>From d9997182204ed2cc6a8b2c14f1b1a522e16900cf Mon Sep 17 00:00:00 2001 From: Quentin Sculo Date: Tue, 13 Apr 2010 19:28:35 +0200 Subject: [PATCH 13/16] 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 + -- 1.6.4.4