elementary/transit - updated test_transit for the chain transit

SVN revision: 58576
This commit is contained in:
ChunEon Park 2011-04-12 05:49:47 +00:00
parent 0d41b9fee8
commit 2b735983c4
1 changed files with 23 additions and 7 deletions

View File

@ -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);
}