#include #include #include #include static ClutterAnimator *animator; static ClutterActor *new_rect (gint r, gint g, gint b, gint a) { GError *error = NULL; ClutterColor *color = clutter_color_new (r, g, b, a); ClutterActor *rectangle = clutter_rectangle_new_with_color (color); gchar *file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL); rectangle = clutter_texture_new_from_file (file, &error); if (rectangle == NULL) g_error ("image load failed: %s", error->message); g_free (file); clutter_actor_set_size (rectangle, 128, 128); clutter_color_free (color); return rectangle; } static gboolean nuke_one (gpointer actor) { clutter_actor_destroy (actor); return FALSE; } #define COUNT 4 static void reverse_timeline (ClutterTimeline *timeline, gpointer data) { ClutterTimelineDirection direction = clutter_timeline_get_direction (timeline); if (direction == CLUTTER_TIMELINE_FORWARD) clutter_timeline_set_direction (timeline, CLUTTER_TIMELINE_BACKWARD); else clutter_timeline_set_direction (timeline, CLUTTER_TIMELINE_FORWARD); clutter_timeline_start (timeline); } G_MODULE_EXPORT gint test_animator_main (gint argc, gchar **argv) { ClutterActor *stage; ClutterActor *rects[COUNT]; gint i; clutter_init (&argc, &argv); stage = clutter_stage_get_default (); for (i=0; i