tizen 2.4 release
[framework/uifw/elementary.git] / src / examples / calendar_example_01.c
1 /**
2  * Simple Elementary's <b>calendar widget</b> example, illustrating its
3  * creation.
4  *
5  * See stdout/stderr for output. Compile with:
6  *
7  * @verbatim
8  * gcc -o calendar_example_01 calendar_example_01.c -g `pkg-config --cflags --libs elementary`
9  * @endverbatim
10  */
11
12 #include <Elementary.h>
13
14 EAPI_MAIN int
15 elm_main(int argc, char **argv)
16 {
17    Evas_Object *win, *cal;
18
19    win = elm_win_util_standard_add("calendar", "Calendar Creation Example");
20    elm_win_autodel_set(win, EINA_TRUE);
21    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
22
23    cal = elm_calendar_add(win);
24    evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
25    elm_win_resize_object_add(win, cal);
26    evas_object_show(cal);
27
28    evas_object_show(win);
29
30    elm_run();
31
32    return 0;
33 }
34 ELM_MAIN()