2 //gcc -g separator_example_01.c -o separator_example_01 `pkg-config --cflags --libs elementary`
4 #include <Elementary.h>
7 elm_main(int argc, char **argv)
9 Evas_Object *win, *bg, *bx, *rect, *separator;
11 win = elm_win_add(NULL, "separator", ELM_WIN_BASIC);
12 elm_win_title_set(win, "Separator");
13 elm_win_autodel_set(win, EINA_TRUE);
14 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
17 elm_win_resize_object_add(win, bg);
20 bx = elm_box_add(win);
21 elm_box_horizontal_set(bx, EINA_TRUE);
22 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
23 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
24 elm_win_resize_object_add(win, bx);
27 rect = evas_object_rectangle_add(evas_object_evas_get(win));
28 evas_object_color_set(rect, 0, 255, 0, 255);
29 evas_object_size_hint_min_set(rect, 90, 200);
30 evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
31 evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
32 evas_object_show(rect);
33 elm_box_pack_end(bx, rect);
35 separator = elm_separator_add(win);
36 elm_separator_horizontal_set(separator, EINA_TRUE);
37 evas_object_show(separator);
38 elm_box_pack_end(bx, separator);
40 rect = evas_object_rectangle_add(evas_object_evas_get(win));
41 evas_object_color_set(rect, 0, 0, 255, 255);
42 evas_object_size_hint_min_set(rect, 90, 200);
43 evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
44 evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
45 evas_object_show(rect);
46 elm_box_pack_end(bx, rect);
48 evas_object_show(win);