[cogl] deprecate #include <cogl/cogl-pango.h>



commit b316241612c43b24867c0be6c77b70087ead72be
Author: Robert Bragg <robert linux intel com>
Date:   Wed May 11 17:21:07 2011 +0100

    deprecate #include <cogl/cogl-pango.h>
    
    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 <cogl-pango/cogl-pango.h> 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(-)
---
diff --git a/cogl-pango/Makefile.am b/cogl-pango/Makefile.am
index 0971529..a47f940 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 f8e4f57..dc88ba3 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 0000000..703b5db
--- /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 <http://www.gnu.org/licenses/>.
+ *
+ *
+ */
+#ifndef __COGL_PANGO_H_COMPAT__
+#define __COGL_PANGO_H_COMPAT__
+
+#ifdef COGL_ENABLE_EXPERIMENTAL_2_0_API
+#error "#include <cogl/cogl-pango.h> is unsupported; please #include <cogl-pango/cogl-pango.h>"
+#else
+#warning "#include <cogl/cogl-pango.h> is deprecated; please #include <cogl-pango/cogl-pango.h>"
+#include <cogl-pango/cogl-pango.h>
+#endif
+
+#endif /* __COGL_PANGO_H_COMPAT__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]