[perl-Gtk2] Wrap overlooked gdk-pixbuf 2.18 API



commit 8d51d1f23f72444439bd0b1810fa2e4eba139793
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Fri Dec 31 02:36:17 2010 +0100

    Wrap overlooked gdk-pixbuf 2.18 API

 NEWS                      |    1 +
 t/GdkPixbufSimpleAnim.t   |   10 +++++++++-
 xs/GdkPixbufSimpleAnim.xs |    8 ++++++++
 3 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 74e3731..091cc60 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Overview of changes in the next unstable release
 * Wrap gdk 2.20 and 2.22 API.
 * Wrap missing gtk+ 2.8, 2.10, 2.12, 2.14, 2.16, 2.18 and 2.20 API.
 * Wrap missing gdk 2.18 API.
+* Wrap missing gdk-pixbuf 2.18 API.
 * Gtk2::Notebook: fix invocation of window creation hooks.
 * Fix length of Gtk2::Gdk::Pixbuf->get_pixels() return.
 * Allow Gtk2::Buildable implementations to return undef from
diff --git a/t/GdkPixbufSimpleAnim.t b/t/GdkPixbufSimpleAnim.t
index d9c78d8..156abc3 100644
--- a/t/GdkPixbufSimpleAnim.t
+++ b/t/GdkPixbufSimpleAnim.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Gtk2::TestHelper tests => 130, noinit => 1,
+use Gtk2::TestHelper tests => 131, noinit => 1,
     at_least_version => [2, 8, 0, 'GdkPixbufSimpleAnim is new in 2.8'];
 
 my $simple_anim = Gtk2::Gdk::PixbufSimpleAnim->new (64, 64, 24.0);
@@ -16,6 +16,14 @@ foreach my $alpha (0..127) {
     ok (1, 'added frame');
 }
 
+SKIP: {
+    skip 'new 2.18 stuff', 1
+        unless Gtk2->CHECK_VERSION(2, 18, 0);
+
+    $simple_anim->set_loop (TRUE);
+    ok ($simple_anim->get_loop);
+}
+
 my $interactive = $ENV{INTERACTIVE} || (@ARGV > 0);
 if ($interactive && Gtk2->init_check) {
     my $window = Gtk2::Window->new;
diff --git a/xs/GdkPixbufSimpleAnim.xs b/xs/GdkPixbufSimpleAnim.xs
index 874b837..308dd2d 100644
--- a/xs/GdkPixbufSimpleAnim.xs
+++ b/xs/GdkPixbufSimpleAnim.xs
@@ -30,3 +30,11 @@ gdk_pixbuf_simple_anim_new (class, gint width, gint height, gfloat rate)
 
 void gdk_pixbuf_simple_anim_add_frame (GdkPixbufSimpleAnim *animation, GdkPixbuf *pixbuf)
 
+#if GTK_CHECK_VERSION (2, 18, 0)
+
+void gdk_pixbuf_simple_anim_set_loop (GdkPixbufSimpleAnim *animation, gboolean loop);
+
+gboolean gdk_pixbuf_simple_anim_get_loop (GdkPixbufSimpleAnim *animation);
+
+#endif /* 2.18 */
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]