diff --git a/cogl/cogl-pango/cogl-pango.h b/cogl/cogl-pango/cogl-pango.h index 871284973..c92685193 100644 --- a/cogl/cogl-pango/cogl-pango.h +++ b/cogl/cogl-pango/cogl-pango.h @@ -51,6 +51,7 @@ #include #else #include "cogl/cogl-context.h" +#include "cogl/cogl-macros.h" #endif COGL_BEGIN_DECLS diff --git a/cogl/cogl/cogl-object.h b/cogl/cogl/cogl-object.h index a0bed88dc..6bdcd50a6 100644 --- a/cogl/cogl/cogl-object.h +++ b/cogl/cogl/cogl-object.h @@ -44,12 +44,9 @@ typedef struct _CoglObject CoglObject; #define COGL_OBJECT(X) ((CoglObject *)X) /** - * CoglObject: - * - * Ref Func: cogl_object_ref - * Unref Func: cogl_object_unref - * Set Value Func: cogl_object_value_set_object - * Get Value Func: cogl_object_value_get_object + * CoglObject: (ref-func cogl_object_ref) (unref-func cogl_object_unref) + * (set-value-func cogl_object_value_set_object) + * (get-value-func cogl_object_get_object) */ #ifdef COGL_HAS_GTYPE_SUPPORT diff --git a/cogl/cogl/cogl-primitive.h b/cogl/cogl/cogl-primitive.h index 0f20bb58b..a21fea5d2 100644 --- a/cogl/cogl/cogl-primitive.h +++ b/cogl/cogl/cogl-primitive.h @@ -61,14 +61,18 @@ COGL_BEGIN_DECLS * FIXME */ -#ifdef COGL_HAS_GTYPE_SUPPORT +/** + * CoglPrimitive: (ref-func cogl_object_ref) (unref-func cogl_object_unref) + * (set-value-func cogl_object_value_set_object) + * (get-value-func cogl_object_get_object) + */ + /** * cogl_primitive_get_gtype: * * Returns: a #GType that can be used with the GLib type system. */ GType cogl_primitive_get_gtype (void); -#endif /** * CoglVertexP2: @@ -253,7 +257,7 @@ cogl_primitive_new (CoglVerticesMode mode, ...); /** - * cogl_primitive_new_with_attributes: + * cogl_primitive_new_with_attributes: (skip) * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to process when drawing * @attributes: An array of CoglAttribute @@ -280,7 +284,7 @@ cogl_primitive_new_with_attributes (CoglVerticesMode mode, int n_attributes); /** - * cogl_primitive_new_p2: + * cogl_primitive_new_p2: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -334,7 +338,7 @@ cogl_primitive_new_p2 (CoglContext *context, const CoglVertexP2 *data); /** - * cogl_primitive_new_p3: + * cogl_primitive_new_p3: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -388,7 +392,7 @@ cogl_primitive_new_p3 (CoglContext *context, const CoglVertexP3 *data); /** - * cogl_primitive_new_p2c4: + * cogl_primitive_new_p2c4: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -444,7 +448,7 @@ cogl_primitive_new_p2c4 (CoglContext *context, const CoglVertexP2C4 *data); /** - * cogl_primitive_new_p3c4: + * cogl_primitive_new_p3c4: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -500,7 +504,7 @@ cogl_primitive_new_p3c4 (CoglContext *context, const CoglVertexP3C4 *data); /** - * cogl_primitive_new_p2t2: + * cogl_primitive_new_p2t2: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -556,7 +560,7 @@ cogl_primitive_new_p2t2 (CoglContext *context, const CoglVertexP2T2 *data); /** - * cogl_primitive_new_p3t2: + * cogl_primitive_new_p3t2: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -612,7 +616,7 @@ cogl_primitive_new_p3t2 (CoglContext *context, const CoglVertexP3T2 *data); /** - * cogl_primitive_new_p2t2c4: + * cogl_primitive_new_p2t2c4: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -668,7 +672,7 @@ cogl_primitive_new_p2t2c4 (CoglContext *context, const CoglVertexP2T2C4 *data); /** - * cogl_primitive_new_p3t2c4: + * cogl_primitive_new_p3t2c4: (skip) * @context: A #CoglContext * @mode: A #CoglVerticesMode defining how to draw the vertices * @n_vertices: The number of vertices to read from @data and also @@ -784,7 +788,7 @@ cogl_primitive_set_mode (CoglPrimitive *primitive, CoglVerticesMode mode); /** - * cogl_primitive_set_attributes: + * cogl_primitive_set_attributes: (skip) * @primitive: A #CoglPrimitive object * @attributes: an array of #CoglAttribute pointers * @n_attributes: the number of elements in @attributes @@ -800,7 +804,7 @@ cogl_primitive_set_attributes (CoglPrimitive *primitive, int n_attributes); /** - * cogl_primitive_set_indices: + * cogl_primitive_set_indices: (skip) * @primitive: A #CoglPrimitive * @indices: A #CoglIndices array * @n_indices: The number of indices to reference when drawing @@ -833,7 +837,7 @@ cogl_primitive_set_indices (CoglPrimitive *primitive, int n_indices); /** - * cogl_primitive_get_indices: + * cogl_primitive_get_indices: (skip) * @primitive: A #CoglPrimitive * * Return value: (transfer none): the indices that were set with @@ -913,7 +917,7 @@ cogl_primitive_foreach_attribute (CoglPrimitive *primitive, void *user_data); /** - * cogl_primitive_draw: + * cogl_primitive_draw: (skip) * @primitive: A #CoglPrimitive geometry object * @framebuffer: A destination #CoglFramebuffer * @pipeline: A #CoglPipeline state object diff --git a/cogl/cogl/cogl-renderer.h b/cogl/cogl/cogl-renderer.h index 88a8c082d..590997ce2 100644 --- a/cogl/cogl/cogl-renderer.h +++ b/cogl/cogl/cogl-renderer.h @@ -222,7 +222,7 @@ int cogl_renderer_get_n_fragment_texture_units (CoglRenderer *renderer); /** - * cogl_renderer_check_onscreen_template: + * cogl_renderer_check_onscreen_template: (skip) * @renderer: A #CoglRenderer * @onscreen_template: A #CoglOnscreenTemplate * @error: A pointer to a #CoglError for reporting exceptions diff --git a/cogl/cogl/cogl-types.h b/cogl/cogl/cogl-types.h index 6accf8d88..e30a3512f 100644 --- a/cogl/cogl/cogl-types.h +++ b/cogl/cogl/cogl-types.h @@ -40,9 +40,8 @@ #include -#ifdef COGL_HAS_GTYPE_SUPPORT +#include #include -#endif /* COGL_HAS_GTYPE_SUPPORT */ /* Guard C code in headers, while including them from C++ */ #ifdef __cplusplus @@ -74,32 +73,6 @@ COGL_BEGIN_DECLS */ typedef int CoglBool; -/** - * TRUE: - * - * A constant to be used with #CoglBool types to indicate a boolean in - * the "true" state. - * - * Since: 2.0 - * Stability: stable - */ -#ifndef TRUE -#define TRUE 1 -#endif - -/** - * FALSE: - * - * A constant to be used with #CoglBool types to indicate a boolean in - * the "false" state. - * - * Since: 2.0 - * Stability: stable - */ -#ifndef FALSE -#define FALSE 0 -#endif - #if __GNUC__ >= 4 #define COGL_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) #else @@ -150,14 +123,10 @@ typedef void * CoglHandle; */ #define COGL_INVALID_HANDLE NULL -#ifdef COGL_HAS_GTYPE_SUPPORT - #define COGL_TYPE_HANDLE (cogl_handle_get_type ()) GType cogl_handle_get_type (void) G_GNUC_CONST; -#endif /* COGL_HAS_GTYPE_SUPPORT */ - /** * cogl_handle_ref: * @handle: a #CoglHandle diff --git a/cogl/cogl/cogl-xlib-renderer.h b/cogl/cogl/cogl-xlib-renderer.h index 9e5a84d28..e81d594f9 100644 --- a/cogl/cogl/cogl-xlib-renderer.h +++ b/cogl/cogl/cogl-xlib-renderer.h @@ -57,8 +57,8 @@ COGL_BEGIN_DECLS -/* - * cogl_xlib_renderer_handle_event: +/** + * cogl_xlib_renderer_handle_event: (skip) * @renderer: a #CoglRenderer * @event: pointer to an XEvent structure * @@ -89,8 +89,8 @@ cogl_xlib_renderer_handle_event (CoglRenderer *renderer, typedef CoglFilterReturn (* CoglXlibFilterFunc) (XEvent *event, void *data); -/* - * cogl_xlib_renderer_add_filter: +/** + * cogl_xlib_renderer_add_filter: (skip) * @renderer: a #CoglRenderer * @func: the callback function * @data: user data passed to @func when called @@ -104,8 +104,8 @@ cogl_xlib_renderer_add_filter (CoglRenderer *renderer, CoglXlibFilterFunc func, void *data); -/* - * cogl_xlib_renderer_remove_filter: +/** + * cogl_xlib_renderer_remove_filter: (skip) * @renderer: a #CoglRenderer * @func: the callback function * @data: user data given when the callback was installed @@ -118,8 +118,8 @@ cogl_xlib_renderer_remove_filter (CoglRenderer *renderer, CoglXlibFilterFunc func, void *data); -/* - * cogl_xlib_renderer_get_foreign_display: +/** + * cogl_xlib_renderer_get_foreign_display: (skip) * @renderer: a #CoglRenderer * * Return value: the foreign Xlib display that will be used by any Xlib based @@ -129,8 +129,8 @@ cogl_xlib_renderer_remove_filter (CoglRenderer *renderer, Display * cogl_xlib_renderer_get_foreign_display (CoglRenderer *renderer); -/* - * cogl_xlib_renderer_set_foreign_display: +/** + * cogl_xlib_renderer_set_foreign_display: (skip) * @renderer: a #CoglRenderer * * Sets a foreign Xlib display that Cogl will use for and Xlib based winsys @@ -167,9 +167,15 @@ void cogl_xlib_renderer_set_event_retrieval_enabled (CoglRenderer *renderer, CoglBool enable); +/** + * cogl_xlib_renderer_get_display: (skip) + */ Display * cogl_xlib_renderer_get_display (CoglRenderer *renderer); +/** + * cogl_xlib_renderer_get_visual_info: (skip) + */ XVisualInfo * cogl_xlib_renderer_get_visual_info (CoglRenderer *renderer); diff --git a/cogl/cogl/cogl1-context.h b/cogl/cogl/cogl1-context.h index 92ac7d08f..0f43c198a 100644 --- a/cogl/cogl/cogl1-context.h +++ b/cogl/cogl/cogl1-context.h @@ -92,7 +92,7 @@ CoglBool cogl_features_available (CoglFeatureFlags features); /** - * cogl_get_proc_address: + * cogl_get_proc_address: (skip) * @name: the name of the function. * * Gets a pointer to a given GL or GL ES extension function. This acts diff --git a/cogl/cogl/deprecated/cogl-clutter-xlib.h b/cogl/cogl/deprecated/cogl-clutter-xlib.h index 424ff49b0..dc7300a8b 100644 --- a/cogl/cogl/deprecated/cogl-clutter-xlib.h +++ b/cogl/cogl/deprecated/cogl-clutter-xlib.h @@ -38,6 +38,10 @@ COGL_BEGIN_DECLS #define cogl_clutter_winsys_xlib_get_visual_info cogl_clutter_winsys_xlib_get_visual_info_CLUTTER + +/** + * cogl_clutter_winsys_xlib_get_visual_info_CLUTTER: (skip) + */ XVisualInfo * cogl_clutter_winsys_xlib_get_visual_info (void); diff --git a/cogl/cogl/deprecated/cogl-fixed.c b/cogl/cogl/deprecated/cogl-fixed.c index 8a4c35e74..3b1635b53 100644 --- a/cogl/cogl/deprecated/cogl-fixed.c +++ b/cogl/cogl/deprecated/cogl-fixed.c @@ -329,14 +329,6 @@ static const double _magic = 68719476736.0 * 1.5; #define COGL_NO_FAST_CONVERSIONS #endif /* HAVE_FLOAT_WORD_ORDER */ -/* - * cogl_double_to_fixed : - * @value: value to be converted - * - * A fast conversion from double precision floating to fixed point - * - * Return value: Fixed point representation of the value - */ CoglFixed cogl_double_to_fixed (double val) { diff --git a/cogl/cogl/deprecated/cogl-fixed.h b/cogl/cogl/deprecated/cogl-fixed.h index 73d0ed59b..1fc83a489 100644 --- a/cogl/cogl/deprecated/cogl-fixed.h +++ b/cogl/cogl/deprecated/cogl-fixed.h @@ -471,7 +471,7 @@ COGL_BEGIN_DECLS * * Computes the sine of @angle. * - * Return value: the sine of the passed angle, in fixed point notation + * Return value: (transfer none): the sine of the passed angle, in fixed point notation * * Since: 1.0 */ @@ -484,7 +484,7 @@ cogl_fixed_sin (CoglFixed angle); * * Computes the tangent of @angle. * - * Return value: the tangent of the passed angle, in fixed point notation + * Return value: (transfer none): the tangent of the passed angle, in fixed point notation * * Since: 1.0 */ @@ -497,7 +497,7 @@ cogl_fixed_tan (CoglFixed angle); * * Computes the cosine of @angle. * - * Return value: the cosine of the passed angle, in fixed point notation + * Return value: (transfer none): the cosine of the passed angle, in fixed point notation * * Since: 1.0 */ @@ -509,7 +509,7 @@ CoglFixed cogl_fixed_cos (CoglFixed angle); * * Computes the arc tangent of @a. * - * Return value: the arc tangent of the passed value, in fixed point notation + * Return value: (transfer none): the arc tangent of the passed value, in fixed point notation * * Since: 1.0 */ @@ -524,8 +524,8 @@ cogl_fixed_atan (CoglFixed a); * Computes the arc tangent of @a / @b but uses the sign of both * arguments to return the angle in right quadrant. * - * Return value: the arc tangent of the passed fraction, in fixed point - * notation + * Return value: (transfer none): the arc tangent of the passed fraction, in + * fixed point notation * * Since: 1.0 */ @@ -536,14 +536,24 @@ cogl_fixed_atan2 (CoglFixed a, /*< public >*/ /* Fixed point math routines */ + +/** + * cogl_fixed_mul: (skip) + */ G_INLINE_FUNC CoglFixed cogl_fixed_mul (CoglFixed a, CoglFixed b); +/** + * cogl_fixed_div: (skip) + */ G_INLINE_FUNC CoglFixed cogl_fixed_div (CoglFixed a, CoglFixed b); +/** + * cogl_fixed_mul_div: (skip) + */ G_INLINE_FUNC CoglFixed cogl_fixed_mul_div (CoglFixed a, CoglFixed b, @@ -596,8 +606,8 @@ cogl_fixed_mul_div (CoglFixed a, * * Computes the square root of @x. * - * Return value: the square root of the passed value, in floating point - * notation + * Return value: (transfer none): the square root of the passed value, in + * floating point notation * * Since: 1.0 */ @@ -613,7 +623,7 @@ cogl_fixed_sqrt (CoglFixed x); * This function is some 2.5 times faster on x86, and over 12 times faster on * fpu-less arm, than using libc log(). * - * Return value: base 2 logarithm. + * Return value: (transfer none): base 2 logarithm. * * Since: 1.0 */ @@ -717,7 +727,7 @@ cogl_sqrti (int x); * * Computes the sine of @angle * - * Return value: the sine of the passed angle + * Return value: (transfer none): the sine of the passed angle * * Since: 1.0 */ @@ -730,7 +740,7 @@ cogl_angle_sin (CoglAngle angle); * * Computes the tangent of @angle * - * Return value: the tangent of the passed angle + * Return value: (transfer none): the tangent of the passed angle * * Since: 1.0 */ @@ -743,7 +753,7 @@ cogl_angle_tan (CoglAngle angle); * * Computes the cosine of @angle * - * Return value: the cosine of the passed angle + * Return value: (transfer none): the cosine of the passed angle * * Since: 1.0 */ @@ -797,6 +807,14 @@ cogl_fixed_mul_div (CoglFixed a, } #endif +/** + * cogl_double_to_fixed: + * @value: value to be converted + * + * A fast conversion from double precision floating to fixed point + * + * Return value: (transfer none): Fixed point representation of the value + */ CoglFixed cogl_double_to_fixed (double value); diff --git a/cogl/cogl/deprecated/cogl-material-compat.c b/cogl/cogl/deprecated/cogl-material-compat.c index 5d73eae0d..3084225c1 100644 --- a/cogl/cogl/deprecated/cogl-material-compat.c +++ b/cogl/cogl/deprecated/cogl-material-compat.c @@ -40,6 +40,9 @@ #include #include +G_DEFINE_BOXED_TYPE (CoglMaterial, cogl_material, + cogl_object_ref, cogl_object_unref) + CoglMaterial * cogl_material_new (void) { diff --git a/cogl/cogl/deprecated/cogl-material-compat.h b/cogl/cogl/deprecated/cogl-material-compat.h index 88d3ac335..57b7df7aa 100644 --- a/cogl/cogl/deprecated/cogl-material-compat.h +++ b/cogl/cogl/deprecated/cogl-material-compat.h @@ -40,6 +40,7 @@ #include #include #include +#include G_BEGIN_DECLS @@ -56,6 +57,9 @@ G_BEGIN_DECLS typedef struct _CoglMaterial CoglMaterial; typedef struct _CoglMaterialLayer CoglMaterialLayer; +#define COGL_TYPE_MATERIAL (cogl_material_get_type ()) +GType cogl_material_get_type (void); + #define COGL_MATERIAL(OBJECT) ((CoglMaterial *)OBJECT) /** diff --git a/cogl/cogl/deprecated/cogl-shader.h b/cogl/cogl/deprecated/cogl-shader.h index af225e878..d4b22e757 100644 --- a/cogl/cogl/deprecated/cogl-shader.h +++ b/cogl/cogl/deprecated/cogl-shader.h @@ -391,7 +391,6 @@ cogl_create_program (void); * Deprecated: 1.0: Please use cogl_object_ref() instead. * * Returns: @handle - * Deprecated: 1.16: Use #CoglSnippet api */ COGL_DEPRECATED_IN_1_16_FOR (cogl_snippet_) CoglHandle @@ -404,7 +403,7 @@ cogl_program_ref (CoglHandle handle); * Removes a reference to a program. If it was the last reference the * program object will be destroyed. * - * Deprecated: 1.16: Use #CoglSnippet api + * Deprecated: 1.0: Please use cogl_object_unref() instead. */ COGL_DEPRECATED_IN_1_16_FOR (cogl_snippet_) void diff --git a/cogl/cogl/deprecated/cogl-texture-deprecated.h b/cogl/cogl/deprecated/cogl-texture-deprecated.h index 4ab824df4..890f365d6 100644 --- a/cogl/cogl/deprecated/cogl-texture-deprecated.h +++ b/cogl/cogl/deprecated/cogl-texture-deprecated.h @@ -31,6 +31,8 @@ #ifndef __COGL_TEXTURE_DEPRECATED_H__ #define __COGL_TEXTURE_DEPRECATED_H__ +#include + /** * cogl_texture_get_format: * @texture: a #CoglTexture pointer. diff --git a/cogl/cogl/deprecated/cogl-vertex-buffer.h b/cogl/cogl/deprecated/cogl-vertex-buffer.h index 3b3a8df62..8b780224e 100644 --- a/cogl/cogl/deprecated/cogl-vertex-buffer.h +++ b/cogl/cogl/deprecated/cogl-vertex-buffer.h @@ -283,7 +283,7 @@ cogl_vertex_buffer_draw (CoglHandle handle, int count); /** - * cogl_vertex_buffer_indices_new: + * cogl_vertex_buffer_indices_new: (skip) * @indices_type: a #CoglIndicesType specifying the data type used for * the indices. * @indices_array: (array length=indices_len): Specifies the address of