[clutter] Deprecate actor id



commit f6e6c803d9ff95c30f489e1e66b01c589a153084
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Apr 11 12:30:51 2011 +0100

    Deprecate actor id
    
    The actor's id, which is currently used to generate the pick color,
    should not be part of the public API: it's an internal detail of the
    pick implementation, and having it exposed is like punching a hole
    through the abstraction.
    
    http://bugzilla.clutter-project.org/show_bug.cgi?id=2633
    
    https://bugzilla.gnome.org/show_bug.cgi?id=647876

 clutter/clutter-actor-private.h |    2 ++
 clutter/clutter-actor.c         |   10 +++++++++-
 clutter/clutter-actor.h         |    5 +++++
 clutter/clutter-main.c          |    2 ++
 4 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-actor-private.h b/clutter/clutter-actor-private.h
index 620dfe3..372f729 100644
--- a/clutter/clutter-actor-private.h
+++ b/clutter/clutter-actor-private.h
@@ -162,6 +162,8 @@ G_CONST_RETURN gchar *_clutter_actor_get_debug_name (ClutterActor *self);
 void _clutter_actor_push_clone_paint (void);
 void _clutter_actor_pop_clone_paint  (void);
 
+guint32 _clutter_actor_get_pick_id (ClutterActor *self);
+
 G_END_DECLS
 
 #endif /* __CLUTTER_ACTOR_PRIVATE_H__ */
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index d906962..56189bb 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -2650,6 +2650,12 @@ actor_has_shader_data (ClutterActor *self)
   return g_object_get_qdata (G_OBJECT (self), quark_shader_data) != NULL;
 }
 
+guint32
+_clutter_actor_get_pick_id (ClutterActor *self)
+{
+  return self->priv->id;
+}
+
 /**
  * clutter_actor_paint:
  * @self: A #ClutterActor
@@ -2813,7 +2819,7 @@ clutter_actor_paint (ClutterActor *self)
 
       CLUTTER_COUNTER_INC (_clutter_uprof_context, actor_pick_counter);
 
-      _clutter_id_to_color (clutter_actor_get_gid (self), &col);
+      _clutter_id_to_color (_clutter_actor_get_pick_id (self), &col);
 
       /* Actor will then paint silhouette of itself in supplied
        * color.  See clutter_stage_get_actor_at_pos() for where
@@ -7278,6 +7284,8 @@ clutter_actor_get_name (ClutterActor *self)
  * Return value: Globally unique value for this object instance.
  *
  * Since: 0.6
+ *
+ * Deprecated: 1.8: The id is not used any longer.
  */
 guint32
 clutter_actor_get_gid (ClutterActor *self)
diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h
index 6b05d13..adc013a 100644
--- a/clutter/clutter-actor.h
+++ b/clutter/clutter-actor.h
@@ -428,7 +428,10 @@ void                  clutter_actor_set_name                  (ClutterActor
                                                                const gchar           *name);
 G_CONST_RETURN gchar *clutter_actor_get_name                  (ClutterActor          *self);
 
+#ifndef CLUTTER_DISABLE_DEPRECATED
 guint32               clutter_actor_get_gid                   (ClutterActor          *self);
+#endif
+
 void                  clutter_actor_set_clip                  (ClutterActor          *self,
                                                                gfloat                 xoff,
                                                                gfloat                 yoff,
@@ -497,7 +500,9 @@ gboolean              clutter_actor_event                     (ClutterActor
                                                                ClutterEvent          *event,
                                                                gboolean               capture);
 
+#ifndef CLUTTER_DISABLE_DEPRECATED
 ClutterActor *        clutter_get_actor_by_gid                (guint32                id_);
+#endif
 
 gboolean              clutter_actor_set_shader                (ClutterActor          *self,
                                                                ClutterShader         *shader);
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index 5373027..3704ee6 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -2296,6 +2296,8 @@ _clutter_process_event (ClutterEvent *event)
  *   The returned actor does not have its reference count increased.
  *
  * Since: 0.6
+ *
+ * Deprecated: 1.8: The id is not used any longer.
  */
 ClutterActor *
 clutter_get_actor_by_gid (guint32 id_)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]