gtk3 3.4.9 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18510c4c73a54ec566d0872a4379ea844916e6c69f44efcbed43ce8726d34837
4
- data.tar.gz: d56661a9d6bd65ff3a0308585b9a2fdc51e7b9f4081bbd60901f075140bb4bc9
3
+ metadata.gz: b970a2c5b58d107215cc199caaeea34d383cc780c72ac3e51762373dd97a278c
4
+ data.tar.gz: 6856a32b6b5209df974fdf88aaf8426cd73a8bb320547f0730bdb8672df0c5c7
5
5
  SHA512:
6
- metadata.gz: 8e69dbe1de57c6afa79be0e095d0caf3dcc787456d34f2cf27c1013fccb285f645876ec345a2671afb494c61bbe6bd5547843a7e2076cad3fada64ea908ed5f5
7
- data.tar.gz: 7a74a321c9508a3bb93d2cfd05f8fe9f578121dfdc8b44b8398dfcf93906af871fb21255939b00286c86c427b35d0d842c8ba57e54d80a4a3af1283913a2e51b
6
+ metadata.gz: 928583dfb84f5f36896c3e8acb9ca8e2026c3e5fa84f7b1f24f6e53266a3b99a112f08ca03a58cb4ec0677c4b82924dcc0b63976d52a5ba87648341a276c749e
7
+ data.tar.gz: 602f62ffbc9d85afaf00c0c88d01a970bbbc101c369842510118d60f49e63f141f7dec8aba3ca2645817c0e657892d392721ce5d9ff524a112b60e711335894f
data/README.md CHANGED
@@ -16,9 +16,9 @@ Ruby/GTK3 is a Ruby binding of GTK+ 3.
16
16
 
17
17
  ## Tutorials, examples:
18
18
 
19
- * gtk3/sample/misc: a lot of simple examples.
20
- * gtk3/sample/gtk-demo: the ruby version of `gtk-demo`.
21
- * gtk3/sample/tutorial: the ruby version of the [offical Gtk3 tutorial "getting started"](https://developer.gnome.org/gtk3/stable/gtk-getting-started.html).
19
+ * [sample/misc](/gtk3/sample/misc): a lot of simple examples.
20
+ * [sample/gtk-demo](/gtk3/sample/gtk-demo): the ruby version of `gtk-demo`.
21
+ * [sample/tutorial](/gtk3/sample/tutorial): the ruby version of the [offical Gtk3 tutorial "getting started"](https://developer.gnome.org/gtk3/stable/gtk-getting-started.html).
22
22
  * a well written tutorial [on how to create a todo application](http://iridakos.com/tutorials/2018/01/25/creating-a-gtk-todo-application-with-ruby)
23
23
 
24
24
  ## License
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2017 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2017-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
@@ -46,11 +46,6 @@ static const rb_data_type_t toplevel_window_marker_type = {
46
46
  {
47
47
  toplevel_window_marker_mark,
48
48
  toplevel_window_marker_free,
49
- NULL,
50
- {
51
- NULL,
52
- NULL,
53
- },
54
49
  },
55
50
  NULL,
56
51
  NULL,
@@ -61,16 +56,9 @@ static const rb_data_type_t toplevel_window_marker_type = {
61
56
  void
62
57
  rbgtk3_window_init(void)
63
58
  {
64
- VALUE mGtk;
65
- VALUE toplevel_window_marker_class;
66
- VALUE toplevel_window_marker;
67
59
  ToplevelWindowMarkerData *data;
68
-
69
- mGtk = rb_const_get(rb_cObject, rb_intern("Gtk"));
70
- toplevel_window_marker_class =
71
- rb_define_class_under(mGtk, "ToplevelWindowMarker", rb_cData);
72
- toplevel_window_marker =
73
- TypedData_Make_Struct(toplevel_window_marker_class,
60
+ VALUE toplevel_window_marker =
61
+ TypedData_Make_Struct(rb_cObject,
74
62
  ToplevelWindowMarkerData,
75
63
  &toplevel_window_marker_type,
76
64
  data);
data/lib/gtk3/label.rb CHANGED
@@ -39,7 +39,7 @@ module Gtk
39
39
  if options == true or options == false or options.nil?
40
40
  mnemonic = options
41
41
  warn "Gtk::Label#set_markup(text, mnemonic) style has been deprecated. " +
42
- "Use Gtk::Label#set_marup(text, {:use_underline => #{mnemonic}}) style instead."
42
+ "Use Gtk::Label#set_markup(text, {:use_underline => #{mnemonic}}) style instead."
43
43
  options = {
44
44
  :use_underline => mnemonic,
45
45
  }
data/lib/gtk3/loader.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014-2020 Ruby-GNOME Project Team
1
+ # Copyright (C) 2014-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
@@ -31,6 +31,7 @@ module Gtk
31
31
  call_init_function(repository, namespace)
32
32
  define_stock_module
33
33
  define_version_module
34
+ define_methods_modules
34
35
  setup_pending_constants
35
36
  end
36
37
 
@@ -54,6 +55,36 @@ module Gtk
54
55
  @base_module.const_set("Version", @version_module)
55
56
  end
56
57
 
58
+ def define_methods_modules
59
+ @stock_singleton_methods_module =
60
+ define_methods_module(:StockSingletonMethods)
61
+ @widget_methods_module =
62
+ define_methods_module(:WidgetMethods)
63
+ @gdk_drag_context_methods_module =
64
+ define_methods_module(:GdkDragContextMethods)
65
+ @icon_size_class_methods_module =
66
+ define_methods_module(:IconSizeClassMethods)
67
+ @accel_group_class_methods_module =
68
+ define_methods_module(:AccelGroupClassMethods)
69
+ @gdk_event_methods_module =
70
+ define_methods_module(:GdkEventMethods)
71
+ end
72
+
73
+ def apply_methods_modules
74
+ apply_methods_module(@stock_singleton_methods_module,
75
+ @base_module::Stock.singleton_class)
76
+ apply_methods_module(@widget_methods_module,
77
+ @base_module::Widget)
78
+ apply_methods_module(@gdk_drag_context_methods_module,
79
+ Gdk::DragContext)
80
+ apply_methods_module(@icon_size_class_methods_module,
81
+ @base_module::IconSize.singleton_class)
82
+ apply_methods_module(@accel_group_class_methods_module,
83
+ @base_module::AccelGroup.singleton_class)
84
+ apply_methods_module(@gdk_event_methods_module,
85
+ Gdk::Event)
86
+ end
87
+
57
88
  def level_bar_class
58
89
  @level_bar_class ||= @base_module.const_get(:LevelBar)
59
90
  end
@@ -64,6 +95,7 @@ module Gtk
64
95
 
65
96
  def post_load(repository, namespace)
66
97
  apply_pending_constants
98
+ apply_methods_modules
67
99
  require_extension
68
100
  require_libraries
69
101
  end
@@ -170,32 +202,34 @@ module Gtk
170
202
  when "init", /_get_type\z/
171
203
  # ignore
172
204
  when /\Astock_/
173
- stock_module = @base_module.const_get(:Stock)
174
205
  method_name = rubyish_method_name(info, :prefix => "stock_")
175
- define_singleton_method(stock_module, method_name, info)
206
+ define_module_function(@stock_singleton_methods_module,
207
+ method_name,
208
+ info)
176
209
  when /\Adrag_(?:source_|dest_|get_data\z|(?:un)highlight\z|begin|check_threshold\z)/
177
210
  # For OS X. It may be broken. It's not tested.
178
- widget_class = @base_module.const_get(:Widget)
179
211
  method_name = rubyish_method_name(info)
180
- define_method(info, widget_class, method_name)
212
+ define_method(info, @widget_methods_module, method_name)
181
213
  when /\Adrag_/
182
214
  method_name = rubyish_method_name(info,
183
215
  :prefix => "drag_",
184
216
  :n_in_args_offset => -1)
185
- define_method(info, Gdk::DragContext, method_name)
217
+ define_method(info, @gdk_drag_context_methods_module, method_name)
186
218
  when /\Abinding_/
187
219
  # Ignore because singleton methods are defined.
188
220
  when /\Aicon_size_/
189
- icon_size_class = @base_module.const_get(:IconSize)
190
221
  method_name = rubyish_method_name(info, :prefix => "icon_size_")
191
- define_singleton_method(icon_size_class, method_name, info)
222
+ define_module_function(@icon_size_class_methods_module,
223
+ method_name,
224
+ info)
192
225
  when /\Atest_widget_/
193
226
  name = $POSTMATCH
194
- define_method(info, Gtk::Widget, name)
227
+ define_method(info, @widget_methods_module, name)
195
228
  when /\Aaccel_groups_/
196
- accel_group_class = @base_module.const_get(:AccelGroup)
197
229
  method_name = rubyish_method_name(info, :prefix => "accel_groups_")
198
- define_singleton_method(accel_group_class, method_name, info)
230
+ define_module_function(@accel_group_class_methods_module,
231
+ method_name,
232
+ info)
199
233
  else
200
234
  super
201
235
  end
@@ -206,7 +240,7 @@ module Gtk
206
240
  when "Gtk"
207
241
  case name
208
242
  when "get_event_widget"
209
- define_gdk_event_widget(info)
243
+ define_method(info, @gdk_event_methods_module, "widget")
210
244
  return
211
245
  when "events_pending"
212
246
  name = "events_pending?"
@@ -222,10 +256,6 @@ module Gtk
222
256
  super(klass, name, info)
223
257
  end
224
258
 
225
- def define_gdk_event_widget(info)
226
- define_method(info, Gdk::Event, "widget")
227
- end
228
-
229
259
  def define_enum(info)
230
260
  case info.name
231
261
  when /\AArrow/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk3
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.9
4
+ version: 3.5.0
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-08-10 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gio2
@@ -16,70 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.9
19
+ version: 3.5.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.4.9
26
+ version: 3.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: atk
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.4.9
33
+ version: 3.5.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.4.9
40
+ version: 3.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pango
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.4.9
47
+ version: 3.5.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.4.9
54
+ version: 3.5.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: gdk_pixbuf2
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.4.9
61
+ version: 3.5.0
62
62
  type: :runtime
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: 3.4.9
68
+ version: 3.5.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: gdk3
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 3.4.9
75
+ version: 3.5.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 3.4.9
82
+ version: 3.5.0
83
83
  description: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
84
84
  email: ruby-gnome2-devel-en@lists.sourceforge.net
85
85
  executables: []
@@ -654,7 +654,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
654
654
  - !ruby/object:Gem::Version
655
655
  version: '0'
656
656
  requirements: []
657
- rubygems_version: 3.3.0.dev
657
+ rubygems_version: 3.4.0.dev
658
658
  signing_key:
659
659
  specification_version: 4
660
660
  summary: Ruby/GTK3 is a Ruby binding of GTK+-3.x.