[mutter] cogl: Fix a bunch of GISCAN warnings
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl: Fix a bunch of GISCAN warnings
- Date: Wed, 20 Jul 2016 06:28:59 +0000 (UTC)
commit ea64e0abfa79de385ee997b2e3d12d53885ccf31
Author: Jonas Ådahl <jadahl gmail com>
Date: Wed Jun 15 15:57:36 2016 -0400
cogl: Fix a bunch of GISCAN warnings
https://bugzilla.gnome.org/show_bug.cgi?id=768977
cogl/cogl-pango/cogl-pango.h | 1 +
cogl/cogl/cogl-object.h | 9 ++---
cogl/cogl/cogl-primitive.h | 34 +++++++++++--------
cogl/cogl/cogl-renderer.h | 2 +-
cogl/cogl/cogl-types.h | 33 +------------------
cogl/cogl/cogl-xlib-renderer.h | 26 +++++++++------
cogl/cogl/cogl1-context.h | 2 +-
cogl/cogl/deprecated/cogl-clutter-xlib.h | 4 ++
cogl/cogl/deprecated/cogl-fixed.c | 8 ----
cogl/cogl/deprecated/cogl-fixed.h | 42 +++++++++++++++++-------
cogl/cogl/deprecated/cogl-material-compat.c | 3 ++
cogl/cogl/deprecated/cogl-material-compat.h | 4 ++
cogl/cogl/deprecated/cogl-shader.h | 3 +-
cogl/cogl/deprecated/cogl-texture-deprecated.h | 2 +
cogl/cogl/deprecated/cogl-vertex-buffer.h | 2 +-
15 files changed, 87 insertions(+), 88 deletions(-)
---
diff --git a/cogl/cogl-pango/cogl-pango.h b/cogl/cogl-pango/cogl-pango.h
index 8712849..c926851 100644
--- a/cogl/cogl-pango/cogl-pango.h
+++ b/cogl/cogl-pango/cogl-pango.h
@@ -51,6 +51,7 @@
#include <cogl/cogl.h>
#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 a0bed88..6bdcd50 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 0f20bb5..a21fea5 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 88a8c08..590997c 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 6accf8d..e30a351 100644
--- a/cogl/cogl/cogl-types.h
+++ b/cogl/cogl/cogl-types.h
@@ -40,9 +40,8 @@
#include <cogl/cogl-defines.h>
-#ifdef COGL_HAS_GTYPE_SUPPORT
+#include <glib.h>
#include <glib-object.h>
-#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 9e5a84d..e81d594 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 92ac7d0..0f43c19 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 424ff49..dc7300a 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 8a4c35e..3b1635b 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 73d0ed5..1fc83a4 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 5d73eae..3084225 100644
--- a/cogl/cogl/deprecated/cogl-material-compat.c
+++ b/cogl/cogl/deprecated/cogl-material-compat.c
@@ -40,6 +40,9 @@
#include <cogl-matrix.h>
#include <cogl-context-private.h>
+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 88d3ac3..57b7df7 100644
--- a/cogl/cogl/deprecated/cogl-material-compat.h
+++ b/cogl/cogl/deprecated/cogl-material-compat.h
@@ -40,6 +40,7 @@
#include <cogl/cogl-depth-state.h>
#include <cogl/cogl-error.h>
#include <cogl/cogl-macros.h>
+#include <cogl/cogl-object.h>
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 af225e8..d4b22e7 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 4ab824d..890f365 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/cogl-texture.h>
+
/**
* 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 3b3a8df..8b78022 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]