gir_ffi-gtk 0.7.2 → 0.8.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
  SHA1:
3
- metadata.gz: af9c23060c5f36407a7862b2abaa874a07534b1e
4
- data.tar.gz: 7b650fc017065988a9a11f03c5e3233d8a189a8d
3
+ metadata.gz: 742b828f6ed4e8f3422442b2b6e9cca410d18fc2
4
+ data.tar.gz: a6f03e605b7cdbb8bf20886647c9735c4cdab169
5
5
  SHA512:
6
- metadata.gz: 24c701020e7fffe55ea56105566844f25de1b3a7eb7881410810c1bd2b9c5bbe04a76c1d168bcb9b7af1c00a494c0c5591ffcfee0dad91788b64923b531dd190
7
- data.tar.gz: 0977c1c3087cc292c50af481c783347dc86b3f8e49273c2cf123d70550f179a2f88ea00262c04e24a70d35171ad7007e25195c225d5448d7c45b6c11fd32019e
6
+ metadata.gz: 2ab32afa737ee8935ec70b2e4102a37f569aa27cf84d8e6173c90d8cdc48a9070d8e00054c3b88c8c5ef19e55980cf7bf6af41efd0e35d258385b0e8f4269bd0
7
+ data.tar.gz: 14c8e71fc367b194e65da0d56948485272dbc24698a73b1dbfafcf28fb1799d9f3bfc50be5b41c2f061d8294ddcb0d62d3625ec9c02a9d3404e480890355db0f
data/README.md CHANGED
@@ -46,7 +46,7 @@ and for Gtk+ 2:
46
46
 
47
47
  ## License
48
48
 
49
- Copyright © 2012–2014 [Matijs van Zuijlen](http://www.matijs.net)
49
+ Copyright © 2012–2015 [Matijs van Zuijlen](http://www.matijs.net)
50
50
 
51
51
  GirFFI-Gtk is free software, distributed under the terms of the GNU Lesser
52
52
  General Public License, version 2.1 or later. See the file COPYING.LIB for
data/Rakefile CHANGED
@@ -1,5 +1,8 @@
1
+ require 'bundler/gem_helper'
1
2
  require 'rake/clean'
2
3
 
4
+ Bundler::GemHelper.install_tasks
5
+
3
6
  load 'tasks/test.rake'
4
7
 
5
8
  task :default => 'test'
@@ -9,6 +9,7 @@ module GirFFIGtk
9
9
  end
10
10
  end
11
11
 
12
+ # Implementation of class methods for AutoArgv
12
13
  module ClassMethods
13
14
  def init_with_auto_argv
14
15
  remaining = init_without_auto_argv([$PROGRAM_NAME, *ARGV]).to_a
@@ -29,6 +30,7 @@ module GirFFIGtk
29
30
  end
30
31
  end
31
32
 
33
+ # Implementation of class methods for ThreadEnabler
32
34
  module ClassMethods
33
35
  def main_with_thread_enabler
34
36
  case RUBY_ENGINE
@@ -11,12 +11,19 @@ module Gtk
11
11
  :varargs], :pointer
12
12
  end
13
13
 
14
+ # Overrides for GtkMessageDialog
14
15
  class MessageDialog
15
- def self.new parent, flags, type, buttons, message
16
+ def self.new *args
17
+ obj = allocate
18
+ obj.send :initialize, *args
19
+ obj
20
+ end
21
+
22
+ def initialize parent, flags, type, buttons, message
16
23
  ptr = Gtk::Lib.gtk_message_dialog_new(parent, flags, type, buttons,
17
24
  '%s',
18
25
  :string, message)
19
- constructor_wrap ptr
26
+ store_pointer(ptr)
20
27
  end
21
28
  end
22
29
  end
@@ -8,16 +8,28 @@ module Gtk
8
8
 
9
9
  # Overrides for GtkRadioButton
10
10
  class RadioButton
11
- def self.new group
11
+ def self.new *args
12
+ obj = allocate
13
+ obj.send :initialize, *args
14
+ obj
15
+ end
16
+
17
+ def self.new_from_widget *args
18
+ obj = allocate
19
+ obj.send :initialize_from_widget, *args
20
+ obj
21
+ end
22
+
23
+ def initialize group
12
24
  v1 = GLib::SList.from(Gtk::RadioButton, group)
13
25
  v2 = Gtk::Lib.gtk_radio_button_new(v1)
14
- constructor_wrap(v2)
26
+ store_pointer(v2)
15
27
  end
16
28
 
17
- def self.new_from_widget radio_group_member
29
+ def initialize_from_widget radio_group_member
18
30
  v1 = Gtk::RadioButton.from(radio_group_member)
19
31
  v2 = Gtk::Lib.gtk_radio_button_new_from_widget(v1)
20
- constructor_wrap(v2)
32
+ store_pointer(v2)
21
33
  end
22
34
  end
23
35
  end
@@ -2,18 +2,24 @@ Gtk.load_class :TreePath
2
2
  module Gtk
3
3
  # Add non-introspected function to Gtk::Lib
4
4
  module Lib
5
- if Gtk::MAJOR_VERSION == 2 || Gtk::MINOR_VERSION < 12
5
+ if Gtk::MAJOR_VERSION == 2 || Gtk::MAJOR_VERSION == 3 && Gtk::MINOR_VERSION < 12
6
6
  attach_function :gtk_tree_path_new_from_indices, [:varargs], :pointer
7
7
  end
8
8
  end
9
9
 
10
10
  # Overrides for GtkTreePath
11
11
  class TreePath
12
- if Gtk::MAJOR_VERSION == 2 || Gtk::MINOR_VERSION < 12
13
- def self.new_from_indices indices
12
+ if Gtk::MAJOR_VERSION == 2 || Gtk::MAJOR_VERSION == 3 && Gtk::MINOR_VERSION < 12
13
+ def self.new_from_indices *args
14
+ obj = allocate
15
+ obj.send :initialize_from_indices, *args
16
+ obj
17
+ end
18
+
19
+ def initialize_from_indices indices
14
20
  args = indices.flat_map { |index| [:int, index] }
15
21
  ptr = Gtk::Lib.gtk_tree_path_new_from_indices(*args, :int, -1)
16
- constructor_wrap ptr
22
+ store_pointer ptr
17
23
  end
18
24
  end
19
25
 
@@ -28,7 +28,7 @@ describe Gtk do
28
28
  describe "::main" do
29
29
  it "allows other threads to run" do
30
30
  a = []
31
- GLib.timeout_add(GLib::PRIORITY_DEFAULT, 100,
31
+ GLib.timeout_add(GLib::PRIORITY_DEFAULT, 150,
32
32
  proc { Gtk.main_quit },
33
33
  nil, nil)
34
34
 
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.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-22 00:00:00.000000000 Z
11
+ date: 2015-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gir_ffi
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.6
19
+ version: 0.8.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.7.6
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.4.1
121
+ rubygems_version: 2.4.5.1
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: GirFFI-based Ruby bindings for Gtk+ 2 and 3
@@ -130,4 +130,3 @@ test_files:
130
130
  - test/gir_ffi-gtk/radio_button_test.rb
131
131
  - test/gir_ffi-gtk/tree_path_test.rb
132
132
  - test/test_helper.rb
133
- has_rdoc: