gobject-introspection 3.4.4 → 3.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gobject-introspection/rb-gi-argument.c +10 -3
- data/ext/gobject-introspection/rb-gi-arguments-in.c +26 -97
- data/ext/gobject-introspection/rb-gi-arguments.c +214 -7
- data/ext/gobject-introspection/rb-gi-base-info.c +11 -1
- data/ext/gobject-introspection/rb-gi-callable-info.c +10 -2
- data/ext/gobject-introspection/rb-gi-callback.c +156 -2
- data/ext/gobject-introspection/rb-gi-conversions.h +6 -6
- data/ext/gobject-introspection/rb-gi-loader.c +53 -1
- data/ext/gobject-introspection/rb-gi-object-info.c +11 -1
- data/ext/gobject-introspection/rb-gi-private-arguments-in.h +3 -1
- data/ext/gobject-introspection/rb-gi-private-arguments.h +5 -1
- data/ext/gobject-introspection/rb-gi-private-callback.h +6 -3
- data/ext/gobject-introspection/rb-gi-private.h +1 -0
- data/ext/gobject-introspection/rb-gi-struct-info.c +13 -1
- data/ext/gobject-introspection/rb-gi-vfunc-info.c +2 -2
- data/ext/gobject-introspection/rb-gobject-introspection.c +231 -0
- data/lib/gobject-introspection/loader.rb +65 -1
- data/test/run-test.rb +4 -0
- data/test/test-base-info.rb +5 -1
- data/test/test-callable-info.rb +7 -1
- data/test/test-loader.rb +53 -7
- data/test/test-object-info.rb +5 -1
- data/test/test-struct-info.rb +6 -1
- metadata +4 -4
data/test/test-loader.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012 Ruby-
|
1
|
+
# Copyright (C) 2012-2021 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -17,14 +17,60 @@
|
|
17
17
|
class TestLoaderInfo < Test::Unit::TestCase
|
18
18
|
def setup
|
19
19
|
@repository = GObjectIntrospection::Repository.default
|
20
|
-
@repository.require("Gio")
|
21
|
-
@info = @repository.find("Gio", "Application")
|
22
|
-
@sandbox = Module.new
|
23
20
|
end
|
24
21
|
|
25
22
|
def test_define_class
|
26
|
-
|
27
|
-
|
28
|
-
assert_equal(gtype,
|
23
|
+
info = @repository.find("Gio", "Application")
|
24
|
+
gtype = info.gtype
|
25
|
+
assert_equal(gtype, Gio::Application.gtype)
|
26
|
+
end
|
27
|
+
|
28
|
+
sub_test_case("virtual function") do
|
29
|
+
def test_without_prefix
|
30
|
+
active_vfs_class = Class.new(Gio::Vfs) do
|
31
|
+
type_register("ActiveVfsWithoutPrefix")
|
32
|
+
|
33
|
+
def virtual_do_is_active
|
34
|
+
true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
active_vfs = active_vfs_class.new
|
38
|
+
assert do
|
39
|
+
active_vfs.active?
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_with_prefix
|
44
|
+
active_vfs_class = Class.new(Gio::Vfs) do
|
45
|
+
type_register("ActiveVfsWithPrefix")
|
46
|
+
|
47
|
+
def virtual_do_gvfs_is_active
|
48
|
+
true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
active_vfs = active_vfs_class.new
|
52
|
+
assert do
|
53
|
+
active_vfs.active?
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_interface
|
58
|
+
resettable_converter_class = Class.new(GLib::Object) do
|
59
|
+
type_register("ResettableConverter")
|
60
|
+
|
61
|
+
include Gio::Converter
|
62
|
+
|
63
|
+
attr_reader :resetted
|
64
|
+
|
65
|
+
def virtual_do_reset
|
66
|
+
@resetted = true
|
67
|
+
end
|
68
|
+
end
|
69
|
+
resettable_converter = resettable_converter_class.new
|
70
|
+
resettable_converter.reset
|
71
|
+
assert do
|
72
|
+
resettable_converter.resetted
|
73
|
+
end
|
74
|
+
end
|
29
75
|
end
|
30
76
|
end
|
data/test/test-object-info.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012 Ruby-
|
1
|
+
# Copyright (C) 2012-2021 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -113,6 +113,10 @@ class TestObjectInfo < Test::Unit::TestCase
|
|
113
113
|
assert_equal(0, @info.n_constants)
|
114
114
|
end
|
115
115
|
|
116
|
+
def test_class_struct
|
117
|
+
assert_equal("FileOutputStreamClass", @info.class_struct.name)
|
118
|
+
end
|
119
|
+
|
116
120
|
def test_unref_function
|
117
121
|
assert_nil(@info.unref_function)
|
118
122
|
end
|
data/test/test-struct-info.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2021 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -30,6 +30,11 @@ class TestStructInfo < Test::Unit::TestCase
|
|
30
30
|
@info.get_field(0))
|
31
31
|
end
|
32
32
|
|
33
|
+
def test_find_field
|
34
|
+
assert_equal("g_type",
|
35
|
+
@info.find_field("g_type").name)
|
36
|
+
end
|
37
|
+
|
33
38
|
def test_n_methods
|
34
39
|
assert_operator(@info.n_methods, :>=, 62)
|
35
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gobject-introspection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glib2
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.4.
|
19
|
+
version: 3.4.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.4.
|
26
|
+
version: 3.4.5
|
27
27
|
description: Ruby/GObjectIntrospection provides bindings of GObject Introspection
|
28
28
|
and a loader module that can generate dynamically Ruby bindings of any GObject C
|
29
29
|
libraries
|