[libchamplainmm] Wrap ChamplainCoordinate
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplainmm] Wrap ChamplainCoordinate
- Date: Sun, 27 Jul 2014 15:46:01 +0000 (UTC)
commit fc3e1eb29864966e6b0aae3cf25923e15077c476
Author: Juan R. García Blanco <juanrgar gmail com>
Date: Sun Jul 27 17:11:47 2014 +0200
Wrap ChamplainCoordinate
* champlain/champlainmm.h: Add champlainmm/coordinate.h.
* champlain/champlainmm/.gitignore: Ignore coordinate.*.
* champlain/src/coordinate.[ccg|hg]: New files.
* champlain/src/filelist.am: Add coordinate.hg.
* tools/extradefs/generate_extra_defs_libchamplain.cc: Add
CHAMPLAIN_TYPE_COORDINATE.
champlain/champlainmm.h | 1 +
champlain/champlainmm/.gitignore | 1 +
champlain/src/champlain_signals.defs | 2 +
champlain/src/coordinate.ccg | 23 ++++++
champlain/src/coordinate.hg | 74 ++++++++++++++++++++
champlain/src/filelist.am | 1 +
.../extradefs/generate_extra_defs_libchamplain.cc | 1 +
7 files changed, 103 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlainmm.h b/champlain/champlainmm.h
index ecfe2e2..753ad14 100644
--- a/champlain/champlainmm.h
+++ b/champlain/champlainmm.h
@@ -24,6 +24,7 @@
#include <champlainmm/init.h>
#include <champlainmm/base-marker.h>
#include <champlainmm/cache.h>
+#include <champlainmm/coordinate.h>
#include <champlainmm/debug.h>
#include <champlainmm/defines.h>
#include <champlainmm/layer.h>
diff --git a/champlain/champlainmm/.gitignore b/champlain/champlainmm/.gitignore
index 8076e3b..36cf16d 100644
--- a/champlain/champlainmm/.gitignore
+++ b/champlain/champlainmm/.gitignore
@@ -1,4 +1,5 @@
bounding-box.*
+coordinate.*
defines.*
label.*
layer.*
diff --git a/champlain/src/champlain_signals.defs b/champlain/src/champlain_signals.defs
index 99e7a7c..50f0cd9 100644
--- a/champlain/src/champlain_signals.defs
+++ b/champlain/src/champlain_signals.defs
@@ -1,5 +1,7 @@
;; ChamplainBoundingBox is neither a GObject nor a GInterface. Not checked for signals and properties.
+;; From ChamplainCoordinate
+
;; From ChamplainLabel
(define-property image
diff --git a/champlain/src/coordinate.ccg b/champlain/src/coordinate.ccg
new file mode 100644
index 0000000..98e7f82
--- /dev/null
+++ b/champlain/src/coordinate.ccg
@@ -0,0 +1,23 @@
+/* Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 2.1 of the License,
+ * or (at your option) any later version.
+ *
+ * libchamplainmm 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <champlain/champlain.h>
+
+namespace Champlain
+{
+} // namespace Champlain
diff --git a/champlain/src/coordinate.hg b/champlain/src/coordinate.hg
new file mode 100644
index 0000000..48f9d52
--- /dev/null
+++ b/champlain/src/coordinate.hg
@@ -0,0 +1,74 @@
+/* Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 2.1 of the License,
+ * or (at your option) any later version.
+ *
+ * libchamplainmm 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <champlainmm/location.h>
+#include <glibmm/object.h>
+
+_DEFS(champlainmm,champlain)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Champlain
+{
+
+/** A Clutter::Actor to display maps.
+ *
+ * The View is a Clutter::Actor to display maps. It supports two modes
+ * of scrolling:
+ * <itemizedlist>
+ * <listitem><para>Push: the normal behavior where the maps don't move
+ * after the user stopped scrolling;</para></listitem>
+ * <listitem><para>Kinetic: the iPhone-like behavior where the maps
+ * decelerate after the user stopped scrolling.</para></listitem>
+ * </itemizedlist>
+ *
+ * You can use the same View to display many types of maps. In
+ * Champlain they are called map sources. You can change the property_map_source()
+ * property at anytime to replace the current displayed map.
+ *
+ * The maps are downloaded from Internet from open maps sources (like
+ * <ulink role="online-location"
+ * url="http://www.openstreetmap.org">OpenStreetMap</ulink>). Maps are divided
+ * in tiles for each zoom level. When a tile is requested, View will
+ * first check if it is in cache (in the user's cache dir under champlain). If
+ * an error occurs during download, an error tile will be displayed.
+ *
+ * The button-press-event and button-release-event signals are emitted each
+ * time a mouse button is pressed and released on the view.
+ *
+ * @newin{0,1}
+ */
+class Coordinate
+: public Glib::Object,
+ public Location
+{
+ _CLASS_GOBJECT(Coordinate, ChamplainCoordinate, CHAMPLAIN_COORDINATE, Glib::Object, GObject)
+ _DERIVES_INITIALLY_UNOWNED()
+ _IMPLEMENTS_INTERFACE(Location)
+
+protected:
+ _CTOR_DEFAULT()
+
+ _WRAP_CTOR(Coordinate(double latitude, double longitude), champlain_coordinate_new_full)
+
+public:
+ _WRAP_CREATE()
+
+ _WRAP_CREATE(double latitude, double longitude)
+};
+
+} // namespace Champlain
diff --git a/champlain/src/filelist.am b/champlain/src/filelist.am
index 2481e29..0b09f7b 100644
--- a/champlain/src/filelist.am
+++ b/champlain/src/filelist.am
@@ -11,6 +11,7 @@ files_defs = \
files_hg = \
bounding-box.hg \
+ coordinate.hg \
marker.hg \
defines.hg \
layer.hg \
diff --git a/tools/extradefs/generate_extra_defs_libchamplain.cc
b/tools/extradefs/generate_extra_defs_libchamplain.cc
index 7b69af7..a8dde26 100644
--- a/tools/extradefs/generate_extra_defs_libchamplain.cc
+++ b/tools/extradefs/generate_extra_defs_libchamplain.cc
@@ -27,6 +27,7 @@ main(int argc, char *argv[])
clutter_init(&argc, &argv);
std::cout << get_defs(CHAMPLAIN_TYPE_BOUNDING_BOX)
+ << get_defs(CHAMPLAIN_TYPE_COORDINATE)
<< get_defs(CHAMPLAIN_TYPE_LABEL)
<< get_defs(CHAMPLAIN_TYPE_LAYER)
<< get_defs(CHAMPLAIN_TYPE_LICENSE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]