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
This commit is contained in:
parent
dbae7e6014
commit
f6e6c803d9
@ -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__ */
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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_)
|
||||
|
Loading…
Reference in New Issue
Block a user