gobject-introspection 2.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +118 -0
- data/ext/gobject-introspection/depend +10 -0
- data/ext/gobject-introspection/extconf.rb +97 -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 +1015 -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 +120 -0
- data/ext/gobject-introspection/rb-gi-conversions.h +116 -0
- data/ext/gobject-introspection/rb-gi-enum-info.c +145 -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 +658 -0
- data/ext/gobject-introspection/rb-gi-interface-info.c +222 -0
- data/ext/gobject-introspection/rb-gi-loader.c +162 -0
- data/ext/gobject-introspection/rb-gi-method-info.c +109 -0
- data/ext/gobject-introspection/rb-gi-object-info.c +345 -0
- data/ext/gobject-introspection/rb-gi-private.h +110 -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 +164 -0
- data/ext/gobject-introspection/rb-gi-signal-info.c +77 -0
- data/ext/gobject-introspection/rb-gi-struct-info.c +190 -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 +57 -0
- data/extconf.rb +71 -0
- data/lib/1.9/gobject_introspection.so +0 -0
- data/lib/2.0/gobject_introspection.so +0 -0
- data/lib/gobject-introspection.rb +52 -0
- data/lib/gobject-introspection/callable-info.rb +91 -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 +328 -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 +56 -0
- data/test/test-field-type.rb +42 -0
- data/test/test-flags-info.rb +27 -0
- data/test/test-function-info.rb +37 -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 +59 -0
- data/test/test-signal-info.rb +37 -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 +52 -0
- data/vendor/local/include/gobject-introspection-1.0/gibaseinfo.h +89 -0
- data/vendor/local/include/gobject-introspection-1.0/gicallableinfo.h +74 -0
- data/vendor/local/include/gobject-introspection-1.0/giconstantinfo.h +46 -0
- data/vendor/local/include/gobject-introspection-1.0/gienuminfo.h +56 -0
- data/vendor/local/include/gobject-introspection-1.0/gifieldinfo.h +52 -0
- data/vendor/local/include/gobject-introspection-1.0/gifunctioninfo.h +77 -0
- data/vendor/local/include/gobject-introspection-1.0/giinterfaceinfo.h +68 -0
- data/vendor/local/include/gobject-introspection-1.0/giobjectinfo.h +137 -0
- data/vendor/local/include/gobject-introspection-1.0/gipropertyinfo.h +44 -0
- data/vendor/local/include/gobject-introspection-1.0/giregisteredtypeinfo.h +53 -0
- data/vendor/local/include/gobject-introspection-1.0/girepository.h +179 -0
- data/vendor/local/include/gobject-introspection-1.0/girffi.h +80 -0
- data/vendor/local/include/gobject-introspection-1.0/gisignalinfo.h +45 -0
- data/vendor/local/include/gobject-introspection-1.0/gistructinfo.h +53 -0
- data/vendor/local/include/gobject-introspection-1.0/gitypeinfo.h +56 -0
- data/vendor/local/include/gobject-introspection-1.0/gitypelib.h +55 -0
- data/vendor/local/include/gobject-introspection-1.0/gitypes.h +453 -0
- data/vendor/local/include/gobject-introspection-1.0/giunioninfo.h +57 -0
- data/vendor/local/include/gobject-introspection-1.0/givfuncinfo.h +56 -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/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 +74 -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 +1204 -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 +1100 -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 +196 -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/codegen.py +140 -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/docmain.py +60 -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/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/function.tmpl +61 -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/class.tmpl +18 -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 +13 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/function.tmpl +48 -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 +10 -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 +37 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/vfunc.tmpl +27 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/class.tmpl +17 -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/function.tmpl +53 -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 +10 -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 +42 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/vfunc.tmpl +33 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/base.tmpl +29 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/class.tmpl +40 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/namespace.tmpl +19 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.py +635 -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 +363 -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 +551 -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 +581 -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 +584 -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 +236 -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 +1337 -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 +185 -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/odict.py +50 -0
- data/vendor/local/lib/gobject-introspection/giscanner/odict.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/odict.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.py +497 -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 +78 -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 +132 -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 +324 -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 +119 -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 +999 -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 +141 -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 +197 -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/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 +3833 -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 +44304 -0
- data/vendor/local/share/gir-1.0/GModule-2.0.gir +184 -0
- data/vendor/local/share/gir-1.0/GObject-2.0.gir +13947 -0
- data/vendor/local/share/gir-1.0/Gio-2.0.gir +73619 -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/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 +564 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/annotation.c +835 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/annotation.h +198 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/drawable.c +55 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/drawable.h +33 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/everything.c +1473 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/everything.h +428 -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 +437 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.c +5256 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.h +1158 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/regress.c +4009 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/regress.h +944 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/utility.c +45 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/utility.h +95 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.c +33 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.h +36 -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 +51 -0
- data/vendor/local/share/man/man1/g-ir-generate.1 +29 -0
- metadata +343 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestFlagsInfo < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@repository = GObjectIntrospection::Repository.default
|
20
|
+
@repository.require("GObject")
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_class
|
24
|
+
assert_kind_of(GObjectIntrospection::FlagsInfo,
|
25
|
+
@repository.find("GObject", "SignalFlags"))
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestFunctionInfo < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@repository = GObjectIntrospection::Repository.default
|
20
|
+
@repository.require("GObject")
|
21
|
+
@info = @repository.find("GObject", "signal_name")
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_symbol
|
25
|
+
assert_equal("g_signal_name", @info.symbol)
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_flags
|
29
|
+
assert_equal(GObjectIntrospection::FunctionInfoFlags.new(0),
|
30
|
+
@info.flags)
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_invoke
|
34
|
+
assert_equal("notify", @info.invoke(1))
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestInterfaceInfo < Test::Unit::TestCase
|
18
|
+
include GObjectIntrospectionTestUtils
|
19
|
+
|
20
|
+
def setup
|
21
|
+
@repository = GObjectIntrospection::Repository.default
|
22
|
+
@repository.require("Gio")
|
23
|
+
@info = @repository.find("Gio", "TlsServerConnection")
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_n_prerequisites
|
27
|
+
assert_equal(1, @info.n_prerequisites)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_prerequisite
|
31
|
+
assert_kind_of(GObjectIntrospection::ObjectInfo,
|
32
|
+
@info.get_prerequisite(0))
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_n_properties
|
36
|
+
assert_equal(1, @info.n_properties)
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_propertiy
|
40
|
+
assert_kind_of(GObjectIntrospection::PropertyInfo,
|
41
|
+
@info.get_property(0))
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_n_methods
|
45
|
+
assert_equal(1, @info.n_methods)
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_get_method_n
|
49
|
+
assert_kind_of(GObjectIntrospection::FunctionInfo,
|
50
|
+
@info.get_method(0))
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_get_method_name
|
54
|
+
assert_kind_of(GObjectIntrospection::FunctionInfo,
|
55
|
+
@info.get_method("new"))
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_n_signals
|
59
|
+
info = @repository.find("Gio", "Volume")
|
60
|
+
assert_equal(2, info.n_signals)
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_get_signal_n
|
64
|
+
info = @repository.find("Gio", "Volume")
|
65
|
+
assert_kind_of(GObjectIntrospection::SignalInfo,
|
66
|
+
info.get_signal(0))
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_get_signal_name
|
70
|
+
require_version(1, 34, 0)
|
71
|
+
info = @repository.find("Gio", "Volume")
|
72
|
+
assert_kind_of(GObjectIntrospection::FunctionInfo,
|
73
|
+
info.get_signal("changed"))
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_n_vfuncs
|
77
|
+
info = @repository.find("Gio", "Volume")
|
78
|
+
assert_operator(0, :<, info.n_vfuncs)
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_get_vfunc_n
|
82
|
+
info = @repository.find("Gio", "Volume")
|
83
|
+
assert_kind_of(GObjectIntrospection::VFuncInfo,
|
84
|
+
info.get_vfunc(0))
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_get_vfunc_name
|
88
|
+
info = @repository.find("Gio", "Volume")
|
89
|
+
assert_kind_of(GObjectIntrospection::VFuncInfo,
|
90
|
+
info.get_vfunc("can_eject"))
|
91
|
+
end
|
92
|
+
|
93
|
+
def test_iface_struct
|
94
|
+
assert_kind_of(GObjectIntrospection::StructInfo,
|
95
|
+
@info.iface_struct)
|
96
|
+
end
|
97
|
+
end
|
data/test/test-loader.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestLoaderInfo < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@repository = GObjectIntrospection::Repository.default
|
20
|
+
@repository.require("Gio")
|
21
|
+
@info = @repository.find("Gio", "Application")
|
22
|
+
@sandbox = Module.new
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_define_class
|
26
|
+
gtype = @info.gtype
|
27
|
+
GObjectIntrospection::Loader.define_class(gtype, "Application", @sandbox)
|
28
|
+
assert_equal(gtype, @sandbox::Application.gtype)
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestObjectInfo < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@repository = GObjectIntrospection::Repository.default
|
20
|
+
@repository.require("Gio")
|
21
|
+
@info = @repository.find("Gio", "FileOutputStream")
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_type_name
|
25
|
+
assert_equal("GFileOutputStream", @info.type_name)
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_type_init
|
29
|
+
assert_equal("g_file_output_stream_get_type", @info.type_init)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_abstract?
|
33
|
+
assert_false(@info.abstract?)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_fundamental?
|
37
|
+
assert_false(@info.fundamental?)
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_parent
|
41
|
+
assert_equal("OutputStream", @info.parent.name)
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_n_interfaces
|
45
|
+
assert_equal(1, @info.n_interfaces)
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_get_interface
|
49
|
+
assert_kind_of(GObjectIntrospection::InterfaceInfo,
|
50
|
+
@info.get_interface(0))
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_n_fields
|
54
|
+
assert_equal(2, @info.n_fields)
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_get_field
|
58
|
+
assert_kind_of(GObjectIntrospection::FieldInfo,
|
59
|
+
@info.get_field(0))
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_n_properties
|
63
|
+
info = @repository.find("Gio", "BufferedOutputStream")
|
64
|
+
assert_equal(2, info.n_properties)
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_get_property
|
68
|
+
info = @repository.find("Gio", "BufferedOutputStream")
|
69
|
+
assert_kind_of(GObjectIntrospection::PropertyInfo,
|
70
|
+
info.get_property(0))
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_n_methods
|
74
|
+
assert_equal(4, @info.n_methods)
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_get_method_n
|
78
|
+
assert_kind_of(GObjectIntrospection::FunctionInfo,
|
79
|
+
@info.get_method(0))
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_get_method_name
|
83
|
+
assert_kind_of(GObjectIntrospection::FunctionInfo,
|
84
|
+
@info.get_method("get_etag"))
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_n_signals
|
88
|
+
info = @repository.find("Gio", "Application")
|
89
|
+
assert_equal(5, info.n_signals)
|
90
|
+
end
|
91
|
+
|
92
|
+
def test_get_signal
|
93
|
+
info = @repository.find("Gio", "Application")
|
94
|
+
assert_kind_of(GObjectIntrospection::SignalInfo,
|
95
|
+
info.get_signal(0))
|
96
|
+
end
|
97
|
+
|
98
|
+
def test_n_vfuncs
|
99
|
+
assert_equal(9, @info.n_vfuncs)
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_get_vfunc_n
|
103
|
+
assert_kind_of(GObjectIntrospection::VFuncInfo,
|
104
|
+
@info.get_vfunc(0))
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_get_vfunc_name
|
108
|
+
assert_kind_of(GObjectIntrospection::VFuncInfo,
|
109
|
+
@info.get_vfunc("can_seek"))
|
110
|
+
end
|
111
|
+
|
112
|
+
def test_n_constants
|
113
|
+
assert_equal(0, @info.n_constants)
|
114
|
+
end
|
115
|
+
|
116
|
+
def test_unref_function
|
117
|
+
assert_nil(@info.unref_function)
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_ref_function
|
121
|
+
assert_nil(@info.ref_function)
|
122
|
+
end
|
123
|
+
|
124
|
+
def test_set_value_function
|
125
|
+
assert_nil(@info.set_value_function)
|
126
|
+
end
|
127
|
+
|
128
|
+
def test_get_value_function
|
129
|
+
assert_nil(@info.get_value_function)
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestPropertyInfo < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@repository = GObjectIntrospection::Repository.default
|
20
|
+
@repository.require("Gio")
|
21
|
+
@object_info = @repository.find("Gio", "Application")
|
22
|
+
@info = @object_info.get_property(0)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_flags
|
26
|
+
assert_equal(GLib::Param::WRITABLE, @info.flags)
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_type
|
30
|
+
assert_kind_of(GObjectIntrospection::TypeInfo,
|
31
|
+
@info.type)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_ownership_transfer
|
35
|
+
assert_equal(GObjectIntrospection::Transfer::NOTHING,
|
36
|
+
@info.ownership_transfer)
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestRegisteredTypeInfo < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@repository = GObjectIntrospection::Repository.default
|
20
|
+
@repository.require("GObject")
|
21
|
+
@info = @repository.find("GObject", "TypePlugin")
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_type_name
|
25
|
+
assert_equal("GTypePlugin", @info.type_name)
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_type_init
|
29
|
+
assert_equal("g_type_plugin_get_type", @info.type_init)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_gtype
|
33
|
+
assert_equal(GLib::Type.new("GTypePlugin"), @info.gtype)
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestRepository < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@repository = GObjectIntrospection::Repository.default
|
20
|
+
@repository.require("GObject")
|
21
|
+
@repository.require("Gio")
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_get_n_infos
|
25
|
+
assert_kind_of(Integer, @repository.get_n_infos("GObject"))
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_get_info
|
29
|
+
assert_kind_of(GObjectIntrospection::BaseInfo,
|
30
|
+
@repository.get_info("GObject", 0))
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_get_dependencies
|
34
|
+
assert_equal(["GLib-2.0", "GObject-2.0"].sort,
|
35
|
+
@repository.get_dependencies("Gio").sort)
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_loaded_namespaces
|
39
|
+
assert_equal(["GLib", "GObject", "Gio"].sort,
|
40
|
+
@repository.loaded_namespaces.sort)
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_enumerable
|
44
|
+
namespaces = @repository.collect do |info|
|
45
|
+
info.namespace
|
46
|
+
end
|
47
|
+
assert_equal(["GLib", "GObject", "Gio"].sort, namespaces.uniq.sort)
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_find_by_gtype
|
51
|
+
info = @repository.find(GLib::Object.gtype)
|
52
|
+
assert_equal("Object", info.name)
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_find_by_name
|
56
|
+
info = @repository.find("GObject", "Object")
|
57
|
+
assert_equal("Object", info.name)
|
58
|
+
end
|
59
|
+
end
|