[libchamplainmm] Wrap ChamplainNullBboxTileSource
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplainmm] Wrap ChamplainNullBboxTileSource
- Date: Sat, 2 Aug 2014 08:52:52 +0000 (UTC)
commit 06ce12cf86f622b87da1b379d9e29a8513d247a6
Author: Juan R. García Blanco <juanrgar gmail com>
Date: Sat Aug 2 10:51:47 2014 +0200
Wrap ChamplainNullBboxTileSource
* champlain/champlainmm.h: Add null-tile-source.h.
* champlain/champlainmm/.gitignore: Ignore null-tile-source.*.
* champlain/src/filelist.am: Add null-tile-source.hg.
* champlain/src/null-tile-source.[hg|ccg]: New files.
* tools/extradefs/generate_extra_defs_libchamplain.cc: Add
CHAMPLAIN_TYPE_NULL_TILE_SOURCE.
champlain/champlainmm.h | 1 +
champlain/champlainmm/.gitignore | 1 +
champlain/src/champlain_signals.defs | 2 +
champlain/src/filelist.am | 1 +
champlain/src/null-tile-source.ccg | 23 ++++++++++
champlain/src/null-tile-source.hg | 47 ++++++++++++++++++++
.../extradefs/generate_extra_defs_libchamplain.cc | 1 +
7 files changed, 76 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlainmm.h b/champlain/champlainmm.h
index 8fb5874..becf3c0 100644
--- a/champlain/champlainmm.h
+++ b/champlain/champlainmm.h
@@ -39,6 +39,7 @@
#include <champlainmm/network-map-source.h>
#include <champlainmm/network-tile-source.h>
#include <champlainmm/network-bbox-tile-source.h>
+#include <champlainmm/null-tile-source.h>
#include <champlainmm/point.h>
#include <champlainmm/polygon.h>
#include <champlainmm/scale.h>
diff --git a/champlain/champlainmm/.gitignore b/champlain/champlainmm/.gitignore
index 4bc218d..3f03239 100644
--- a/champlain/champlainmm/.gitignore
+++ b/champlain/champlainmm/.gitignore
@@ -15,6 +15,7 @@ marker.*
memory-cache.*
network-tile-source.*
network-bbox-tile-source.*
+null-tile-source.*
path-layer.*
point.*
renderer.*
diff --git a/champlain/src/champlain_signals.defs b/champlain/src/champlain_signals.defs
index 3fea583..defb7b2 100644
--- a/champlain/src/champlain_signals.defs
+++ b/champlain/src/champlain_signals.defs
@@ -444,6 +444,8 @@
(construct-only #f)
)
+;; From ChamplainNullTileSource
+
;; From ChamplainPathLayer
(define-property closed
diff --git a/champlain/src/filelist.am b/champlain/src/filelist.am
index 262e961..c2d74ca 100644
--- a/champlain/src/filelist.am
+++ b/champlain/src/filelist.am
@@ -25,6 +25,7 @@ files_hg = \
memory-cache.hg \
network-tile-source.hg \
network-bbox-tile-source.hg \
+ null-tile-source.hg \
label.hg \
point.hg \
path-layer.hg \
diff --git a/champlain/src/null-tile-source.ccg b/champlain/src/null-tile-source.ccg
new file mode 100644
index 0000000..98e7f82
--- /dev/null
+++ b/champlain/src/null-tile-source.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/null-tile-source.hg b/champlain/src/null-tile-source.hg
new file mode 100644
index 0000000..330e1a9
--- /dev/null
+++ b/champlain/src/null-tile-source.hg
@@ -0,0 +1,47 @@
+/* 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/renderer.h>
+#include <champlainmm/tile-source.h>
+
+_DEFS(champlainmm,champlain)
+_PINCLUDE(champlainmm/private/tile-source_p.h)
+
+namespace Champlain
+{
+
+/** A tile source that doesn't load map data from anywhere.
+ *
+ * This map source does not provide any input data to the associated renderer.
+ * This can be useful in situations when the tile can be rendered independently
+ * of any input such as in the case of the #ChamplainErrorTileRenderer.
+ *
+ * @newin{0,8}
+ */
+class NullTileSource : public TileSource
+{
+ _CLASS_GOBJECT(NullTileSource, ChamplainNullTileSource, CHAMPLAIN_NULL_TILE_SOURCE, TileSource,
ChamplainTileSource)
+
+protected:
+ _WRAP_CTOR(NullTileSource(const Glib::RefPtr<Renderer>& renderer), champlain_null_tile_source_new_full)
+
+public:
+ _WRAP_CREATE(const Glib::RefPtr<Renderer>& renderer)
+};
+
+} // namespace Champlain
diff --git a/tools/extradefs/generate_extra_defs_libchamplain.cc
b/tools/extradefs/generate_extra_defs_libchamplain.cc
index e5b5158..15fa3d6 100644
--- a/tools/extradefs/generate_extra_defs_libchamplain.cc
+++ b/tools/extradefs/generate_extra_defs_libchamplain.cc
@@ -41,6 +41,7 @@ main(int argc, char *argv[])
<< get_defs(CHAMPLAIN_TYPE_MEMORY_CACHE)
<< get_defs(CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE)
<< get_defs(CHAMPLAIN_TYPE_NETWORK_BBOX_TILE_SOURCE)
+ << get_defs(CHAMPLAIN_TYPE_NULL_TILE_SOURCE)
<< get_defs(CHAMPLAIN_TYPE_PATH_LAYER)
<< get_defs(CHAMPLAIN_TYPE_POINT)
<< get_defs(CHAMPLAIN_TYPE_RENDERER)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]