gdk_pixbuf2 3.0.8-x64-mingw32 → 3.0.9-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/lib/gdk_pixbuf2.rb +11 -69
  4. data/lib/gdk_pixbuf2/deprecated.rb +160 -0
  5. data/lib/gdk_pixbuf2/loader.rb +51 -0
  6. data/lib/gdk_pixbuf2/pixbuf-loader.rb +24 -0
  7. data/lib/gdk_pixbuf2/pixbuf.rb +282 -0
  8. data/lib/gdk_pixbuf2/version.rb +33 -0
  9. data/sample/anim.rb +2 -2
  10. data/sample/composite.rb +41 -11
  11. data/sample/flip.rb +2 -2
  12. data/sample/format.rb +2 -4
  13. data/sample/loader.rb +3 -3
  14. data/sample/rotate.rb +4 -4
  15. data/sample/save.rb +3 -3
  16. data/sample/scale.rb +14 -6
  17. data/sample/simpleanim.rb +10 -4
  18. data/sample/utils.rb +7 -4
  19. data/sample/xpm.rb +9 -9
  20. data/test/fixture/floppybuddy.gif +0 -0
  21. data/test/fixture/gnome-logo-icon.png +0 -0
  22. data/test/fixture/image.gresource +0 -0
  23. data/test/fixture/image.gresource.xml +6 -0
  24. data/test/gdk_pixbuf2-test-utils.rb +11 -0
  25. data/test/run-test.rb +6 -3
  26. data/test/test-animation.rb +30 -0
  27. data/test/test-loader.rb +31 -0
  28. data/test/test-pixbuf.rb +334 -0
  29. data/vendor/local/bin/gdk-pixbuf-csource.exe +0 -0
  30. data/vendor/local/bin/gdk-pixbuf-pixdata.exe +0 -0
  31. data/vendor/local/bin/gdk-pixbuf-query-loaders.exe +0 -0
  32. data/vendor/local/bin/libgdk_pixbuf-2.0-0.dll +0 -0
  33. data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.a +0 -0
  34. data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll +0 -0
  35. data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll.a +0 -0
  36. data/vendor/local/lib/libgdk_pixbuf-2.0.dll.a +0 -0
  37. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/GdkPixbufLoader.html +59 -59
  38. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Animations.html +64 -64
  39. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-Loading.html +89 -89
  40. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-saving.html +85 -85
  41. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Image-Data-in-Memory.html +23 -23
  42. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Inline-data.html +36 -36
  43. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Module-Interface.html +46 -46
  44. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html +10 -10
  45. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Scaling.html +13 -13
  46. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html +52 -52
  47. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Utilities.html +10 -10
  48. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-X-Drawables-to-Pixbufs.html +3 -3
  49. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-XlibRGB.html +4 -4
  50. metadata +17 -25
  51. data/README +0 -29
  52. data/ext/gdk_pixbuf2/depend +0 -11
  53. data/ext/gdk_pixbuf2/extconf.rb +0 -68
  54. data/ext/gdk_pixbuf2/gdk_pixbuf2.def +0 -2
  55. data/ext/gdk_pixbuf2/rbgdk-pixbuf-format.c +0 -179
  56. data/ext/gdk_pixbuf2/rbgdk-pixbuf-loader.c +0 -164
  57. data/ext/gdk_pixbuf2/rbgdk-pixbuf.c +0 -737
  58. data/ext/gdk_pixbuf2/rbgdk-pixbuf.h +0 -41
  59. data/ext/gdk_pixbuf2/rbgdk-pixbuf2conversions.h +0 -42
  60. data/ext/gdk_pixbuf2/rbgdk-pixbuf2private.h +0 -35
  61. data/ext/gdk_pixbuf2/rbgdk-pixbufanimation.c +0 -93
  62. data/ext/gdk_pixbuf2/rbgdk-pixbufanimationiter.c +0 -71
  63. data/ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c +0 -53
  64. data/ext/gdk_pixbuf2/rbgdk-pixdata.c +0 -213
  65. data/extconf.rb +0 -49
  66. data/lib/2.2/gdk_pixbuf2.so +0 -0
  67. data/lib/2.3/gdk_pixbuf2.so +0 -0
  68. data/sample/inline.rb +0 -37
  69. data/sample/pixdata.rb +0 -39
  70. data/test/test-version.rb +0 -47
@@ -0,0 +1,33 @@
1
+ # Copyright (C) 2016 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ module GdkPixbuf
18
+ module Version
19
+ STRING = [MAJOR, MINOR, MICRO].join(".")
20
+
21
+ class << self
22
+ def or_later?(major, minor, micro=nil)
23
+ micro ||= 0
24
+ version = [
25
+ MAJOR,
26
+ MINOR,
27
+ MICRO,
28
+ ]
29
+ (version <=> [major, minor, micro]) >= 0
30
+ end
31
+ end
32
+ end
33
+ end
data/sample/anim.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  anim.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2002-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: anim.rb,v 1.5 2006/06/17 14:38:08 mutoh Exp $
@@ -16,7 +16,7 @@ w.signal_connect('delete-event') do
16
16
  end
17
17
 
18
18
  box = Gtk::VBox.new
19
- src = Gdk::PixbufAnimation.new("floppybuddy.gif")
19
+ src = GdkPixbuf::PixbufAnimation.new(File.join(__dir__, "floppybuddy.gif"))
20
20
  box.pack_start(Gtk::Image.new(src))
21
21
  p src.width
22
22
  p src.height
data/sample/composite.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  composite.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2002-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: composite.rb,v 1.6 2006/06/17 14:38:08 mutoh Exp $
@@ -16,23 +16,53 @@ unless filename
16
16
  exit(1)
17
17
  end
18
18
 
19
- src = Gdk::Pixbuf.new(filename)
19
+ src = GdkPixbuf::Pixbuf.new(:file => filename)
20
20
 
21
21
  vbox = Gtk::VBox.new
22
22
 
23
- dst = src.composite(100, 100, Gdk::Pixbuf::INTERP_HYPER,
24
- 200, 32, 0xFF0000, 0x00FF00)
23
+ dst = src.composite(:dest_width => 100,
24
+ :dest_height => 100,
25
+ :interp_type => :hyper,
26
+ :overall_alpha => 255,
27
+ :check_size => 32,
28
+ :color1 => 0xFF0000,
29
+ :color2 => 0x00FF00)
25
30
  vbox.pack_start(Gtk::Image.new(dst))
26
31
 
27
- dst = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
28
- dst.composite!(src, 0, 0, 200, 200, 0, 0, 1.8, 1.8,
29
- Gdk::Pixbuf::INTERP_HYPER, 200)
32
+ dst = GdkPixbuf::Pixbuf.new(:colorspace => :rgb,
33
+ :has_alpha => true,
34
+ :bits_per_sample => 8,
35
+ :width =>200,
36
+ :height => 200)
37
+ dst.composite!(src,
38
+ :dest_width => 200,
39
+ :dest_height => 200,
40
+ :scale_x => 1.8,
41
+ :scale_y => 1.8,
42
+ :interp_type => :hyper,
43
+ :overall_alpha => 200)
30
44
  vbox.pack_start(Gtk::Image.new(dst))
31
45
 
32
- dst = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
33
- dst.composite!(src, 10, 10, 180, 180, 15, 15, 3, 2,
34
- Gdk::Pixbuf::INTERP_BILINEAR, 200, 100, 100, 16,
35
- 0x999999, 0xdddddd)
46
+ dst = GdkPixbuf::Pixbuf.new(:colorspace => :rgb,
47
+ :has_alpha => true,
48
+ :bits_per_sample => 8,
49
+ :width =>200,
50
+ :height => 200)
51
+ dst.composite!(src,
52
+ :dest_x => 10,
53
+ :dest_y => 10,
54
+ :dest_width => 180,
55
+ :dest_height => 180,
56
+ :offset_x => 15,
57
+ :offset_y => 15,
58
+ :scale_x => 3,
59
+ :scale_y => 2,
60
+ :overall_alpha => 200,
61
+ :check_x => 100,
62
+ :check_y => 100,
63
+ :check_size => 16,
64
+ :color1 => 0x999999,
65
+ :color2 => 0xdddddd)
36
66
  vbox.pack_start(Gtk::Image.new(dst))
37
67
 
38
68
  window = Gtk::Window.new.add(vbox)
data/sample/flip.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  flip.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2005,2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2005-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: flip.rb,v 1.3 2006/06/17 14:38:08 mutoh Exp $
@@ -25,7 +25,7 @@ end
25
25
 
26
26
  vbox = Gtk::VBox.new
27
27
 
28
- src = Gdk::Pixbuf.new(filename)
28
+ src = GdkPixbuf::Pixbuf.new(:file => filename)
29
29
  vbox.add(Gtk::Image.new(src))
30
30
 
31
31
  # Horizontal
data/sample/format.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  format.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2004-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: format.rb,v 1.4 2006/06/17 14:38:08 mutoh Exp $
@@ -22,14 +22,12 @@ unless filename
22
22
  exit(1)
23
23
  end
24
24
 
25
- puts fileinfo = Gdk::Pixbuf.get_file_info(filename)[0]
25
+ puts fileinfo = GdkPixbuf::Pixbuf.get_file_info(filename)[0]
26
26
  puts "name = #{fileinfo.name}"
27
27
  puts "description = #{fileinfo.description}"
28
28
  puts "mime_types = #{fileinfo.mime_types.inspect}"
29
29
  puts "extensions = #{fileinfo.extensions.inspect}"
30
30
  puts "writable = #{fileinfo.writable?}"
31
- puts "domain = #{fileinfo.domain}"
32
- puts "signature = #{fileinfo.signature.inspect}"
33
31
 
34
32
  if Gtk.check_version?(2, 6, 0)
35
33
  puts "Since 2.6 --- "
data/sample/loader.rb CHANGED
@@ -2,15 +2,15 @@
2
2
  =begin
3
3
  loader.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2003,2006: Ruby-GNOME2 Project Team
5
+ Copyright (c) 2003-2016: Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: loader.rb,v 1.3 2006/06/17 14:38:08 mutoh Exp $
9
9
  =end
10
10
  require 'gtk2'
11
11
 
12
- loader = Gdk::PixbufLoader.new
13
- File.open("gnome-foot.png","rb") { |f|
12
+ loader = GdkPixbuf::PixbufLoader.new
13
+ File.open(File.join(__dir__, "gnome-foot.png"), "rb") { |f|
14
14
  loader.last_write(f.read)
15
15
  }
16
16
  pixbuf = loader.pixbuf
data/sample/rotate.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  rotate.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2005,2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2005-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: rotate.rb,v 1.3 2006/06/17 14:38:08 mutoh Exp $
@@ -25,13 +25,13 @@ end
25
25
 
26
26
  vbox = Gtk::VBox.new
27
27
 
28
- src = Gdk::Pixbuf.new(filename)
28
+ src = GdkPixbuf::Pixbuf.new(:file => filename)
29
29
  vbox.add(Gtk::Image.new(src))
30
30
 
31
- dst = src.rotate(Gdk::Pixbuf::ROTATE_COUNTERCLOCKWISE)
31
+ dst = src.rotate(:counterclockwise)
32
32
  vbox.add(Gtk::Image.new(dst))
33
33
 
34
- dst2 = src.rotate(Gdk::Pixbuf::ROTATE_UPSIDEDOWN)
34
+ dst2 = src.rotate(:upsidedown)
35
35
  vbox.add(Gtk::Image.new(dst2))
36
36
 
37
37
  window = Gtk::Window.new
data/sample/save.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  save.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2002-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: save.rb,v 1.5 2006/06/17 14:38:08 mutoh Exp $
@@ -17,9 +17,9 @@ if ! from or ! to
17
17
  exit(1)
18
18
  end
19
19
 
20
- src = Gdk::Pixbuf.new(from)
20
+ src = GdkPixbuf::Pixbuf.new(from)
21
21
 
22
- dst = src.scale(300, 300, Gdk::Pixbuf::INTERP_HYPER)
22
+ dst = src.scale(300, 300, :hyper)
23
23
  # This doesn't work ....
24
24
  #dst.save(to, "jpeg", {:quality => 100})
25
25
  dst.save(to, "png")
data/sample/scale.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  scale.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2002-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: scale.rb,v 1.10 2006/06/17 14:38:08 mutoh Exp $
@@ -18,20 +18,28 @@ end
18
18
 
19
19
  vbox = Gtk::VBox.new
20
20
 
21
- src = Gdk::Pixbuf.new(filename)
21
+ src = GdkPixbuf::Pixbuf.new(:file => filename)
22
22
  vbox.add(Gtk::Image.new(src))
23
23
 
24
- dst = src.scale(200, 200, Gdk::Pixbuf::INTERP_NEAREST)
24
+ dst = src.scale(200, 200, :nearest)
25
25
  dst.scale!(src, 60, 60, 90, 90, -50, 50, 6, 3)
26
26
  vbox.add(Gtk::Image.new(dst))
27
27
 
28
- dst2 = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
28
+ dst2 = GdkPixbuf::Pixbuf.new(:colorspace => :rgb,
29
+ :has_alpha =>true,
30
+ :bits_per_sample => 8,
31
+ :width => 200,
32
+ :height => 200)
29
33
  dst2.scale!(src, 0, 0, 100, 100, 0, 0, 1.5, 1.5)
30
34
 
31
35
  vbox.add(Gtk::Image.new(dst2))
32
36
 
33
- dst3 = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 200, 200)
34
- dst3.scale!(src, 0, 0, 200, 200, 0, 0, 5, 3, Gdk::Pixbuf::INTERP_HYPER)
37
+ dst3 = GdkPixbuf::Pixbuf.new(:colorspace => :rgb,
38
+ :has_alpha =>true,
39
+ :bits_per_sample => 8,
40
+ :width => 200,
41
+ :height => 200)
42
+ dst3.scale!(src, 0, 0, 200, 200, 0, 0, 5, 3, :hyper)
35
43
  vbox.add(Gtk::Image.new(dst3))
36
44
 
37
45
  window = Gtk::Window.new
data/sample/simpleanim.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin
3
3
  simpleanim.rb - Ruby/GdkPixbuf sample script for Gdk::PixbufSimpleAnim.
4
-
4
+
5
5
  Inspired by http://mail.gnome.org/archives/gtk-perl-list/2005-September/msg00110.html
6
6
 
7
- Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
7
+ Copyright (c) 2002-2016 Ruby-GNOME2 Project Team
8
8
  This program is licenced under the same licence as Ruby-GNOME2.
9
9
 
10
10
  $Id: simpleanim.rb,v 1.2 2006/06/17 14:38:08 mutoh Exp $
@@ -14,13 +14,19 @@ require 'gtk2'
14
14
 
15
15
  $stdout.sync = true
16
16
 
17
- simple_anim = Gdk::PixbufSimpleAnim.new(64, 64, 24)
17
+ simple_anim = GdkPixbuf::PixbufSimpleAnim.new(64, 64, 24)
18
18
  store_pixels = []
19
19
 
20
20
  print 'generating frames'
21
21
  for red in 0 .. 126
22
22
  store_pixels << pixels = ([ 4*(63-red).abs, 0, 0 ] * (64*64)).pack('C*')
23
- pixbuf = Gdk::Pixbuf.new(pixels, Gdk::Pixbuf::COLORSPACE_RGB, false, 8, 64, 64, 64*3)
23
+ pixbuf = GdkPixbuf::Pixbuf.new(:data => pixels,
24
+ :colorspace => :rgb,
25
+ :has_alpha =>false,
26
+ :bits_per_sample => 8,
27
+ :width => 64,
28
+ :height => 64,
29
+ :row_stride => 64*3)
24
30
  simple_anim.add_frame(pixbuf)
25
31
  print '.'
26
32
  end
data/sample/utils.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  utils.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2002-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: utils.rb,v 1.4 2006/06/17 14:38:08 mutoh Exp $
@@ -16,15 +16,18 @@ unless filename
16
16
  exit(1)
17
17
  end
18
18
 
19
- src = Gdk::Pixbuf.new(filename)
19
+ src = GdkPixbuf::Pixbuf.new(:file => filename)
20
20
 
21
21
  vbox = Gtk::VBox.new
22
22
 
23
23
  dst = src.add_alpha(true, 0, 0, 0)
24
24
  vbox.pack_start(Gtk::Image.new(dst))
25
25
 
26
- dst = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8,
27
- src.width + 20, src.height + 30)
26
+ dst = GdkPixbuf::Pixbuf.new(:colorspace => :rgb,
27
+ :has_alpha => true,
28
+ :bits_per_sample => 8,
29
+ :width => src.width + 20,
30
+ :height => src.height + 30)
28
31
  src.copy_area(0, 0, src.width / 2, src.height / 2, dst, 10, 20)
29
32
  vbox.pack_start(Gtk::Image.new(dst))
30
33
 
data/sample/xpm.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  =begin
3
3
  xpm.rb - Ruby/GdkPixbuf sample script.
4
4
 
5
- Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
5
+ Copyright (c) 2002-2016 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
7
7
 
8
8
  $Id: xpm.rb,v 1.5 2006/06/17 14:38:08 mutoh Exp $
@@ -11,11 +11,11 @@
11
11
  require 'gtk2'
12
12
 
13
13
  r_xpm = [
14
- "10 10 3 1",
15
- " c None",
16
- ". c #FE0B0B",
17
- "+ c #FFFFFF",
18
- "+.......++",
14
+ "10 10 3 1",
15
+ " c None",
16
+ ". c #FE0B0B",
17
+ "+ c #FFFFFF",
18
+ "+.......++",
19
19
  "+.. ..+",
20
20
  "+.. ..+",
21
21
  "+.. ...+",
@@ -24,15 +24,15 @@ r_xpm = [
24
24
  "+..++..+++",
25
25
  "+..++...++",
26
26
  "+..+++...+",
27
- "+..++++..+"]
27
+ "+..++++..+"]
28
28
 
29
29
  w = Gtk::Window.new
30
30
  w.signal_connect('delete-event') do
31
31
  Gtk.main_quit
32
32
  end
33
33
 
34
- src = Gdk::Pixbuf.new(r_xpm)
35
- dst = src.scale(300, 300, Gdk::Pixbuf::INTERP_HYPER)
34
+ src = GdkPixbuf::Pixbuf.new(:xpm => r_xpm)
35
+ dst = src.scale(300, 300, :hyper)
36
36
 
37
37
  w.add(Gtk::Image.new(dst))
38
38
  w.show_all
Binary file
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <gresources>
3
+ <gresource prefix="/org/ruby/gnome">
4
+ <file>gnome-logo-icon.png</file>
5
+ </gresource>
6
+ </gresources>
@@ -17,4 +17,15 @@
17
17
  require "test-unit"
18
18
 
19
19
  module GdkPixbufTestUtils
20
+ private
21
+ def only_version(major, minor, micro=nil)
22
+ micro ||= 0
23
+ unless GdkPixbuf::Version.or_later?(major, minor, micro)
24
+ omit("Require GdkPixbuf >= #{major}.#{minor}.#{micro}")
25
+ end
26
+ end
27
+
28
+ def fixture_path(*components)
29
+ File.join(File.dirname(__FILE__), "fixture", *components)
30
+ end
20
31
  end
data/test/run-test.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (C) 2015 Ruby-GNOME2 Project Team
3
+ # Copyright (C) 2016 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
@@ -20,14 +20,17 @@ ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
20
20
  ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
21
21
 
22
22
  glib_base = File.join(ruby_gnome2_base, "glib2")
23
+ gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
23
24
  gdk_pixbuf2_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
24
25
 
25
26
  modules = [
26
27
  [glib_base, "glib2"],
27
- [gdk_pixbuf2_base, "gdk_pixbuf2"]
28
+ [gobject_introspection_base, "gobject-introspection"],
29
+ [gdk_pixbuf2_base, "gdk_pixbuf2"],
28
30
  ]
29
31
  modules.each do |target, module_name|
30
- if system("which make > /dev/null")
32
+ makefile = File.join(target, "Makefile")
33
+ if File.exist?(makefile) and system("which make > /dev/null")
31
34
  `make -C #{target.dump} > /dev/null` or exit(false)
32
35
  end
33
36
  $LOAD_PATH.unshift(File.join(target, "ext", module_name))