actor-meta: Add a get_debug_name() private method

Similar to ClutterActor's own get_debug_name().
This commit is contained in:
Emmanuele Bassi 2011-04-15 13:42:45 +01:00
parent bc2c786754
commit a5315de133
2 changed files with 19 additions and 0 deletions

View File

@ -65,6 +65,8 @@ ClutterActorMeta * _clutter_meta_group_get_meta (ClutterMetaGroup *group,
void _clutter_actor_meta_set_actor (ClutterActorMeta *meta, void _clutter_actor_meta_set_actor (ClutterActorMeta *meta,
ClutterActor *actor); ClutterActor *actor);
const gchar * _clutter_actor_meta_get_debug_name (ClutterActorMeta *meta);
G_END_DECLS G_END_DECLS
#endif /* __CLUTTER_ACTOR_META_PRIVATE_H__ */ #endif /* __CLUTTER_ACTOR_META_PRIVATE_H__ */

View File

@ -515,3 +515,20 @@ _clutter_meta_group_get_meta (ClutterMetaGroup *group,
return NULL; return NULL;
} }
/*< private >
* clutter_actor_meta_get_debug_name:
* @meta: a #ClutterActorMeta
*
* Retrieves the name of the @meta for debugging purposes.
*
* Return value: (transfer none): the name of the @meta. The returned
* string is owned by the @meta instance and it should not be
* modified or freed
*/
const gchar *
_clutter_actor_meta_get_debug_name (ClutterActorMeta *meta)
{
return meta->priv->name != NULL ? meta->priv->name
: G_OBJECT_TYPE_NAME (meta);
}