From b598210e011f6711848e649217ac7a35770bfe8e Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 26 Nov 2009 17:47:17 +0000 Subject: [PATCH] cogl_offscreen: deprecate cogl_offscreen_ref/unref. New code should use cogl_handle_ref/unref --- clutter/cogl/cogl/cogl-offscreen.h | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/clutter/cogl/cogl/cogl-offscreen.h b/clutter/cogl/cogl/cogl-offscreen.h index a3be41b..2d4db7b 100644 --- a/clutter/cogl/cogl/cogl-offscreen.h +++ b/clutter/cogl/cogl/cogl-offscreen.h @@ -35,9 +35,9 @@ G_BEGIN_DECLS /** * SECTION:cogl-offscreen * @short_description: Fuctions for creating and manipulating offscreen - * frame buffer objects + * framebuffers. * - * Cogl allows creating and operating on offscreen render targets. + * Cogl allows creating and operating on offscreen framebuffers. */ /* Offscreen api */ @@ -61,26 +61,30 @@ G_BEGIN_DECLS CoglHandle cogl_offscreen_new_to_texture (CoglHandle handle); /** - * cogl_offscreen_ref: + * cogl_is_offscreen: * @handle: A CoglHandle for an offscreen buffer * - * Increments the reference count on the offscreen buffer. + * Determines whether the given #CoglHandle references an offscreen buffer + * object. * - * Returns: For convenience it returns the given CoglHandle + * Returns: %TRUE if the handle references an offscreen buffer, + * %FALSE otherwise */ -CoglHandle cogl_offscreen_ref (CoglHandle handle); +gboolean cogl_is_offscreen (CoglHandle handle); + +#ifndef COGL_DISABLE_DEPRECATED /** - * cogl_is_offscreen: + * cogl_offscreen_ref: * @handle: A CoglHandle for an offscreen buffer * - * Gets whether the given handle references an existing offscreen buffer - * object. + * Increments the reference count on the offscreen buffer. * - * Returns: %TRUE if the handle references an offscreen buffer, - * %FALSE otherwise + * Returns: For convenience it returns the given CoglHandle + * + * Deprecated: 1.2: cogl_handle_ref should be used in new code. */ -gboolean cogl_is_offscreen (CoglHandle handle); +CoglHandle cogl_offscreen_ref (CoglHandle handle) G_GNUC_DEPRECATED; /** * cogl_offscreen_unref: @@ -88,8 +92,12 @@ gboolean cogl_is_offscreen (CoglHandle handle); * * Decreases the reference count for the offscreen buffer and frees it when * the count reaches 0. + * + * Deprecated: 1.2: cogl_handle_unref should be used in new code. */ -void cogl_offscreen_unref (CoglHandle handle); +void cogl_offscreen_unref (CoglHandle handle) G_GNUC_DEPRECATED; + +#endif /* COGL_DISABLE_DEPRECATED */ G_END_DECLS -- 2.7.4