[Cogl] Cogl introspection not exposing enough of the API

Artur Skawina art.08.09 at gmail.com
Sun Feb 5 08:47:46 PST 2012


The generated Cogl GIR files are missing certain things, such as the
"Context" structure, which means not even the bundled examples work
when translated into a language that uses bindings generated from the
introspection data.

I needed this patch to be able to generate a usable D binding
(which can be seen at http://repo.or.cz/w/girtod.git/blob/HEAD:/gtk2/cogl.d )

artur

diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index 0c223b8..2f4f49d 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -111,6 +111,20 @@ cogl_experimental_h = \
 	$(srcdir)/cogl2-experimental.h		\
 	$(NULL)
 
+cogl_introspect_h = \
+	$(srcdir)/cogl-renderer.h 		\
+	$(srcdir)/cogl-swap-chain.h 		\
+	$(srcdir)/cogl-onscreen-template.h 	\
+	$(srcdir)/cogl-display.h 		\
+	$(srcdir)/cogl-context.h 		\
+	$(srcdir)/cogl-pipeline.h 		\
+	$(srcdir)/cogl-pipeline-state.h 	\
+	$(srcdir)/cogl-pipeline-layer-state.h 	\
+	$(srcdir)/cogl-snippet.h		\
+	$(srcdir)/cogl2-clip-state.h		\
+	$(srcdir)/cogl2-experimental.h		\
+	$(NULL)
+
 # driver sources
 cogl_driver_sources =
 
@@ -563,8 +577,8 @@ Cogl-1.0.gir: libcogl.la Makefile
 Cogl_1_0_gir_NAMESPACE = Cogl
 Cogl_1_0_gir_VERSION = 1.0
 Cogl_1_0_gir_LIBS = libcogl.la
-Cogl_1_0_gir_FILES = $(cogl_public_h) cogl-enum-types.h
-Cogl_1_0_gir_CFLAGS = $(INCLUDES) $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS)
+Cogl_1_0_gir_FILES = $(cogl_public_h) $(cogl_introspect_h) cogl-enum-types.h
+Cogl_1_0_gir_CFLAGS = $(INCLUDES) $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -DCOGL_ENABLE_EXPERIMENTAL_API=1 -DCOGL_ENABLE_EXPERIMENTAL_2_0_API=1
 Cogl_1_0_gir_INCLUDES = GL-1.0 GObject-2.0
 Cogl_1_0_gir_EXPORT_PACKAGES = cogl-1.0
 Cogl_1_0_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'


More information about the Cogl mailing list