[libchamplain] Include champlain-memphis-renderer.h from champlain.h when available
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Include champlain-memphis-renderer.h from champlain.h when available
- Date: Sat, 9 Feb 2019 17:58:11 +0000 (UTC)
commit 654ba9dc4118db489fa77baf8a3d2ddcb34c0015
Author: Jiří Techet <techet gmail com>
Date: Sat Feb 9 18:57:09 2019 +0100
Include champlain-memphis-renderer.h from champlain.h when available
champlain/champlain-memphis-renderer.h | 14 +++++---------
champlain/champlain.h | 4 ++++
demos/local-rendering.c | 1 -
3 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/champlain/champlain-memphis-renderer.h b/champlain/champlain-memphis-renderer.h
index 9794117..ee2f816 100644
--- a/champlain/champlain-memphis-renderer.h
+++ b/champlain/champlain-memphis-renderer.h
@@ -17,18 +17,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
+#error "Only <champlain/champlain.h> can be included directly."
+#endif
+
#ifndef _CHAMPLAIN_MEMPHIS_RENDERER
#define _CHAMPLAIN_MEMPHIS_RENDERER
-#define __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
-
-#include "champlain/champlain-features.h"
-
-#include <champlain/champlain-tile-source.h>
+#include <champlain/champlain-renderer.h>
#include <champlain/champlain-bounding-box.h>
-#include <glib-object.h>
-
G_BEGIN_DECLS
#define CHAMPLAIN_TYPE_MEMPHIS_RENDERER champlain_memphis_renderer_get_type ()
@@ -187,8 +185,6 @@ void champlain_memphis_renderer_set_tile_size (ChamplainMemphisRenderer *rendere
guint champlain_memphis_renderer_get_tile_size (ChamplainMemphisRenderer *renderer);
-#undef __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
-
G_END_DECLS
#endif /* _CHAMPLAIN_MEMPHIS_RENDERER */
diff --git a/champlain/champlain.h b/champlain/champlain.h
index 7285964..028e40a 100644
--- a/champlain/champlain.h
+++ b/champlain/champlain.h
@@ -62,6 +62,10 @@
#include "champlain/champlain-image-renderer.h"
#include "champlain/champlain-error-tile-renderer.h"
+#ifdef CHAMPLAIN_HAS_MEMPHIS
+# include "champlain/champlain-memphis-renderer.h"
+#endif
+
#undef __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
#endif
diff --git a/demos/local-rendering.c b/demos/local-rendering.c
index 8dd3c99..c65b076 100644
--- a/demos/local-rendering.c
+++ b/demos/local-rendering.c
@@ -19,7 +19,6 @@
#include <gtk/gtk.h>
#include <champlain/champlain.h>
-#include <champlain/champlain-memphis-renderer.h>
#include <champlain-gtk/champlain-gtk.h>
#include <clutter-gtk/clutter-gtk.h>
#include <memphis/memphis.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]