[perl-Gtk2] Wrap gtk_scale_add_mark and gtk_scale_clear_marks (new in gtk+ 2.16)
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Wrap gtk_scale_add_mark and gtk_scale_clear_marks (new in gtk+ 2.16)
- Date: Tue, 20 Apr 2010 21:09:19 +0000 (UTC)
commit 97b86a175dcabc8660ffd21dbf8ef7ec6d750af5
Author: Quentin Sculo <squentin free fr>
Date: Tue Apr 13 18:57:19 2010 +0200
Wrap gtk_scale_add_mark and gtk_scale_clear_marks (new in gtk+ 2.16)
t/GtkScale.t | 15 +++++++++++++--
xs/GtkScale.xs | 14 ++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/t/GtkScale.t b/t/GtkScale.t
index f2099c8..f04d1a2 100644
--- a/t/GtkScale.t
+++ b/t/GtkScale.t
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
use strict;
-use Gtk2::TestHelper tests => 6;
+use Gtk2::TestHelper tests => 7;
# $Id$
@@ -26,7 +26,18 @@ SKIP: {
is(@{[$scale -> get_layout_offsets()]}, 2);
}
+SKIP: {
+ skip("gtk_scale_add_mark and gtk_scale_clear_marks are new in 2.16", 1)
+ unless Gtk2->CHECK_VERSION (2, 16, 0);
+
+ # no way to test it other than checking they don't crash
+ $scale -> add_mark(50,'top','this is the middle');
+ $scale -> add_mark(80,'bottom',undef);
+ $scale -> clear_marks;
+ ok(1,"add_mark and clear_marks");
+}
+
__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/GtkScale.xs b/xs/GtkScale.xs
index 69f34bc..52e7692 100644
--- a/xs/GtkScale.xs
+++ b/xs/GtkScale.xs
@@ -69,3 +69,17 @@ gtk_scale_get_layout (scale)
void gtk_scale_get_layout_offsets (GtkScale *scale, OUTLIST gint x, OUTLIST gint y)
#endif
+
+#if GTK_CHECK_VERSION (2, 16, 0)
+
+## void gtk_scale_add_mark (GtkScale *scale, gdouble value, GtkPositionType position, const gchar *markup)
+void
+gtk_scale_add_mark (scale, value, position, markup)
+ GtkScale *scale
+ gdouble value
+ GtkPositionType position
+ const gchar_ornull *markup
+
+void gtk_scale_clear_marks (GtkScale *scale)
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]