gdk3 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gdk3/loader.rb +31 -27
  3. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49471046d7696fc185bbcd1ae7acfcbd8f6cc2e9
4
- data.tar.gz: 3ca01ecc366241d60304eea82664c5a13cc14c44
3
+ metadata.gz: 0066a133aed3805845ed9b29a9702bdefcdd32af
4
+ data.tar.gz: d3b8a7ec06d039784a886b4c99e7e4d7215fff13
5
5
  SHA512:
6
- metadata.gz: 9a73005800f1b611c64fbac583ab7c92efc776f87c9924e658b75b2bd4d07b9bdd4682991e63fa22a7a81e16547c23088cc7b987e539b6a9b9fade8048caf325
7
- data.tar.gz: 738320e9ad77b6d2e4408cf7d5faf05d068eb908f6d62ee0a44b157c4dfa092d3bf8710996de306d31ebaa5e36d477cab81637d41e8f0e11228cb117428a920b
6
+ metadata.gz: 8d9b4a87e144d0f92cf728c26093526b31f5558edbb049ffa403a7fc94e4c05e21651fd53c08d33d03500e8c9586aa3908cc90cba31dc0e86de094a987045cb6
7
+ data.tar.gz: 858a6019e786cec947c3e791810b42d62c6e3845d28f5bdee3da537aa00512233496fa18a7029ae812b5a8b81ea2de6c1daffa6f1820fb4c69655adf4ccee54e
@@ -34,7 +34,6 @@ module Gdk
34
34
  setup_pending_rectangle_functions
35
35
  define_keyval_module
36
36
  define_selection_module
37
- load_cairo_rectangle_int
38
37
  end
39
38
 
40
39
  def define_keyval_module
@@ -47,27 +46,6 @@ module Gdk
47
46
  @base_module.const_set("Selection", @selection_module)
48
47
  end
49
48
 
50
- def load_cairo_rectangle_int
51
- info = find_cairo_rectangle_int_info
52
- klass = self.class.define_class(info.gtype,
53
- "Rectangle",
54
- @base_module,
55
- :size => info.size)
56
- @rectangle_class = klass
57
- load_fields(info, klass)
58
- load_methods(info, klass)
59
- end
60
-
61
- def find_cairo_rectangle_int_info
62
- repository = GObjectIntrospection::Repository.default
63
- repository.each("cairo") do |info|
64
- if info.name == "RectangleInt"
65
- return info
66
- end
67
- end
68
- nil
69
- end
70
-
71
49
  def post_load(repository, namespace)
72
50
  apply_pending_constants
73
51
  apply_pending_rectangle_functions
@@ -102,17 +80,43 @@ module Gdk
102
80
 
103
81
  def apply_pending_rectangle_functions
104
82
  get_type_info = @pending_rectangle_get_type_function
105
- gtype = get_type_info.invoke({:arguments => []})
106
- self.class.register_boxed_class_converter(gtype) do |rectangle|
107
- @rectangle_class
83
+ if get_type_info
84
+ rectangle_class = load_cairo_rectangle_int
85
+ gtype = get_type_info.invoke({:arguments => []})
86
+ self.class.register_boxed_class_converter(gtype) do |rectangle|
87
+ rectangle_class
88
+ end
89
+ else
90
+ rectangle_class = @base_module.const_get(:Rectangle)
108
91
  end
109
92
 
110
93
  @pending_rectangle_functions.each do |info|
111
- name = info.name
112
- define_method(info, @rectangle_class, name.gsub(/\Arectangle_/, ""))
94
+ name = rubyish_method_name(info, :prefix => "rectangle_")
95
+ define_method(info, rectangle_class, name)
113
96
  end
114
97
  end
115
98
 
99
+ def load_cairo_rectangle_int
100
+ info = find_cairo_rectangle_int_info
101
+ klass = self.class.define_class(info.gtype,
102
+ "Rectangle",
103
+ @base_module,
104
+ :size => info.size)
105
+ load_fields(info, klass)
106
+ load_methods(info, klass)
107
+ klass
108
+ end
109
+
110
+ def find_cairo_rectangle_int_info
111
+ repository = GObjectIntrospection::Repository.default
112
+ repository.each("cairo") do |info|
113
+ if info.name == "RectangleInt"
114
+ return info
115
+ end
116
+ end
117
+ nil
118
+ end
119
+
116
120
  def require_libraries
117
121
  require "gdk3/atom"
118
122
  require "gdk3/color"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdk3
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-16 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pango
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.3
19
+ version: 3.0.4
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.0.3
26
+ version: 3.0.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gdk_pixbuf2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.3
33
+ version: 3.0.4
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.0.3
40
+ version: 3.0.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cairo-gobject
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.3
47
+ version: 3.0.4
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.0.3
54
+ version: 3.0.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: gobject-introspection
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.3
61
+ version: 3.0.4
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.0.3
68
+ version: 3.0.4
69
69
  description: Ruby/GDK3 is a Ruby binding of GDK-3.x.
70
70
  email: ruby-gnome2-devel-en@lists.sourceforge.net
71
71
  executables: []