1
0
Fork 0
mutter-performance-source/tests/test-timeline.c
Matthew Allum 1ceaf04ac7 2007-08-24 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/glx/clutter-event-glx.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-stage-glx.h:
        Add initial support for stage state events.
        Fix fullscreening for an already mapped stage.

        * tests/test-events.c:
        Print out info from the above. Blue button now toggles
        fullscreen.

        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        Add a setting for templates to ref or clone underlying
        timelines. (As to improve sync issues like those in foofone)

        * tests/test-timeline.c:
        Also add completed signals.

        * clutter/cogl/gles/cogl.c: (cogl_texture_image_2d):
        * configure.ac:
        Forward port from stable branch. RGB Image fixes gles
        and check for lower case libgles_cm.
2007-08-24 15:12:52 +00:00

86 lines
2 KiB
C

#include <stdio.h>
#include <stdlib.h>
#include <clutter/clutter.h>
static void
timeline_1_complete (ClutterTimeline *timeline)
{
g_debug ("1: Completed");
}
static void
timeline_2_complete (ClutterTimeline *timeline)
{
g_debug ("2: Completed");
}
static void
timeline_3_complete (ClutterTimeline *timeline)
{
g_debug ("3: Completed");
}
static void
timeline_1_new_frame_cb (ClutterTimeline *timeline, gint frame_no)
{
g_debug ("1: Doing frame %d.", frame_no);
}
static void
timeline_2_new_frame_cb (ClutterTimeline *timeline, gint frame_no)
{
g_debug ("2: Doing frame %d.", frame_no);
}
static void
timeline_3_new_frame_cb (ClutterTimeline *timeline, gint frame_no)
{
g_debug ("3: Doing frame %d.", frame_no);
}
int
main (int argc, char **argv)
{
ClutterTimeline *timeline_1;
ClutterTimeline *timeline_2;
ClutterTimeline *timeline_3;
clutter_init (&argc, &argv);
timeline_1 = clutter_timeline_new (10, 120);
timeline_2 = clutter_timeline_clone (timeline_1);
timeline_3 = clutter_timeline_clone (timeline_1);
g_signal_connect (timeline_1,
"new-frame", G_CALLBACK (timeline_1_new_frame_cb),
NULL);
g_signal_connect (timeline_1,
"completed", G_CALLBACK (timeline_1_complete),
NULL);
g_signal_connect (timeline_2,
"new-frame", G_CALLBACK (timeline_2_new_frame_cb),
NULL);
g_signal_connect (timeline_2,
"completed", G_CALLBACK (timeline_2_complete),
NULL);
g_signal_connect (timeline_3,
"new-frame", G_CALLBACK (timeline_3_new_frame_cb),
NULL);
g_signal_connect (timeline_3,
"completed", G_CALLBACK (timeline_3_complete),
NULL);
clutter_timeline_start (timeline_1);
clutter_timeline_start (timeline_2);
clutter_timeline_start (timeline_3);
clutter_main ();
g_object_unref (timeline_1);
g_object_unref (timeline_2);
g_object_unref (timeline_3);
return EXIT_SUCCESS;
}