gir_ffi-gtk 0.14.1 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +17 -0
- data/lib/gir_ffi-gtk/base.rb +3 -3
- data/lib/gir_ffi-gtk/container.rb +1 -1
- data/lib/gir_ffi-gtk/file_chooser_dialog.rb +4 -0
- data/lib/gir_ffi-gtk/gtk2/menu.rb +26 -0
- data/lib/gir_ffi-gtk/message_dialog.rb +1 -1
- data/lib/gir_ffi-gtk/tree_path.rb +1 -1
- data/lib/gir_ffi-gtk/version.rb +5 -0
- data/lib/gir_ffi-gtk2.rb +22 -21
- data/lib/gir_ffi-gtk3.rb +18 -18
- metadata +94 -74
- data/Rakefile +0 -8
- data/examples/01_empty_window.rb +0 -12
- data/examples/02_hello_world.rb +0 -27
- data/examples/03_upgraded_hello_world.rb +0 -40
- data/examples/04_webkit.rb +0 -18
- data/examples/05_notification.rb +0 -33
- data/examples/06_treeview.rb +0 -51
- data/examples/07_simple_gtk_application.rb +0 -30
- data/examples/08_webkit_headless.rb +0 -21
- data/examples/09_webkit2_headless.rb +0 -24
- data/examples/10_completion_provider.rb +0 -62
- data/lib/gir_ffi-gtk/menu.rb +0 -19
- data/tasks/test.rake +0 -30
- data/test/callback_exceptions_test.rb +0 -58
- data/test/gir_ffi-gtk/action_test.rb +0 -17
- data/test/gir_ffi-gtk/base_test.rb +0 -47
- data/test/gir_ffi-gtk/builder_test.rb +0 -70
- data/test/gir_ffi-gtk/button_test.rb +0 -19
- data/test/gir_ffi-gtk/container_test.rb +0 -33
- data/test/gir_ffi-gtk/dialog_test.rb +0 -13
- data/test/gir_ffi-gtk/file_chooser_dialog_test.rb +0 -18
- data/test/gir_ffi-gtk/generated_gtk_test.rb +0 -58
- data/test/gir_ffi-gtk/image_test.rb +0 -43
- data/test/gir_ffi-gtk/list_store_test.rb +0 -38
- data/test/gir_ffi-gtk/menu_test.rb +0 -20
- data/test/gir_ffi-gtk/message_dialog_test.rb +0 -15
- data/test/gir_ffi-gtk/radio_action_test.rb +0 -28
- data/test/gir_ffi-gtk/radio_button_test.rb +0 -37
- data/test/gir_ffi-gtk/target_entry_test.rb +0 -19
- data/test/gir_ffi-gtk/tree_path_test.rb +0 -17
- data/test/gir_ffi-gtk/tree_store_test.rb +0 -38
- data/test/gir_ffi-gtk/tree_view_column_test.rb +0 -51
- data/test/gir_ffi-gtk/widget_test.rb +0 -103
- data/test/test_helper.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5ba8084b1384ca046c99a897a17740c65253291f08b477758e3266635c8989c
|
4
|
+
data.tar.gz: 1cefd2914bc8bb771643880e1adfae93168760b91e7e4f4d213c3d8063391718
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '05398cde3136948edc81a46c505e90c87b161a6a0ba4d8b2f32203b03c4a8d67984eeb48e90f29fe9199663e2fec25c627ecb2377f2f83a6396cd64da29923c6'
|
7
|
+
data.tar.gz: d67193952c980d74ec8ee99e0472fbf0cdf2fb16f8d10ebf327cc5a6d18b857ed205ed66de6298b2a7dc0d6729a678d68391a9bca7116bb4b3754e8a143c4823
|
data/Changelog.md
CHANGED
@@ -3,6 +3,23 @@
|
|
3
3
|
All notable changes to this project will be documented in this file. See the
|
4
4
|
Git log for all changes.
|
5
5
|
|
6
|
+
## 0.16.0 / 2022-05-21
|
7
|
+
|
8
|
+
* Drop support for Ruby 2.6 and JRuby
|
9
|
+
* Depend on GirFFI 0.16.0
|
10
|
+
|
11
|
+
## 0.15.1 / 2022-01-21
|
12
|
+
|
13
|
+
* Silence warnings about redefining initialize in FileChooserDialog override
|
14
|
+
* Depend on GirFFI 0.15.2
|
15
|
+
* Target Ruby 2.6+
|
16
|
+
|
17
|
+
## 0.15.0 / 2019-10-19
|
18
|
+
|
19
|
+
* Fix override for `Gtk::Menu#popup`
|
20
|
+
* Depend on GirFFI 0.15.0
|
21
|
+
* Target Ruby 2.4+
|
22
|
+
|
6
23
|
## 0.14.1 / 2018-12-19
|
7
24
|
|
8
25
|
* Override `Gtk::Widget#get_events`, `Gtk::Widget#set_events` and
|
data/lib/gir_ffi-gtk/base.rb
CHANGED
@@ -43,7 +43,7 @@ module GirFFIGtk
|
|
43
43
|
# Implementation of class methods for MainLoopOverride
|
44
44
|
module ClassMethods
|
45
45
|
def main_with_override
|
46
|
-
GLib::MainLoop::ThreadEnabler.instance.setup_idle_handler if RUBY_ENGINE ==
|
46
|
+
GLib::MainLoop::ThreadEnabler.instance.setup_idle_handler if RUBY_ENGINE == "ruby"
|
47
47
|
GLib::MainLoop::RUNNING_LOOPS << DummyLoop.new
|
48
48
|
result = main_without_override
|
49
49
|
ex = GLib::MainLoop::EXCEPTIONS.shift
|
@@ -58,8 +58,8 @@ end
|
|
58
58
|
|
59
59
|
# Overrides for Gtk module functions
|
60
60
|
module Gtk
|
61
|
-
setup_method!
|
62
|
-
setup_method!
|
61
|
+
setup_method! "init"
|
62
|
+
setup_method! "main"
|
63
63
|
|
64
64
|
include GirFFIGtk::AutoArgv
|
65
65
|
include GirFFIGtk::MainLoopOverride
|
@@ -14,7 +14,7 @@ module Gtk
|
|
14
14
|
setup_instance_method! :child_get_property
|
15
15
|
|
16
16
|
def child_get_property_with_override(widget, property_name)
|
17
|
-
param_spec =
|
17
|
+
param_spec = class_struct.find_child_property property_name
|
18
18
|
unless param_spec
|
19
19
|
raise(ArgumentError,
|
20
20
|
"child property named '#{property_name}' not found in #{self.class}")
|
@@ -19,6 +19,8 @@ module Gtk
|
|
19
19
|
obj
|
20
20
|
end
|
21
21
|
|
22
|
+
alias old_initialize initialize
|
23
|
+
|
22
24
|
def initialize(title, parent, action, buttons)
|
23
25
|
button_params = buttons.flat_map do |button_text, button_response|
|
24
26
|
[:string, button_text, :int, Gtk::ResponseType.to_int(button_response)]
|
@@ -27,5 +29,7 @@ module Gtk
|
|
27
29
|
*button_params, :string, nil)
|
28
30
|
store_pointer(ptr)
|
29
31
|
end
|
32
|
+
|
33
|
+
remove_method :old_initialize
|
30
34
|
end
|
31
35
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Gtk.load_class :Menu
|
4
|
+
module Gtk
|
5
|
+
# Add non-introspected functions to Gtk::Lib
|
6
|
+
module Lib
|
7
|
+
attach_function(:gtk_menu_popup,
|
8
|
+
[:pointer, :pointer, :pointer,
|
9
|
+
:pointer, :pointer,
|
10
|
+
:uint, :uint32],
|
11
|
+
:void)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Overrides for GtkMenu
|
15
|
+
class Menu
|
16
|
+
def popup(parent_menu_shell, parent_menu_item, button, activate_time, &func)
|
17
|
+
v1 = Gtk::Widget.from(parent_menu_shell)
|
18
|
+
v2 = Gtk::Widget.from(parent_menu_item)
|
19
|
+
v3 = Gtk::MenuPositionFunc.from(func)
|
20
|
+
v4 = GirFFI::ArgHelper.store(v3)
|
21
|
+
v5 = button
|
22
|
+
v6 = activate_time
|
23
|
+
Gtk::Lib.gtk_menu_popup self, v1, v2, v3, v4, v5, v6
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/gir_ffi-gtk2.rb
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "gir_ffi"
|
4
4
|
|
5
|
-
GirFFI.setup :Gtk,
|
5
|
+
GirFFI.setup :Gtk, "2.0"
|
6
6
|
|
7
|
-
require
|
7
|
+
require "gir_ffi-gtk/base"
|
8
|
+
require "gir_ffi-gtk/version"
|
8
9
|
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
15
|
-
require
|
16
|
-
require
|
17
|
-
require
|
18
|
-
require
|
19
|
-
require
|
20
|
-
require
|
21
|
-
require 'gir_ffi-gtk/widget'
|
10
|
+
require "gir_ffi-gtk/action"
|
11
|
+
require "gir_ffi-gtk/builder"
|
12
|
+
require "gir_ffi-gtk/container"
|
13
|
+
require "gir_ffi-gtk/dialog"
|
14
|
+
require "gir_ffi-gtk/file_chooser_dialog"
|
15
|
+
require "gir_ffi-gtk/image"
|
16
|
+
require "gir_ffi-gtk/list_store"
|
17
|
+
require "gir_ffi-gtk/message_dialog"
|
18
|
+
require "gir_ffi-gtk/tree_path"
|
19
|
+
require "gir_ffi-gtk/tree_store"
|
20
|
+
require "gir_ffi-gtk/tree_view_column"
|
21
|
+
require "gir_ffi-gtk/widget"
|
22
22
|
|
23
|
-
require
|
24
|
-
require
|
25
|
-
require
|
26
|
-
require
|
27
|
-
require
|
23
|
+
require "gir_ffi-gtk/gtk2/list_store"
|
24
|
+
require "gir_ffi-gtk/gtk2/menu"
|
25
|
+
require "gir_ffi-gtk/gtk2/radio_action"
|
26
|
+
require "gir_ffi-gtk/gtk2/radio_button"
|
27
|
+
require "gir_ffi-gtk/gtk2/target_entry"
|
28
|
+
require "gir_ffi-gtk/gtk2/tree_store"
|
data/lib/gir_ffi-gtk3.rb
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "gir_ffi"
|
4
4
|
|
5
|
-
GirFFI.setup :Gtk,
|
5
|
+
GirFFI.setup :Gtk, "3.0"
|
6
6
|
|
7
|
-
require
|
7
|
+
require "gir_ffi-gtk/base"
|
8
|
+
require "gir_ffi-gtk/version"
|
8
9
|
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
15
|
-
require
|
16
|
-
require
|
17
|
-
require
|
18
|
-
require
|
19
|
-
require
|
20
|
-
require
|
21
|
-
require 'gir_ffi-gtk/widget'
|
10
|
+
require "gir_ffi-gtk/action"
|
11
|
+
require "gir_ffi-gtk/builder"
|
12
|
+
require "gir_ffi-gtk/container"
|
13
|
+
require "gir_ffi-gtk/dialog"
|
14
|
+
require "gir_ffi-gtk/file_chooser_dialog"
|
15
|
+
require "gir_ffi-gtk/image"
|
16
|
+
require "gir_ffi-gtk/list_store"
|
17
|
+
require "gir_ffi-gtk/message_dialog"
|
18
|
+
require "gir_ffi-gtk/tree_path"
|
19
|
+
require "gir_ffi-gtk/tree_store"
|
20
|
+
require "gir_ffi-gtk/tree_view_column"
|
21
|
+
require "gir_ffi-gtk/widget"
|
22
22
|
|
23
|
-
require
|
24
|
-
require
|
23
|
+
require "gir_ffi-gtk/gtk3/button"
|
24
|
+
require "gir_ffi-gtk/gtk3/target_entry"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gir_ffi-gtk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gir_ffi
|
@@ -16,56 +16,126 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.16.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: 0.
|
26
|
+
version: 0.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '5.
|
33
|
+
version: '5.12'
|
34
34
|
type: :development
|
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: '5.
|
40
|
+
version: '5.12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
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: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake-manifest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.2.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.2.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.25'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.25'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.19.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.19.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-packaging
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.5.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.5.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-performance
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.13'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.13'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.21.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.21.0
|
69
139
|
description: Bindings for Gtk+ 2 and 3, generated by GirFFI, with overrides.
|
70
140
|
email:
|
71
141
|
- matijs@matijs.net
|
@@ -76,17 +146,6 @@ files:
|
|
76
146
|
- COPYING.LIB
|
77
147
|
- Changelog.md
|
78
148
|
- README.md
|
79
|
-
- Rakefile
|
80
|
-
- examples/01_empty_window.rb
|
81
|
-
- examples/02_hello_world.rb
|
82
|
-
- examples/03_upgraded_hello_world.rb
|
83
|
-
- examples/04_webkit.rb
|
84
|
-
- examples/05_notification.rb
|
85
|
-
- examples/06_treeview.rb
|
86
|
-
- examples/07_simple_gtk_application.rb
|
87
|
-
- examples/08_webkit_headless.rb
|
88
|
-
- examples/09_webkit2_headless.rb
|
89
|
-
- examples/10_completion_provider.rb
|
90
149
|
- lib/gir_ffi-gtk/action.rb
|
91
150
|
- lib/gir_ffi-gtk/base.rb
|
92
151
|
- lib/gir_ffi-gtk/builder.rb
|
@@ -94,6 +153,7 @@ files:
|
|
94
153
|
- lib/gir_ffi-gtk/dialog.rb
|
95
154
|
- lib/gir_ffi-gtk/file_chooser_dialog.rb
|
96
155
|
- lib/gir_ffi-gtk/gtk2/list_store.rb
|
156
|
+
- lib/gir_ffi-gtk/gtk2/menu.rb
|
97
157
|
- lib/gir_ffi-gtk/gtk2/radio_action.rb
|
98
158
|
- lib/gir_ffi-gtk/gtk2/radio_button.rb
|
99
159
|
- lib/gir_ffi-gtk/gtk2/target_entry.rb
|
@@ -102,41 +162,23 @@ files:
|
|
102
162
|
- lib/gir_ffi-gtk/gtk3/target_entry.rb
|
103
163
|
- lib/gir_ffi-gtk/image.rb
|
104
164
|
- lib/gir_ffi-gtk/list_store.rb
|
105
|
-
- lib/gir_ffi-gtk/menu.rb
|
106
165
|
- lib/gir_ffi-gtk/message_dialog.rb
|
107
166
|
- lib/gir_ffi-gtk/tree_path.rb
|
108
167
|
- lib/gir_ffi-gtk/tree_store.rb
|
109
168
|
- lib/gir_ffi-gtk/tree_view_column.rb
|
169
|
+
- lib/gir_ffi-gtk/version.rb
|
110
170
|
- lib/gir_ffi-gtk/widget.rb
|
111
171
|
- lib/gir_ffi-gtk2.rb
|
112
172
|
- lib/gir_ffi-gtk3.rb
|
113
|
-
- tasks/test.rake
|
114
|
-
- test/callback_exceptions_test.rb
|
115
|
-
- test/gir_ffi-gtk/action_test.rb
|
116
|
-
- test/gir_ffi-gtk/base_test.rb
|
117
|
-
- test/gir_ffi-gtk/builder_test.rb
|
118
|
-
- test/gir_ffi-gtk/button_test.rb
|
119
|
-
- test/gir_ffi-gtk/container_test.rb
|
120
|
-
- test/gir_ffi-gtk/dialog_test.rb
|
121
|
-
- test/gir_ffi-gtk/file_chooser_dialog_test.rb
|
122
|
-
- test/gir_ffi-gtk/generated_gtk_test.rb
|
123
|
-
- test/gir_ffi-gtk/image_test.rb
|
124
|
-
- test/gir_ffi-gtk/list_store_test.rb
|
125
|
-
- test/gir_ffi-gtk/menu_test.rb
|
126
|
-
- test/gir_ffi-gtk/message_dialog_test.rb
|
127
|
-
- test/gir_ffi-gtk/radio_action_test.rb
|
128
|
-
- test/gir_ffi-gtk/radio_button_test.rb
|
129
|
-
- test/gir_ffi-gtk/target_entry_test.rb
|
130
|
-
- test/gir_ffi-gtk/tree_path_test.rb
|
131
|
-
- test/gir_ffi-gtk/tree_store_test.rb
|
132
|
-
- test/gir_ffi-gtk/tree_view_column_test.rb
|
133
|
-
- test/gir_ffi-gtk/widget_test.rb
|
134
|
-
- test/test_helper.rb
|
135
173
|
homepage: http://www.github.com/mvz/gir_ffi-gtk
|
136
174
|
licenses:
|
137
175
|
- LGPL-2.1+
|
138
|
-
metadata:
|
139
|
-
|
176
|
+
metadata:
|
177
|
+
homepage_uri: http://www.github.com/mvz/gir_ffi-gtk
|
178
|
+
source_code_uri: https://github.com/mvz/gir_ffi-gtk
|
179
|
+
changelog_uri: https://github.com/mvz/gir_ffi-gtk/blob/master/Changelog.md
|
180
|
+
rubygems_mfa_required: 'true'
|
181
|
+
post_install_message:
|
140
182
|
rdoc_options: []
|
141
183
|
require_paths:
|
142
184
|
- lib
|
@@ -144,37 +186,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
186
|
requirements:
|
145
187
|
- - ">="
|
146
188
|
- !ruby/object:Gem::Version
|
147
|
-
version: 2.
|
189
|
+
version: 2.7.0
|
148
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
191
|
requirements:
|
150
192
|
- - ">="
|
151
193
|
- !ruby/object:Gem::Version
|
152
194
|
version: '0'
|
153
195
|
requirements: []
|
154
|
-
|
155
|
-
|
156
|
-
signing_key:
|
196
|
+
rubygems_version: 3.3.7
|
197
|
+
signing_key:
|
157
198
|
specification_version: 4
|
158
199
|
summary: GirFFI-based Ruby bindings for Gtk+ 2 and 3
|
159
|
-
test_files:
|
160
|
-
- test/callback_exceptions_test.rb
|
161
|
-
- test/gir_ffi-gtk/action_test.rb
|
162
|
-
- test/gir_ffi-gtk/base_test.rb
|
163
|
-
- test/gir_ffi-gtk/builder_test.rb
|
164
|
-
- test/gir_ffi-gtk/button_test.rb
|
165
|
-
- test/gir_ffi-gtk/container_test.rb
|
166
|
-
- test/gir_ffi-gtk/dialog_test.rb
|
167
|
-
- test/gir_ffi-gtk/file_chooser_dialog_test.rb
|
168
|
-
- test/gir_ffi-gtk/generated_gtk_test.rb
|
169
|
-
- test/gir_ffi-gtk/image_test.rb
|
170
|
-
- test/gir_ffi-gtk/list_store_test.rb
|
171
|
-
- test/gir_ffi-gtk/menu_test.rb
|
172
|
-
- test/gir_ffi-gtk/message_dialog_test.rb
|
173
|
-
- test/gir_ffi-gtk/radio_action_test.rb
|
174
|
-
- test/gir_ffi-gtk/radio_button_test.rb
|
175
|
-
- test/gir_ffi-gtk/target_entry_test.rb
|
176
|
-
- test/gir_ffi-gtk/tree_path_test.rb
|
177
|
-
- test/gir_ffi-gtk/tree_store_test.rb
|
178
|
-
- test/gir_ffi-gtk/tree_view_column_test.rb
|
179
|
-
- test/gir_ffi-gtk/widget_test.rb
|
180
|
-
- test/test_helper.rb
|
200
|
+
test_files: []
|
data/Rakefile
DELETED
data/examples/01_empty_window.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Based on the empty window Gtk+ tutorial example at
|
4
|
-
# http://library.gnome.org/devel/gtk-tutorial/2.90/c39.html
|
5
|
-
#
|
6
|
-
require 'gir_ffi-gtk3'
|
7
|
-
|
8
|
-
Gtk.init
|
9
|
-
win = Gtk::Window.new :toplevel
|
10
|
-
win.show
|
11
|
-
win.signal_connect("destroy") { Gtk.main_quit }
|
12
|
-
Gtk.main
|
data/examples/02_hello_world.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Based on the 'Hello world' Gtk+ tutorial example at
|
4
|
-
# http://library.gnome.org/devel/gtk-tutorial/2.90/c39.html#SEC-HELLOWORLD
|
5
|
-
#
|
6
|
-
require 'gir_ffi-gtk3'
|
7
|
-
|
8
|
-
Gtk.init
|
9
|
-
|
10
|
-
win = Gtk::Window.new(:toplevel)
|
11
|
-
win.signal_connect "delete-event" do
|
12
|
-
puts "delete event occured"
|
13
|
-
true
|
14
|
-
end
|
15
|
-
|
16
|
-
win.signal_connect("destroy") { Gtk.main_quit }
|
17
|
-
win.border_width = 10
|
18
|
-
|
19
|
-
but = Gtk::Button.new_with_label("Hello World")
|
20
|
-
but.signal_connect("clicked") { win.destroy }
|
21
|
-
|
22
|
-
win.add but
|
23
|
-
|
24
|
-
but.show
|
25
|
-
win.show
|
26
|
-
|
27
|
-
Gtk.main
|
@@ -1,40 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Based on the 'Upgraded Hello world' Gtk+ tutorial example at
|
4
|
-
# http://library.gnome.org/devel/gtk-tutorial/2.90/x344.html
|
5
|
-
#
|
6
|
-
require 'gir_ffi-gtk3'
|
7
|
-
|
8
|
-
callback = lambda { |widget, data|
|
9
|
-
puts "Hello again - #{data} was pressed"
|
10
|
-
}
|
11
|
-
|
12
|
-
Gtk.init
|
13
|
-
|
14
|
-
win = Gtk::Window.new(:toplevel)
|
15
|
-
win.title= "Hello Buttons!"
|
16
|
-
|
17
|
-
win.signal_connect "delete-event" do
|
18
|
-
Gtk.main_quit
|
19
|
-
false
|
20
|
-
end
|
21
|
-
|
22
|
-
win.border_width = 10
|
23
|
-
|
24
|
-
box = Gtk::HBox.new(false, 0)
|
25
|
-
win.add box
|
26
|
-
|
27
|
-
button = Gtk::Button.new_with_label("Button 1")
|
28
|
-
button.signal_connect "clicked", "button 1", &callback
|
29
|
-
box.pack_start button, true, true, 0
|
30
|
-
button.show
|
31
|
-
|
32
|
-
button = Gtk::Button.new_with_label("Button 2")
|
33
|
-
button.signal_connect "clicked", "button 2", &callback
|
34
|
-
box.pack_start button, true, true, 0
|
35
|
-
button.show
|
36
|
-
|
37
|
-
box.show
|
38
|
-
win.show
|
39
|
-
|
40
|
-
Gtk.main
|
data/examples/04_webkit.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Based on https://web.archive.org/web/20110228141616/http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/
|
4
|
-
#
|
5
|
-
|
6
|
-
require 'gir_ffi-gtk3'
|
7
|
-
|
8
|
-
GirFFI.setup :WebKit2, '4.0'
|
9
|
-
|
10
|
-
Gtk.init
|
11
|
-
|
12
|
-
win = Gtk::Window.new :toplevel
|
13
|
-
wv = WebKit2::WebView.new
|
14
|
-
win.add(wv)
|
15
|
-
win.show_all
|
16
|
-
wv.load_uri('http://www.google.com/')
|
17
|
-
win.signal_connect('destroy') { Gtk.main_quit }
|
18
|
-
Gtk.main
|
data/examples/05_notification.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Simple notification example.
|
4
|
-
require 'gir_ffi-gtk3'
|
5
|
-
|
6
|
-
GirFFI.setup :Notify
|
7
|
-
|
8
|
-
# Both Gtk and Notify need to be init'ed.
|
9
|
-
Gtk.init
|
10
|
-
Notify.init "notification test"
|
11
|
-
|
12
|
-
# Basic set up of the notification.
|
13
|
-
nf = Notify::Notification.new "Hello!", "Hi there.", "gtk-dialog-info"
|
14
|
-
nf.timeout = 3000
|
15
|
-
nf.urgency = :critical
|
16
|
-
|
17
|
-
# Show a button 'Test' in the notification, with a callback function.
|
18
|
-
nf.add_action("test", "Test") { |obj, action, user_data|
|
19
|
-
puts "Action #{action} clicked."
|
20
|
-
}
|
21
|
-
|
22
|
-
# In this case, we want the program to end once the notification is gone,
|
23
|
-
# but not before.
|
24
|
-
nf.signal_connect("closed") {
|
25
|
-
puts "Notification closed."
|
26
|
-
Gtk.main_quit
|
27
|
-
}
|
28
|
-
|
29
|
-
# Show the notification.
|
30
|
-
nf.show
|
31
|
-
|
32
|
-
# Start a main loop to wait for the notification to be closed.
|
33
|
-
Gtk.main
|