rendered paste body#include <clutter/clutter.h>static voidnew_frame_cb (ClutterTimeline *timeline, gint frame_num, ClutterText *text){ gchar *string = g_strdup_printf ("Progress = %lf", clutter_timeline_get_progress (timeline)); clutter_text_set_text (text, string); g_free (string);}static gbooleanupdate_string (gpointer *array){ new_frame_cb (array[0], 0, array[1]); g_free (array); return FALSE;}static voidcompleted_cb (ClutterTimeline *timeline, ClutterText *text){ gpointer *array = g_malloc (sizeof (gpointer) * 2); array[0] = timeline; array[1] = text; g_idle_add ((GSourceFunc)update_string, array);}intmain (int argc, char **argv){ ClutterActor *stage, *label; ClutterTimeline *timeline; clutter_init (&argc, &argv); stage = clutter_stage_get_default (); label = clutter_text_new (); clutter_container_add_actor (CLUTTER_CONTAINER (stage), label); timeline = clutter_timeline_new (1000); g_signal_connect (timeline, "new-frame", G_CALLBACK (new_frame_cb), label); g_signal_connect (timeline, "completed", G_CALLBACK (completed_cb), label); clutter_timeline_start (timeline); clutter_actor_show (stage); clutter_main (); return 0;}