From e79f8c1ebf13a7b827ae3b3412fc28ed9fcaff81 Mon Sep 17 00:00:00 2001 From: hermet Date: Tue, 12 Apr 2011 05:49:47 +0000 Subject: [PATCH] elementary/transit - updated test_transit for the chain transit git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@58576 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/test_transit.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/bin/test_transit.c b/src/bin/test_transit.c index 75e5e73..fbd8071 100644 --- a/src/bin/test_transit.c +++ b/src/bin/test_transit.c @@ -486,8 +486,8 @@ test_transit7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in void test_transit8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Evas_Object *win, *bg, *bt; - Elm_Transit *trans; + Evas_Object *win, *bg, *bt, *bt2; + Elm_Transit *trans, *trans2; Elm_Transit_Effect *effect_context; win = elm_win_add(NULL, "transit8", ELM_WIN_BASIC); @@ -503,8 +503,14 @@ test_transit8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in bt = elm_button_add(win); elm_button_label_set(bt, "Button - Custom Effect"); evas_object_show(bt); - evas_object_move(bt, 50, 100); - evas_object_resize(bt, 250, 150); + evas_object_move(bt, 50, 50); + evas_object_resize(bt, 150, 150); + + bt2 = elm_button_add(win); + elm_button_label_set(bt2, "Button - Chain Transit"); + evas_object_show(bt2); + evas_object_move(bt2, 200, 200); + evas_object_resize(bt2, 150, 150); evas_object_show(win); @@ -512,14 +518,24 @@ test_transit8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in trans = elm_transit_add(); elm_transit_auto_reverse_set(trans, EINA_TRUE); elm_transit_tween_mode_set(trans, ELM_TRANSIT_TWEEN_MODE_DECELERATE); - //Negative value makes transition repeate for infinite times. - elm_transit_repeat_times_set(trans, -1); - effect_context = _custom_context_new(100, 100, 250, 250); + effect_context = _custom_context_new(150, 150, 50, 50); elm_transit_object_add(trans, bt); elm_transit_effect_add(trans, _custom_op, effect_context, _custom_context_free); elm_transit_duration_set(trans, 5.0); + + /* Adding Chain Transit */ + trans2 = elm_transit_add(); + elm_transit_object_add(trans2, bt2); + elm_transit_object_add(trans2, bt2); + elm_transit_effect_flip_add(trans2, ELM_TRANSIT_EFFECT_FLIP_AXIS_Y, EINA_TRUE); + elm_transit_tween_mode_set(trans2, ELM_TRANSIT_TWEEN_MODE_ACCELERATE); + elm_transit_duration_set(trans2, 2.0); + //Negative value makes transition repeate for infinite times. + elm_transit_repeat_times_set(trans2, -1); + + elm_transit_chain_transit_add(trans, trans2); elm_transit_go(trans); } -- 2.7.4