perl-Gtk2 r2134 - in trunk: . t xs
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-Gtk2 r2134 - in trunk: . t xs
- Date: Fri, 6 Feb 2009 15:27:05 +0000 (UTC)
Author: tsch
Date: Fri Feb 6 15:27:05 2009
New Revision: 2134
URL: http://svn.gnome.org/viewvc/perl-Gtk2?rev=2134&view=rev
Log:
Wrap the new GtkOrientable interface. No support for implementing it in Perl
subclasses yet. Patch by Emmanuel Rodriguez.
Added:
trunk/t/GtkOrientable.t
trunk/xs/GtkOrientable.xs
trunk/xs_files-2.16
Modified:
trunk/ChangeLog
trunk/MANIFEST
trunk/maps-2.16
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Fri Feb 6 15:27:05 2009
@@ -233,6 +233,7 @@
t/GtkNotebook.t
t/GtkObject.t
t/GtkOptionMenu.t
+t/GtkOrientable.t
t/GtkPageSetup.t
t/GtkPaned.t
t/GtkPaperSize.t
@@ -456,6 +457,7 @@
xs/GtkNotebook.xs
xs/GtkObject.xs
xs/GtkOptionMenu.xs
+xs/GtkOrientable.xs
xs/GtkPageSetup.xs
xs/GtkPaned.xs
xs/GtkPaperSize.xs
@@ -537,6 +539,7 @@
xs_files-2.10
xs_files-2.12
xs_files-2.14
+xs_files-2.16
xs_files-2.2
xs_files-2.4
xs_files-2.6
Modified: trunk/maps-2.16
==============================================================================
--- trunk/maps-2.16 (original)
+++ trunk/maps-2.16 Fri Feb 6 15:27:05 2009
@@ -1 +1,2 @@
+GTK_TYPE_ORIENTABLE GtkOrientable GInterface Gtk2::Orientable
GTK_TYPE_ENTRY_ICON_POSITION GtkEntryIconPosition GEnum Gtk2::EntryIconPosition
Added: trunk/t/GtkOrientable.t
==============================================================================
--- (empty file)
+++ trunk/t/GtkOrientable.t Fri Feb 6 15:27:05 2009
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+use Gtk2::TestHelper
+ tests => 6,
+ at_least_version => [2, 15, 0, 'GtkOrientable: it appeared in 2.16']; # FIXME: 2.16
+
+
+my $vbox = Gtk2::VBox -> new();
+isa_ok($vbox, "Gtk2::Orientable");
+is($vbox->get_orientation, 'vertical');
+
+my $hbox = Gtk2::HBox -> new();
+isa_ok($hbox, "Gtk2::Orientable");
+is($hbox->get_orientation, 'horizontal');
+
+
+# Swap the orientation
+$vbox->set_orientation('horizontal');
+is($vbox->get_orientation, 'horizontal');
+
+$hbox->set_orientation('vertical');
+is($hbox->get_orientation, 'vertical');
+
+
+__END__
+
+Copyright (C) 2009 by the gtk2-perl team (see the file AUTHORS for the
+full list). See LICENSE for more information.
Added: trunk/xs/GtkOrientable.xs
==============================================================================
--- (empty file)
+++ trunk/xs/GtkOrientable.xs Fri Feb 6 15:27:05 2009
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2009 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
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307 USA.
+ */
+
+#include "gtk2perl.h"
+
+MODULE = Gtk2::Orientable PACKAGE = Gtk2::Orientable PREFIX = gtk_orientable_
+
+=for object Gtk2::Orientable - Interface for flippable widgets
+=cut
+
+GtkOrientation gtk_orientable_get_orientation (GtkOrientable *orientable);
+
+void gtk_orientable_set_orientation (GtkOrientable *orientable, GtkOrientation orientation);
Added: trunk/xs_files-2.16
==============================================================================
--- (empty file)
+++ trunk/xs_files-2.16 Fri Feb 6 15:27:05 2009
@@ -0,0 +1 @@
+xs/GtkOrientable.xs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]