[mutter/wip/nielsdg/cleanup-cogl: 1/3] cogl: use G_BEGIN_DECLS instead of COGL_BEGIN_DECLS



commit 3a4a858ce31aaba2b2c4fb76d89bcf060b815583
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Nov 23 08:42:05 2018 +0100

    cogl: use G_BEGIN_DECLS instead of COGL_BEGIN_DECLS
    
    This macro was introduced so as to be able to be built without GLib.
    However, this feature was long ago removed, and in Mutter we depend on
    it anyway, so let's get rid of it in favor of more consistency.

 cogl/cogl-pango/cogl-pango-display-list.h          |  4 ++--
 cogl/cogl-pango/cogl-pango-glyph-cache.h           |  4 ++--
 cogl/cogl-pango/cogl-pango-pipeline-cache.h        |  4 ++--
 cogl/cogl-pango/cogl-pango-private.h               |  4 ++--
 cogl/cogl-pango/cogl-pango.h                       |  4 ++--
 cogl/cogl-path/cogl-path-functions.h               |  4 ++--
 cogl/cogl-path/cogl-path-types.h                   |  4 ++--
 cogl/cogl/cogl-atlas-texture.h                     |  4 ++--
 cogl/cogl/cogl-attribute-buffer.h                  |  4 ++--
 cogl/cogl/cogl-attribute.h                         |  4 ++--
 cogl/cogl/cogl-bitmap.h                            |  4 ++--
 cogl/cogl/cogl-bitmask.h                           |  4 ++--
 cogl/cogl/cogl-buffer-private.h                    |  4 ++--
 cogl/cogl/cogl-buffer.h                            |  4 ++--
 cogl/cogl/cogl-color.h                             |  4 ++--
 cogl/cogl/cogl-context.h                           |  4 ++--
 cogl/cogl/cogl-debug.h                             |  4 ++--
 cogl/cogl/cogl-depth-state.h                       |  4 ++--
 cogl/cogl/cogl-display.h                           |  4 ++--
 cogl/cogl/cogl-egl.h                               |  4 ++--
 cogl/cogl/cogl-error.h                             |  4 ++--
 cogl/cogl/cogl-euler.h                             |  4 ++--
 cogl/cogl/cogl-flags.h                             |  4 ++--
 cogl/cogl/cogl-framebuffer.h                       |  4 ++--
 cogl/cogl/cogl-gles2.h                             |  4 ++--
 cogl/cogl/cogl-glx.h                               |  4 ++--
 cogl/cogl/cogl-index-buffer.h                      |  4 ++--
 cogl/cogl/cogl-indices.h                           |  4 ++--
 cogl/cogl/cogl-matrix-private.h                    |  4 ++--
 cogl/cogl/cogl-matrix.h                            |  4 ++--
 cogl/cogl/cogl-meta-texture.h                      |  4 ++--
 cogl/cogl/cogl-object.h                            |  4 ++--
 cogl/cogl/cogl-offscreen.h                         |  4 ++--
 cogl/cogl/cogl-onscreen-template.h                 |  4 ++--
 cogl/cogl/cogl-onscreen.h                          |  4 ++--
 cogl/cogl/cogl-output.h                            |  4 ++--
 cogl/cogl/cogl-pipeline-layer-state.h              |  4 ++--
 cogl/cogl/cogl-pipeline-state.h                    |  4 ++--
 cogl/cogl/cogl-pipeline.h                          |  4 ++--
 cogl/cogl/cogl-pixel-buffer-private.h              |  4 ++--
 cogl/cogl/cogl-pixel-buffer.h                      |  4 ++--
 cogl/cogl/cogl-point-in-poly-private.h             |  4 ++--
 cogl/cogl/cogl-poll.h                              |  4 ++--
 cogl/cogl/cogl-primitive-texture.h                 |  4 ++--
 cogl/cogl/cogl-primitive.h                         |  4 ++--
 cogl/cogl/cogl-primitives-private.h                |  4 ++--
 cogl/cogl/cogl-primitives.h                        |  4 ++--
 cogl/cogl/cogl-private.h                           |  4 ++--
 cogl/cogl/cogl-quaternion.h                        |  4 ++--
 cogl/cogl/cogl-renderer.h                          |  4 ++--
 cogl/cogl/cogl-snippet.h                           |  4 ++--
 cogl/cogl/cogl-sub-texture.h                       |  4 ++--
 cogl/cogl/cogl-swap-chain.h                        |  4 ++--
 cogl/cogl/cogl-texture-2d-gl.h                     |  4 ++--
 cogl/cogl/cogl-texture-2d.h                        |  4 ++--
 cogl/cogl/cogl-texture-3d.h                        |  4 ++--
 cogl/cogl/cogl-texture-rectangle.h                 |  4 ++--
 cogl/cogl/cogl-texture.h                           |  4 ++--
 cogl/cogl/cogl-types.h                             | 13 ++-----------
 cogl/cogl/cogl-vector.h                            |  4 ++--
 cogl/cogl/cogl-wayland-server.h                    |  4 ++--
 cogl/cogl/cogl-xlib-renderer.h                     |  4 ++--
 cogl/cogl/cogl-xlib.h                              |  4 ++--
 cogl/cogl/cogl1-context.h                          |  4 ++--
 cogl/cogl/deprecated/cogl-auto-texture.h           |  4 ++--
 cogl/cogl/deprecated/cogl-clutter-xlib.h           |  4 ++--
 cogl/cogl/deprecated/cogl-clutter.h                |  4 ++--
 cogl/cogl/deprecated/cogl-framebuffer-deprecated.h |  4 ++--
 cogl/cogl/deprecated/cogl-shader.h                 |  4 ++--
 cogl/cogl/deprecated/cogl-vertex-buffer.h          |  4 ++--
 cogl/cogl/winsys/cogl-texture-pixmap-x11.h         |  4 ++--
 71 files changed, 142 insertions(+), 151 deletions(-)
---
diff --git a/cogl/cogl-pango/cogl-pango-display-list.h b/cogl/cogl-pango/cogl-pango-display-list.h
index 5dbc074e0..03a686ee1 100644
--- a/cogl/cogl-pango/cogl-pango-display-list.h
+++ b/cogl/cogl-pango/cogl-pango-display-list.h
@@ -32,7 +32,7 @@
 #include <glib.h>
 #include "cogl-pango-pipeline-cache.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglPangoDisplayList CoglPangoDisplayList;
 
@@ -79,6 +79,6 @@ _cogl_pango_display_list_clear (CoglPangoDisplayList *dl);
 void
 _cogl_pango_display_list_free (CoglPangoDisplayList *dl);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PANGO_DISPLAY_LIST_H__ */
diff --git a/cogl/cogl-pango/cogl-pango-glyph-cache.h b/cogl/cogl-pango/cogl-pango-glyph-cache.h
index ca33203bc..c93d1831e 100644
--- a/cogl/cogl-pango/cogl-pango-glyph-cache.h
+++ b/cogl/cogl-pango/cogl-pango-glyph-cache.h
@@ -34,7 +34,7 @@
 
 #include "cogl/cogl-texture.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglPangoGlyphCache      CoglPangoGlyphCache;
 typedef struct _CoglPangoGlyphCacheValue CoglPangoGlyphCacheValue;
@@ -95,6 +95,6 @@ void
 _cogl_pango_glyph_cache_set_dirty_glyphs (CoglPangoGlyphCache *cache,
                                           CoglPangoGlyphCacheDirtyFunc func);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PANGO_GLYPH_CACHE_H__ */
diff --git a/cogl/cogl-pango/cogl-pango-pipeline-cache.h b/cogl/cogl-pango/cogl-pango-pipeline-cache.h
index c8abe2c34..ff7955e62 100644
--- a/cogl/cogl-pango/cogl-pango-pipeline-cache.h
+++ b/cogl/cogl-pango/cogl-pango-pipeline-cache.h
@@ -38,7 +38,7 @@
 
 #include "cogl/cogl-context-private.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglPangoPipelineCache
 {
@@ -67,6 +67,6 @@ _cogl_pango_pipeline_cache_get (CoglPangoPipelineCache *cache,
 void
 _cogl_pango_pipeline_cache_free (CoglPangoPipelineCache *cache);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PANGO_PIPELINE_CACHE_H__ */
diff --git a/cogl/cogl-pango/cogl-pango-private.h b/cogl/cogl-pango/cogl-pango-private.h
index e0d1f51fa..716725bd5 100644
--- a/cogl/cogl-pango/cogl-pango-private.h
+++ b/cogl/cogl-pango/cogl-pango-private.h
@@ -38,7 +38,7 @@
 
 #include "cogl-pango.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 PangoRenderer *
 _cogl_pango_renderer_new (CoglContext *context);
@@ -60,6 +60,6 @@ _cogl_pango_font_map_get_cogl_context (CoglPangoFontMap *fm);
 PangoRenderer *
 _cogl_pango_font_map_get_renderer (CoglPangoFontMap *fm);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PANGO_PRIVATE_H__ */
diff --git a/cogl/cogl-pango/cogl-pango.h b/cogl/cogl-pango/cogl-pango.h
index 3b21d2636..62a62ce89 100644
--- a/cogl/cogl-pango/cogl-pango.h
+++ b/cogl/cogl-pango/cogl-pango.h
@@ -54,7 +54,7 @@
 #include "cogl/cogl-macros.h"
 #endif
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /* It's too difficult to actually subclass the pango cairo font
  * map. Instead we just make a fake set of macros that actually just
@@ -294,6 +294,6 @@ cogl_pango_render_layout_line (PangoLayoutLine *line,
                                int y,
                                const CoglColor *color);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PANGO_H__ */
diff --git a/cogl/cogl-path/cogl-path-functions.h b/cogl/cogl-path/cogl-path-functions.h
index d99605faf..07cfe0f5a 100644
--- a/cogl/cogl-path/cogl-path-functions.h
+++ b/cogl/cogl-path/cogl-path-functions.h
@@ -43,7 +43,7 @@
 #endif
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_path_get_gtype:
@@ -535,7 +535,7 @@ COGL_DEPRECATED_FOR (cogl_framebuffer_push_path_clip)
 void
 cogl_clip_push_from_path (CoglPath *path);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PATH_FUNCTIONS_H__ */
 
diff --git a/cogl/cogl-path/cogl-path-types.h b/cogl/cogl-path/cogl-path-types.h
index 53c06ee67..15b184c54 100644
--- a/cogl/cogl-path/cogl-path-types.h
+++ b/cogl/cogl-path/cogl-path-types.h
@@ -37,7 +37,7 @@
 
 #include <cogl/cogl-types.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglPath CoglPath;
 
@@ -80,6 +80,6 @@ typedef enum {
   COGL_PATH_FILL_RULE_EVEN_ODD
 } CoglPathFillRule;
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PATH_TYPES_H__ */
diff --git a/cogl/cogl/cogl-atlas-texture.h b/cogl/cogl/cogl-atlas-texture.h
index 37b7b8f24..89593a49d 100644
--- a/cogl/cogl/cogl-atlas-texture.h
+++ b/cogl/cogl/cogl-atlas-texture.h
@@ -39,7 +39,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-atlas-texture
@@ -249,6 +249,6 @@ cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp);
 CoglBool
 cogl_is_atlas_texture (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* _COGL_ATLAS_TEXTURE_H_ */
diff --git a/cogl/cogl/cogl-attribute-buffer.h b/cogl/cogl/cogl-attribute-buffer.h
index 9c72df49c..0f74e527e 100644
--- a/cogl/cogl/cogl-attribute-buffer.h
+++ b/cogl/cogl/cogl-attribute-buffer.h
@@ -47,7 +47,7 @@ typedef struct _CoglAttributeBuffer CoglAttributeBuffer;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-attribute-buffer
@@ -142,7 +142,7 @@ cogl_attribute_buffer_new (CoglContext *context,
 CoglBool
 cogl_is_attribute_buffer (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_ATTRIBUTE_BUFFER_H__ */
 
diff --git a/cogl/cogl/cogl-attribute.h b/cogl/cogl/cogl-attribute.h
index 801412c46..04f24d12f 100644
--- a/cogl/cogl/cogl-attribute.h
+++ b/cogl/cogl/cogl-attribute.h
@@ -48,7 +48,7 @@ typedef struct _CoglAttribute CoglAttribute;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-attribute
@@ -548,7 +548,7 @@ cogl_attribute_set_buffer (CoglAttribute *attribute,
 CoglBool
 cogl_is_attribute (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_ATTRIBUTE_H__ */
 
diff --git a/cogl/cogl/cogl-bitmap.h b/cogl/cogl/cogl-bitmap.h
index 723f8d0d0..eda38ee8b 100644
--- a/cogl/cogl/cogl-bitmap.h
+++ b/cogl/cogl/cogl-bitmap.h
@@ -46,7 +46,7 @@ typedef struct _CoglBitmap CoglBitmap;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_bitmap_get_gtype:
@@ -297,6 +297,6 @@ typedef enum {
 
 uint32_t cogl_bitmap_error_quark (void);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_BITMAP_H__ */
diff --git a/cogl/cogl/cogl-bitmask.h b/cogl/cogl/cogl-bitmask.h
index 35fc4416e..7ec128439 100644
--- a/cogl/cogl/cogl-bitmask.h
+++ b/cogl/cogl/cogl-bitmask.h
@@ -35,7 +35,7 @@
 #include <glib.h>
 #include "cogl-util.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /*
  * CoglBitmask implements a growable array of bits. A CoglBitmask can
@@ -307,6 +307,6 @@ _cogl_bitmask_popcount_upto (const CoglBitmask *bitmask,
                                  ((1UL << upto) - 1));
 }
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_BITMASK_H */
diff --git a/cogl/cogl/cogl-buffer-private.h b/cogl/cogl/cogl-buffer-private.h
index eab81fda4..eef3cc86a 100644
--- a/cogl/cogl/cogl-buffer-private.h
+++ b/cogl/cogl/cogl-buffer-private.h
@@ -42,7 +42,7 @@
 #include "cogl-context.h"
 #include "cogl-gl-header.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglBufferVtable CoglBufferVtable;
 
@@ -175,6 +175,6 @@ _cogl_buffer_map_for_fill_or_fallback (CoglBuffer *buffer);
 void
 _cogl_buffer_unmap_for_fill_or_fallback (CoglBuffer *buffer);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_BUFFER_PRIVATE_H__ */
diff --git a/cogl/cogl/cogl-buffer.h b/cogl/cogl/cogl-buffer.h
index 68fec49fc..ca6f8b8a2 100644
--- a/cogl/cogl/cogl-buffer.h
+++ b/cogl/cogl/cogl-buffer.h
@@ -42,7 +42,7 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-error.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-buffer
@@ -320,6 +320,6 @@ cogl_buffer_set_data (CoglBuffer *buffer,
                       const void *data,
                       size_t size);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_BUFFER_H__ */
diff --git a/cogl/cogl/cogl-color.h b/cogl/cogl/cogl-color.h
index 7406a177e..67b89b731 100644
--- a/cogl/cogl/cogl-color.h
+++ b/cogl/cogl/cogl-color.h
@@ -50,7 +50,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_color_get_gtype:
@@ -595,6 +595,6 @@ cogl_color_init_from_hsl (CoglColor *color,
                           float      saturation,
                           float      luminance);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_COLOR_H__ */
diff --git a/cogl/cogl/cogl-context.h b/cogl/cogl/cogl-context.h
index 649f4392b..862a81d43 100644
--- a/cogl/cogl/cogl-context.h
+++ b/cogl/cogl/cogl-context.h
@@ -48,7 +48,7 @@ typedef struct _CoglContext CoglContext;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-context
@@ -404,7 +404,7 @@ typedef enum _CoglGraphicsResetStatus
 CoglGraphicsResetStatus
 cogl_get_graphics_reset_status (CoglContext *context);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_CONTEXT_H__ */
 
diff --git a/cogl/cogl/cogl-debug.h b/cogl/cogl/cogl-debug.h
index 7223be9b7..017f46560 100644
--- a/cogl/cogl/cogl-debug.h
+++ b/cogl/cogl/cogl-debug.h
@@ -37,7 +37,7 @@
 
 #include <glib.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef enum {
   COGL_DEBUG_SLICING,
@@ -115,7 +115,7 @@ _cogl_parse_debug_string (const char *value,
                           CoglBool enable,
                           CoglBool ignore_help);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_DEBUG_H__ */
 
diff --git a/cogl/cogl/cogl-depth-state.h b/cogl/cogl/cogl-depth-state.h
index 581b96110..e08251ff1 100644
--- a/cogl/cogl/cogl-depth-state.h
+++ b/cogl/cogl/cogl-depth-state.h
@@ -37,7 +37,7 @@
 #ifndef __COGL_DEPTH_STATE_H__
 #define __COGL_DEPTH_STATE_H__
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-depth-state
@@ -265,6 +265,6 @@ cogl_depth_state_get_range (CoglDepthState *state,
                             float *near_val,
                             float *far_val);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_DEPTH_STATE_H__ */
diff --git a/cogl/cogl/cogl-display.h b/cogl/cogl/cogl-display.h
index 4c15dcc6f..8fa55ccb4 100644
--- a/cogl/cogl/cogl-display.h
+++ b/cogl/cogl/cogl-display.h
@@ -42,7 +42,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-display
@@ -204,7 +204,7 @@ cogl_display_setup (CoglDisplay *display,
 CoglBool
 cogl_is_display (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_DISPLAY_H__ */
 
diff --git a/cogl/cogl/cogl-egl.h b/cogl/cogl/cogl-egl.h
index 787feabf3..8b4f17223 100644
--- a/cogl/cogl/cogl-egl.h
+++ b/cogl/cogl/cogl-egl.h
@@ -58,7 +58,7 @@
 #include <cogl/cogl-egl-defines.h>
 #include <cogl/cogl-types.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_egl_context_get_egl_display:
@@ -99,7 +99,7 @@ EGLContext
 cogl_egl_context_get_egl_context (CoglContext *context);
 
 
-COGL_END_DECLS
+G_END_DECLS
 
 /* The gobject introspection scanner seems to parse public headers in
  * isolation which means we need to be extra careful about how we
diff --git a/cogl/cogl/cogl-error.h b/cogl/cogl/cogl-error.h
index eddec357f..db4f00fea 100644
--- a/cogl/cogl/cogl-error.h
+++ b/cogl/cogl/cogl-error.h
@@ -35,7 +35,7 @@
 
 #include "cogl-types.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-error
@@ -164,6 +164,6 @@ cogl_error_matches (CoglError *error,
  */
 #define COGL_GLIB_ERROR(COGL_ERROR) ((CoglError *)COGL_ERROR)
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_ERROR_H__ */
diff --git a/cogl/cogl/cogl-euler.h b/cogl/cogl/cogl-euler.h
index 39b06decc..2d258077b 100644
--- a/cogl/cogl/cogl-euler.h
+++ b/cogl/cogl/cogl-euler.h
@@ -40,7 +40,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-euler
@@ -259,7 +259,7 @@ cogl_euler_copy (const CoglEuler *src);
 void
 cogl_euler_free (CoglEuler *euler);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_EULER_H */
 
diff --git a/cogl/cogl/cogl-flags.h b/cogl/cogl/cogl-flags.h
index 33633f0d8..773818dcb 100644
--- a/cogl/cogl/cogl-flags.h
+++ b/cogl/cogl/cogl-flags.h
@@ -36,7 +36,7 @@
 
 #include "cogl-util.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /* These are macros used to implement a fixed-size array of bits. This
    should be used instead of CoglBitmask when the maximum bit number
@@ -124,7 +124,7 @@ COGL_BEGIN_DECLS
 #define COGL_FLAGS_FOREACH_END \
   } } } G_STMT_END
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_FLAGS_H */
 
diff --git a/cogl/cogl/cogl-framebuffer.h b/cogl/cogl/cogl-framebuffer.h
index 112ea88bb..26d137bf1 100644
--- a/cogl/cogl/cogl-framebuffer.h
+++ b/cogl/cogl/cogl-framebuffer.h
@@ -56,7 +56,7 @@ typedef struct _CoglFramebuffer CoglFramebuffer;
 #include <cogl/cogl-texture.h>
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-framebuffer
@@ -1845,6 +1845,6 @@ typedef enum { /*< prefix=COGL_FRAMEBUFFER_ERROR >*/
 CoglBool
 cogl_is_framebuffer (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_FRAMEBUFFER_H */
diff --git a/cogl/cogl/cogl-gles2.h b/cogl/cogl/cogl-gles2.h
index 87a06f10a..cd8bce76f 100644
--- a/cogl/cogl/cogl-gles2.h
+++ b/cogl/cogl/cogl-gles2.h
@@ -71,7 +71,7 @@
 #include <cogl/cogl-gles2-types.h>
 #endif
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-gles2
@@ -397,7 +397,7 @@ cogl_gles2_texture_get_handle (CoglTexture *texture,
 CoglBool
 cogl_is_gles2_context (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 /* The gobject introspection scanner seems to parse public headers in
  * isolation which means we need to be extra careful about how we
diff --git a/cogl/cogl/cogl-glx.h b/cogl/cogl/cogl-glx.h
index 69963d7c2..8a96f357f 100644
--- a/cogl/cogl/cogl-glx.h
+++ b/cogl/cogl/cogl-glx.h
@@ -58,7 +58,7 @@
 #include <GL/glx.h>
 #include <cogl/cogl-types.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_glx_context_get_glx_context:
@@ -76,7 +76,7 @@ COGL_BEGIN_DECLS
 GLXContext
 cogl_glx_context_get_glx_context (CoglContext *context);
 
-COGL_END_DECLS
+G_END_DECLS
 
 /* The gobject introspection scanner seems to parse public headers in
  * isolation which means we need to be extra careful about how we
diff --git a/cogl/cogl/cogl-index-buffer.h b/cogl/cogl/cogl-index-buffer.h
index 94d2c8d8b..ed1ddc53e 100644
--- a/cogl/cogl/cogl-index-buffer.h
+++ b/cogl/cogl/cogl-index-buffer.h
@@ -42,7 +42,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-index-buffer
@@ -97,7 +97,7 @@ cogl_index_buffer_new (CoglContext *context,
 CoglBool
 cogl_is_index_buffer (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_INDEX_BUFFER_H__ */
 
diff --git a/cogl/cogl/cogl-indices.h b/cogl/cogl/cogl-indices.h
index 9247f400d..365271d55 100644
--- a/cogl/cogl/cogl-indices.h
+++ b/cogl/cogl/cogl-indices.h
@@ -47,7 +47,7 @@ typedef struct _CoglIndices CoglIndices;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-indices
@@ -155,7 +155,7 @@ cogl_get_rectangle_indices (CoglContext *context, int n_rectangles);
 CoglBool
 cogl_is_indices (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_INDICES_H__ */
 
diff --git a/cogl/cogl/cogl-matrix-private.h b/cogl/cogl/cogl-matrix-private.h
index d9fc98eab..0add3e4c2 100644
--- a/cogl/cogl/cogl-matrix-private.h
+++ b/cogl/cogl/cogl-matrix-private.h
@@ -36,7 +36,7 @@
 
 #include <glib.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 #define _COGL_MATRIX_DEBUG_PRINT(MATRIX) \
   if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_MATRICES))) \
@@ -52,7 +52,7 @@ void
 _cogl_matrix_init_from_matrix_without_inverse (CoglMatrix *matrix,
                                                const CoglMatrix *src);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_MATRIX_PRIVATE_H */
 
diff --git a/cogl/cogl/cogl-matrix.h b/cogl/cogl/cogl-matrix.h
index d9e008516..725958116 100644
--- a/cogl/cogl/cogl-matrix.h
+++ b/cogl/cogl/cogl-matrix.h
@@ -44,7 +44,7 @@
 #include <cogl/cogl-quaternion.h>
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-matrix
@@ -794,6 +794,6 @@ GType cogl_matrix_get_gtype (void);
 GType
 cogl_gtype_matrix_get_type (void);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_MATRIX_H */
diff --git a/cogl/cogl/cogl-meta-texture.h b/cogl/cogl/cogl-meta-texture.h
index c347881e7..f398e7a2a 100644
--- a/cogl/cogl/cogl-meta-texture.h
+++ b/cogl/cogl/cogl-meta-texture.h
@@ -37,7 +37,7 @@
 
 #include <cogl/cogl-pipeline-layer-state.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-meta-texture
@@ -190,6 +190,6 @@ cogl_meta_texture_foreach_in_region (CoglMetaTexture *meta_texture,
                                      CoglMetaTextureCallback callback,
                                      void *user_data);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_META_TEXTURE_H__ */
diff --git a/cogl/cogl/cogl-object.h b/cogl/cogl/cogl-object.h
index 91ef5790d..d8e483745 100644
--- a/cogl/cogl/cogl-object.h
+++ b/cogl/cogl/cogl-object.h
@@ -35,7 +35,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglObject      CoglObject;
 
@@ -244,7 +244,7 @@ cogl_debug_object_foreach_type (CoglDebugObjectForeachTypeCallback func,
 void
 cogl_debug_object_print_instances (void);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_OBJECT_H */
 
diff --git a/cogl/cogl/cogl-offscreen.h b/cogl/cogl/cogl-offscreen.h
index ad2b447ec..6350c94e5 100644
--- a/cogl/cogl/cogl-offscreen.h
+++ b/cogl/cogl/cogl-offscreen.h
@@ -40,7 +40,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-offscreen
@@ -169,6 +169,6 @@ cogl_offscreen_unref (void *offscreen);
 CoglTexture *
 cogl_offscreen_get_texture (CoglOffscreen *offscreen);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_OFFSCREEN_H__ */
diff --git a/cogl/cogl/cogl-onscreen-template.h b/cogl/cogl/cogl-onscreen-template.h
index 2dd737bef..9831375e6 100644
--- a/cogl/cogl/cogl-onscreen-template.h
+++ b/cogl/cogl/cogl-onscreen-template.h
@@ -41,7 +41,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglOnscreenTemplate         CoglOnscreenTemplate;
 
@@ -134,6 +134,6 @@ cogl_onscreen_template_set_stereo_enabled (
 CoglBool
 cogl_is_onscreen_template (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_ONSCREEN_TEMPLATE_H__ */
diff --git a/cogl/cogl/cogl-onscreen.h b/cogl/cogl/cogl-onscreen.h
index a1e2afc80..a4f062ecb 100644
--- a/cogl/cogl/cogl-onscreen.h
+++ b/cogl/cogl/cogl-onscreen.h
@@ -45,7 +45,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglOnscreen CoglOnscreen;
 #define COGL_ONSCREEN(X) ((CoglOnscreen *)(X))
@@ -896,6 +896,6 @@ cogl_is_onscreen (void *object);
 int64_t
 cogl_onscreen_get_frame_counter (CoglOnscreen *onscreen);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_ONSCREEN_H */
diff --git a/cogl/cogl/cogl-output.h b/cogl/cogl/cogl-output.h
index 15df92c33..e8979267c 100644
--- a/cogl/cogl/cogl-output.h
+++ b/cogl/cogl/cogl-output.h
@@ -41,7 +41,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-output
@@ -249,7 +249,7 @@ cogl_output_get_subpixel_order (CoglOutput *output);
 float
 cogl_output_get_refresh_rate (CoglOutput *output);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_OUTPUT_H */
 
diff --git a/cogl/cogl/cogl-pipeline-layer-state.h b/cogl/cogl/cogl-pipeline-layer-state.h
index 38f6a9ba2..7f827407d 100644
--- a/cogl/cogl/cogl-pipeline-layer-state.h
+++ b/cogl/cogl/cogl-pipeline-layer-state.h
@@ -40,7 +40,7 @@
 #include <cogl/cogl-matrix.h>
 #include <cogl/cogl-texture.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * CoglPipelineFilter:
@@ -611,6 +611,6 @@ cogl_pipeline_add_layer_snippet (CoglPipeline *pipeline,
                                  int layer,
                                  CoglSnippet *snippet);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PIPELINE_LAYER_STATE_H__ */
diff --git a/cogl/cogl/cogl-pipeline-state.h b/cogl/cogl/cogl-pipeline-state.h
index b9e58af57..c6ff607c5 100644
--- a/cogl/cogl/cogl-pipeline-state.h
+++ b/cogl/cogl/cogl-pipeline-state.h
@@ -39,7 +39,7 @@
 #include <cogl/cogl-color.h>
 #include <cogl/cogl-depth-state.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_pipeline_set_color:
@@ -971,6 +971,6 @@ void
 cogl_pipeline_add_snippet (CoglPipeline *pipeline,
                            CoglSnippet *snippet);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PIPELINE_STATE_H__ */
diff --git a/cogl/cogl/cogl-pipeline.h b/cogl/cogl/cogl-pipeline.h
index 8ac2b55c4..75cd9823e 100644
--- a/cogl/cogl/cogl-pipeline.h
+++ b/cogl/cogl/cogl-pipeline.h
@@ -46,7 +46,7 @@ typedef struct _CoglPipeline CoglPipeline;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-pipeline
@@ -180,6 +180,6 @@ int
 cogl_pipeline_get_uniform_location (CoglPipeline *pipeline,
                                     const char *uniform_name);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PIPELINE_H__ */
diff --git a/cogl/cogl/cogl-pixel-buffer-private.h b/cogl/cogl/cogl-pixel-buffer-private.h
index 2735277e0..3e5100336 100644
--- a/cogl/cogl/cogl-pixel-buffer-private.h
+++ b/cogl/cogl/cogl-pixel-buffer-private.h
@@ -40,13 +40,13 @@
 
 #include <glib.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 struct _CoglPixelBuffer
 {
   CoglBuffer            _parent;
 };
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PIXEL_BUFFER_PRIVATE_H__ */
diff --git a/cogl/cogl/cogl-pixel-buffer.h b/cogl/cogl/cogl-pixel-buffer.h
index 473b5ed82..febdc6066 100644
--- a/cogl/cogl/cogl-pixel-buffer.h
+++ b/cogl/cogl/cogl-pixel-buffer.h
@@ -48,7 +48,7 @@ typedef struct _CoglPixelBuffer CoglPixelBuffer;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 #define COGL_PIXEL_BUFFER(buffer) ((CoglPixelBuffer *)(buffer))
 
@@ -133,6 +133,6 @@ cogl_pixel_buffer_set_region (CoglPixelBuffer *buffer,
                               unsigned int dst_y);
 #endif
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PIXEL_BUFFER_H__ */
diff --git a/cogl/cogl/cogl-point-in-poly-private.h b/cogl/cogl/cogl-point-in-poly-private.h
index 1f3f7014c..9b6b21953 100644
--- a/cogl/cogl/cogl-point-in-poly-private.h
+++ b/cogl/cogl/cogl-point-in-poly-private.h
@@ -31,7 +31,7 @@
 
 #include <glib.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 int
 _cogl_util_point_in_screen_poly (float point_x,
@@ -40,7 +40,7 @@ _cogl_util_point_in_screen_poly (float point_x,
                                  size_t stride,
                                  int n_vertices);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_POINT_INT_POLYGON_PRIVATE_H */
 
diff --git a/cogl/cogl/cogl-poll.h b/cogl/cogl/cogl-poll.h
index 849e95c92..8b1483a98 100644
--- a/cogl/cogl/cogl-poll.h
+++ b/cogl/cogl/cogl-poll.h
@@ -40,7 +40,7 @@
 #include <cogl/cogl-defines.h>
 #include <cogl/cogl-context.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-poll
@@ -190,6 +190,6 @@ cogl_poll_renderer_dispatch (CoglRenderer *renderer,
                              const CoglPollFD *poll_fds,
                              int n_poll_fds);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_POLL_H__ */
diff --git a/cogl/cogl/cogl-primitive-texture.h b/cogl/cogl/cogl-primitive-texture.h
index a8102579c..232fa5af5 100644
--- a/cogl/cogl/cogl-primitive-texture.h
+++ b/cogl/cogl/cogl-primitive-texture.h
@@ -37,7 +37,7 @@
 
 #include "cogl-types.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-primitive-texture
@@ -107,6 +107,6 @@ void
 cogl_primitive_texture_set_auto_mipmap (CoglPrimitiveTexture *primitive_texture,
                                         CoglBool value);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PRIMITIVE_TEXTURE_H__ */
diff --git a/cogl/cogl/cogl-primitive.h b/cogl/cogl/cogl-primitive.h
index e1c5d4002..ccfbcd43e 100644
--- a/cogl/cogl/cogl-primitive.h
+++ b/cogl/cogl/cogl-primitive.h
@@ -49,7 +49,7 @@ typedef struct _CoglPrimitive CoglPrimitive;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-primitive
@@ -938,7 +938,7 @@ cogl_primitive_draw (CoglPrimitive *primitive,
                      CoglPipeline *pipeline);
 
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PRIMITIVE_H__ */
 
diff --git a/cogl/cogl/cogl-primitives-private.h b/cogl/cogl/cogl-primitives-private.h
index 10db86905..188976f28 100644
--- a/cogl/cogl/cogl-primitives-private.h
+++ b/cogl/cogl/cogl-primitives-private.h
@@ -33,7 +33,7 @@
 
 #include <glib.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /* Draws a rectangle without going through the journal so that it will
    be flushed immediately. This should only be used in situations
@@ -62,6 +62,6 @@ _cogl_framebuffer_draw_multitextured_rectangles (
                                         int n_rects,
                                         CoglBool disable_legacy_state);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PRIMITIVES_PRIVATE_H */
diff --git a/cogl/cogl/cogl-primitives.h b/cogl/cogl/cogl-primitives.h
index 0c9211eee..682cffac1 100644
--- a/cogl/cogl/cogl-primitives.h
+++ b/cogl/cogl/cogl-primitives.h
@@ -33,7 +33,7 @@
 
 #include <glib.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-primitives
@@ -192,6 +192,6 @@ cogl_polygon (const CoglTextureVertex  *vertices,
               unsigned int              n_vertices,
               CoglBool                  use_color);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PRIMITIVES_H */
diff --git a/cogl/cogl/cogl-private.h b/cogl/cogl/cogl-private.h
index 5d3eff328..faddf2c0c 100644
--- a/cogl/cogl/cogl-private.h
+++ b/cogl/cogl/cogl-private.h
@@ -36,7 +36,7 @@
 #include "cogl-context.h"
 #include "cogl-flags.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef enum
 {
@@ -167,6 +167,6 @@ _cogl_pixel_format_is_endian_dependant (CoglPixelFormat format);
 #define COGL_PIXEL_FORMAT_CAN_HAVE_PREMULT(format) \
   (((format) & COGL_A_BIT) && (format) != COGL_PIXEL_FORMAT_A_8)
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_PRIVATE_H__ */
diff --git a/cogl/cogl/cogl-quaternion.h b/cogl/cogl/cogl-quaternion.h
index 0660f7e51..59cc7401e 100644
--- a/cogl/cogl/cogl-quaternion.h
+++ b/cogl/cogl/cogl-quaternion.h
@@ -39,7 +39,7 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-vector.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-quaternion
@@ -554,7 +554,7 @@ cogl_get_static_identity_quaternion (void);
 const CoglQuaternion *
 cogl_get_static_zero_quaternion (void);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_QUATERNION_H__ */
 
diff --git a/cogl/cogl/cogl-renderer.h b/cogl/cogl/cogl-renderer.h
index ce72a97ed..6b52ea657 100644
--- a/cogl/cogl/cogl-renderer.h
+++ b/cogl/cogl/cogl-renderer.h
@@ -40,7 +40,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-renderer
@@ -418,7 +418,7 @@ cogl_renderer_foreach_output (CoglRenderer *renderer,
                               CoglOutputCallback callback,
                               void *user_data);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_RENDERER_H__ */
 
diff --git a/cogl/cogl/cogl-snippet.h b/cogl/cogl/cogl-snippet.h
index a4a77ed46..7880c5a5f 100644
--- a/cogl/cogl/cogl-snippet.h
+++ b/cogl/cogl/cogl-snippet.h
@@ -38,7 +38,7 @@
 #ifndef __COGL_SNIPPET_H__
 #define __COGL_SNIPPET_H__
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-snippet
@@ -859,6 +859,6 @@ cogl_snippet_set_post (CoglSnippet *snippet,
 const char *
 cogl_snippet_get_post (CoglSnippet *snippet);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_SNIPPET_H__ */
diff --git a/cogl/cogl/cogl-sub-texture.h b/cogl/cogl/cogl-sub-texture.h
index 7b89bb72c..59de9a933 100644
--- a/cogl/cogl/cogl-sub-texture.h
+++ b/cogl/cogl/cogl-sub-texture.h
@@ -36,7 +36,7 @@
 #ifndef __COGL_SUB_TEXTURE_H
 #define __COGL_SUB_TEXTURE_H
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-sub-texture
@@ -129,6 +129,6 @@ cogl_sub_texture_get_parent (CoglSubTexture *sub_texture);
 CoglBool
 cogl_is_sub_texture (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_SUB_TEXTURE_H */
diff --git a/cogl/cogl/cogl-swap-chain.h b/cogl/cogl/cogl-swap-chain.h
index dd854bcc9..2d8d02e86 100644
--- a/cogl/cogl/cogl-swap-chain.h
+++ b/cogl/cogl/cogl-swap-chain.h
@@ -37,7 +37,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 typedef struct _CoglSwapChain CoglSwapChain;
 
@@ -62,6 +62,6 @@ cogl_swap_chain_set_length (CoglSwapChain *swap_chain,
 CoglBool
 cogl_is_swap_chain (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_SWAP_CHAIN_H__ */
diff --git a/cogl/cogl/cogl-texture-2d-gl.h b/cogl/cogl/cogl-texture-2d-gl.h
index e7b22df91..8bab385f4 100644
--- a/cogl/cogl/cogl-texture-2d-gl.h
+++ b/cogl/cogl/cogl-texture-2d-gl.h
@@ -40,7 +40,7 @@
 #include "cogl-context.h"
 #include "cogl-texture-2d.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_texture_2d_gl_new_from_foreign:
@@ -73,6 +73,6 @@ cogl_texture_2d_gl_new_from_foreign (CoglContext *ctx,
                                      int height,
                                      CoglPixelFormat format);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* _COGL_TEXTURE_2D_GL_H_ */
diff --git a/cogl/cogl/cogl-texture-2d.h b/cogl/cogl/cogl-texture-2d.h
index 405fb5f6a..a58ded4b0 100644
--- a/cogl/cogl/cogl-texture-2d.h
+++ b/cogl/cogl/cogl-texture-2d.h
@@ -44,7 +44,7 @@
 #include "cogl-egl-defines.h"
 #endif
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-texture-2d
@@ -265,6 +265,6 @@ cogl_texture_2d_egl_image_external_alloc_finish (CoglTexture2D *tex_2d,
                                                 GDestroyNotify destroy);
 #endif
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_TEXTURE_2D_H */
diff --git a/cogl/cogl/cogl-texture-3d.h b/cogl/cogl/cogl-texture-3d.h
index 238adfe24..f13f91901 100644
--- a/cogl/cogl/cogl-texture-3d.h
+++ b/cogl/cogl/cogl-texture-3d.h
@@ -36,7 +36,7 @@
 #ifndef __COGL_TEXTURE_3D_H
 #define __COGL_TEXTURE_3D_H
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-texture-3d
@@ -197,6 +197,6 @@ cogl_texture_3d_new_from_bitmap (CoglBitmap *bitmap,
 CoglBool
 cogl_is_texture_3d (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_TEXTURE_3D_H */
diff --git a/cogl/cogl/cogl-texture-rectangle.h b/cogl/cogl/cogl-texture-rectangle.h
index c71f0f84e..4fc0566e3 100644
--- a/cogl/cogl/cogl-texture-rectangle.h
+++ b/cogl/cogl/cogl-texture-rectangle.h
@@ -35,7 +35,7 @@
 
 #include "cogl-context.h"
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-texture-rectangle
@@ -211,6 +211,6 @@ cogl_texture_rectangle_new_from_foreign (CoglContext *ctx,
                                          int height,
                                          CoglPixelFormat format);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_TEXURE_RECTANGLE_H */
diff --git a/cogl/cogl/cogl-texture.h b/cogl/cogl/cogl-texture.h
index ef7d14281..350d02dac 100644
--- a/cogl/cogl/cogl-texture.h
+++ b/cogl/cogl/cogl-texture.h
@@ -57,7 +57,7 @@ typedef struct _CoglTexture CoglTexture;
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-texture
@@ -511,6 +511,6 @@ CoglBool
 cogl_texture_allocate (CoglTexture *texture,
                        CoglError **error);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_TEXTURE_H__ */
diff --git a/cogl/cogl/cogl-types.h b/cogl/cogl/cogl-types.h
index b351cfd2d..b324da2e8 100644
--- a/cogl/cogl/cogl-types.h
+++ b/cogl/cogl/cogl-types.h
@@ -43,16 +43,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-/* Guard C code in headers, while including them from C++ */
-#ifdef  __cplusplus
-#define COGL_BEGIN_DECLS  extern "C" {
-#define COGL_END_DECLS    }
-#else
-#define COGL_BEGIN_DECLS
-#define COGL_END_DECLS
-#endif
-
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-types
@@ -891,6 +882,6 @@ typedef enum {
   COGL_STEREO_RIGHT
 } CoglStereoMode;
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_TYPES_H__ */
diff --git a/cogl/cogl/cogl-vector.h b/cogl/cogl/cogl-vector.h
index 08cf017f8..b39139e0c 100644
--- a/cogl/cogl/cogl-vector.h
+++ b/cogl/cogl/cogl-vector.h
@@ -36,7 +36,7 @@
 #ifndef __COGL_VECTOR_H
 #define __COGL_VECTOR_H
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-vector
@@ -350,7 +350,7 @@ cogl_vector3_dot_product (const float *a, const float *b);
 float
 cogl_vector3_distance (const float *a, const float *b);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_VECTOR_H */
 
diff --git a/cogl/cogl/cogl-wayland-server.h b/cogl/cogl/cogl-wayland-server.h
index 271260191..322620a8a 100644
--- a/cogl/cogl/cogl-wayland-server.h
+++ b/cogl/cogl/cogl-wayland-server.h
@@ -52,7 +52,7 @@
 #include <cogl/cogl-context.h>
 #include <cogl/cogl-texture-2d.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_wayland_display_set_compositor_display:
@@ -145,7 +145,7 @@ cogl_wayland_texture_set_region_from_shm_buffer (CoglTexture *texture,
                                                  int level,
                                                  CoglError **error);
 
-COGL_END_DECLS
+G_END_DECLS
 
 /* The gobject introspection scanner seems to parse public headers in
  * isolation which means we need to be extra careful about how we
diff --git a/cogl/cogl/cogl-xlib-renderer.h b/cogl/cogl/cogl-xlib-renderer.h
index 2a4f5d6ea..48fe11796 100644
--- a/cogl/cogl/cogl-xlib-renderer.h
+++ b/cogl/cogl/cogl-xlib-renderer.h
@@ -55,7 +55,7 @@
 
 #include <cogl/cogl-renderer.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_xlib_renderer_handle_event: (skip)
@@ -250,7 +250,7 @@ cogl_xlib_renderer_get_visual_info (CoglRenderer *renderer);
 void
 cogl_xlib_renderer_request_reset_on_video_memory_purge (CoglRenderer *renderer,
                                                         CoglBool enable);
-COGL_END_DECLS
+G_END_DECLS
 
 /* The gobject introspection scanner seems to parse public headers in
  * isolation which means we need to be extra careful about how we
diff --git a/cogl/cogl/cogl-xlib.h b/cogl/cogl/cogl-xlib.h
index 65f5bc441..bb15183be 100644
--- a/cogl/cogl/cogl-xlib.h
+++ b/cogl/cogl/cogl-xlib.h
@@ -59,7 +59,7 @@
 #include <cogl/cogl-xlib-renderer.h>
 #include <cogl/cogl-macros.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /*
  * cogl_xlib_get_display:
@@ -112,7 +112,7 @@ COGL_DEPRECATED_FOR (cogl_xlib_renderer_handle_event)
 CoglFilterReturn
 cogl_xlib_handle_event (XEvent *xevent);
 
-COGL_END_DECLS
+G_END_DECLS
 
 
 /* The gobject introspection scanner seems to parse public headers in
diff --git a/cogl/cogl/cogl1-context.h b/cogl/cogl/cogl1-context.h
index 01a7b2892..cb7f33ef4 100644
--- a/cogl/cogl/cogl1-context.h
+++ b/cogl/cogl/cogl1-context.h
@@ -42,7 +42,7 @@
 #include <cogl/cogl-framebuffer.h>
 #include <cogl/cogl-macros.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_get_option_group:
@@ -857,6 +857,6 @@ COGL_DEPRECATED_FOR (CoglGLES2Context_API)
 void
 cogl_end_gl (void);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_1_CONTEXT_H__ */
diff --git a/cogl/cogl/deprecated/cogl-auto-texture.h b/cogl/cogl/deprecated/cogl-auto-texture.h
index 1ab23aa5d..e37d18301 100644
--- a/cogl/cogl/deprecated/cogl-auto-texture.h
+++ b/cogl/cogl/deprecated/cogl-auto-texture.h
@@ -31,7 +31,7 @@
 #ifndef __COGL_AUTO_TEXTURE_H__
 #define __COGL_AUTO_TEXTURE_H__
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 #include <cogl/cogl-texture.h>
 
@@ -218,6 +218,6 @@ cogl_texture_new_from_sub_texture (CoglTexture *full_texture,
                                    int sub_width,
                                    int sub_height);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_AUTO_TEXTURE_H__ */
diff --git a/cogl/cogl/deprecated/cogl-clutter-xlib.h b/cogl/cogl/deprecated/cogl-clutter-xlib.h
index dc7300a8b..c45b4fa26 100644
--- a/cogl/cogl/deprecated/cogl-clutter-xlib.h
+++ b/cogl/cogl/deprecated/cogl-clutter-xlib.h
@@ -35,7 +35,7 @@
 
 #include <X11/Xutil.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 #define cogl_clutter_winsys_xlib_get_visual_info cogl_clutter_winsys_xlib_get_visual_info_CLUTTER
 
@@ -45,6 +45,6 @@ COGL_BEGIN_DECLS
 XVisualInfo *
 cogl_clutter_winsys_xlib_get_visual_info (void);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_CLUTTER_XLIB_H__ */
diff --git a/cogl/cogl/deprecated/cogl-clutter.h b/cogl/cogl/deprecated/cogl-clutter.h
index 1fd56ff9f..aa47144a3 100644
--- a/cogl/cogl/deprecated/cogl-clutter.h
+++ b/cogl/cogl/deprecated/cogl-clutter.h
@@ -33,7 +33,7 @@
 #ifndef __COGL_CLUTTER_H__
 #define __COGL_CLUTTER_H__
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 #define cogl_clutter_check_extension cogl_clutter_check_extension_CLUTTER
 COGL_DEPRECATED
@@ -49,6 +49,6 @@ cogl_clutter_winsys_has_feature (CoglWinsysFeature feature);
 void
 cogl_onscreen_clutter_backend_set_size (int width, int height);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_CLUTTER_H__ */
diff --git a/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h 
b/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h
index 452b4542a..6b947d7b5 100644
--- a/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h
+++ b/cogl/cogl/deprecated/cogl-framebuffer-deprecated.h
@@ -34,7 +34,7 @@
 #include <cogl/cogl-framebuffer.h>
 #include <cogl/cogl-macros.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * cogl_set_framebuffer: (skip)
@@ -260,6 +260,6 @@ COGL_DEPRECATED
 CoglPixelFormat
 cogl_framebuffer_get_color_format (CoglFramebuffer *framebuffer);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_FRAMEBUFFER_DEPRECATED_H__ */
diff --git a/cogl/cogl/deprecated/cogl-shader.h b/cogl/cogl/deprecated/cogl-shader.h
index 1c7ac97d4..ad94d30bf 100644
--- a/cogl/cogl/deprecated/cogl-shader.h
+++ b/cogl/cogl/deprecated/cogl-shader.h
@@ -39,7 +39,7 @@
 #include <cogl/cogl-defines.h>
 #include <cogl/cogl-macros.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-shaders
@@ -698,6 +698,6 @@ cogl_program_uniform_matrix (int          uniform_no,
                              CoglBool     transpose,
                              const float *value);
 
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_SHADER_H__ */
diff --git a/cogl/cogl/deprecated/cogl-vertex-buffer.h b/cogl/cogl/deprecated/cogl-vertex-buffer.h
index 955a13bc2..56f6aead4 100644
--- a/cogl/cogl/deprecated/cogl-vertex-buffer.h
+++ b/cogl/cogl/deprecated/cogl-vertex-buffer.h
@@ -43,7 +43,7 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-macros.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-vertex-buffer
@@ -446,6 +446,6 @@ cogl_is_vertex_buffer (CoglHandle handle);
 COGL_DEPRECATED_FOR (cogl_primitive_API)
 CoglBool
 cogl_is_vertex_buffer_indices (CoglHandle handle);
-COGL_END_DECLS
+G_END_DECLS
 
 #endif /* __COGL_VERTEX_BUFFER_H__ */
diff --git a/cogl/cogl/winsys/cogl-texture-pixmap-x11.h b/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
index 4c86c6858..de0c99afb 100644
--- a/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
+++ b/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
@@ -52,7 +52,7 @@
 
 #include <glib-object.h>
 
-COGL_BEGIN_DECLS
+G_BEGIN_DECLS
 
 /**
  * SECTION:cogl-texture-pixmap-x11
@@ -268,7 +268,7 @@ cogl_texture_pixmap_x11_set_damage_object (CoglTexturePixmapX11 *texture,
 CoglBool
 cogl_is_texture_pixmap_x11 (void *object);
 
-COGL_END_DECLS
+G_END_DECLS
 
 /* The gobject introspection scanner seems to parse public headers in
  * isolation which means we need to be extra careful about how we



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