gdk4 3.5.1 → 4.0.0

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.
@@ -1,6 +1,4 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2013-2022 Ruby-GNOME Project Team
4
2
  #
5
3
  # This library is free software; you can redistribute it and/or
6
4
  # modify it under the terms of the GNU Lesser General Public
@@ -17,6 +15,18 @@
17
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
16
 
19
17
  class TestGdkRGBA < Test::Unit::TestCase
18
+ sub_test_case ".try_convert" do
19
+ test("String") do
20
+ assert_equal(Gdk::RGBA.parse("gray"),
21
+ Gdk::RGBA.try_convert("gray"))
22
+ end
23
+
24
+ test("Symbol") do
25
+ assert_equal(Gdk::RGBA.parse("gray"),
26
+ Gdk::RGBA.try_convert(:gray))
27
+ end
28
+ end
29
+
20
30
  def test_to_s
21
31
  rgba = Gdk::RGBA.new(0.2, 0.4, 0.6, 0.5)
22
32
  assert_equal("rgba(51,102,153,0.5)", rgba.to_s)
@@ -24,55 +34,65 @@ class TestGdkRGBA < Test::Unit::TestCase
24
34
 
25
35
  def test_to_a
26
36
  rgba = Gdk::RGBA.new(0.2, 0.4, 0.6, 0.5)
27
- assert_equal([0.2, 0.4, 0.6, 0.5], rgba.to_a)
37
+ assert_equal([0.2, 0.4, 0.6, 0.5],
38
+ rgba.to_a.collect {|value| value.round(2)})
28
39
  end
29
40
 
30
41
  sub_test_case("new") do
31
42
  def test_empty
32
43
  rgba = Gdk::RGBA.new
33
- assert_equal([0.0, 0.0, 0.0, 1.0], rgba.to_a)
44
+ assert_equal([0.0, 0.0, 0.0, 1.0],
45
+ rgba.to_a.collect {|value| value.round(2)})
34
46
  end
35
47
 
36
48
  def test_rgb
37
49
  rgba = Gdk::RGBA.new(0.2, 0.4, 0.6)
38
- assert_equal([0.2, 0.4, 0.6, 1.0], rgba.to_a)
50
+ assert_equal([0.2, 0.4, 0.6, 1.0],
51
+ rgba.to_a.collect {|value| value.round(2)})
39
52
  end
40
53
  end
41
54
 
42
55
  sub_test_case("parse") do
43
56
  def test_name
44
57
  rgba = Gdk::RGBA.parse("red")
45
- assert_equal([1.0, 0.0, 0.0, 1.0], rgba.to_a)
58
+ assert_equal([1.0, 0.0, 0.0, 1.0],
59
+ rgba.to_a.collect {|value| value.round(2)})
46
60
  end
47
61
 
48
62
  def test_hash_rgb
49
63
  rgba = Gdk::RGBA.parse("#f0f")
50
- assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
64
+ assert_equal([1.0, 0.0, 1.0, 1.0],
65
+ rgba.to_a.collect {|value| value.round(2)})
51
66
  end
52
67
 
53
68
  def test_hash_rrggbb
54
69
  rgba = Gdk::RGBA.parse("#ff00ff")
55
- assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
70
+ assert_equal([1.0, 0.0, 1.0, 1.0],
71
+ rgba.to_a.collect {|value| value.round(2)})
56
72
  end
57
73
 
58
74
  def test_hash_rrrgggbbb
59
75
  rgba = Gdk::RGBA.parse("#fff000fff")
60
- assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
76
+ assert_equal([1.0, 0.0, 1.0, 1.0],
77
+ rgba.to_a.collect {|value| value.round(2)})
61
78
  end
62
79
 
63
80
  def test_hash_rrrrggggbbbb
64
81
  rgba = Gdk::RGBA.parse("#ffff0000ffff")
65
- assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
82
+ assert_equal([1.0, 0.0, 1.0, 1.0],
83
+ rgba.to_a.collect {|value| value.round(2)})
66
84
  end
67
85
 
68
86
  def test_rgb
69
87
  rgba = Gdk::RGBA.parse("rgb(255, 0, 255)")
70
- assert_equal([1.0, 0.0, 1.0, 1.0], rgba.to_a)
88
+ assert_equal([1.0, 0.0, 1.0, 1.0],
89
+ rgba.to_a.collect {|value| value.round(2)})
71
90
  end
72
91
 
73
92
  def test_rgba
74
93
  rgba = Gdk::RGBA.parse("rgba(255, 0, 255, 0.5)")
75
- assert_equal([1.0, 0.0, 1.0, 0.5], rgba.to_a)
94
+ assert_equal([1.0, 0.0, 1.0, 0.5],
95
+ rgba.to_a.collect {|value| value.round(2)})
76
96
  end
77
97
 
78
98
  def test_invalid
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdk4
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pango
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.5.1
19
+ version: 4.0.0
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.5.1
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gdk_pixbuf2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.5.1
33
+ version: 4.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.5.1
40
+ version: 4.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cairo-gobject
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.5.1
47
+ version: 4.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 3.5.1
54
+ version: 4.0.0
55
55
  description: Ruby/GDK4 is a Ruby binding of GDK-4.x.
56
56
  email: ruby-gnome2-devel-en@lists.sourceforge.net
57
57
  executables: []
@@ -66,9 +66,13 @@ files:
66
66
  - gdk4.gemspec
67
67
  - lib/gdk4.rb
68
68
  - lib/gdk4/cairo.rb
69
+ - lib/gdk4/cursor.rb
70
+ - lib/gdk4/deprecated.rb
69
71
  - lib/gdk4/loader.rb
72
+ - lib/gdk4/paintable.rb
70
73
  - lib/gdk4/rectangle.rb
71
74
  - lib/gdk4/rgba.rb
75
+ - lib/gdk4/texture.rb
72
76
  - lib/gdk4/version.rb
73
77
  - lib/gdk4/x11-loader.rb
74
78
  - test/fixture/ruby-gnome2-logo.png
@@ -76,22 +80,17 @@ files:
76
80
  - test/run-test.rb
77
81
  - test/test-gdk-cairo.rb
78
82
  - test/test-gdk-cursor.rb
79
- - test/test-gdk-event-mask.rb
80
- - test/test-gdk-event-type.rb
81
83
  - test/test-gdk-event.rb
82
- - test/test-gdk-geometry.rb
83
84
  - test/test-gdk-keyval.rb
84
85
  - test/test-gdk-pixbuf.rb
85
86
  - test/test-gdk-rectangle.rb
86
87
  - test/test-gdk-rgba.rb
87
- - test/test-gdk-selection.rb
88
- - test/test-gdk-window-attr.rb
89
88
  homepage: https://ruby-gnome2.osdn.jp/
90
89
  licenses:
91
90
  - LGPL-2.1+
92
91
  metadata:
93
92
  msys2_mingw_dependencies: gtk4
94
- post_install_message:
93
+ post_install_message:
95
94
  rdoc_options: []
96
95
  require_paths:
97
96
  - lib
@@ -107,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
106
  version: '0'
108
107
  requirements: []
109
108
  rubygems_version: 3.4.0.dev
110
- signing_key:
109
+ signing_key:
111
110
  specification_version: 4
112
111
  summary: Ruby/GDK4 is a Ruby binding of GDK-4.x.
113
112
  test_files: []
@@ -1,29 +0,0 @@
1
- # Copyright (C) 2014 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 TestGdkSelection < Test::Unit::TestCase
18
- class TestConstant < self
19
- def test_primary
20
- atom = Gdk::Selection::PRIMARY
21
- assert_equal("PRIMARY", atom.name)
22
- end
23
-
24
- def test_clipboard
25
- atom = Gdk::Selection::CLIPBOARD
26
- assert_equal("CLIPBOARD", atom.name)
27
- end
28
- end
29
- end
@@ -1,32 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
4
- #
5
- # This library is free software; you can redistribute it and/or
6
- # modify it under the terms of the GNU Lesser General Public
7
- # License as published by the Free Software Foundation; either
8
- # version 2.1 of the License, or (at your option) any later version.
9
- #
10
- # This library is distributed in the hope that it will be useful,
11
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- # Lesser General Public License for more details.
14
- #
15
- # You should have received a copy of the GNU Lesser General Public
16
- # License along with this library; if not, write to the Free Software
17
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
-
19
- class TestGdkWindowAttr < Test::Unit::TestCase
20
- include GdkTestUtils
21
-
22
- def test_initialize
23
- attrs = Gdk::WindowAttr.new(100, 100, :input_only, :temp)
24
- assert_equal([
25
- 100,
26
- 100,
27
- Gdk::WindowWindowClass::INPUT_ONLY,
28
- Gdk::WindowType::TEMP,
29
- ],
30
- [attrs.width, attrs.height, attrs.wclass, attrs.window_type])
31
- end
32
- end