From a5315de133d4fa47200ff89827c8ebee3add656a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 15 Apr 2011 13:42:45 +0100 Subject: [PATCH] actor-meta: Add a get_debug_name() private method Similar to ClutterActor's own get_debug_name(). --- clutter/clutter-actor-meta-private.h | 2 ++ clutter/clutter-actor-meta.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/clutter/clutter-actor-meta-private.h b/clutter/clutter-actor-meta-private.h index e97d8f1a7..39c76265b 100644 --- a/clutter/clutter-actor-meta-private.h +++ b/clutter/clutter-actor-meta-private.h @@ -65,6 +65,8 @@ ClutterActorMeta * _clutter_meta_group_get_meta (ClutterMetaGroup *group, void _clutter_actor_meta_set_actor (ClutterActorMeta *meta, ClutterActor *actor); +const gchar * _clutter_actor_meta_get_debug_name (ClutterActorMeta *meta); + G_END_DECLS #endif /* __CLUTTER_ACTOR_META_PRIVATE_H__ */ diff --git a/clutter/clutter-actor-meta.c b/clutter/clutter-actor-meta.c index b17082834..e2ebdaadf 100644 --- a/clutter/clutter-actor-meta.c +++ b/clutter/clutter-actor-meta.c @@ -515,3 +515,20 @@ _clutter_meta_group_get_meta (ClutterMetaGroup *group, 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); +}