[perl-Gtk2] Properly bless GDK_DAMAGE events
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Properly bless GDK_DAMAGE events
- Date: Thu, 22 Apr 2010 23:08:42 +0000 (UTC)
commit 54d824618e1ec978744264b021b23aeaa1ac9fbf
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Thu Apr 22 21:57:46 2010 +0200
Properly bless GDK_DAMAGE events
t/GdkEvent.t | 12 +++++++++++-
xs/GdkEvent.xs | 4 ++++
2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/t/GdkEvent.t b/t/GdkEvent.t
index 9e00ec5..f2e8112 100644
--- a/t/GdkEvent.t
+++ b/t/GdkEvent.t
@@ -8,7 +8,7 @@
# - rm
#########################
-use Gtk2::TestHelper tests => 121;
+use Gtk2::TestHelper tests => 122;
use Data::Dumper;
# Expose #######################################################################
@@ -452,6 +452,16 @@ SKIP: {
is ($event->grab_window, $window);
}
+# Damage ######################################################################
+
+SKIP: {
+ skip ("the damage event is new in 2.14", 1)
+ unless (Gtk2->CHECK_VERSION (2, 14, 0));
+
+ isa_ok (my $event = Gtk2::Gdk::Event->new ("damage"),
+ "Gtk2::Gdk::Event::Damage");
+}
+
__END__
Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for the
diff --git a/xs/GdkEvent.xs b/xs/GdkEvent.xs
index 08b474e..317868b 100644
--- a/xs/GdkEvent.xs
+++ b/xs/GdkEvent.xs
@@ -108,6 +108,10 @@ gdk_event_get_package (GType gtype,
case GDK_GRAB_BROKEN:
return "Gtk2::Gdk::Event::GrabBroken";
#endif
+#if GTK_CHECK_VERSION (2, 14, 0)
+ case GDK_DAMAGE:
+ return "Gtk2::Gdk::Event::Damage";
+#endif
default:
{
GEnumClass * class = g_type_class_ref (GDK_TYPE_EVENT_TYPE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]