gdk4 3.5.1 → 4.0.2
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.
- checksums.yaml +4 -4
- data/dependency-check/Rakefile +1 -0
- data/lib/gdk4/cairo.rb +15 -11
- data/{test/test-gdk-event-type.rb → lib/gdk4/cursor.rb} +15 -8
- data/lib/gdk4/deprecated.rb +156 -0
- data/lib/gdk4/loader.rb +179 -21
- data/{test/test-gdk-geometry.rb → lib/gdk4/paintable.rb} +13 -7
- data/lib/gdk4/rgba.rb +12 -1
- data/{test/test-gdk-event-mask.rb → lib/gdk4/texture.rb} +13 -4
- data/lib/gdk4/x11-loader.rb +17 -3
- data/lib/gdk4.rb +3 -11
- data/test/gdk-test-utils.rb +10 -2
- data/test/run-test.rb +2 -4
- data/test/test-gdk-cursor.rb +14 -17
- data/test/test-gdk-event.rb +1 -672
- data/test/test-gdk-pixbuf.rb +1 -18
- data/test/test-gdk-rgba.rb +33 -13
- metadata +15 -16
- data/test/test-gdk-selection.rb +0 -29
- data/test/test-gdk-window-attr.rb +0 -32
data/test/run-test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# Copyright (C) 2013-
|
3
|
+
# Copyright (C) 2013-2022 Ruby-GNOME Project Team
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -26,6 +26,7 @@ run_test(__dir__,
|
|
26
26
|
"cairo-gobject",
|
27
27
|
"gdk_pixbuf2",
|
28
28
|
"gio2",
|
29
|
+
"pango",
|
29
30
|
"gdk4",
|
30
31
|
]) do
|
31
32
|
begin
|
@@ -35,8 +36,5 @@ run_test(__dir__,
|
|
35
36
|
exit(true)
|
36
37
|
end
|
37
38
|
|
38
|
-
Gdk.init
|
39
|
-
Gdk.init_check([$0])
|
40
|
-
|
41
39
|
require_relative "gdk-test-utils"
|
42
40
|
end
|
data/test/test-gdk-cursor.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015 Ruby-
|
1
|
+
# Copyright (C) 2015-2012 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
|
@@ -18,27 +18,24 @@ class TestGdkCursor < Test::Unit::TestCase
|
|
18
18
|
include GdkTestUtils
|
19
19
|
|
20
20
|
sub_test_case ".new" do
|
21
|
-
test "
|
22
|
-
cursor = Gdk::Cursor.new(:arrow)
|
23
|
-
assert_equal(Gdk::CursorType::ARROW, cursor.cursor_type)
|
24
|
-
end
|
25
|
-
|
26
|
-
test "pixbuf" do
|
21
|
+
test "texture" do
|
27
22
|
pixbuf = GdkPixbuf::Pixbuf.new(:file => fixture_path("ruby-gnome2-logo.png"))
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
test "surface" do
|
33
|
-
only_gdk_version(3, 10, 0)
|
34
|
-
surface = Cairo::ImageSurface.new(100, 100)
|
35
|
-
cursor = Gdk::Cursor.new(surface, 0, 0)
|
36
|
-
assert_equal(Gdk::CursorType::CURSOR_IS_PIXMAP, cursor.cursor_type)
|
23
|
+
texture = Gdk::Texture.new(pixbuf)
|
24
|
+
cursor = Gdk::Cursor.new(texture, 0, 0)
|
25
|
+
assert_equal(texture, cursor.texture)
|
37
26
|
end
|
38
27
|
|
39
28
|
test "name" do
|
40
29
|
cursor = Gdk::Cursor.new("cross")
|
41
|
-
assert_equal(
|
30
|
+
assert_equal("cross", cursor.name)
|
31
|
+
end
|
32
|
+
|
33
|
+
test "name - multiple" do
|
34
|
+
3.times do |i|
|
35
|
+
cursor = Gdk::Cursor.new("cross")
|
36
|
+
assert_equal([i, "cross"],
|
37
|
+
[i, cursor.name])
|
38
|
+
end
|
42
39
|
end
|
43
40
|
end
|
44
41
|
end
|