Calendar - Simple creation.

As a first example, let's just display a calendar in our window, explaining all steps required to do so.

First you should declare objects we intend to use:

Evas_Object *win, *cal;

Then a window is created, a title is set and its set to be autodeleted. More details can be found on windows examples:

win = elm_win_util_standard_add("calendar", "Calendar Creation Example");
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition eina_types.h:539
Evas_Object * elm_win_util_standard_add(const char *name, const char *title)
Adds a window object with standard setup.
Definition efl_ui_win.c:9587
void elm_win_autodel_set(Eo *obj, Eina_Bool autodel)
Set the window's autodel state.
Definition efl_ui_win.c:6199

Next a simple background is placed on our windows. More details on elm_bg - Plain color background. :

Now, the exciting part, let's add the calendar with elm_calendar_add(), passing our window object as parent.

To conclude our example, we should show the window and run elm mainloop:

Our example will look like this:

See the full source code calendar_example_01.c here.