2 //gcc -g `pkg-config --cflags --libs elementary` frame_example_01.c -o frame_example_01
4 #include <Elementary.h>
6 # include "elementary_config.h"
10 elm_main(int argc, char **argv)
12 Evas_Object *win, *bg;
13 Evas_Object *f1, *r1, *f2, *r2, *f3, *r3, *f4, *r4;
16 win = elm_win_add(NULL, "frame", ELM_WIN_BASIC);
17 elm_win_title_set(win, "Frame");
18 elm_win_autodel_set(win, EINA_TRUE);
19 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
22 elm_win_resize_object_add(win, bg);
25 r1 = evas_object_rectangle_add(evas_object_evas_get(win));
26 evas_object_color_set(r1, 255, 0, 0, 255);
29 f1= elm_frame_add(win);
30 elm_object_content_set(f1, r1);
31 elm_object_text_set(f1, "Default frame");
32 evas_object_resize(f1, 100, 100);
33 evas_object_move(f1, 25, 25);
36 r2 = evas_object_rectangle_add(evas_object_evas_get(win));
37 evas_object_color_set(r2, 0, 255, 0, 255);
40 f2 = elm_frame_add(win);
41 elm_object_content_set(f2, r2);
42 elm_object_text_set(f2, "Padding frame");
43 evas_object_resize(f2, 100, 100);
44 evas_object_move(f2, 150, 25);
45 elm_object_style_set(f2, "pad_small");
48 r3 = evas_object_rectangle_add(evas_object_evas_get(win));
49 evas_object_color_set(r3, 0, 0, 255, 255);
52 f3 = elm_frame_add(win);
53 elm_object_content_set(f3, r3);
54 elm_object_text_set(f3, "Top outdent frame");
55 evas_object_resize(f3, 100, 100);
56 evas_object_move(f3, 25, 150);
57 elm_object_style_set(f3, "outdent_top");
60 r4 = evas_object_rectangle_add(evas_object_evas_get(win));
61 evas_object_color_set(r4, 0, 0, 0, 255);
64 f4 = elm_frame_add(win);
65 elm_object_content_set(f4, r4);
66 elm_object_text_set(f4, "Bottom outdent frame");
67 evas_object_resize(f4, 100, 100);
68 evas_object_move(f4, 150, 150);
69 elm_object_style_set(f4, "outdent_bottom");
72 evas_object_resize(win, 275, 275);
73 evas_object_show(win);