[mutter] cogl: Remove support for not building with glib/gtype support



commit 75c3cf05898b0b171d246d4a436e6676c99c49f3
Author: Jonas Ådahl <jadahl gmail com>
Date:   Thu Jun 16 16:31:38 2016 -0400

    cogl: Remove support for not building with glib/gtype support
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768977

 cogl/cogl-path/cogl-path.h                 |    3 ---
 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-color.h                     |    4 ----
 cogl/cogl/cogl-config.c                    |   12 ------------
 cogl/cogl/cogl-context.h                   |    4 ----
 cogl/cogl/cogl-display.h                   |    4 ----
 cogl/cogl/cogl-error-private.h             |    2 --
 cogl/cogl/cogl-error.c                     |    7 -------
 cogl/cogl/cogl-error.h                     |   16 ----------------
 cogl/cogl/cogl-euler.h                     |    4 ----
 cogl/cogl/cogl-frame-info.h                |    4 ----
 cogl/cogl/cogl-framebuffer.h               |    2 --
 cogl/cogl/cogl-gles2.h                     |    4 ----
 cogl/cogl/cogl-index-buffer.h              |    4 ----
 cogl/cogl/cogl-indices.h                   |    4 ----
 cogl/cogl/cogl-matrix-stack.h              |    4 ----
 cogl/cogl/cogl-matrix.c                    |    2 --
 cogl/cogl/cogl-matrix.h                    |    8 --------
 cogl/cogl/cogl-object-private.h            |    6 ------
 cogl/cogl/cogl-object.h                    |    8 --------
 cogl/cogl/cogl-offscreen.h                 |    4 ----
 cogl/cogl/cogl-onscreen-template.h         |    4 ----
 cogl/cogl/cogl-onscreen.h                  |   10 ----------
 cogl/cogl/cogl-output.h                    |    4 ----
 cogl/cogl/cogl-pipeline.h                  |    4 ----
 cogl/cogl/cogl-pixel-buffer.h              |    4 ----
 cogl/cogl/cogl-primitive.h                 |    2 --
 cogl/cogl/cogl-quaternion.h                |    4 ----
 cogl/cogl/cogl-renderer.h                  |    4 ----
 cogl/cogl/cogl-snippet.h                   |    2 --
 cogl/cogl/cogl-sub-texture.h               |    2 --
 cogl/cogl/cogl-swap-chain.h                |    4 ----
 cogl/cogl/cogl-texture-2d-sliced.h         |    2 --
 cogl/cogl/cogl-texture-2d.h                |    2 --
 cogl/cogl/cogl-texture-3d.h                |    2 --
 cogl/cogl/cogl-texture-rectangle.h         |    2 --
 cogl/cogl/cogl-texture.h                   |    4 ----
 cogl/cogl/cogl-util.h                      |    2 --
 cogl/cogl/cogl.c                           |    2 +-
 cogl/cogl/winsys/cogl-texture-pixmap-x11.h |    4 ----
 cogl/configure.ac                          |    2 --
 44 files changed, 1 insertions(+), 187 deletions(-)
---
diff --git a/cogl/cogl-path/cogl-path.h b/cogl/cogl-path/cogl-path.h
index 22b7dc3..0a2eb05 100644
--- a/cogl/cogl-path/cogl-path.h
+++ b/cogl/cogl-path/cogl-path.h
@@ -52,10 +52,7 @@
 
 #include <cogl/cogl-defines.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <cogl-path/cogl-path-enum-types.h>
-#endif
-
 #include <cogl-path/cogl-path-types.h>
 #include <cogl-path/cogl-path-functions.h>
 
diff --git a/cogl/cogl/cogl-atlas-texture.h b/cogl/cogl/cogl-atlas-texture.h
index 79c15b9..37b7b8f 100644
--- a/cogl/cogl/cogl-atlas-texture.h
+++ b/cogl/cogl/cogl-atlas-texture.h
@@ -37,9 +37,7 @@
 
 #include <cogl/cogl-context.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -71,14 +69,12 @@ COGL_BEGIN_DECLS
 typedef struct _CoglAtlasTexture CoglAtlasTexture;
 #define COGL_ATLAS_TEXTURE(tex) ((CoglAtlasTexture *) tex)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_atlas_texture_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_atlas_texture_get_gtype (void);
-#endif
 
 /**
  * cogl_atlas_texture_new_with_size:
diff --git a/cogl/cogl/cogl-attribute-buffer.h b/cogl/cogl/cogl-attribute-buffer.h
index 189d81e..9c72df4 100644
--- a/cogl/cogl/cogl-attribute-buffer.h
+++ b/cogl/cogl/cogl-attribute-buffer.h
@@ -45,9 +45,7 @@ typedef struct _CoglAttributeBuffer CoglAttributeBuffer;
 
 #include <cogl/cogl-context.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -61,14 +59,12 @@ COGL_BEGIN_DECLS
 
 #define COGL_ATTRIBUTE_BUFFER(buffer) ((CoglAttributeBuffer *)(buffer))
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_attribute_buffer_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_attribute_buffer_get_gtype (void);
-#endif
 
 /**
  * cogl_attribute_buffer_new_with_size:
diff --git a/cogl/cogl/cogl-attribute.h b/cogl/cogl/cogl-attribute.h
index 736b0c6..801412c 100644
--- a/cogl/cogl/cogl-attribute.h
+++ b/cogl/cogl/cogl-attribute.h
@@ -46,9 +46,7 @@ typedef struct _CoglAttribute CoglAttribute;
 #include <cogl/cogl-attribute-buffer.h>
 #include <cogl/cogl-indices.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -60,14 +58,12 @@ COGL_BEGIN_DECLS
  * FIXME
  */
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_attribute_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_attribute_get_gtype (void);
-#endif
 
 /**
  * cogl_attribute_new: (constructor)
diff --git a/cogl/cogl/cogl-bitmap.h b/cogl/cogl/cogl-bitmap.h
index 1da52ec..723f8d0 100644
--- a/cogl/cogl/cogl-bitmap.h
+++ b/cogl/cogl/cogl-bitmap.h
@@ -44,20 +44,16 @@ typedef struct _CoglBitmap CoglBitmap;
 #include <cogl/cogl-context.h>
 #include <cogl/cogl-pixel-buffer.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_bitmap_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_bitmap_get_gtype (void);
-#endif
 
 /**
  * SECTION:cogl-bitmap
diff --git a/cogl/cogl/cogl-color.h b/cogl/cogl/cogl-color.h
index bdb0bfa..42fe525 100644
--- a/cogl/cogl/cogl-color.h
+++ b/cogl/cogl/cogl-color.h
@@ -48,20 +48,16 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-macros.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_color_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_color_get_gtype (void);
-#endif
 
 /**
  * cogl_color_new:
diff --git a/cogl/cogl/cogl-config.c b/cogl/cogl/cogl-config.c
index ea6e106..032dc37 100644
--- a/cogl/cogl/cogl-config.c
+++ b/cogl/cogl/cogl-config.c
@@ -44,16 +44,6 @@ char *_cogl_config_renderer;
 char *_cogl_config_disable_gl_extensions;
 char *_cogl_config_override_gl_version;
 
-#ifndef COGL_HAS_GLIB_SUPPORT
-
-void
-_cogl_config_read (void)
-{
-
-}
-
-#else /* COGL_HAS_GLIB_SUPPORT */
-
 /* Array of config options that just set a global string */
 static const struct
 {
@@ -143,5 +133,3 @@ _cogl_config_read (void)
 
   g_key_file_free (key_file);
 }
-
-#endif /* COGL_HAS_GLIB_SUPPORT */
diff --git a/cogl/cogl/cogl-context.h b/cogl/cogl/cogl-context.h
index d3680c0..978c3fc 100644
--- a/cogl/cogl/cogl-context.h
+++ b/cogl/cogl/cogl-context.h
@@ -46,9 +46,7 @@ typedef struct _CoglContext CoglContext;
 #include <cogl/cogl-display.h>
 #include <cogl/cogl-primitive.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -96,14 +94,12 @@ COGL_BEGIN_DECLS
 
 #define COGL_CONTEXT(OBJECT) ((CoglContext *)OBJECT)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_context_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_context_get_gtype (void);
-#endif
 
 /**
  * cogl_context_new: (constructor)
diff --git a/cogl/cogl/cogl-display.h b/cogl/cogl/cogl-display.h
index 47720a3..4c15dcc 100644
--- a/cogl/cogl/cogl-display.h
+++ b/cogl/cogl/cogl-display.h
@@ -40,9 +40,7 @@
 #include <cogl/cogl-renderer.h>
 #include <cogl/cogl-onscreen-template.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -72,14 +70,12 @@ typedef struct _CoglDisplay       CoglDisplay;
 
 #define COGL_DISPLAY(OBJECT) ((CoglDisplay *)OBJECT)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_display_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_display_get_gtype (void);
-#endif
 
 /**
  * cogl_display_new:
diff --git a/cogl/cogl/cogl-error-private.h b/cogl/cogl/cogl-error-private.h
index d96779f..382fc44 100644
--- a/cogl/cogl/cogl-error-private.h
+++ b/cogl/cogl/cogl-error-private.h
@@ -48,11 +48,9 @@ void
 _cogl_propagate_error (CoglError **dest,
                        CoglError *src);
 
-#ifdef COGL_HAS_GLIB_SUPPORT
 void
 _cogl_propagate_gerror (CoglError **dest,
                         GError *src);
-#endif /* COGL_HAS_GLIB_SUPPORT */
 
 #define _cogl_clear_error(X) g_clear_error ((GError **)X)
 
diff --git a/cogl/cogl/cogl-error.c b/cogl/cogl/cogl-error.c
index 18e2b1a..623ab1b 100644
--- a/cogl/cogl/cogl-error.c
+++ b/cogl/cogl/cogl-error.c
@@ -120,16 +120,9 @@ _cogl_propagate_error (CoglError **dest,
     *dest = src;
 }
 
-/* This function is only used from the gdk-pixbuf image backend so it
- * should only be called if we are using the system GLib. It would be
- * difficult to get this to work without the system glib because we
- * would need to somehow call the same g_error_free function that
- * gdk-pixbuf is using */
-#ifdef COGL_HAS_GLIB_SUPPORT
 void
 _cogl_propagate_gerror (CoglError **dest,
                         GError *src)
 {
   _cogl_propagate_error (dest, (CoglError *) src);
 }
-#endif /* COGL_HAS_GLIB_SUPPORT */
diff --git a/cogl/cogl/cogl-error.h b/cogl/cogl/cogl-error.h
index 8682d0e..eddec35 100644
--- a/cogl/cogl/cogl-error.h
+++ b/cogl/cogl/cogl-error.h
@@ -111,21 +111,7 @@ COGL_BEGIN_DECLS
  * if an error is thrown.</note>
  */
 
-#ifdef COGL_HAS_GLIB_SUPPORT
 #define CoglError GError
-#else
-/**
- * CoglError:
- * @domain: A high-level domain identifier for the error
- * @code: A specific error code within a specified domain
- * @message: A human readable error message
- */
-typedef struct _CoglError {
-  uint32_t domain;
-  int code;
-  char *message;
-} CoglError;
-#endif /* COGL_HAS_GLIB_SUPPORT */
 
 /**
  * cogl_error_free:
@@ -176,9 +162,7 @@ cogl_error_matches (CoglError *error,
  * that a CoglError is a GError and can be used directly with the
  * GError api.
  */
-#ifdef COGL_HAS_GLIB_SUPPORT
 #define COGL_GLIB_ERROR(COGL_ERROR) ((CoglError *)COGL_ERROR)
-#endif
 
 COGL_END_DECLS
 
diff --git a/cogl/cogl/cogl-euler.h b/cogl/cogl/cogl-euler.h
index 4ccbb2a..39b06de 100644
--- a/cogl/cogl/cogl-euler.h
+++ b/cogl/cogl/cogl-euler.h
@@ -38,9 +38,7 @@
 
 #include <cogl/cogl-types.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -166,14 +164,12 @@ struct _CoglEuler
 };
 COGL_STRUCT_SIZE_ASSERT (CoglEuler, 32);
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_euler_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_euler_get_gtype (void);
-#endif
 
 /**
  * cogl_euler_init:
diff --git a/cogl/cogl/cogl-frame-info.h b/cogl/cogl/cogl-frame-info.h
index 3e44d74..a87f7e1 100644
--- a/cogl/cogl/cogl-frame-info.h
+++ b/cogl/cogl/cogl-frame-info.h
@@ -40,9 +40,7 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-output.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 #include <glib.h>
 
 G_BEGIN_DECLS
@@ -50,14 +48,12 @@ G_BEGIN_DECLS
 typedef struct _CoglFrameInfo CoglFrameInfo;
 #define COGL_FRAME_INFO(X) ((CoglFrameInfo *)(X))
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_frame_info_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_frame_info_get_gtype (void);
-#endif
 
 /**
  * cogl_is_frame_info:
diff --git a/cogl/cogl/cogl-framebuffer.h b/cogl/cogl/cogl-framebuffer.h
index 27bf9c9..1ab5737 100644
--- a/cogl/cogl/cogl-framebuffer.h
+++ b/cogl/cogl/cogl-framebuffer.h
@@ -53,9 +53,7 @@ typedef struct _CoglFramebuffer CoglFramebuffer;
 #include <cogl/cogl-quaternion.h>
 #include <cogl/cogl-euler.h>
 #include <cogl/cogl-texture.h>
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
diff --git a/cogl/cogl/cogl-gles2.h b/cogl/cogl/cogl-gles2.h
index e947117..a90d0ce 100644
--- a/cogl/cogl/cogl-gles2.h
+++ b/cogl/cogl/cogl-gles2.h
@@ -142,23 +142,19 @@ struct _CoglGLES2Vtable
 
 #include <cogl/gl-prototypes/cogl-gles2-functions.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 #undef COGL_EXT_BEGIN
 #undef COGL_EXT_FUNCTION
 #undef COGL_EXT_END
 };
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_gles2_context_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_gles2_context_get_gtype (void);
-#endif
 
 uint32_t
 _cogl_gles2_context_error_quark (void);
diff --git a/cogl/cogl/cogl-index-buffer.h b/cogl/cogl/cogl-index-buffer.h
index 204c858..94d2c8d 100644
--- a/cogl/cogl/cogl-index-buffer.h
+++ b/cogl/cogl/cogl-index-buffer.h
@@ -40,9 +40,7 @@
 
 #include <cogl/cogl-context.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -58,14 +56,12 @@ COGL_BEGIN_DECLS
 
 typedef struct _CoglIndexBuffer              CoglIndexBuffer;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_index_buffer_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_index_buffer_get_gtype (void);
-#endif
 
 /**
  * cogl_index_buffer_new:
diff --git a/cogl/cogl/cogl-indices.h b/cogl/cogl/cogl-indices.h
index 3cc9239..9247f40 100644
--- a/cogl/cogl/cogl-indices.h
+++ b/cogl/cogl/cogl-indices.h
@@ -45,9 +45,7 @@ typedef struct _CoglIndices CoglIndices;
 
 #include <cogl/cogl-index-buffer.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -109,14 +107,12 @@ COGL_BEGIN_DECLS
  * for drawing quads as above.
  */
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_indices_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_indices_get_gtype (void);
-#endif
 
 CoglIndices *
 cogl_indices_new (CoglContext *context,
diff --git a/cogl/cogl/cogl-matrix-stack.h b/cogl/cogl/cogl-matrix-stack.h
index 6ea323a..8d936b2 100644
--- a/cogl/cogl/cogl-matrix-stack.h
+++ b/cogl/cogl/cogl-matrix-stack.h
@@ -134,14 +134,12 @@
  */
 typedef struct _CoglMatrixStack CoglMatrixStack;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_matrix_stack_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_matrix_stack_get_gtype (void);
-#endif
 
 /**
  * CoglMatrixEntry:
@@ -179,14 +177,12 @@ GType cogl_matrix_stack_get_gtype (void);
  */
 typedef struct _CoglMatrixEntry CoglMatrixEntry;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_matrix_entry_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_matrix_entry_get_gtype (void);
-#endif
 
 
 /**
diff --git a/cogl/cogl/cogl-matrix.c b/cogl/cogl/cogl-matrix.c
index a67f0ab..7c01a0b 100644
--- a/cogl/cogl/cogl-matrix.c
+++ b/cogl/cogl/cogl-matrix.c
@@ -2304,10 +2304,8 @@ cogl_matrix_transpose (CoglMatrix *matrix)
   cogl_matrix_init_from_array (matrix, new_values);
 }
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 GType
 cogl_gtype_matrix_get_type (void)
 {
   return cogl_matrix_get_gtype ();
 }
-#endif
diff --git a/cogl/cogl/cogl-matrix.h b/cogl/cogl/cogl-matrix.h
index b102d32..43adfd9 100644
--- a/cogl/cogl/cogl-matrix.h
+++ b/cogl/cogl/cogl-matrix.h
@@ -36,17 +36,13 @@
 
 #include <cogl/cogl-defines.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif /* COGL_HAS_GTYPE_SUPPORT */
 
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-macros.h>
 
 #include <cogl/cogl-quaternion.h>
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -777,8 +773,6 @@ cogl_matrix_transpose (CoglMatrix *matrix);
 void
 cogl_debug_matrix_print (const CoglMatrix *matrix);
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
-
 #define COGL_GTYPE_TYPE_MATRIX (cogl_matrix_get_gtype ())
 
 /**
@@ -800,8 +794,6 @@ GType cogl_matrix_get_gtype (void);
 GType
 cogl_gtype_matrix_get_type (void);
 
-#endif /* COGL_HAS_GTYPE_SUPPORT*/
-
 COGL_END_DECLS
 
 #endif /* __COGL_MATRIX_H */
diff --git a/cogl/cogl/cogl-object-private.h b/cogl/cogl/cogl-object-private.h
index 7955a35..c63e323 100644
--- a/cogl/cogl/cogl-object-private.h
+++ b/cogl/cogl/cogl-object-private.h
@@ -57,9 +57,7 @@ typedef void (*CoglUserDataDestroyInternalCallback) (void *user_data,
 
 typedef struct _CoglObjectClass
 {
-#ifdef COGL_HAS_GTYPE_SUPPORT
   GTypeClass base_class;
-#endif
   const char *name;
   void *virt_free;
   void *virt_unref;
@@ -127,13 +125,9 @@ struct _CoglObject
 
 #endif /* COGL_OBJECT_DEBUG */
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #define _COGL_GTYPE_INIT_CLASS(type_name) do {                                   \
   _cogl_##type_name##_class.base_class.g_type = cogl_##type_name##_get_gtype (); \
 } while (0)
-#else
-#define _COGL_GTYPE_INIT_CLASS(type_name)
-#endif
 
 #define COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code)  \
                                                                         \
diff --git a/cogl/cogl/cogl-object.h b/cogl/cogl/cogl-object.h
index 96f54cc..fa52958 100644
--- a/cogl/cogl/cogl-object.h
+++ b/cogl/cogl/cogl-object.h
@@ -33,9 +33,7 @@
 
 #include <cogl/cogl-types.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -49,14 +47,12 @@ typedef struct _CoglObject      CoglObject;
  *     (get-value-func cogl_object_get_object)
  */
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_object_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_object_get_gtype (void);
-#endif
 
 /**
  * cogl_object_ref: (skip)
@@ -128,11 +124,7 @@ typedef struct {
  *
  * Since: 1.4
  */
-#ifdef COGL_HAS_GTYPE_SUPPORT
 typedef GDestroyNotify CoglUserDataDestroyCallback;
-#else
-typedef void (*CoglUserDataDestroyCallback) (void *user_data);
-#endif
 
 /**
  * CoglDebugObjectTypeInfo:
diff --git a/cogl/cogl/cogl-offscreen.h b/cogl/cogl/cogl-offscreen.h
index 26016f5..5c26370 100644
--- a/cogl/cogl/cogl-offscreen.h
+++ b/cogl/cogl/cogl-offscreen.h
@@ -38,9 +38,7 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-texture.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -56,14 +54,12 @@ typedef struct _CoglOffscreen CoglOffscreen;
 
 #define COGL_OFFSCREEN(X) ((CoglOffscreen *)X)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_offscreen_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_offscreen_get_gtype (void);
-#endif
 
 /* Offscreen api */
 
diff --git a/cogl/cogl/cogl-onscreen-template.h b/cogl/cogl/cogl-onscreen-template.h
index d8714fa..2dd737b 100644
--- a/cogl/cogl/cogl-onscreen-template.h
+++ b/cogl/cogl/cogl-onscreen-template.h
@@ -39,9 +39,7 @@
 
 #include <cogl/cogl-swap-chain.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -49,14 +47,12 @@ typedef struct _CoglOnscreenTemplate              CoglOnscreenTemplate;
 
 #define COGL_ONSCREEN_TEMPLATE(OBJECT) ((CoglOnscreenTemplate *)OBJECT)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_onscreen_template_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_onscreen_template_get_gtype (void);
-#endif
 
 CoglOnscreenTemplate *
 cogl_onscreen_template_new (CoglSwapChain *swap_chain);
diff --git a/cogl/cogl/cogl-onscreen.h b/cogl/cogl/cogl-onscreen.h
index 6a55c4c..bf36bfb 100644
--- a/cogl/cogl/cogl-onscreen.h
+++ b/cogl/cogl/cogl-onscreen.h
@@ -43,23 +43,19 @@
 #include <cogl/cogl-frame-info.h>
 #include <cogl/cogl-object.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
 typedef struct _CoglOnscreen CoglOnscreen;
 #define COGL_ONSCREEN(X) ((CoglOnscreen *)(X))
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_onscreen_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_onscreen_get_gtype (void);
-#endif
 
 /**
  * cogl_onscreen_new: (constructor)
@@ -469,14 +465,12 @@ typedef void (*CoglFrameCallback) (CoglOnscreen *onscreen,
  */
 typedef struct _CoglClosure CoglFrameClosure;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_frame_closure_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_frame_closure_get_gtype (void);
-#endif
 
 /**
  * cogl_onscreen_add_frame_callback:
@@ -696,14 +690,12 @@ typedef void (*CoglOnscreenResizeCallback) (CoglOnscreen *onscreen,
  */
 typedef struct _CoglClosure CoglOnscreenResizeClosure;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_onscreen_resize_closure_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_onscreen_resize_closure_get_gtype (void);
-#endif
 
 /**
  * cogl_onscreen_add_resize_callback:
@@ -812,14 +804,12 @@ typedef void (*CoglOnscreenDirtyCallback) (CoglOnscreen *onscreen,
  */
 typedef struct _CoglClosure CoglOnscreenDirtyClosure;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_onscreen_dirty_closure_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_onscreen_dirty_closure_get_gtype (void);
-#endif
 
 /**
  * cogl_onscreen_add_dirty_callback:
diff --git a/cogl/cogl/cogl-output.h b/cogl/cogl/cogl-output.h
index 6eec10e..15df92c 100644
--- a/cogl/cogl/cogl-output.h
+++ b/cogl/cogl/cogl-output.h
@@ -39,9 +39,7 @@
 
 #include <cogl/cogl-types.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -70,14 +68,12 @@ COGL_BEGIN_DECLS
 typedef struct _CoglOutput CoglOutput;
 #define COGL_OUTPUT(X) ((CoglOutput *)(X))
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_output_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_output_get_gtype (void);
-#endif
 
 /**
  * CoglSubpixelOrder:
diff --git a/cogl/cogl/cogl-pipeline.h b/cogl/cogl/cogl-pipeline.h
index 0ec7aa0..6558735 100644
--- a/cogl/cogl/cogl-pipeline.h
+++ b/cogl/cogl/cogl-pipeline.h
@@ -44,9 +44,7 @@ typedef struct _CoglPipeline CoglPipeline;
 #include <cogl/cogl-context.h>
 #include <cogl/cogl-snippet.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -66,14 +64,12 @@ COGL_BEGIN_DECLS
 
 #define COGL_PIPELINE(OBJECT) ((CoglPipeline *)OBJECT)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_pipeline_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_pipeline_get_gtype (void);
-#endif
 
 /**
  * cogl_pipeline_new:
diff --git a/cogl/cogl/cogl-pixel-buffer.h b/cogl/cogl/cogl-pixel-buffer.h
index e451856..473b5ed 100644
--- a/cogl/cogl/cogl-pixel-buffer.h
+++ b/cogl/cogl/cogl-pixel-buffer.h
@@ -46,9 +46,7 @@ typedef struct _CoglPixelBuffer CoglPixelBuffer;
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-context.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -58,14 +56,12 @@ COGL_BEGIN_DECLS
  * CoglPixelBuffer: (skip)
  */
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_pixel_buffer_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_pixel_buffer_get_gtype (void);
-#endif
 
 /**
  * cogl_pixel_buffer_new:
diff --git a/cogl/cogl/cogl-primitive.h b/cogl/cogl/cogl-primitive.h
index a21fea5..708c06b 100644
--- a/cogl/cogl/cogl-primitive.h
+++ b/cogl/cogl/cogl-primitive.h
@@ -47,9 +47,7 @@ typedef struct _CoglPrimitive CoglPrimitive;
 #include <cogl/cogl-attribute.h>
 #include <cogl/cogl-framebuffer.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
diff --git a/cogl/cogl/cogl-quaternion.h b/cogl/cogl/cogl-quaternion.h
index c70ecca..0660f7e 100644
--- a/cogl/cogl/cogl-quaternion.h
+++ b/cogl/cogl/cogl-quaternion.h
@@ -59,9 +59,7 @@ COGL_BEGIN_DECLS
 #include <cogl/cogl-vector.h>
 #include <cogl/cogl-euler.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 /**
  * CoglQuaternion:
@@ -147,14 +145,12 @@ struct _CoglQuaternion
 };
 COGL_STRUCT_SIZE_ASSERT (CoglQuaternion, 32);
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_quaternion_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_quaternion_get_gtype (void);
-#endif
 
 /**
  * cogl_quaternion_init:
diff --git a/cogl/cogl/cogl-renderer.h b/cogl/cogl/cogl-renderer.h
index 590997c..8dbf199 100644
--- a/cogl/cogl/cogl-renderer.h
+++ b/cogl/cogl/cogl-renderer.h
@@ -38,9 +38,7 @@
 #include <cogl/cogl-error.h>
 #include <cogl/cogl-output.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -88,14 +86,12 @@ cogl_renderer_error_quark (void);
 
 typedef struct _CoglRenderer CoglRenderer;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_renderer_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_renderer_get_gtype (void);
-#endif
 
 /**
  * cogl_is_renderer:
diff --git a/cogl/cogl/cogl-snippet.h b/cogl/cogl/cogl-snippet.h
index b8d9efd..a4a77ed 100644
--- a/cogl/cogl/cogl-snippet.h
+++ b/cogl/cogl/cogl-snippet.h
@@ -341,14 +341,12 @@ typedef struct _CoglSnippet CoglSnippet;
 
 #define COGL_SNIPPET(OBJECT) ((CoglSnippet *)OBJECT)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_snippet_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_snippet_get_gtype (void);
-#endif
 
 /* Enumeration of all the hook points that a snippet can be attached
    to within a pipeline. */
diff --git a/cogl/cogl/cogl-sub-texture.h b/cogl/cogl/cogl-sub-texture.h
index ced2677..7b89bb7 100644
--- a/cogl/cogl/cogl-sub-texture.h
+++ b/cogl/cogl/cogl-sub-texture.h
@@ -52,14 +52,12 @@ COGL_BEGIN_DECLS
 #define COGL_SUB_TEXTURE(tex) ((CoglSubTexture *) tex)
 typedef struct _CoglSubTexture CoglSubTexture;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_sub_texture_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_sub_texture_get_gtype (void);
-#endif
 
 /**
  * cogl_sub_texture_new:
diff --git a/cogl/cogl/cogl-swap-chain.h b/cogl/cogl/cogl-swap-chain.h
index d048867..dd854bc 100644
--- a/cogl/cogl/cogl-swap-chain.h
+++ b/cogl/cogl/cogl-swap-chain.h
@@ -35,22 +35,18 @@
 
 #include <cogl/cogl-types.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
 typedef struct _CoglSwapChain CoglSwapChain;
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_swap_chain_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_swap_chain_get_gtype (void);
-#endif
 
 CoglSwapChain *
 cogl_swap_chain_new (void);
diff --git a/cogl/cogl/cogl-texture-2d-sliced.h b/cogl/cogl/cogl-texture-2d-sliced.h
index ec959a9..7208ef4 100644
--- a/cogl/cogl/cogl-texture-2d-sliced.h
+++ b/cogl/cogl/cogl-texture-2d-sliced.h
@@ -70,14 +70,12 @@
 typedef struct _CoglTexture2DSliced CoglTexture2DSliced;
 #define COGL_TEXTURE_2D_SLICED(X) ((CoglTexture2DSliced *)X)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_texture_2d_sliced_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_texture_2d_sliced_get_gtype (void);
-#endif
 
 /**
  * cogl_texture_2d_sliced_new_with_size:
diff --git a/cogl/cogl/cogl-texture-2d.h b/cogl/cogl/cogl-texture-2d.h
index c806ced..ee6c9d7 100644
--- a/cogl/cogl/cogl-texture-2d.h
+++ b/cogl/cogl/cogl-texture-2d.h
@@ -61,14 +61,12 @@ COGL_BEGIN_DECLS
 typedef struct _CoglTexture2D CoglTexture2D;
 #define COGL_TEXTURE_2D(X) ((CoglTexture2D *)X)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_texture_2d_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_texture_2d_get_gtype (void);
-#endif
 
 /**
  * cogl_is_texture_2d:
diff --git a/cogl/cogl/cogl-texture-3d.h b/cogl/cogl/cogl-texture-3d.h
index b3b038a..238adfe 100644
--- a/cogl/cogl/cogl-texture-3d.h
+++ b/cogl/cogl/cogl-texture-3d.h
@@ -52,14 +52,12 @@ typedef struct _CoglTexture3D CoglTexture3D;
 
 #define COGL_TEXTURE_3D(X) ((CoglTexture3D *)X)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_texture_3d_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_texture_3d_get_gtype (void);
-#endif
 
 /**
  * cogl_texture_3d_new_with_size:
diff --git a/cogl/cogl/cogl-texture-rectangle.h b/cogl/cogl/cogl-texture-rectangle.h
index 7619686..c71f0f8 100644
--- a/cogl/cogl/cogl-texture-rectangle.h
+++ b/cogl/cogl/cogl-texture-rectangle.h
@@ -69,14 +69,12 @@ COGL_BEGIN_DECLS
 typedef struct _CoglTextureRectangle CoglTextureRectangle;
 #define COGL_TEXTURE_RECTANGLE(X) ((CoglTextureRectangle *)X)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_texture_rectangle_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_texture_rectangle_get_gtype (void);
-#endif
 
 /**
  * cogl_is_texture_rectangle:
diff --git a/cogl/cogl/cogl-texture.h b/cogl/cogl/cogl-texture.h
index e1243f0..8440f88 100644
--- a/cogl/cogl/cogl-texture.h
+++ b/cogl/cogl/cogl-texture.h
@@ -54,9 +54,7 @@ typedef struct _CoglTexture CoglTexture;
 #include <cogl/cogl-pixel-buffer.h>
 #include <cogl/cogl-bitmap.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -71,14 +69,12 @@ COGL_BEGIN_DECLS
 
 #define COGL_TEXTURE_MAX_WASTE  127
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_texture_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_texture_get_gtype (void);
-#endif
 
 /**
  * COGL_TEXTURE_ERROR:
diff --git a/cogl/cogl/cogl-util.h b/cogl/cogl/cogl-util.h
index c244196..376d177 100644
--- a/cogl/cogl/cogl-util.h
+++ b/cogl/cogl/cogl-util.h
@@ -37,9 +37,7 @@
 #include <cogl/cogl-defines.h>
 #include "cogl-types.h"
 
-#ifndef COGL_HAS_GLIB_SUPPORT
 #include <stdio.h>
-#endif
 
 /* Double check that config.h has been included */
 #if (!defined (PACKAGE_NAME) && \
diff --git a/cogl/cogl/cogl.c b/cogl/cogl/cogl.c
index fc8e461..a9ca3fe 100644
--- a/cogl/cogl/cogl.c
+++ b/cogl/cogl/cogl.c
@@ -757,7 +757,7 @@ _cogl_init (void)
 
   if (initialized == FALSE)
     {
-#if defined(COGL_HAS_GTYPE_SUPPORT) && !GLIB_CHECK_VERSION (2, 36, 0)
+#if !GLIB_CHECK_VERSION (2, 36, 0)
       g_type_init ();
 #endif
 
diff --git a/cogl/cogl/winsys/cogl-texture-pixmap-x11.h b/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
index 8587dfd..4c86c68 100644
--- a/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
+++ b/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
@@ -50,9 +50,7 @@
 
 #include <cogl/cogl-context.h>
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 #include <glib-object.h>
-#endif
 
 COGL_BEGIN_DECLS
 
@@ -70,14 +68,12 @@ typedef struct _CoglTexturePixmapX11 CoglTexturePixmapX11;
 
 #define COGL_TEXTURE_PIXMAP_X11(X) ((CoglTexturePixmapX11 *)X)
 
-#ifdef COGL_HAS_GTYPE_SUPPORT
 /**
  * cogl_texture_pixmap_x11_get_gtype:
  *
  * Returns: a #GType that can be used with the GLib type system.
  */
 GType cogl_texture_pixmap_x11_get_gtype (void);
-#endif
 
 typedef enum
 {
diff --git a/cogl/configure.ac b/cogl/configure.ac
index 8fbc260..3ed761c 100644
--- a/cogl/configure.ac
+++ b/cogl/configure.ac
@@ -375,8 +375,6 @@ AM_PATH_GLIB_2_0([glib_req_version],
                  [AC_MSG_ERROR([glib-2.0 is required])],
                  [gobject gthread gmodule-no-export])
 
-COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLIB_SUPPORT"
-COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GTYPE_SUPPORT"
 COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES gobject-2.0 gmodule-no-export-2.0"
 
 dnl     ============================================================


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