[perl-Gtk2] Wrap gdk_x11_screen_get_monitor_output (new in gtk+ 2.14)



commit b2ecaa57d30df968a242d77f517256c7164a015b
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Thu Apr 22 22:37:07 2010 +0200

    Wrap gdk_x11_screen_get_monitor_output (new in gtk+ 2.14)

 t/GdkX11.t   |   12 ++++++++++--
 xs/GdkX11.xs |    6 ++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/t/GdkX11.t b/t/GdkX11.t
index 45ea2f2..690e551 100644
--- a/t/GdkX11.t
+++ b/t/GdkX11.t
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Gtk2::TestHelper tests => 13;
+use Gtk2::TestHelper tests => 14;
 
 # $Id$
 
@@ -8,7 +8,7 @@ my $window = Gtk2::Window -> new();
 $window -> realize();
 
 SKIP: {
-  skip("X11 stuff", 11)
+  skip("X11 stuff", 12)
     unless $window -> window() -> can("get_xid");
 
   like($window -> window() -> get_xid(), qr/^\d+$/);
@@ -81,6 +81,14 @@ SKIP: {
     my $startup_id = $display -> get_startup_notification_id();
     ok(TRUE); # $startup_id might be undef, so we can't really test
   }
+
+  SKIP: {
+    skip '2.14 stuff', 1
+      unless Gtk2->CHECK_VERSION(2, 14, 0);
+
+    my $screen = Gtk2::Gdk::Screen -> get_default();
+    ok(defined $screen -> get_monitor_output(0));
+  }
 }
 
 SKIP: {
diff --git a/xs/GdkX11.xs b/xs/GdkX11.xs
index 9241c69..58ceded 100644
--- a/xs/GdkX11.xs
+++ b/xs/GdkX11.xs
@@ -175,6 +175,12 @@ gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, GdkAtom propert
 
 #endif /* 2.2.0 */
 
+#if GTK_CHECK_VERSION (2, 14, 0)
+
+UV gdk_x11_screen_get_monitor_output (GdkScreen *screen, gint monitor_num);
+
+#endif /* 2.14.0 */
+
 #endif /* GDK_WINDOWING_X11 */
 
 # --------------------------------------------------------------------------- #



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