2 //gcc -o frame_example_01 frame_example_01.c -g `pkg-config --cflags --libs elementary`
4 #include <Elementary.h>
7 elm_main(int argc, char **argv)
10 Evas_Object *f1, *r1, *f2, *r2, *f3, *r3, *f4, *r4;
12 win = elm_win_add(NULL, "frame", ELM_WIN_BASIC);
13 elm_win_title_set(win, "Frame");
14 elm_win_autodel_set(win, EINA_TRUE);
15 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
18 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
19 elm_win_resize_object_add(win, bg);
22 r1 = evas_object_rectangle_add(evas_object_evas_get(win));
23 evas_object_color_set(r1, 255, 0, 0, 255);
26 f1= elm_frame_add(win);
27 elm_object_content_set(f1, r1);
28 elm_object_text_set(f1, "Default frame");
29 evas_object_resize(f1, 100, 100);
30 evas_object_move(f1, 25, 25);
33 r2 = evas_object_rectangle_add(evas_object_evas_get(win));
34 evas_object_color_set(r2, 0, 255, 0, 255);
37 f2 = elm_frame_add(win);
38 elm_object_content_set(f2, r2);
39 elm_object_text_set(f2, "Padding frame");
40 evas_object_resize(f2, 100, 100);
41 evas_object_move(f2, 150, 25);
42 elm_object_style_set(f2, "pad_small");
45 r3 = evas_object_rectangle_add(evas_object_evas_get(win));
46 evas_object_color_set(r3, 0, 0, 255, 255);
49 f3 = elm_frame_add(win);
50 elm_object_content_set(f3, r3);
51 elm_object_text_set(f3, "Top outdent frame");
52 evas_object_resize(f3, 100, 100);
53 evas_object_move(f3, 25, 150);
54 elm_object_style_set(f3, "outdent_top");
57 r4 = evas_object_rectangle_add(evas_object_evas_get(win));
58 evas_object_color_set(r4, 0, 0, 0, 255);
61 f4 = elm_frame_add(win);
62 elm_object_content_set(f4, r4);
63 elm_object_text_set(f4, "Bottom outdent frame");
64 evas_object_resize(f4, 100, 100);
65 evas_object_move(f4, 150, 150);
66 elm_object_style_set(f4, "outdent_bottom");
69 evas_object_resize(win, 275, 275);
70 evas_object_show(win);