summaryrefslogtreecommitdiff
path: root/cogl/cogl-util.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-05-27 22:24:56 +0100
committerRobert Bragg <robert@linux.intel.com>2010-06-04 14:44:15 +0100
commit5af3ead3a2bbd18f4b1ee35eabffd20d740749c1 (patch)
treec738f5c82f5ea0e6fc3e2818d6b4e1f980fbbc22 /cogl/cogl-util.c
parentef08c6369a0bb2a261fa16bf4323a5d524d5d788 (diff)
downloadcogl-5af3ead3a2bbd18f4b1ee35eabffd20d740749c1.tar.gz
CoglObject: Adds cogl_object_{get,set}_user_data
This provides a mechanism for associating private data with any CoglObject. We expect Clutter will use this to associate weak materials with normal materials.
Diffstat (limited to 'cogl/cogl-util.c')
-rw-r--r--cogl/cogl-util.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/cogl/cogl-util.c b/cogl/cogl-util.c
index cc28b08e..369017b8 100644
--- a/cogl/cogl-util.c
+++ b/cogl/cogl-util.c
@@ -61,67 +61,6 @@ cogl_util_next_p2 (int a)
/* gtypes */
-void *
-cogl_object_ref (void *object)
-{
- CoglObject *obj = object;
-
- g_return_val_if_fail (object != NULL, NULL);
-
- obj->ref_count++;
- return object;
-}
-
-CoglHandle
-cogl_handle_ref (CoglHandle handle)
-{
- return cogl_object_ref (handle);
-}
-
-void
-cogl_object_unref (void *object)
-{
- CoglObject *obj = object;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (obj->ref_count > 0);
-
- if (--obj->ref_count < 1)
- {
- void (*free_func)(void *obj);
-
- COGL_OBJECT_DEBUG_FREE (obj);
- free_func = obj->klass->virt_free;
- free_func (obj);
- }
-}
-
-void
-cogl_handle_unref (CoglHandle handle)
-{
- cogl_object_unref (handle);
-}
-
-GType
-cogl_object_get_type (void)
-{
- static GType our_type = 0;
-
- /* XXX: We are keeping the "CoglHandle" name for now incase it would
- * break bindings to change to "CoglObject" */
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (g_intern_static_string ("CoglHandle"),
- (GBoxedCopyFunc) cogl_object_ref,
- (GBoxedFreeFunc) cogl_object_unref);
-
- return our_type;
-}
-
-GType
-cogl_handle_get_type (void)
-{
- return cogl_object_get_type ();
-}
/*
* CoglFixed
*/