summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2013-01-30 15:19:33 +0000
committerLionel Landwerlin <llandwerlin@gmail.com>2013-01-31 14:19:28 +0000
commitd591ca0b4e465e76e68f244810db5ab3140cdc25 (patch)
tree563ac4ceadc0c62a91745027790e286e4fc84eab /tests
parent6ce5ec6b63758e8aae17d84ca8bf55b2cec36e2f (diff)
downloadclutter-gst-d591ca0b4e465e76e68f244810db5ab3140cdc25.tar.gz
remove most of remaining Clutter deprecation warnings
Apart from ClutterMedia/ClutterTexture because that would break API.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-alpha.c32
-rw-r--r--tests/test-rgb-upload.c4
-rw-r--r--tests/test-start-stop.c4
-rw-r--r--tests/test-yuv-upload.c4
4 files changed, 28 insertions, 16 deletions
diff --git a/tests/test-alpha.c b/tests/test-alpha.c
index e1e78e6..359ba0a 100644
--- a/tests/test-alpha.c
+++ b/tests/test-alpha.c
@@ -110,11 +110,11 @@ main (int argc, char *argv[])
const ClutterColor stage_color = {128, 0, 192, 255};
const ClutterColor rectangle_color = { 96, 0, 0, 255};
- const ClutterGeometry rectangle_geom = {110, 70, 100, 100};
+ const ClutterRect rectangle_geom = { {110, 70}, {100, 100}};
ClutterActor *stage;
ClutterActor *texture;
ClutterActor *rectangle;
- ClutterAnimation *animation;
+ ClutterTransition *animation;
GstPipeline *pipeline;
GstElement *src;
@@ -142,10 +142,16 @@ main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_actor_set_size (stage, 320.0f, 240.0f);
- clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
+ clutter_actor_set_background_color (stage, &stage_color);
- rectangle = clutter_rectangle_new_with_color (&rectangle_color);
- clutter_actor_set_geometry (rectangle, &rectangle_geom);
+ rectangle = clutter_actor_new ();
+ clutter_actor_set_background_color (rectangle, &rectangle_color);
+ clutter_actor_set_position (rectangle,
+ rectangle_geom.origin.x,
+ rectangle_geom.origin.y);
+ clutter_actor_set_size (rectangle,
+ rectangle_geom.size.width,
+ rectangle_geom.size.height);
/* We need to set certain props on the target texture currently for
* efficient/corrent playback onto the texture (which sucks a bit)
@@ -199,12 +205,18 @@ main (int argc, char *argv[])
clutter_actor_add_child (stage, rectangle);
clutter_actor_add_child (stage, texture);
- clutter_actor_show_all (stage);
+ clutter_actor_show (stage);
- animation = clutter_actor_animate (texture, CLUTTER_LINEAR, 6000,
- "opacity", 0xff,
- NULL);
- clutter_animation_set_loop (animation, TRUE);
+ clutter_actor_save_easing_state (texture);
+ clutter_actor_set_easing_mode (texture, CLUTTER_LINEAR);
+ clutter_actor_set_easing_duration (texture, 6000);
+
+ clutter_actor_set_opacity (texture, 0xff);
+
+ clutter_actor_restore_easing_state (texture);
+
+ animation = clutter_actor_get_transition (texture, "opacity");
+ clutter_timeline_set_repeat_count (CLUTTER_TIMELINE (animation), -1);
clutter_main();
diff --git a/tests/test-rgb-upload.c b/tests/test-rgb-upload.c
index 5a324d5..aeccf8f 100644
--- a/tests/test-rgb-upload.c
+++ b/tests/test-rgb-upload.c
@@ -173,8 +173,8 @@ main (int argc, char *argv[])
g_critical("Could not link elements");
gst_element_set_state (GST_ELEMENT(pipeline), GST_STATE_PLAYING);
- clutter_group_add (CLUTTER_GROUP (stage), texture);
- clutter_actor_show_all (stage);
+ clutter_actor_add_child (stage, texture);
+ clutter_actor_show (stage);
clutter_main();
diff --git a/tests/test-start-stop.c b/tests/test-start-stop.c
index 7b6efab..b7b6938 100644
--- a/tests/test-start-stop.c
+++ b/tests/test-start-stop.c
@@ -142,7 +142,7 @@ main (int argc, char *argv[])
g_assert (error == CLUTTER_INIT_SUCCESS);
stage = clutter_stage_new ();
- clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
+ clutter_actor_set_background_color (stage, &stage_color);
video = clutter_gst_video_texture_new ();
g_assert (CLUTTER_GST_IS_VIDEO_TEXTURE(video));
@@ -161,7 +161,7 @@ main (int argc, char *argv[])
clutter_media_set_playing (CLUTTER_MEDIA(video), TRUE);
clutter_actor_add_child (stage, video);
- clutter_actor_show_all (stage);
+ clutter_actor_show (stage);
clutter_main ();
return EXIT_SUCCESS;
diff --git a/tests/test-yuv-upload.c b/tests/test-yuv-upload.c
index 1b8b02b..682733e 100644
--- a/tests/test-yuv-upload.c
+++ b/tests/test-yuv-upload.c
@@ -155,9 +155,9 @@ main (int argc, char *argv[])
g_critical("Could not link elements");
gst_element_set_state (GST_ELEMENT(pipeline), GST_STATE_PLAYING);
- clutter_group_add (CLUTTER_GROUP (stage), texture);
+ clutter_actor_add_child (stage, texture);
/* clutter_actor_set_opacity (texture, 0x11); */
- clutter_actor_show_all (stage);
+ clutter_actor_show (stage);
clutter_main();