/* Dump actors */ static void _xfdashboard_dump_actor_internal(ClutterActor *inActor, gint inLevel) { ClutterActorIter iter; ClutterActor *child; gint i; g_return_if_fail(CLUTTER_IS_ACTOR(inActor)); g_return_if_fail(inLevel>=0); clutter_actor_iter_init(&iter, CLUTTER_ACTOR(inActor)); while(clutter_actor_iter_next(&iter, &child)) { for(i=0; i<inLevel; i++) g_print(" "); g_print("+- %s@%p - name: %s - geometry: %.2f,%.2f [%.2fx%.2f], mapped: %s, visible: %s, children: %d\n", G_OBJECT_TYPE_NAME(child), child, clutter_actor_get_name(child), clutter_actor_get_x(child), clutter_actor_get_y(child), clutter_actor_get_width(child), clutter_actor_get_height(child), clutter_actor_is_mapped(child) ? "yes" : "no", clutter_actor_is_visible(child) ? "yes" : "no", clutter_actor_get_n_children(child)); if(clutter_actor_get_n_children(child)>0) _xfdashboard_dump_actor_internal(child, inLevel+1); } }
/** * xfdashboard_dump_actor: * @inActor: The #ClutterActor to dump * * Dumps a textual representation of actor specified in @inActor * to console. The dump contains all children recursively displayed * in a tree. Each entry contains the object class name, address, * position and size of this actor and also the state like is-mapped, * is-visible and a number of children it contains. * * This functions is for debugging purposes and should not be used * normally. */ void xfdashboard_dump_actor(ClutterActor *inActor) { g_return_if_fail(CLUTTER_IS_ACTOR(inActor)); /* Dump the requested top-level actor */ _xfdashboard_dump_actor_print(inActor, 0); /* Dump children of top-level actor which calls itself recursive * if any child has children. */ _xfdashboard_dump_actor_internal(inActor, 1); }
static void _xfdashboard_dump_actor_internal(ClutterActor *inActor, gint inLevel) { ClutterActorIter iter; ClutterActor *child; g_return_if_fail(CLUTTER_IS_ACTOR(inActor)); g_return_if_fail(inLevel>0); /* Dump children */ clutter_actor_iter_init(&iter, CLUTTER_ACTOR(inActor)); while(clutter_actor_iter_next(&iter, &child)) { _xfdashboard_dump_actor_print(child, inLevel); if(clutter_actor_get_n_children(child)>0) _xfdashboard_dump_actor_internal(child, inLevel+1); } }
/** * xfdashboard_dump_actor: * @inActor: The #ClutterActor to dump * * Dumps a textual representation of actor specified in @inActor * to console. The dump contains all children recursively displayed * in a tree. Each entry contains the object class name, address, * position and size of this actor and also the state like is-mapped, * is-visible and a number of children it contains. * * This functions is for debugging purposes and should not be used * normally. */ void xfdashboard_dump_actor(ClutterActor *inActor) { _xfdashboard_dump_actor_internal(inActor, 0); }