From 654ba9dc4118db489fa77baf8a3d2ddcb34c0015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Sat, 9 Feb 2019 18:57:09 +0100 Subject: 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 can be included directly." +#endif + #ifndef _CHAMPLAIN_MEMPHIS_RENDERER #define _CHAMPLAIN_MEMPHIS_RENDERER -#define __CHAMPLAIN_CHAMPLAIN_H_INSIDE__ - -#include "champlain/champlain-features.h" - -#include +#include #include -#include - 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 #include -#include #include #include #include -- cgit v1.2.1