2 //gcc -o transit_example_01 transit_example_01.c `pkg-config --cflags --libs elementary`
4 #include <Elementary.h>
7 on_done(void *data, Evas_Object *obj, void *event_info)
9 /* quit the mainloop (elm_run) */
14 elm_main(int argc, char **argv)
16 Evas_Object *win, *bg, *bt;
19 win = elm_win_add(NULL, "transit-basic", ELM_WIN_BASIC);
20 elm_win_title_set(win, "Transit - Basic");
21 evas_object_smart_callback_add(win, "delete,request", on_done, NULL);
22 elm_win_autodel_set(win, EINA_TRUE);
23 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
24 evas_object_resize(win, 400, 400);
27 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
28 elm_win_resize_object_add(win, bg);
31 bt = elm_button_add(win);
32 elm_object_text_set(bt, "Resizing Effect");
34 evas_object_move(bt, 50, 100);
35 evas_object_resize(bt, 100, 50);
37 evas_object_show(win);
39 trans = elm_transit_add();
40 elm_transit_object_add(trans, bt);
42 elm_transit_effect_resizing_add(trans, 100, 50, 300, 150);
44 elm_transit_duration_set(trans, 5.0);
45 elm_transit_go(trans);