[perl-Gtk2] Wrap gdk_region_rect_equal (new in gtk+ 2.18)



commit e0869a381dead6dc5408e4e2ee49fe31b1809529
Author: Quentin Sculo <squentin free fr>
Date:   Tue Apr 13 19:28:35 2010 +0200

    Wrap gdk_region_rect_equal (new in gtk+ 2.18)

 t/GdkRegion.t   |   10 +++++++++-
 xs/GdkRegion.xs |    7 +++++++
 2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/t/GdkRegion.t b/t/GdkRegion.t
index b24de3c..8120441 100644
--- a/t/GdkRegion.t
+++ b/t/GdkRegion.t
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Gtk2::TestHelper tests => 22, noinit => 1;
+use Gtk2::TestHelper tests => 23, noinit => 1;
 
 # $Id$
 
@@ -62,6 +62,14 @@ $region -> union($region_two);
 $region -> subtract($region_two);
 $region -> xor($region_two);
 
+SKIP: {
+  skip "new 2.18 stuff", 1
+	unless Gtk2 -> CHECK_VERSION(2, 18, 0);
+	my $region= Gtk2::Gdk::Region -> rectangle($rectangle_one);
+	ok(!$region->rect_equal($rectangle_two), 'rect_equal');
+}
+
+
 __END__
 
 Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
diff --git a/xs/GdkRegion.xs b/xs/GdkRegion.xs
index ee5f977..20781e0 100644
--- a/xs/GdkRegion.xs
+++ b/xs/GdkRegion.xs
@@ -256,3 +256,10 @@ gdk_region_spans_intersect_foreach (region, spans_ref, sorted, func, data=NULL)
 
 	gperl_callback_destroy (callback);
 	g_free (spans);
+
+#if GTK_CHECK_VERSION (2, 18, 0)
+
+gboolean gdk_region_rect_equal (const GdkRegion *region, const GdkRectangle *rectangle);
+
+#endif
+



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