CHAMPLAIN_TYPE_VIEW ChamplainView GObject Champlain::View
CHAMPLAIN_TYPE_VIEW_SCROLL_MODE ChamplainScrollMode GEnum Champlain::ScrollMode
CHAMPLAIN_TYPE_LAYER ChamplainLayer GObject Champlain::Layer
+CHAMPLAIN_TYPE_BASE_MARKER ChamplainBaseMarker GObject Champlain::BaseMarker
CHAMPLAIN_TYPE_MARKER ChamplainMarker GObject Champlain::Marker
CHAMPLAIN_TYPE_MAP_SOURCE ChamplainMapSource GObject Champlain::MapSource
CHAMPLAIN_TYPE_ZOOM_LEVEL ChamplainZoomLevel GObject Champlain::ZoomLevel
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Clutter::TestHelper tests => 5;
+
+use Champlain;
+
+
+exit tests();
+
+
+sub tests {
+ my $marker = Champlain::BaseMarker->new();
+ isa_ok($marker, 'Champlain::BaseMarker');
+
+ my ($latitude, $longitude) = $marker->get('latitude', 'longitude');
+ is($latitude, 0.0, "Initial latitude is at 0.0");
+ is($longitude, 0.0, "Initial longitude is at 0.0");
+
+ $marker->set_position(20.0, 40.0);
+ ($latitude, $longitude) = $marker->get('latitude', 'longitude');
+ is($latitude, 20.0, "set_position() changed the latitude");
+ is($longitude, 40.0, "set_position() changed the longitude");
+
+ return 0;
+}
+
--- /dev/null
+/*
+ * This file was generated automatically by ExtUtils::ParseXS version 2.19 from the
+ * contents of ChamplainBaseMarker.xs. Do not edit this file, edit ChamplainBaseMarker.xs instead.
+ *
+ * ANY CHANGES MADE HERE WILL BE LOST!
+ *
+ */
+
+#line 1 "xs/ChamplainBaseMarker.xs"
+#include "champlain-perl.h"
+
+
+#ifndef PERL_UNUSED_VAR
+# define PERL_UNUSED_VAR(var) if (0) var = var
+#endif
+
+#line 18 "xs/ChamplainBaseMarker.c"
+
+XS(XS_Champlain__BaseMarker_new); /* prototype to pass -Wmissing-prototypes */
+XS(XS_Champlain__BaseMarker_new)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ Perl_croak(aTHX_ "Usage: %s(%s)", "Champlain::BaseMarker::new", "class");
+ PERL_UNUSED_VAR(cv); /* -W */
+ {
+ ClutterActor * RETVAL;
+
+ RETVAL = champlain_base_marker_new(/* No args */);
+ ST(0) = newSVClutterActor (RETVAL);
+
+ sv_2mortal(ST(0));
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_Champlain__BaseMarker_set_position); /* prototype to pass -Wmissing-prototypes */
+XS(XS_Champlain__BaseMarker_set_position)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 3)
+ Perl_croak(aTHX_ "Usage: %s(%s)", "Champlain::BaseMarker::set_position", "marker, longitude, latitude");
+ PERL_UNUSED_VAR(cv); /* -W */
+ {
+ ChamplainBaseMarker * marker = SvChamplainBaseMarker (ST(0));
+ gdouble longitude = (double)SvNV(ST(1));
+ gdouble latitude = (double)SvNV(ST(2));
+
+ champlain_base_marker_set_position(marker, longitude, latitude);
+ }
+ XSRETURN_EMPTY;
+}
+
+#ifdef __cplusplus
+extern "C"
+#endif
+XS(boot_Champlain__BaseMarker); /* prototype to pass -Wmissing-prototypes */
+XS(boot_Champlain__BaseMarker)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ char* file = __FILE__;
+
+ PERL_UNUSED_VAR(cv); /* -W */
+ PERL_UNUSED_VAR(items); /* -W */
+ XS_VERSION_BOOTCHECK ;
+
+ newXS("Champlain::BaseMarker::new", XS_Champlain__BaseMarker_new, file);
+ newXS("Champlain::BaseMarker::set_position", XS_Champlain__BaseMarker_set_position, file);
+ if (PL_unitcheckav)
+ call_list(PL_scopestack_ix, PL_unitcheckav);
+ XSRETURN_YES;
+}
+