diff options
Diffstat (limited to 'cogl/cogl-gles2.h')
-rw-r--r-- | cogl/cogl-gles2.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cogl/cogl-gles2.h b/cogl/cogl-gles2.h index 75d37f6d..9c551ad2 100644 --- a/cogl/cogl-gles2.h +++ b/cogl/cogl-gles2.h @@ -36,9 +36,16 @@ * api definitions */ #ifndef COGL_COMPILATION + +/* Note: When building Cogl .gir we explicitly define + * __COGL_H_INSIDE__ */ +#ifndef __COGL_H_INSIDE__ #define __COGL_H_INSIDE__ +#define __COGL_MUST_UNDEF_COGL_H_INSIDE__ #endif +#endif /* COGL_COMPILATION */ + #include <cogl/cogl-defines.h> #include <cogl/cogl-context.h> #include <cogl/cogl-framebuffer.h> @@ -379,5 +386,18 @@ cogl_is_gles2_context (void *object); COGL_END_DECLS +/* The gobject introspection scanner seems to parse public headers in + * isolation which means we need to be extra careful about how we + * define and undefine __COGL_H_INSIDE__ used to detect when internal + * headers are incorrectly included by developers. In the gobject + * introspection case we have to manually define __COGL_H_INSIDE__ as + * a commandline argument for the scanner which means we must be + * careful not to undefine it in a header... + */ +#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__ +#undef __COGL_H_INSIDE__ +#undef __COGL_MUST_UNDEF_COGL_H_INSIDE__ +#endif + #endif /* __COGL_GLES2_H__ */ |