2 * Simple Elementary's <b>conformant widget</b> example, illustrating its
5 * See stdout/stderr for output. Compile with:
8 * gcc -g `pkg-config --cflags --libs elementary` conformant_example_01.c -o conformant_example_01
12 #include <Elementary.h>
14 # include "elementary_config.h"
20 elm_main(int argc __UNUSED__, char **argv __UNUSED__)
22 Evas_Object *win, *bg, *btn, *bx, *en;
24 win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC);
25 elm_win_title_set(win, "Conformant Example");
26 elm_win_autodel_set(win, EINA_TRUE);
29 elm_win_resize_object_add(win, bg);
30 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
33 bx = elm_box_add(win);
34 elm_win_resize_object_add(win, bx);
35 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
36 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
38 btn = elm_button_add(win);
39 elm_object_text_set(btn, "Test Conformant");
40 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0);
41 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0);
42 elm_box_pack_end(bx, btn);
43 evas_object_show(btn);
45 en = elm_entry_add(win);
46 elm_entry_scrollable_set(en, EINA_TRUE);
47 elm_object_text_set(en,
48 "This is a multi-line entry at the bottom<br>"
49 "This can contain more than 1 line of text and be "
50 "scrolled around to allow for entering of lots of "
51 "content. It is also to test to see that autoscroll "
52 "moves to the right part of a larger multi-line "
53 "text entry that is inside of a scroller than can be "
54 "scrolled around, thus changing the expected position "
55 "as well as cursor changes updating auto-scroll when "
58 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
59 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
61 elm_box_pack_end(bx, en);
63 btn = elm_button_add(win);
64 elm_object_text_set(btn, "Test Conformant");
65 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0);
66 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0);
67 elm_box_pack_end(bx, btn);
68 evas_object_show(btn);
72 evas_object_resize(win, 240, 480);
73 evas_object_show(win);