1
0
Fork 0

cogl: Remove support for not building with glib/gtype support

https://bugzilla.gnome.org/show_bug.cgi?id=768977
This commit is contained in:
Jonas Ådahl 2016-06-16 16:31:38 -04:00
parent a40e4634a6
commit 75c3cf0589
44 changed files with 1 additions and 187 deletions

View file

@ -52,10 +52,7 @@
#include <cogl/cogl-defines.h> #include <cogl/cogl-defines.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <cogl-path/cogl-path-enum-types.h> #include <cogl-path/cogl-path-enum-types.h>
#endif
#include <cogl-path/cogl-path-types.h> #include <cogl-path/cogl-path-types.h>
#include <cogl-path/cogl-path-functions.h> #include <cogl-path/cogl-path-functions.h>

View file

@ -37,9 +37,7 @@
#include <cogl/cogl-context.h> #include <cogl/cogl-context.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -71,14 +69,12 @@ COGL_BEGIN_DECLS
typedef struct _CoglAtlasTexture CoglAtlasTexture; typedef struct _CoglAtlasTexture CoglAtlasTexture;
#define COGL_ATLAS_TEXTURE(tex) ((CoglAtlasTexture *) tex) #define COGL_ATLAS_TEXTURE(tex) ((CoglAtlasTexture *) tex)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_atlas_texture_get_gtype: * cogl_atlas_texture_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_atlas_texture_get_gtype (void); GType cogl_atlas_texture_get_gtype (void);
#endif
/** /**
* cogl_atlas_texture_new_with_size: * cogl_atlas_texture_new_with_size:

View file

@ -45,9 +45,7 @@ typedef struct _CoglAttributeBuffer CoglAttributeBuffer;
#include <cogl/cogl-context.h> #include <cogl/cogl-context.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -61,14 +59,12 @@ COGL_BEGIN_DECLS
#define COGL_ATTRIBUTE_BUFFER(buffer) ((CoglAttributeBuffer *)(buffer)) #define COGL_ATTRIBUTE_BUFFER(buffer) ((CoglAttributeBuffer *)(buffer))
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_attribute_buffer_get_gtype: * cogl_attribute_buffer_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_attribute_buffer_get_gtype (void); GType cogl_attribute_buffer_get_gtype (void);
#endif
/** /**
* cogl_attribute_buffer_new_with_size: * cogl_attribute_buffer_new_with_size:

View file

@ -46,9 +46,7 @@ typedef struct _CoglAttribute CoglAttribute;
#include <cogl/cogl-attribute-buffer.h> #include <cogl/cogl-attribute-buffer.h>
#include <cogl/cogl-indices.h> #include <cogl/cogl-indices.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -60,14 +58,12 @@ COGL_BEGIN_DECLS
* FIXME * FIXME
*/ */
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_attribute_get_gtype: * cogl_attribute_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_attribute_get_gtype (void); GType cogl_attribute_get_gtype (void);
#endif
/** /**
* cogl_attribute_new: (constructor) * cogl_attribute_new: (constructor)

View file

@ -44,20 +44,16 @@ typedef struct _CoglBitmap CoglBitmap;
#include <cogl/cogl-context.h> #include <cogl/cogl-context.h>
#include <cogl/cogl-pixel-buffer.h> #include <cogl/cogl-pixel-buffer.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_bitmap_get_gtype: * cogl_bitmap_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_bitmap_get_gtype (void); GType cogl_bitmap_get_gtype (void);
#endif
/** /**
* SECTION:cogl-bitmap * SECTION:cogl-bitmap

View file

@ -48,20 +48,16 @@
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#include <cogl/cogl-macros.h> #include <cogl/cogl-macros.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_color_get_gtype: * cogl_color_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_color_get_gtype (void); GType cogl_color_get_gtype (void);
#endif
/** /**
* cogl_color_new: * cogl_color_new:

View file

@ -44,16 +44,6 @@ char *_cogl_config_renderer;
char *_cogl_config_disable_gl_extensions; char *_cogl_config_disable_gl_extensions;
char *_cogl_config_override_gl_version; 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 */ /* Array of config options that just set a global string */
static const struct static const struct
{ {
@ -143,5 +133,3 @@ _cogl_config_read (void)
g_key_file_free (key_file); g_key_file_free (key_file);
} }
#endif /* COGL_HAS_GLIB_SUPPORT */

View file

@ -46,9 +46,7 @@ typedef struct _CoglContext CoglContext;
#include <cogl/cogl-display.h> #include <cogl/cogl-display.h>
#include <cogl/cogl-primitive.h> #include <cogl/cogl-primitive.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -96,14 +94,12 @@ COGL_BEGIN_DECLS
#define COGL_CONTEXT(OBJECT) ((CoglContext *)OBJECT) #define COGL_CONTEXT(OBJECT) ((CoglContext *)OBJECT)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_context_get_gtype: * cogl_context_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_context_get_gtype (void); GType cogl_context_get_gtype (void);
#endif
/** /**
* cogl_context_new: (constructor) * cogl_context_new: (constructor)

View file

@ -40,9 +40,7 @@
#include <cogl/cogl-renderer.h> #include <cogl/cogl-renderer.h>
#include <cogl/cogl-onscreen-template.h> #include <cogl/cogl-onscreen-template.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -72,14 +70,12 @@ typedef struct _CoglDisplay CoglDisplay;
#define COGL_DISPLAY(OBJECT) ((CoglDisplay *)OBJECT) #define COGL_DISPLAY(OBJECT) ((CoglDisplay *)OBJECT)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_display_get_gtype: * cogl_display_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_display_get_gtype (void); GType cogl_display_get_gtype (void);
#endif
/** /**
* cogl_display_new: * cogl_display_new:

View file

@ -48,11 +48,9 @@ void
_cogl_propagate_error (CoglError **dest, _cogl_propagate_error (CoglError **dest,
CoglError *src); CoglError *src);
#ifdef COGL_HAS_GLIB_SUPPORT
void void
_cogl_propagate_gerror (CoglError **dest, _cogl_propagate_gerror (CoglError **dest,
GError *src); GError *src);
#endif /* COGL_HAS_GLIB_SUPPORT */
#define _cogl_clear_error(X) g_clear_error ((GError **)X) #define _cogl_clear_error(X) g_clear_error ((GError **)X)

View file

@ -120,16 +120,9 @@ _cogl_propagate_error (CoglError **dest,
*dest = src; *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 void
_cogl_propagate_gerror (CoglError **dest, _cogl_propagate_gerror (CoglError **dest,
GError *src) GError *src)
{ {
_cogl_propagate_error (dest, (CoglError *) src); _cogl_propagate_error (dest, (CoglError *) src);
} }
#endif /* COGL_HAS_GLIB_SUPPORT */

View file

@ -111,21 +111,7 @@ COGL_BEGIN_DECLS
* if an error is thrown.</note> * if an error is thrown.</note>
*/ */
#ifdef COGL_HAS_GLIB_SUPPORT
#define CoglError GError #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: * 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 * that a CoglError is a GError and can be used directly with the
* GError api. * GError api.
*/ */
#ifdef COGL_HAS_GLIB_SUPPORT
#define COGL_GLIB_ERROR(COGL_ERROR) ((CoglError *)COGL_ERROR) #define COGL_GLIB_ERROR(COGL_ERROR) ((CoglError *)COGL_ERROR)
#endif
COGL_END_DECLS COGL_END_DECLS

View file

@ -38,9 +38,7 @@
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -166,14 +164,12 @@ struct _CoglEuler
}; };
COGL_STRUCT_SIZE_ASSERT (CoglEuler, 32); COGL_STRUCT_SIZE_ASSERT (CoglEuler, 32);
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_euler_get_gtype: * cogl_euler_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_euler_get_gtype (void); GType cogl_euler_get_gtype (void);
#endif
/** /**
* cogl_euler_init: * cogl_euler_init:

View file

@ -40,9 +40,7 @@
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#include <cogl/cogl-output.h> #include <cogl/cogl-output.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
#include <glib.h> #include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -50,14 +48,12 @@ G_BEGIN_DECLS
typedef struct _CoglFrameInfo CoglFrameInfo; typedef struct _CoglFrameInfo CoglFrameInfo;
#define COGL_FRAME_INFO(X) ((CoglFrameInfo *)(X)) #define COGL_FRAME_INFO(X) ((CoglFrameInfo *)(X))
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_frame_info_get_gtype: * cogl_frame_info_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_frame_info_get_gtype (void); GType cogl_frame_info_get_gtype (void);
#endif
/** /**
* cogl_is_frame_info: * cogl_is_frame_info:

View file

@ -53,9 +53,7 @@ typedef struct _CoglFramebuffer CoglFramebuffer;
#include <cogl/cogl-quaternion.h> #include <cogl/cogl-quaternion.h>
#include <cogl/cogl-euler.h> #include <cogl/cogl-euler.h>
#include <cogl/cogl-texture.h> #include <cogl/cogl-texture.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS

View file

@ -142,23 +142,19 @@ struct _CoglGLES2Vtable
#include <cogl/gl-prototypes/cogl-gles2-functions.h> #include <cogl/gl-prototypes/cogl-gles2-functions.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
#undef COGL_EXT_BEGIN #undef COGL_EXT_BEGIN
#undef COGL_EXT_FUNCTION #undef COGL_EXT_FUNCTION
#undef COGL_EXT_END #undef COGL_EXT_END
}; };
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_gles2_context_get_gtype: * cogl_gles2_context_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_gles2_context_get_gtype (void); GType cogl_gles2_context_get_gtype (void);
#endif
uint32_t uint32_t
_cogl_gles2_context_error_quark (void); _cogl_gles2_context_error_quark (void);

View file

@ -40,9 +40,7 @@
#include <cogl/cogl-context.h> #include <cogl/cogl-context.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -58,14 +56,12 @@ COGL_BEGIN_DECLS
typedef struct _CoglIndexBuffer CoglIndexBuffer; typedef struct _CoglIndexBuffer CoglIndexBuffer;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_index_buffer_get_gtype: * cogl_index_buffer_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_index_buffer_get_gtype (void); GType cogl_index_buffer_get_gtype (void);
#endif
/** /**
* cogl_index_buffer_new: * cogl_index_buffer_new:

View file

@ -45,9 +45,7 @@ typedef struct _CoglIndices CoglIndices;
#include <cogl/cogl-index-buffer.h> #include <cogl/cogl-index-buffer.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -109,14 +107,12 @@ COGL_BEGIN_DECLS
* for drawing quads as above. * for drawing quads as above.
*/ */
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_indices_get_gtype: * cogl_indices_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_indices_get_gtype (void); GType cogl_indices_get_gtype (void);
#endif
CoglIndices * CoglIndices *
cogl_indices_new (CoglContext *context, cogl_indices_new (CoglContext *context,

View file

@ -134,14 +134,12 @@
*/ */
typedef struct _CoglMatrixStack CoglMatrixStack; typedef struct _CoglMatrixStack CoglMatrixStack;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_matrix_stack_get_gtype: * cogl_matrix_stack_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_matrix_stack_get_gtype (void); GType cogl_matrix_stack_get_gtype (void);
#endif
/** /**
* CoglMatrixEntry: * CoglMatrixEntry:
@ -179,14 +177,12 @@ GType cogl_matrix_stack_get_gtype (void);
*/ */
typedef struct _CoglMatrixEntry CoglMatrixEntry; typedef struct _CoglMatrixEntry CoglMatrixEntry;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_matrix_entry_get_gtype: * cogl_matrix_entry_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_matrix_entry_get_gtype (void); GType cogl_matrix_entry_get_gtype (void);
#endif
/** /**

View file

@ -2304,10 +2304,8 @@ cogl_matrix_transpose (CoglMatrix *matrix)
cogl_matrix_init_from_array (matrix, new_values); cogl_matrix_init_from_array (matrix, new_values);
} }
#ifdef COGL_HAS_GTYPE_SUPPORT
GType GType
cogl_gtype_matrix_get_type (void) cogl_gtype_matrix_get_type (void)
{ {
return cogl_matrix_get_gtype (); return cogl_matrix_get_gtype ();
} }
#endif

View file

@ -36,17 +36,13 @@
#include <cogl/cogl-defines.h> #include <cogl/cogl-defines.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif /* COGL_HAS_GTYPE_SUPPORT */
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#include <cogl/cogl-macros.h> #include <cogl/cogl-macros.h>
#include <cogl/cogl-quaternion.h> #include <cogl/cogl-quaternion.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -777,8 +773,6 @@ cogl_matrix_transpose (CoglMatrix *matrix);
void void
cogl_debug_matrix_print (const CoglMatrix *matrix); cogl_debug_matrix_print (const CoglMatrix *matrix);
#ifdef COGL_HAS_GTYPE_SUPPORT
#define COGL_GTYPE_TYPE_MATRIX (cogl_matrix_get_gtype ()) #define COGL_GTYPE_TYPE_MATRIX (cogl_matrix_get_gtype ())
/** /**
@ -800,8 +794,6 @@ GType cogl_matrix_get_gtype (void);
GType GType
cogl_gtype_matrix_get_type (void); cogl_gtype_matrix_get_type (void);
#endif /* COGL_HAS_GTYPE_SUPPORT*/
COGL_END_DECLS COGL_END_DECLS
#endif /* __COGL_MATRIX_H */ #endif /* __COGL_MATRIX_H */

View file

@ -57,9 +57,7 @@ typedef void (*CoglUserDataDestroyInternalCallback) (void *user_data,
typedef struct _CoglObjectClass typedef struct _CoglObjectClass
{ {
#ifdef COGL_HAS_GTYPE_SUPPORT
GTypeClass base_class; GTypeClass base_class;
#endif
const char *name; const char *name;
void *virt_free; void *virt_free;
void *virt_unref; void *virt_unref;
@ -127,13 +125,9 @@ struct _CoglObject
#endif /* COGL_OBJECT_DEBUG */ #endif /* COGL_OBJECT_DEBUG */
#ifdef COGL_HAS_GTYPE_SUPPORT
#define _COGL_GTYPE_INIT_CLASS(type_name) do { \ #define _COGL_GTYPE_INIT_CLASS(type_name) do { \
_cogl_##type_name##_class.base_class.g_type = cogl_##type_name##_get_gtype (); \ _cogl_##type_name##_class.base_class.g_type = cogl_##type_name##_get_gtype (); \
} while (0) } while (0)
#else
#define _COGL_GTYPE_INIT_CLASS(type_name)
#endif
#define COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \ #define COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \
\ \

View file

@ -33,9 +33,7 @@
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -49,14 +47,12 @@ typedef struct _CoglObject CoglObject;
* (get-value-func cogl_object_get_object) * (get-value-func cogl_object_get_object)
*/ */
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_object_get_gtype: * cogl_object_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_object_get_gtype (void); GType cogl_object_get_gtype (void);
#endif
/** /**
* cogl_object_ref: (skip) * cogl_object_ref: (skip)
@ -128,11 +124,7 @@ typedef struct {
* *
* Since: 1.4 * Since: 1.4
*/ */
#ifdef COGL_HAS_GTYPE_SUPPORT
typedef GDestroyNotify CoglUserDataDestroyCallback; typedef GDestroyNotify CoglUserDataDestroyCallback;
#else
typedef void (*CoglUserDataDestroyCallback) (void *user_data);
#endif
/** /**
* CoglDebugObjectTypeInfo: * CoglDebugObjectTypeInfo:

View file

@ -38,9 +38,7 @@
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#include <cogl/cogl-texture.h> #include <cogl/cogl-texture.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -56,14 +54,12 @@ typedef struct _CoglOffscreen CoglOffscreen;
#define COGL_OFFSCREEN(X) ((CoglOffscreen *)X) #define COGL_OFFSCREEN(X) ((CoglOffscreen *)X)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_offscreen_get_gtype: * cogl_offscreen_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_offscreen_get_gtype (void); GType cogl_offscreen_get_gtype (void);
#endif
/* Offscreen api */ /* Offscreen api */

View file

@ -39,9 +39,7 @@
#include <cogl/cogl-swap-chain.h> #include <cogl/cogl-swap-chain.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -49,14 +47,12 @@ typedef struct _CoglOnscreenTemplate CoglOnscreenTemplate;
#define COGL_ONSCREEN_TEMPLATE(OBJECT) ((CoglOnscreenTemplate *)OBJECT) #define COGL_ONSCREEN_TEMPLATE(OBJECT) ((CoglOnscreenTemplate *)OBJECT)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_onscreen_template_get_gtype: * cogl_onscreen_template_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_onscreen_template_get_gtype (void); GType cogl_onscreen_template_get_gtype (void);
#endif
CoglOnscreenTemplate * CoglOnscreenTemplate *
cogl_onscreen_template_new (CoglSwapChain *swap_chain); cogl_onscreen_template_new (CoglSwapChain *swap_chain);

View file

@ -43,23 +43,19 @@
#include <cogl/cogl-frame-info.h> #include <cogl/cogl-frame-info.h>
#include <cogl/cogl-object.h> #include <cogl/cogl-object.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
typedef struct _CoglOnscreen CoglOnscreen; typedef struct _CoglOnscreen CoglOnscreen;
#define COGL_ONSCREEN(X) ((CoglOnscreen *)(X)) #define COGL_ONSCREEN(X) ((CoglOnscreen *)(X))
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_onscreen_get_gtype: * cogl_onscreen_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_onscreen_get_gtype (void); GType cogl_onscreen_get_gtype (void);
#endif
/** /**
* cogl_onscreen_new: (constructor) * cogl_onscreen_new: (constructor)
@ -469,14 +465,12 @@ typedef void (*CoglFrameCallback) (CoglOnscreen *onscreen,
*/ */
typedef struct _CoglClosure CoglFrameClosure; typedef struct _CoglClosure CoglFrameClosure;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_frame_closure_get_gtype: * cogl_frame_closure_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_frame_closure_get_gtype (void); GType cogl_frame_closure_get_gtype (void);
#endif
/** /**
* cogl_onscreen_add_frame_callback: * cogl_onscreen_add_frame_callback:
@ -696,14 +690,12 @@ typedef void (*CoglOnscreenResizeCallback) (CoglOnscreen *onscreen,
*/ */
typedef struct _CoglClosure CoglOnscreenResizeClosure; typedef struct _CoglClosure CoglOnscreenResizeClosure;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_onscreen_resize_closure_get_gtype: * cogl_onscreen_resize_closure_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_onscreen_resize_closure_get_gtype (void); GType cogl_onscreen_resize_closure_get_gtype (void);
#endif
/** /**
* cogl_onscreen_add_resize_callback: * cogl_onscreen_add_resize_callback:
@ -812,14 +804,12 @@ typedef void (*CoglOnscreenDirtyCallback) (CoglOnscreen *onscreen,
*/ */
typedef struct _CoglClosure CoglOnscreenDirtyClosure; typedef struct _CoglClosure CoglOnscreenDirtyClosure;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_onscreen_dirty_closure_get_gtype: * cogl_onscreen_dirty_closure_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_onscreen_dirty_closure_get_gtype (void); GType cogl_onscreen_dirty_closure_get_gtype (void);
#endif
/** /**
* cogl_onscreen_add_dirty_callback: * cogl_onscreen_add_dirty_callback:

View file

@ -39,9 +39,7 @@
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -70,14 +68,12 @@ COGL_BEGIN_DECLS
typedef struct _CoglOutput CoglOutput; typedef struct _CoglOutput CoglOutput;
#define COGL_OUTPUT(X) ((CoglOutput *)(X)) #define COGL_OUTPUT(X) ((CoglOutput *)(X))
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_output_get_gtype: * cogl_output_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_output_get_gtype (void); GType cogl_output_get_gtype (void);
#endif
/** /**
* CoglSubpixelOrder: * CoglSubpixelOrder:

View file

@ -44,9 +44,7 @@ typedef struct _CoglPipeline CoglPipeline;
#include <cogl/cogl-context.h> #include <cogl/cogl-context.h>
#include <cogl/cogl-snippet.h> #include <cogl/cogl-snippet.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -66,14 +64,12 @@ COGL_BEGIN_DECLS
#define COGL_PIPELINE(OBJECT) ((CoglPipeline *)OBJECT) #define COGL_PIPELINE(OBJECT) ((CoglPipeline *)OBJECT)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_pipeline_get_gtype: * cogl_pipeline_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_pipeline_get_gtype (void); GType cogl_pipeline_get_gtype (void);
#endif
/** /**
* cogl_pipeline_new: * cogl_pipeline_new:

View file

@ -46,9 +46,7 @@ typedef struct _CoglPixelBuffer CoglPixelBuffer;
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#include <cogl/cogl-context.h> #include <cogl/cogl-context.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -58,14 +56,12 @@ COGL_BEGIN_DECLS
* CoglPixelBuffer: (skip) * CoglPixelBuffer: (skip)
*/ */
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_pixel_buffer_get_gtype: * cogl_pixel_buffer_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_pixel_buffer_get_gtype (void); GType cogl_pixel_buffer_get_gtype (void);
#endif
/** /**
* cogl_pixel_buffer_new: * cogl_pixel_buffer_new:

View file

@ -47,9 +47,7 @@ typedef struct _CoglPrimitive CoglPrimitive;
#include <cogl/cogl-attribute.h> #include <cogl/cogl-attribute.h>
#include <cogl/cogl-framebuffer.h> #include <cogl/cogl-framebuffer.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS

View file

@ -59,9 +59,7 @@ COGL_BEGIN_DECLS
#include <cogl/cogl-vector.h> #include <cogl/cogl-vector.h>
#include <cogl/cogl-euler.h> #include <cogl/cogl-euler.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
/** /**
* CoglQuaternion: * CoglQuaternion:
@ -147,14 +145,12 @@ struct _CoglQuaternion
}; };
COGL_STRUCT_SIZE_ASSERT (CoglQuaternion, 32); COGL_STRUCT_SIZE_ASSERT (CoglQuaternion, 32);
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_quaternion_get_gtype: * cogl_quaternion_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_quaternion_get_gtype (void); GType cogl_quaternion_get_gtype (void);
#endif
/** /**
* cogl_quaternion_init: * cogl_quaternion_init:

View file

@ -38,9 +38,7 @@
#include <cogl/cogl-error.h> #include <cogl/cogl-error.h>
#include <cogl/cogl-output.h> #include <cogl/cogl-output.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -88,14 +86,12 @@ cogl_renderer_error_quark (void);
typedef struct _CoglRenderer CoglRenderer; typedef struct _CoglRenderer CoglRenderer;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_renderer_get_gtype: * cogl_renderer_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_renderer_get_gtype (void); GType cogl_renderer_get_gtype (void);
#endif
/** /**
* cogl_is_renderer: * cogl_is_renderer:

View file

@ -341,14 +341,12 @@ typedef struct _CoglSnippet CoglSnippet;
#define COGL_SNIPPET(OBJECT) ((CoglSnippet *)OBJECT) #define COGL_SNIPPET(OBJECT) ((CoglSnippet *)OBJECT)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_snippet_get_gtype: * cogl_snippet_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_snippet_get_gtype (void); GType cogl_snippet_get_gtype (void);
#endif
/* Enumeration of all the hook points that a snippet can be attached /* Enumeration of all the hook points that a snippet can be attached
to within a pipeline. */ to within a pipeline. */

View file

@ -52,14 +52,12 @@ COGL_BEGIN_DECLS
#define COGL_SUB_TEXTURE(tex) ((CoglSubTexture *) tex) #define COGL_SUB_TEXTURE(tex) ((CoglSubTexture *) tex)
typedef struct _CoglSubTexture CoglSubTexture; typedef struct _CoglSubTexture CoglSubTexture;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_sub_texture_get_gtype: * cogl_sub_texture_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_sub_texture_get_gtype (void); GType cogl_sub_texture_get_gtype (void);
#endif
/** /**
* cogl_sub_texture_new: * cogl_sub_texture_new:

View file

@ -35,22 +35,18 @@
#include <cogl/cogl-types.h> #include <cogl/cogl-types.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
typedef struct _CoglSwapChain CoglSwapChain; typedef struct _CoglSwapChain CoglSwapChain;
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_swap_chain_get_gtype: * cogl_swap_chain_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_swap_chain_get_gtype (void); GType cogl_swap_chain_get_gtype (void);
#endif
CoglSwapChain * CoglSwapChain *
cogl_swap_chain_new (void); cogl_swap_chain_new (void);

View file

@ -70,14 +70,12 @@
typedef struct _CoglTexture2DSliced CoglTexture2DSliced; typedef struct _CoglTexture2DSliced CoglTexture2DSliced;
#define COGL_TEXTURE_2D_SLICED(X) ((CoglTexture2DSliced *)X) #define COGL_TEXTURE_2D_SLICED(X) ((CoglTexture2DSliced *)X)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_texture_2d_sliced_get_gtype: * cogl_texture_2d_sliced_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_texture_2d_sliced_get_gtype (void); GType cogl_texture_2d_sliced_get_gtype (void);
#endif
/** /**
* cogl_texture_2d_sliced_new_with_size: * cogl_texture_2d_sliced_new_with_size:

View file

@ -61,14 +61,12 @@ COGL_BEGIN_DECLS
typedef struct _CoglTexture2D CoglTexture2D; typedef struct _CoglTexture2D CoglTexture2D;
#define COGL_TEXTURE_2D(X) ((CoglTexture2D *)X) #define COGL_TEXTURE_2D(X) ((CoglTexture2D *)X)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_texture_2d_get_gtype: * cogl_texture_2d_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_texture_2d_get_gtype (void); GType cogl_texture_2d_get_gtype (void);
#endif
/** /**
* cogl_is_texture_2d: * cogl_is_texture_2d:

View file

@ -52,14 +52,12 @@ typedef struct _CoglTexture3D CoglTexture3D;
#define COGL_TEXTURE_3D(X) ((CoglTexture3D *)X) #define COGL_TEXTURE_3D(X) ((CoglTexture3D *)X)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_texture_3d_get_gtype: * cogl_texture_3d_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_texture_3d_get_gtype (void); GType cogl_texture_3d_get_gtype (void);
#endif
/** /**
* cogl_texture_3d_new_with_size: * cogl_texture_3d_new_with_size:

View file

@ -69,14 +69,12 @@ COGL_BEGIN_DECLS
typedef struct _CoglTextureRectangle CoglTextureRectangle; typedef struct _CoglTextureRectangle CoglTextureRectangle;
#define COGL_TEXTURE_RECTANGLE(X) ((CoglTextureRectangle *)X) #define COGL_TEXTURE_RECTANGLE(X) ((CoglTextureRectangle *)X)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_texture_rectangle_get_gtype: * cogl_texture_rectangle_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_texture_rectangle_get_gtype (void); GType cogl_texture_rectangle_get_gtype (void);
#endif
/** /**
* cogl_is_texture_rectangle: * cogl_is_texture_rectangle:

View file

@ -54,9 +54,7 @@ typedef struct _CoglTexture CoglTexture;
#include <cogl/cogl-pixel-buffer.h> #include <cogl/cogl-pixel-buffer.h>
#include <cogl/cogl-bitmap.h> #include <cogl/cogl-bitmap.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -71,14 +69,12 @@ COGL_BEGIN_DECLS
#define COGL_TEXTURE_MAX_WASTE 127 #define COGL_TEXTURE_MAX_WASTE 127
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_texture_get_gtype: * cogl_texture_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_texture_get_gtype (void); GType cogl_texture_get_gtype (void);
#endif
/** /**
* COGL_TEXTURE_ERROR: * COGL_TEXTURE_ERROR:

View file

@ -37,9 +37,7 @@
#include <cogl/cogl-defines.h> #include <cogl/cogl-defines.h>
#include "cogl-types.h" #include "cogl-types.h"
#ifndef COGL_HAS_GLIB_SUPPORT
#include <stdio.h> #include <stdio.h>
#endif
/* Double check that config.h has been included */ /* Double check that config.h has been included */
#if (!defined (PACKAGE_NAME) && \ #if (!defined (PACKAGE_NAME) && \

View file

@ -757,7 +757,7 @@ _cogl_init (void)
if (initialized == FALSE) 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 (); g_type_init ();
#endif #endif

View file

@ -50,9 +50,7 @@
#include <cogl/cogl-context.h> #include <cogl/cogl-context.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h> #include <glib-object.h>
#endif
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
@ -70,14 +68,12 @@ typedef struct _CoglTexturePixmapX11 CoglTexturePixmapX11;
#define COGL_TEXTURE_PIXMAP_X11(X) ((CoglTexturePixmapX11 *)X) #define COGL_TEXTURE_PIXMAP_X11(X) ((CoglTexturePixmapX11 *)X)
#ifdef COGL_HAS_GTYPE_SUPPORT
/** /**
* cogl_texture_pixmap_x11_get_gtype: * cogl_texture_pixmap_x11_get_gtype:
* *
* Returns: a #GType that can be used with the GLib type system. * Returns: a #GType that can be used with the GLib type system.
*/ */
GType cogl_texture_pixmap_x11_get_gtype (void); GType cogl_texture_pixmap_x11_get_gtype (void);
#endif
typedef enum typedef enum
{ {

View file

@ -375,8 +375,6 @@ AM_PATH_GLIB_2_0([glib_req_version],
[AC_MSG_ERROR([glib-2.0 is required])], [AC_MSG_ERROR([glib-2.0 is required])],
[gobject gthread gmodule-no-export]) [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" COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES gobject-2.0 gmodule-no-export-2.0"
dnl ============================================================ dnl ============================================================