f22c284c6b2789e4288b524e08d1f57576f02aa2
[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 -g `pkg-config --cflags --libs elementary` calendar_example_01.c -o calendar_example_01
9  * @endverbatim
10  */
11
12 #include <Elementary.h>
13 #ifdef HAVE_CONFIG_H
14 # include "elementary_config.h"
15 #else
16 # define __UNUSED__
17 #endif
18
19 EAPI_MAIN int
20 elm_main(int argc __UNUSED__, char **argv __UNUSED__)
21 {
22    Evas_Object *win, *bg, *cal;
23
24    win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
25    elm_win_title_set(win, "Calendar Creation Example");
26    elm_win_autodel_set(win, EINA_TRUE);
27
28    bg = elm_bg_add(win);
29    elm_win_resize_object_add(win, bg);
30    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
31    evas_object_show(bg);
32
33    cal = elm_calendar_add(win);
34    elm_win_resize_object_add(win, cal);
35    evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
36    evas_object_show(cal);
37
38    evas_object_show(win);
39
40    elm_run();
41    return 0;
42 }
43 ELM_MAIN()