summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Techet <techet@gmail.com>2019-02-09 18:57:09 +0100
committerJiří Techet <techet@gmail.com>2019-02-09 18:57:09 +0100
commit654ba9dc4118db489fa77baf8a3d2ddcb34c0015 (patch)
treec3201cffef08f885950ad45ef4fd46fa4cea32b3
parentbf3aee0c8869377d39de5ff6708b04fccfac559e (diff)
downloadlibchamplain-654ba9dc4118db489fa77baf8a3d2ddcb34c0015.tar.gz
Include champlain-memphis-renderer.h from champlain.h when available
-rw-r--r--champlain/champlain-memphis-renderer.h14
-rw-r--r--champlain/champlain.h4
-rw-r--r--demos/local-rendering.c1
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>