gobject-introspection 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. data/Rakefile +50 -0
  2. data/ext/gobject-introspection/extconf.rb +97 -0
  3. data/ext/gobject-introspection/rb-gi-arg-info.c +151 -0
  4. data/ext/gobject-introspection/rb-gi-argument.c +223 -0
  5. data/ext/gobject-introspection/rb-gi-base-info.c +218 -0
  6. data/ext/gobject-introspection/rb-gi-boxed-info.c +48 -0
  7. data/ext/gobject-introspection/rb-gi-callable-info.c +124 -0
  8. data/ext/gobject-introspection/rb-gi-callback-info.c +48 -0
  9. data/ext/gobject-introspection/rb-gi-constant-info.c +77 -0
  10. data/ext/gobject-introspection/rb-gi-constructor-info.c +82 -0
  11. data/ext/gobject-introspection/rb-gi-conversions.h +95 -0
  12. data/ext/gobject-introspection/rb-gi-enum-info.c +145 -0
  13. data/ext/gobject-introspection/rb-gi-field-info.c +149 -0
  14. data/ext/gobject-introspection/rb-gi-flags-info.c +48 -0
  15. data/ext/gobject-introspection/rb-gi-function-info.c +199 -0
  16. data/ext/gobject-introspection/rb-gi-interface-info.c +222 -0
  17. data/ext/gobject-introspection/rb-gi-loader.c +61 -0
  18. data/ext/gobject-introspection/rb-gi-method-info.c +66 -0
  19. data/ext/gobject-introspection/rb-gi-object-info.c +345 -0
  20. data/ext/gobject-introspection/rb-gi-property-info.c +77 -0
  21. data/ext/gobject-introspection/rb-gi-registered-type-info.c +86 -0
  22. data/ext/gobject-introspection/rb-gi-repository.c +164 -0
  23. data/ext/gobject-introspection/rb-gi-signal-info.c +77 -0
  24. data/ext/gobject-introspection/rb-gi-struct-info.c +183 -0
  25. data/ext/gobject-introspection/rb-gi-type-info.c +143 -0
  26. data/ext/gobject-introspection/rb-gi-type-tag.c +43 -0
  27. data/ext/gobject-introspection/rb-gi-types.h +71 -0
  28. data/ext/gobject-introspection/rb-gi-union-info.c +206 -0
  29. data/ext/gobject-introspection/rb-gi-unresolved-info.c +48 -0
  30. data/ext/gobject-introspection/rb-gi-value-info.c +57 -0
  31. data/ext/gobject-introspection/rb-gi-vfunc-info.c +91 -0
  32. data/ext/gobject-introspection/rb-gobject-introspection.c +42 -0
  33. data/ext/gobject-introspection/rb-gobject-introspection.h +105 -0
  34. data/extconf.rb +71 -0
  35. data/lib/gobject-introspection.rb +39 -0
  36. data/lib/gobject-introspection/collection-reader.rb +34 -0
  37. data/lib/gobject-introspection/loader.rb +148 -0
  38. data/lib/gobject-introspection/object-info.rb +33 -0
  39. data/lib/gobject-introspection/repository.rb +32 -0
  40. data/lib/gobject-introspection/struct-info.rb +28 -0
  41. data/sample/clutter-basic-actor.rb +132 -0
  42. data/sample/clutter.rb +29 -0
  43. data/test/gobject-introspection-test-utils.rb +26 -0
  44. data/test/run-test.rb +45 -0
  45. data/test/test-arg-info.rb +68 -0
  46. data/test/test-base-info.rb +31 -0
  47. data/test/test-boxed-info.rb +21 -0
  48. data/test/test-callable-info.rb +49 -0
  49. data/test/test-callback-info.rb +29 -0
  50. data/test/test-constant-info.rb +24 -0
  51. data/test/test-enum-info.rb +56 -0
  52. data/test/test-field-type.rb +42 -0
  53. data/test/test-flags-info.rb +27 -0
  54. data/test/test-function-info.rb +37 -0
  55. data/test/test-interface-info.rb +97 -0
  56. data/test/test-loader.rb +30 -0
  57. data/test/test-object-info.rb +131 -0
  58. data/test/test-property-info.rb +38 -0
  59. data/test/test-registered-type-info.rb +35 -0
  60. data/test/test-repository.rb +59 -0
  61. data/test/test-signal-info.rb +37 -0
  62. data/test/test-struct-info.rb +57 -0
  63. data/test/test-type-info.rb +62 -0
  64. data/test/test-type-tag.rb +29 -0
  65. data/test/test-union-info.rb +21 -0
  66. data/test/test-value-info.rb +28 -0
  67. data/test/test-vfunc-info.rb +42 -0
  68. metadata +162 -0
@@ -0,0 +1,62 @@
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 TestTypeInfo < Test::Unit::TestCase
18
+ def setup
19
+ @repository = GObjectIntrospection::Repository.default
20
+ @repository.require("GObject")
21
+ @function_info = @repository.find("GObject", "signal_list_ids")
22
+ @info = @function_info.return_type
23
+ end
24
+
25
+ def test_pointer?
26
+ assert_true(@info.pointer?)
27
+ end
28
+
29
+ def test_tag
30
+ assert_kind_of(GObjectIntrospection::TypeTag,
31
+ @info.tag)
32
+ end
33
+
34
+ def test_param_type
35
+ assert_kind_of(GObjectIntrospection::TypeInfo,
36
+ @info.get_param_type(0))
37
+ end
38
+
39
+ def test_interface
40
+ function_info = @repository.find("GObject", "type_class_ref")
41
+ info = function_info.return_type
42
+ assert_kind_of(GObjectIntrospection::StructInfo,
43
+ info.interface)
44
+ end
45
+
46
+ def test_array_length
47
+ assert_equal(1, @info.array_length)
48
+ end
49
+
50
+ def test_array_fixed_size
51
+ assert_equal(-1, @info.array_fixed_size)
52
+ end
53
+
54
+ def test_zero_terminated?
55
+ assert_false(@info.zero_terminated?)
56
+ end
57
+
58
+ def test_array_type
59
+ assert_equal(GObjectIntrospection::ArrayType::C,
60
+ @info.array_type)
61
+ end
62
+ end
@@ -0,0 +1,29 @@
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 TestTypeTag < Test::Unit::TestCase
18
+ def setup
19
+ @repository = GObjectIntrospection::Repository.default
20
+ @repository.require("GObject")
21
+ @function_info = @repository.find("GObject", "signal_list_ids")
22
+ @type_info = @function_info.return_type
23
+ @tag = @type_info.tag
24
+ end
25
+
26
+ def test_to_s
27
+ assert_equal("array", @tag.to_s)
28
+ end
29
+ end
@@ -0,0 +1,21 @@
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 TestUnionInfo < Test::Unit::TestCase
18
+ def setup
19
+ # TODO: find UnionInfo
20
+ end
21
+ end
@@ -0,0 +1,28 @@
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 TestValueInfo < Test::Unit::TestCase
18
+ def setup
19
+ @repository = GObjectIntrospection::Repository.default
20
+ @repository.require("GObject")
21
+ @flags_info = @repository.find("GObject", "SignalFlags")
22
+ @info = @flags_info.get_value(0)
23
+ end
24
+
25
+ def test_value
26
+ assert_equal(1, @info.value)
27
+ end
28
+ end
@@ -0,0 +1,42 @@
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 TestVFuncInfo < Test::Unit::TestCase
18
+ def setup
19
+ @repository = GObjectIntrospection::Repository.default
20
+ @repository.require("Gio")
21
+ @object_info = @repository.find("Gio", "FileOutputStream")
22
+ @info = @object_info.get_vfunc(0)
23
+ end
24
+
25
+ def test_flags
26
+ assert_equal(GObjectIntrospection::VFuncInfoFlags.new,
27
+ @info.flags)
28
+ end
29
+
30
+ def test_offset
31
+ assert_equal(GObjectIntrospection::VFuncInfo::UNKNOWN_OFFSET,
32
+ @info.offset)
33
+ end
34
+
35
+ def test_signal
36
+ assert_nil(@info.signal)
37
+ end
38
+
39
+ def test_invoker
40
+ assert_nil(@info.invoker)
41
+ end
42
+ end
metadata ADDED
@@ -0,0 +1,162 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gobject-introspection
3
+ version: !ruby/object:Gem::Version
4
+ hash: 1
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 9
10
+ version: 1.1.9
11
+ platform: ruby
12
+ authors:
13
+ - The Ruby-GNOME2 Project Team
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-12-30 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: glib2
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 1
29
+ segments:
30
+ - 1
31
+ - 1
32
+ - 9
33
+ version: 1.1.9
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: test-unit
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 7
45
+ segments:
46
+ - 2
47
+ version: "2"
48
+ type: :development
49
+ version_requirements: *id002
50
+ description: Ruby/GObjectIntrospection is a Ruby binding of GObjectIntrospection.
51
+ email: ruby-gnome2-devel-en@lists.sourceforge.net
52
+ executables: []
53
+
54
+ extensions:
55
+ - ext/gobject-introspection/extconf.rb
56
+ extra_rdoc_files: []
57
+
58
+ files:
59
+ - Rakefile
60
+ - extconf.rb
61
+ - lib/gobject-introspection.rb
62
+ - lib/gobject-introspection/object-info.rb
63
+ - lib/gobject-introspection/loader.rb
64
+ - lib/gobject-introspection/repository.rb
65
+ - lib/gobject-introspection/collection-reader.rb
66
+ - lib/gobject-introspection/struct-info.rb
67
+ - ext/gobject-introspection/rb-gi-union-info.c
68
+ - ext/gobject-introspection/rb-gi-argument.c
69
+ - ext/gobject-introspection/rb-gi-callback-info.c
70
+ - ext/gobject-introspection/rb-gi-method-info.c
71
+ - ext/gobject-introspection/rb-gi-registered-type-info.c
72
+ - ext/gobject-introspection/rb-gi-conversions.h
73
+ - ext/gobject-introspection/rb-gi-repository.c
74
+ - ext/gobject-introspection/rb-gi-struct-info.c
75
+ - ext/gobject-introspection/rb-gobject-introspection.h
76
+ - ext/gobject-introspection/rb-gi-signal-info.c
77
+ - ext/gobject-introspection/rb-gi-flags-info.c
78
+ - ext/gobject-introspection/rb-gi-property-info.c
79
+ - ext/gobject-introspection/rb-gi-types.h
80
+ - ext/gobject-introspection/rb-gi-unresolved-info.c
81
+ - ext/gobject-introspection/rb-gi-boxed-info.c
82
+ - ext/gobject-introspection/rb-gi-value-info.c
83
+ - ext/gobject-introspection/extconf.rb
84
+ - ext/gobject-introspection/rb-gobject-introspection.c
85
+ - ext/gobject-introspection/rb-gi-function-info.c
86
+ - ext/gobject-introspection/rb-gi-field-info.c
87
+ - ext/gobject-introspection/rb-gi-object-info.c
88
+ - ext/gobject-introspection/rb-gi-constant-info.c
89
+ - ext/gobject-introspection/rb-gi-arg-info.c
90
+ - ext/gobject-introspection/rb-gi-type-info.c
91
+ - ext/gobject-introspection/rb-gi-constructor-info.c
92
+ - ext/gobject-introspection/rb-gi-base-info.c
93
+ - ext/gobject-introspection/rb-gi-loader.c
94
+ - ext/gobject-introspection/rb-gi-callable-info.c
95
+ - ext/gobject-introspection/rb-gi-interface-info.c
96
+ - ext/gobject-introspection/rb-gi-enum-info.c
97
+ - ext/gobject-introspection/rb-gi-vfunc-info.c
98
+ - ext/gobject-introspection/rb-gi-type-tag.c
99
+ - sample/clutter.rb
100
+ - sample/clutter-basic-actor.rb
101
+ - test/test-type-info.rb
102
+ - test/test-union-info.rb
103
+ - test/test-interface-info.rb
104
+ - test/test-enum-info.rb
105
+ - test/test-arg-info.rb
106
+ - test/test-repository.rb
107
+ - test/test-type-tag.rb
108
+ - test/test-loader.rb
109
+ - test/test-struct-info.rb
110
+ - test/test-flags-info.rb
111
+ - test/test-registered-type-info.rb
112
+ - test/test-property-info.rb
113
+ - test/test-constant-info.rb
114
+ - test/run-test.rb
115
+ - test/test-function-info.rb
116
+ - test/test-callable-info.rb
117
+ - test/test-base-info.rb
118
+ - test/test-callback-info.rb
119
+ - test/gobject-introspection-test-utils.rb
120
+ - test/test-field-type.rb
121
+ - test/test-vfunc-info.rb
122
+ - test/test-signal-info.rb
123
+ - test/test-object-info.rb
124
+ - test/test-boxed-info.rb
125
+ - test/test-value-info.rb
126
+ homepage: http://ruby-gnome2.sourceforge.jp/
127
+ licenses: []
128
+
129
+ post_install_message:
130
+ rdoc_options: []
131
+
132
+ require_paths:
133
+ - lib
134
+ required_ruby_version: !ruby/object:Gem::Requirement
135
+ none: false
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ hash: 61
140
+ segments:
141
+ - 1
142
+ - 8
143
+ - 5
144
+ version: 1.8.5
145
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ hash: 3
151
+ segments:
152
+ - 0
153
+ version: "0"
154
+ requirements: []
155
+
156
+ rubyforge_project:
157
+ rubygems_version: 1.8.24
158
+ signing_key:
159
+ specification_version: 3
160
+ summary: Ruby/GObjectIntrospection is a Ruby binding of GObjectIntrospection.
161
+ test_files: []
162
+