gdk3 2.2.3 → 2.2.4

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: 3624c05778aca4682f86b8b9f5eafd4a9a851e9f
4
- data.tar.gz: ff818f4fc593da1c621656ad52032aa06a158628
3
+ metadata.gz: 8fb6a6ffa274f7d19f464561c1c9c9d31488797e
4
+ data.tar.gz: d70a7a19bd10a9f153756071e893c89aa8f98626
5
5
  SHA512:
6
- metadata.gz: ce2cccad5bc1c4e33bb7efe128a81beca80b19b84ba46ed736d0841c261c16cb7687eaf67895cdcdf3b89284405631a7a94daa7d1b4bb2a56738d60d384f67a1
7
- data.tar.gz: 9a495352a75bd4f523602546f506292d842366f3c83ca900afe6717e1bb8997d8347674ca019f2a22dd429721fd6be79d1acd1984856e12466d72f5f3b9b5a04
6
+ metadata.gz: da1e352a3f37a5965fff3418f9129b8401d00fb9e59d3448b1bf0d2783bc12d5777c06032724b39759610367df076301fcd4bbb1b690beb5ed14e537af90e90b
7
+ data.tar.gz: a40ea46084e97b457562940a49411f304360ecdc338091f3e4a71c0835302143fbbab2327972c5ca41340519713645cda12661399529c267c43655086da88840
data/Rakefile CHANGED
@@ -47,7 +47,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
47
47
  :name => "gtk+",
48
48
  :download_site => :gnome,
49
49
  :label => "GTK+",
50
- :version => "3.14.1",
50
+ :version => "3.14.6",
51
51
  :compression_method => "xz",
52
52
  :windows => {
53
53
  :configure_args => [
@@ -60,14 +60,14 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
60
60
  },
61
61
  },
62
62
  {
63
- :name => "hicolor-icon-theme",
64
- :download_base_url => "http://icon-theme.freedesktop.org/releases",
65
- :label => "gtk-hi-color-icon-theme",
66
- :version => "0.13",
63
+ :name => "adwaita-icon-theme",
64
+ :download_site => :gnome,
65
+ :label => "adwaita-icon-theme",
66
+ :version => "3.14.1",
67
67
  :windows => {
68
68
  :configure_args => [],
69
69
  :build_concurrently => false,
70
- :built_file => "share/icons/hicolor/index.theme",
70
+ :built_file => "share/icons/Adwaita/index.theme",
71
71
  }
72
72
  },
73
73
  ]
@@ -36,11 +36,15 @@ module Cairo
36
36
 
37
37
  if method_defined?(:set_source_rgba)
38
38
  alias_method :set_source_not_gdk_rgba, :set_source_rgba
39
- def set_source_rgba(rgba)
40
- if rgba.is_a?(Gdk::RGBA)
39
+ def set_source_rgba(rgba, g=nil, b=nil, a=nil)
40
+ case rgba
41
+ when Gdk::RGBA
41
42
  set_source_gdk_rgba(rgba)
42
- else
43
+ when Array
43
44
  set_source_not_gdk_rgba(rgba)
45
+ else
46
+ r = rgba
47
+ set_source_not_gdk_rgba([r, g, b, a])
44
48
  end
45
49
  end
46
50
  else
@@ -16,6 +16,28 @@
16
16
 
17
17
  module Gdk
18
18
  class Color
19
+ class << self
20
+ alias_method :parse_raw, :parse
21
+ def parse(spec)
22
+ succeeded, color = parse_raw(spec)
23
+ unless succeeded
24
+ message = "Invalid color spec: <#{spec.inspect}>: "
25
+ message << "Color spec must be one of them: "
26
+ message << "\"\#rgb\", "
27
+ message << "\"\#rrggbb\", "
28
+ message << "\"\#rrggbb\", "
29
+ message << "\"\#rrrgggbbb\", "
30
+ message << "\"\#rrrrggggbbbb\", "
31
+ message << "\"\#fff\", "
32
+ message << "\"\#ffffff\", "
33
+ message << "\"\#fffffffff\", "
34
+ message << "\"\#fffffffffffff\""
35
+ raise ArgumentError, message
36
+ end
37
+ color
38
+ end
39
+ end
40
+
19
41
  alias_method :initialize_raw, :initialize
20
42
  def initialize(red, green, blue)
21
43
  initialize_raw
@@ -53,11 +53,8 @@ module Gdk
53
53
 
54
54
  class Event
55
55
  extend GLib::Deprecatable
56
- define_deprecated_flags :Mask
57
- define_deprecated_enums :Type
58
- Gdk::EventMask.constants.each do |event_mask|
59
- define_deprecated_const event_mask, ['Gdk::EventMask', event_mask].join('::')
60
- end
56
+ define_deprecated_const :Mask, "Gdk::EventMask"
57
+ define_deprecated_const :Type, "Gdk::EventType"
61
58
  end
62
59
 
63
60
  class EventCrossing
@@ -134,17 +131,20 @@ module Gdk
134
131
 
135
132
  class Window
136
133
  extend GLib::Deprecatable
137
- define_deprecated_flags :AttributesType, 'WA'
138
- define_deprecated_enums :Edge, 'EDGE'
139
- define_deprecated_enums :FilterReturn, 'FILTER'
140
- define_deprecated_enums :Gravity, 'GRAVITY'
141
- define_deprecated_flags :Hints, 'HINT'
142
- define_deprecated_flags :ModifierType
143
- define_deprecated_enums :Type
144
- define_deprecated_enums :TypeHint, 'TYPE_HINT'
145
- define_deprecated_const :WindowClass, 'Gdk::Window::Class'
146
- define_deprecated_flags :WMDecoration, 'DECOR'
147
- define_deprecated_flags :WMFunction, 'FUNC'
134
+
135
+ define_deprecated_const :Gravity, "Gdk::Gravity"
136
+ define_deprecated_const :AttributesType, "Gdk::WindowAttributesType"
137
+ define_deprecated_const :Edge, "Gdk::WindowEdge"
138
+ define_deprecated_const :FilterReturn, "Gdk::FilterReturn"
139
+ define_deprecated_const :Hints, "Gdk::WindowHints"
140
+ define_deprecated_const :ModifierType, "Gdk::ModifierType"
141
+ define_deprecated_const :Type, "Gdk::WindowType"
142
+ define_deprecated_const :TypeHint, "Gdk::WindowTypeHint"
143
+ define_deprecated_const :WindowClass, "Gdk::WindowWindowClass"
144
+ define_deprecated_const :Class, "Gdk::WindowWindowClass"
145
+ define_deprecated_const :WMDecoration, "Gdk::WMDecoration"
146
+ define_deprecated_const :WMFunction, "Gdk::WMFunction"
147
+ define_deprecated_const :PARENT_RELATIVE, "Gdk::PARENT_RELATIVE"
148
148
  define_deprecated_method :clear, :warn => "Don't use this method."
149
149
  define_deprecated_method :clear_area, :warn => "Don't use this method."
150
150
  define_deprecated_method :internal_paint_info, :raise => "Don't use this method."
@@ -218,6 +218,9 @@ module Gdk
218
218
  else
219
219
  define_method(info, Cairo::Context, name)
220
220
  end
221
+ when /\Akeyval_/
222
+ name = rubyish_method_name(info, :prefix => "keyval_")
223
+ define_module_function(@keyval_module, name, info)
221
224
  else
222
225
  super
223
226
  end
@@ -237,10 +240,6 @@ module Gdk
237
240
 
238
241
  def define_enum(info)
239
242
  case info.name
240
- when /\AWindowWindow/
241
- self.class.define_class(info.gtype, $POSTMATCH, window_class)
242
- when /\AWindow/
243
- self.class.define_class(info.gtype, $POSTMATCH, window_class)
244
243
  when "EventType"
245
244
  self.class.register_constant_rename_map("2BUTTON_PRESS",
246
245
  "BUTTON2_PRESS")
@@ -32,10 +32,40 @@ class TestGdkCairo < Test::Unit::TestCase
32
32
  @context.source.color)
33
33
  end
34
34
 
35
- def test_set_source_rgba
36
- rgba = Gdk::RGBA.new(0.1, 0.2, 0.3, 0.4)
37
- @context.source_rgba = rgba
38
- assert_equal(Cairo::Color::RGB.new(0.1, 0.2, 0.3, 0.4),
39
- @context.source.color)
35
+ sub_test_case "#set_source_rgba" do
36
+ sub_test_case "RGBA" do
37
+ def test_rgba
38
+ rgba = Gdk::RGBA.new(0.1, 0.2, 0.3, 0.4)
39
+ @context.source_rgba = rgba
40
+ assert_equal(Cairo::Color::RGB.new(0.1, 0.2, 0.3, 0.4),
41
+ @context.source.color)
42
+ end
43
+
44
+ def test_values
45
+ @context.set_source_rgba(0.1, 0.2, 0.3, 0.4)
46
+ assert_equal([0.1, 0.2, 0.3, 0.4],
47
+ @context.source.rgba)
48
+ end
49
+
50
+ def test_array
51
+ @context.set_source_rgba([0.1, 0.2, 0.3, 0.4])
52
+ assert_equal([0.1, 0.2, 0.3, 0.4],
53
+ @context.source.rgba)
54
+ end
55
+ end
56
+
57
+ sub_test_case "RGB" do
58
+ def test_values
59
+ @context.set_source_rgb(0.1, 0.2, 0.3)
60
+ assert_equal([0.1, 0.2, 0.3, 1.0],
61
+ @context.source.rgba)
62
+ end
63
+
64
+ def test_array
65
+ @context.set_source_rgb([0.1, 0.2, 0.3])
66
+ assert_equal([0.1, 0.2, 0.3, 1.0],
67
+ @context.source.rgba)
68
+ end
69
+ end
40
70
  end
41
71
  end
@@ -17,6 +17,31 @@
17
17
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
19
  class TestGdkColor < Test::Unit::TestCase
20
+ sub_test_case ".parse" do
21
+ def test_invalid_spec
22
+ spec = "fff"
23
+ message = "Invalid color spec: <#{spec.inspect}>: "
24
+ message << "Color spec must be one of them: "
25
+ message << "\"\#rgb\", "
26
+ message << "\"\#rrggbb\", "
27
+ message << "\"\#rrggbb\", "
28
+ message << "\"\#rrrgggbbb\", "
29
+ message << "\"\#rrrrggggbbbb\", "
30
+ message << "\"\#fff\", "
31
+ message << "\"\#ffffff\", "
32
+ message << "\"\#fffffffff\", "
33
+ message << "\"\#fffffffffffff\""
34
+ assert_raise(ArgumentError.new(message)) do
35
+ Gdk::Color.parse(spec)
36
+ end
37
+ end
38
+
39
+ def test_valid
40
+ color = Gdk::Color.parse("#abc")
41
+ assert_equal("#aaaabbbbcccc", color.to_s)
42
+ end
43
+ end
44
+
20
45
  def test_to_s
21
46
  color = Gdk::Color.new(0xffff, 0x1234, 0xabcd)
22
47
  assert_equal("#ffff1234abcd", color.to_s)
@@ -18,4 +18,59 @@ class TestGdkKeyval < Test::Unit::TestCase
18
18
  def test_consntant_name
19
19
  assert_equal("a".unpack("c")[0], Gdk::Keyval::KEY_a)
20
20
  end
21
+
22
+ sub_test_case "#lower?" do
23
+ def test_lower
24
+ assert_true(Gdk::Keyval.lower?(Gdk::Keyval::KEY_a))
25
+ end
26
+
27
+ def test_upper
28
+ assert_false(Gdk::Keyval.lower?(Gdk::Keyval::KEY_A))
29
+ end
30
+ end
31
+
32
+ sub_test_case "#upper?" do
33
+ def test_lower
34
+ assert_false(Gdk::Keyval.upper?(Gdk::Keyval::KEY_a))
35
+ end
36
+
37
+ def test_upper
38
+ assert_true(Gdk::Keyval.upper?(Gdk::Keyval::KEY_A))
39
+ end
40
+ end
41
+
42
+ def test_name
43
+ assert_equal("A", Gdk::Keyval.name(Gdk::Keyval::KEY_A))
44
+ end
45
+
46
+ sub_test_case "#to_lower" do
47
+ def test_lower
48
+ assert_equal(Gdk::Keyval::KEY_a,
49
+ Gdk::Keyval.to_lower(Gdk::Keyval::KEY_a))
50
+ end
51
+
52
+ def test_upper
53
+ assert_equal(Gdk::Keyval::KEY_a,
54
+ Gdk::Keyval.to_lower(Gdk::Keyval::KEY_A))
55
+ end
56
+ end
57
+
58
+ sub_test_case "#to_upper" do
59
+ def test_lower
60
+ assert_equal(Gdk::Keyval::KEY_A,
61
+ Gdk::Keyval.to_upper(Gdk::Keyval::KEY_a))
62
+ end
63
+
64
+ def test_upper
65
+ assert_equal(Gdk::Keyval::KEY_A,
66
+ Gdk::Keyval.to_upper(Gdk::Keyval::KEY_A))
67
+ end
68
+ end
69
+
70
+ sub_test_case "#to_unicode" do
71
+ def test_to_unicode
72
+ assert_equal("\u02D8", # BREVE
73
+ [Gdk::Keyval.to_unicode(Gdk::Keyval::KEY_breve)].pack("U"))
74
+ end
75
+ end
21
76
  end
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 Ruby-GNOME2 Project Team
3
+ # Copyright (C) 2013-2014 Ruby-GNOME2 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
@@ -24,8 +24,8 @@ class TestGdkWindowAttr < Test::Unit::TestCase
24
24
  assert_equal([
25
25
  100,
26
26
  100,
27
- Gdk::Window::Class::INPUT_ONLY,
28
- Gdk::Window::Type::TEMP,
27
+ Gdk::WindowWindowClass::INPUT_ONLY,
28
+ Gdk::WindowType::TEMP,
29
29
  ],
30
30
  [attrs.width, attrs.height, attrs.wclass, attrs.window_type])
31
31
  end
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: 2.2.3
4
+ version: 2.2.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: 2014-10-26 00:00:00.000000000 Z
11
+ date: 2014-12-23 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: 2.2.3
19
+ version: 2.2.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: 2.2.3
26
+ version: 2.2.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: 2.2.3
33
+ version: 2.2.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: 2.2.3
40
+ version: 2.2.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: 2.2.3
47
+ version: 2.2.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: 2.2.3
54
+ version: 2.2.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: 2.2.3
61
+ version: 2.2.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: 2.2.3
68
+ version: 2.2.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: []