diff options
author | David Walter Seikel | 2012-04-22 09:20:32 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:20:32 +1000 |
commit | 3ad3455551be0d7859ecb02290376206d5e66498 (patch) | |
tree | 497917e12b4d7f458dff9765d9b53f64c4e03fc3 /libraries/elementary/src/examples/transit_example_01.c | |
parent | Update EFL to latest beta. (diff) | |
download | SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.zip SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.gz SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.bz2 SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.xz |
And actually include new files, plus elementary libraries.
Diffstat (limited to 'libraries/elementary/src/examples/transit_example_01.c')
-rw-r--r-- | libraries/elementary/src/examples/transit_example_01.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/libraries/elementary/src/examples/transit_example_01.c b/libraries/elementary/src/examples/transit_example_01.c new file mode 100644 index 0000000..26323c9 --- /dev/null +++ b/libraries/elementary/src/examples/transit_example_01.c | |||
@@ -0,0 +1,52 @@ | |||
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() | ||