From b316241612c43b24867c0be6c77b70087ead72be Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Wed, 11 May 2011 17:21:07 +0100 Subject: [PATCH] deprecate #include cogl-pango is conceptually a separate library so it doesn't seem appropriate to bundle the headers with all the other cogl headers. Also in-tree the headers live in a cogl-pango directory so if we want examples that can include cogl-pango consistently when built in or out of tree using the convention #include makes that easy. This adds a compatibility cogl/cogl-pango.h header that's will redirect to cogl-pango/cogl-pango.h with a warning, or result in an error if COGL_ENABLE_EXPERIMENTAL_2_0_API is defined. --- cogl-pango/Makefile.am | 4 ++-- cogl/Makefile.am | 1 + cogl/cogl-pango.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 cogl/cogl-pango.h diff --git a/cogl-pango/Makefile.am b/cogl-pango/Makefile.am index 09715296f..a47f9404e 100644 --- a/cogl-pango/Makefile.am +++ b/cogl-pango/Makefile.am @@ -43,7 +43,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_builddir) -cogl_pangoheadersdir = $(includedir)/cogl/cogl +cogl_pangoheadersdir = $(includedir)/cogl/cogl-pango cogl_pangoheaders_HEADERS = $(source_h) pc_files = cogl-pango-1.0.pc \ @@ -73,7 +73,7 @@ CoglPango_1_0_gir_SCANNERFLAGS = \ --warn-all \ --identifier-prefix=CoglPango \ --symbol-prefix=cogl_pango \ - --c-include='cogl/cogl-pango.h' \ + --c-include='cogl-pango/cogl-pango.h' \ --include-uninstalled=$(top_builddir)/cogl/Cogl-1.0.gir INTROSPECTION_GIRS += CoglPango-1.0.gir diff --git a/cogl/Makefile.am b/cogl/Makefile.am index f8e4f57cd..dc88ba351 100644 --- a/cogl/Makefile.am +++ b/cogl/Makefile.am @@ -82,6 +82,7 @@ cogl_public_h = \ $(srcdir)/cogl-clip-state.h \ $(srcdir)/cogl-framebuffer.h \ $(srcdir)/cogl-clutter.h \ + $(srcdir)/cogl-pango.h \ $(srcdir)/cogl.h \ $(NULL) diff --git a/cogl/cogl-pango.h b/cogl/cogl-pango.h new file mode 100644 index 000000000..703b5db10 --- /dev/null +++ b/cogl/cogl-pango.h @@ -0,0 +1,33 @@ +/* + * Cogl + * + * An object oriented GL/GLES Abstraction/Utility Layer + * + * Copyright (C) 2011 Intel Corporation. + * + * This library 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 of the License, or (at your option) any later version. + * + * This library 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 library. If not, see . + * + * + */ +#ifndef __COGL_PANGO_H_COMPAT__ +#define __COGL_PANGO_H_COMPAT__ + +#ifdef COGL_ENABLE_EXPERIMENTAL_2_0_API +#error "#include is unsupported; please #include " +#else +#warning "#include is deprecated; please #include " +#include +#endif + +#endif /* __COGL_PANGO_H_COMPAT__ */