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;
14 Elm_Animator *animator;
17 win = elm_win_add(NULL, "frame", ELM_WIN_BASIC);
18 elm_win_title_set(win, "Frame");
19 elm_win_autodel_set(win, EINA_TRUE);
20 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
23 elm_win_resize_object_add(win, bg);
26 r1 = evas_object_rectangle_add(evas_object_evas_get(win));
27 evas_object_color_set(r1, 255, 0, 0, 255);
30 f1= elm_frame_add(win);
31 elm_frame_content_set(f1, r1);
32 elm_object_text_set(f1, "Default frame");
33 evas_object_resize(f1, 100, 100);
34 evas_object_move(f1, 25, 25);
37 r2 = evas_object_rectangle_add(evas_object_evas_get(win));
38 evas_object_color_set(r2, 0, 255, 0, 255);
41 f2 = elm_frame_add(win);
42 elm_frame_content_set(f2, r2);
43 elm_object_text_set(f2, "Padding frame");
44 evas_object_resize(f2, 100, 100);
45 evas_object_move(f2, 150, 25);
46 elm_object_style_set(f2, "pad_small");
49 r3 = evas_object_rectangle_add(evas_object_evas_get(win));
50 evas_object_color_set(r3, 0, 0, 255, 255);
53 f3 = elm_frame_add(win);
54 elm_frame_content_set(f3, r3);
55 elm_object_text_set(f3, "Top outdent frame");
56 evas_object_resize(f3, 100, 100);
57 evas_object_move(f3, 25, 150);
58 elm_object_style_set(f3, "outdent_top");
61 r4 = evas_object_rectangle_add(evas_object_evas_get(win));
62 evas_object_color_set(r4, 0, 0, 0, 255);
65 f4 = elm_frame_add(win);
66 elm_frame_content_set(f4, r4);
67 elm_object_text_set(f4, "Bottom outdent frame");
68 evas_object_resize(f4, 100, 100);
69 evas_object_move(f4, 150, 150);
70 elm_object_style_set(f4, "outdent_bottom");
73 evas_object_resize(win, 275, 275);
74 evas_object_show(win);