fixed plugin image size problem
[framework/uifw/elementary.git] / src / examples / transit_example_01.c
1 //Compile with:
2 //gcc -o transit_example_01 transit_example_01.c `pkg-config --cflags --libs elementary`
3
4 #include <Elementary.h>
5
6 static void
7 on_done(void *data, Evas_Object *obj, void *event_info)
8 {
9    /* quit the mainloop (elm_run) */
10    elm_exit();
11 }
12
13 EAPI_MAIN int
14 elm_main(int argc, char **argv)
15 {
16    Evas_Object *win, *bg, *bt;
17    Elm_Transit *trans;
18
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);
25
26    bg = elm_bg_add(win);
27    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
28    elm_win_resize_object_add(win, bg);
29    evas_object_show(bg);
30
31    bt = elm_button_add(win);
32    elm_object_text_set(bt, "Resizing Effect");
33    evas_object_show(bt);
34    evas_object_move(bt, 50, 100);
35    evas_object_resize(bt, 100, 50);
36
37    evas_object_show(win);
38
39    trans = elm_transit_add();
40    elm_transit_object_add(trans, bt);
41
42    elm_transit_effect_resizing_add(trans, 100, 50, 300, 150);
43
44    elm_transit_duration_set(trans, 5.0);
45    elm_transit_go(trans);
46
47    elm_run();
48    elm_shutdown();
49
50    return 0;
51 }
52 ELM_MAIN()