[perl-Gtk2] Wrap gtk_viewport_get_bin_window()



commit c859955105932d3abca49708eb971385e4143710
Author: Kevin Ryde <user42 zip com au>
Date:   Sat Nov 13 06:37:55 2010 +1100

    Wrap gtk_viewport_get_bin_window()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=634710

 t/GtkViewport.t   |   12 ++++++++++--
 xs/GtkViewport.xs |    8 +++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/t/GtkViewport.t b/t/GtkViewport.t
index 9ddd329..069bf99 100644
--- a/t/GtkViewport.t
+++ b/t/GtkViewport.t
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Gtk2::TestHelper tests => 6, noinit => 1;
+use Gtk2::TestHelper tests => 7, noinit => 1;
 
 # $Id$
 
@@ -24,7 +24,15 @@ isa_ok($viewport, "Gtk2::Viewport");
 $viewport -> set_shadow_type("etched-in");
 is($viewport -> get_shadow_type(), "etched-in");
 
+SKIP: {
+    skip "new 2.20 stuff", 1
+        unless Gtk2->CHECK_VERSION(2, 20, 0);
+
+    is ($viewport->get_bin_window, undef,
+	'get_bin_window() undef when unrealized');
+}
+
 __END__
 
-Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
+Copyright (C) 2003, 2010 by the gtk2-perl team (see the file AUTHORS for the
 full list).  See LICENSE for more information.
diff --git a/xs/GtkViewport.xs b/xs/GtkViewport.xs
index b273f01..5fcc2bf 100644
--- a/xs/GtkViewport.xs
+++ b/xs/GtkViewport.xs
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
+ * Copyright (c) 2003, 2010 by the gtk2-perl team (see the file AUTHORS)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -64,3 +64,9 @@ GtkShadowType
 gtk_viewport_get_shadow_type (viewport)
 	GtkViewport * viewport
 
+#if GTK_CHECK_VERSION (2, 20, 0)
+
+GdkWindow_ornull*
+gtk_viewport_get_bin_window (GtkViewport *viewport)
+
+#endif /* 2.20 */



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