gtk4 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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/gtk4.gemspec +1 -5
  3. data/lib/gtk4/{menu-item.rb → application.rb} +11 -10
  4. data/lib/gtk4/box.rb +1 -1
  5. data/lib/gtk4/builder.rb +14 -61
  6. data/lib/gtk4/button.rb +1 -2
  7. data/lib/gtk4/combo-box.rb +1 -6
  8. data/lib/gtk4/deprecated.rb +234 -246
  9. data/lib/gtk4/dialog.rb +10 -21
  10. data/lib/gtk4/{action.rb → entry.rb} +11 -8
  11. data/lib/gtk4/{gdk-drag-context.rb → gdk-display.rb} +12 -10
  12. data/lib/gtk4/icon-theme.rb +9 -12
  13. data/lib/gtk4/image.rb +12 -56
  14. data/lib/gtk4/list-store.rb +8 -0
  15. data/lib/gtk4/loader.rb +153 -27
  16. data/lib/gtk4/message-dialog.rb +1 -1
  17. data/lib/gtk4/paned.rb +17 -11
  18. data/lib/gtk4/{clipboard.rb → response-type.rb} +11 -6
  19. data/lib/gtk4/ruby-builder-scope.rb +47 -0
  20. data/lib/gtk4/scale-button.rb +6 -13
  21. data/lib/gtk4/stack.rb +23 -27
  22. data/lib/gtk4/style-context.rb +20 -4
  23. data/lib/gtk4/text-buffer.rb +14 -10
  24. data/lib/gtk4/{style-properties.rb → tree-model-sort.rb} +7 -9
  25. data/lib/gtk4/tree-model.rb +21 -1
  26. data/lib/gtk4/{target-list.rb → tree-sortable.rb} +8 -11
  27. data/lib/gtk4/tree-view-column.rb +9 -1
  28. data/lib/gtk4/version.rb +2 -2
  29. data/lib/gtk4/widget.rb +44 -71
  30. data/lib/gtk4.rb +4 -35
  31. data/sample/demos/README.md +4 -0
  32. data/sample/examples/README.md +4 -0
  33. data/sample/{action-namespace.rb → examples/action-namespace.rb} +0 -0
  34. data/sample/{builder.rb → examples/builder.rb} +0 -0
  35. data/sample/{builder.ui → examples/builder.ui} +0 -0
  36. data/sample/{drawing.rb → examples/drawing.rb} +0 -0
  37. data/sample/{grid_packing.rb → examples/grid_packing.rb} +0 -0
  38. data/sample/{hello_world.rb → examples/hello_world.rb} +0 -0
  39. data/sample/{utils.rb → examples/utils.rb} +0 -0
  40. data/sample/getting-started/README.md +4 -0
  41. metadata +26 -92
  42. data/lib/gtk4/action-group.rb +0 -131
  43. data/lib/gtk4/calendar.rb +0 -30
  44. data/lib/gtk4/check-menu-item.rb +0 -34
  45. data/lib/gtk4/container.rb +0 -62
  46. data/lib/gtk4/icon-size.rb +0 -32
  47. data/lib/gtk4/image-menu-item.rb +0 -37
  48. data/lib/gtk4/radio-action.rb +0 -28
  49. data/lib/gtk4/radio-button.rb +0 -49
  50. data/lib/gtk4/recent-chooser-dialog.rb +0 -38
  51. data/lib/gtk4/selection-data.rb +0 -42
  52. data/lib/gtk4/stock-item.rb +0 -36
  53. data/lib/gtk4/stock.rb +0 -70
  54. data/lib/gtk4/table.rb +0 -43
  55. data/lib/gtk4/target-entry.rb +0 -27
  56. data/lib/gtk4/toggle-action.rb +0 -27
  57. data/lib/gtk4/tool-button.rb +0 -36
  58. data/lib/gtk4/ui-manager.rb +0 -35
  59. data/lib/gtk4/window.rb +0 -42
  60. data/test/fixture/gnome-logo-icon.png +0 -0
  61. data/test/gtk-test-utils.rb +0 -36
  62. data/test/run-test.rb +0 -42
  63. data/test/test-gtk-box.rb +0 -36
  64. data/test/test-gtk-button.rb +0 -46
  65. data/test/test-gtk-dialog.rb +0 -74
  66. data/test/test-gtk-menu-item.rb +0 -42
  67. data/test/test-gtk-message-dialog.rb +0 -62
  68. data/test/test-gtk-version.rb +0 -47
  69. data/test/test-gtk-window.rb +0 -34
@@ -1,62 +0,0 @@
1
- # Copyright (C) 2015-2018 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 TestGtkMessageDialog < Test::Unit::TestCase
18
- include GtkTestUtils
19
-
20
- sub_test_case ".new" do
21
- test "no argument" do
22
- dialog = Gtk::MessageDialog.new
23
- assert_equal("", dialog.text)
24
- end
25
-
26
- test "parent" do
27
- parent = Gtk::Window.new
28
- dialog = Gtk::MessageDialog.new(:parent => parent)
29
- assert_equal(parent, dialog.transient_for)
30
- end
31
-
32
- test "flags - modal" do
33
- dialog = Gtk::MessageDialog.new(:flags => :modal)
34
- assert do
35
- dialog.modal?
36
- end
37
- end
38
-
39
- test "flags - destroy_with_parent" do
40
- dialog = Gtk::MessageDialog.new(:flags => :destroy_with_parent)
41
- assert do
42
- dialog.destroy_with_parent?
43
- end
44
- end
45
-
46
- test "type" do
47
- dialog = Gtk::MessageDialog.new(:type => :error)
48
- assert_equal(Gtk::MessageType::ERROR, dialog.message_type)
49
- end
50
-
51
- test "buttons" do
52
- dialog = Gtk::MessageDialog.new(:buttons => :cancel)
53
- button = dialog.get_widget_for_response(Gtk::ResponseType::CANCEL)
54
- assert_not_nil(button)
55
- end
56
-
57
- test "message" do
58
- dialog = Gtk::MessageDialog.new(:message => "Label")
59
- assert_equal("Label", dialog.text)
60
- end
61
- end
62
- end
@@ -1,47 +0,0 @@
1
- # Copyright (C) 2015 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 TestGtkVersion < Test::Unit::TestCase
18
- include GtkTestUtils
19
-
20
- test "STRING" do
21
- major = Gtk::Version::MAJOR
22
- minor = Gtk::Version::MINOR
23
- micro = Gtk::Version::MICRO
24
- assert_equal([major, minor, micro].join("."),
25
- Gtk::Version::STRING)
26
- end
27
-
28
- sub_test_case("#or_later?") do
29
- test "same" do
30
- assert_true(Gtk::Version.or_later?(Gtk::Version::MAJOR,
31
- Gtk::Version::MINOR,
32
- Gtk::Version::MICRO))
33
- end
34
-
35
- test "later" do
36
- assert_true(Gtk::Version.or_later?(Gtk::Version::MAJOR,
37
- Gtk::Version::MINOR,
38
- Gtk::Version::MICRO - 1))
39
- end
40
-
41
- test "earlier" do
42
- assert_false(Gtk::Version.or_later?(Gtk::Version::MAJOR,
43
- Gtk::Version::MINOR,
44
- Gtk::Version::MICRO + 1))
45
- end
46
- end
47
- end
@@ -1,34 +0,0 @@
1
- # Copyright (C) 2015-2018 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 TestGtkWindow < Test::Unit::TestCase
18
- include GtkTestUtils
19
-
20
- def setup
21
- @window = Gtk::Window.new
22
- end
23
-
24
- sub_test_case "#icon=" do
25
- test "String" do
26
- @window.icon = fixture_path("gnome-logo-icon.png")
27
- end
28
-
29
- test "GdkPixbuf::Pixbuf" do
30
- icon = GdkPixbuf::Pixbuf.new(:file => fixture_path("gnome-logo-icon.png"))
31
- @window.icon = icon
32
- end
33
- end
34
- end