Macros | Typedefs | Enumerations | Functions
Calendar

Macros

#define ELM_CALENDAR_CLASS   elm_calendar_class_get()
 Calendar widget. More...
 
#define ELM_CALENDAR_EVENT_CHANGED   (&(_ELM_CALENDAR_EVENT_CHANGED))
 Emitted when the date in the calendar is changed.
 
#define ELM_CALENDAR_EVENT_DISPLAY_CHANGED   (&(_ELM_CALENDAR_EVENT_DISPLAY_CHANGED))
 Emitted when the current month displayed in the calendar is changed.
 

Typedefs

typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark
 Item handle for a calendar mark. More...
 
typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark
 Item handle for a calendar mark. More...
 
typedef char *(* Elm_Calendar_Format_Cb) (struct tm *stime)
 This callback type is used to format the string that will be used to display month and year. More...
 

Enumerations

enum  Elm_Calendar_Weekday {
  ELM_DAY_SUNDAY = 0,
  ELM_DAY_MONDAY,
  ELM_DAY_TUESDAY,
  ELM_DAY_WEDNESDAY,
  ELM_DAY_THURSDAY,
  ELM_DAY_FRIDAY,
  ELM_DAY_SATURDAY,
  ELM_DAY_LAST,
  ELM_DAY_SUNDAY = 0,
  ELM_DAY_MONDAY,
  ELM_DAY_TUESDAY,
  ELM_DAY_WEDNESDAY,
  ELM_DAY_THURSDAY,
  ELM_DAY_FRIDAY,
  ELM_DAY_SATURDAY,
  ELM_DAY_LAST
}
 A weekday. More...
 
enum  Elm_Calendar_Selectable {
  ELM_CALENDAR_SELECTABLE_NONE = 0,
  ELM_CALENDAR_SELECTABLE_YEAR = 1,
  ELM_CALENDAR_SELECTABLE_MONTH = 2,
  ELM_CALENDAR_SELECTABLE_DAY = 4,
  ELM_CALENDAR_SELECTABLE_NONE = 0,
  ELM_CALENDAR_SELECTABLE_YEAR = 1,
  ELM_CALENDAR_SELECTABLE_MONTH = 2,
  ELM_CALENDAR_SELECTABLE_DAY = 4
}
 A bitmask used to define which fields of a tm struct will be taken into account, when elm_calendar_selected_time_set() is invoked. More...
 
enum  Elm_Calendar_Weekday {
  ELM_DAY_SUNDAY = 0,
  ELM_DAY_MONDAY,
  ELM_DAY_TUESDAY,
  ELM_DAY_WEDNESDAY,
  ELM_DAY_THURSDAY,
  ELM_DAY_FRIDAY,
  ELM_DAY_SATURDAY,
  ELM_DAY_LAST,
  ELM_DAY_SUNDAY = 0,
  ELM_DAY_MONDAY,
  ELM_DAY_TUESDAY,
  ELM_DAY_WEDNESDAY,
  ELM_DAY_THURSDAY,
  ELM_DAY_FRIDAY,
  ELM_DAY_SATURDAY,
  ELM_DAY_LAST
}
 A weekday. More...
 
enum  Elm_Calendar_Selectable {
  ELM_CALENDAR_SELECTABLE_NONE = 0,
  ELM_CALENDAR_SELECTABLE_YEAR = 1,
  ELM_CALENDAR_SELECTABLE_MONTH = 2,
  ELM_CALENDAR_SELECTABLE_DAY = 4,
  ELM_CALENDAR_SELECTABLE_NONE = 0,
  ELM_CALENDAR_SELECTABLE_YEAR = 1,
  ELM_CALENDAR_SELECTABLE_MONTH = 2,
  ELM_CALENDAR_SELECTABLE_DAY = 4
}
 A bitmask used to define which fields of a tm struct will be taken into account, when elm_calendar_selected_time_set() is invoked. More...
 

Functions

EOAPI void elm_obj_calendar_first_day_of_week_set (Eo *obj, Elm_Calendar_Weekday day)
 The first day of week to use on calendar widgets'. More...
 
EOAPI Elm_Calendar_Weekday elm_obj_calendar_first_day_of_week_get (const Eo *obj)
 The first day of week to use on calendar widgets'. More...
 
EOAPI void elm_obj_calendar_selectable_set (Eo *obj, Elm_Calendar_Selectable selectable)
 Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked. More...
 
EOAPI Elm_Calendar_Selectable elm_obj_calendar_selectable_get (const Eo *obj)
 Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked. More...
 
EOAPI void elm_obj_calendar_interval_set (Eo *obj, double interval)
 The interval on time updates for an user mouse button hold on calendar widgets' month/year selection. More...
 
EOAPI double elm_obj_calendar_interval_get (const Eo *obj)
 The interval on time updates for an user mouse button hold on calendar widgets' month/year selection. More...
 
EOAPI void elm_obj_calendar_weekdays_names_set (Eo *obj, const char **weekdays)
 Weekdays names to be displayed by the calendar. More...
 
EOAPI const char ** elm_obj_calendar_weekdays_names_get (const Eo *obj)
 Weekdays names to be displayed by the calendar. More...
 
EOAPI void elm_obj_calendar_select_mode_set (Eo *obj, Elm_Calendar_Select_Mode mode)
 Select day mode to use. More...
 
EOAPI Elm_Calendar_Select_Mode elm_obj_calendar_select_mode_get (const Eo *obj)
 Select day mode to use. More...
 
EOAPI void elm_obj_calendar_min_max_year_set (Eo *obj, int min, int max)
 The minimum and maximum values for the year. More...
 
EOAPI void elm_obj_calendar_min_max_year_get (const Eo *obj, int *min, int *max)
 The minimum and maximum values for the year. More...
 
EOAPI void elm_obj_calendar_format_function_set (Eo *obj, Elm_Calendar_Format_Cb format_function)
 Set a function to format the string that will be used to display month and year;. More...
 
EOAPI const Eina_Listelm_obj_calendar_marks_get (const Eo *obj)
 Get a list of all the calendar marks. More...
 
EOAPI void elm_obj_calendar_selected_time_set (Eo *obj, Efl_Time *selected_time)
 Set selected date to be highlighted on calendar. More...
 
EOAPI Eina_Bool elm_obj_calendar_selected_time_get (const Eo *obj, Efl_Time *selected_time)
 Get selected date. More...
 
EOAPI Elm_Calendar_Markelm_obj_calendar_mark_add (Eo *obj, const char *mark_type, Efl_Time *mark_time, Elm_Calendar_Mark_Repeat_Type repeat)
 Add a new mark to the calendar. More...
 
EOAPI void elm_obj_calendar_mark_del (Eo *obj, Elm_Calendar_Mark *mark)
 Delete mark from the calendar. More...
 
EOAPI void elm_obj_calendar_marks_clear (Eo *obj)
 Remove all calendar's marks. More...
 
EOAPI void elm_obj_calendar_marks_draw (Eo *obj)
 Draw calendar marks. More...
 
EOAPI Eina_Bool elm_obj_calendar_displayed_time_get (const Eo *obj, Efl_Time *displayed_time)
 Get the current time displayed in the widget. More...
 
void elm_calendar_first_day_of_week_set (Elm_Calendar *obj, Elm_Calendar_Weekday day)
 Calendar widget. More...
 
Elm_Calendar_Weekday elm_calendar_first_day_of_week_get (const Elm_Calendar *obj)
 The first day of week to use on calendar widgets'. More...
 
void elm_calendar_selectable_set (Elm_Calendar *obj, Elm_Calendar_Selectable selectable)
 Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked. More...
 
Elm_Calendar_Selectable elm_calendar_selectable_get (const Elm_Calendar *obj)
 Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked. More...
 
void elm_calendar_interval_set (Elm_Calendar *obj, double interval)
 The interval on time updates for an user mouse button hold on calendar widgets' month/year selection. More...
 
double elm_calendar_interval_get (const Elm_Calendar *obj)
 The interval on time updates for an user mouse button hold on calendar widgets' month/year selection. More...
 
void elm_calendar_weekdays_names_set (Elm_Calendar *obj, const char **weekdays)
 Weekdays names to be displayed by the calendar. More...
 
const char ** elm_calendar_weekdays_names_get (const Elm_Calendar *obj)
 Weekdays names to be displayed by the calendar. More...
 
void elm_calendar_select_mode_set (Elm_Calendar *obj, Elm_Calendar_Select_Mode mode)
 Select day mode to use. More...
 
Elm_Calendar_Select_Mode elm_calendar_select_mode_get (const Elm_Calendar *obj)
 Select day mode to use. More...
 
void elm_calendar_min_max_year_set (Elm_Calendar *obj, int min, int max)
 The minimum and maximum values for the year. More...
 
void elm_calendar_min_max_year_get (const Elm_Calendar *obj, int *min, int *max)
 The minimum and maximum values for the year. More...
 
void elm_calendar_format_function_set (Elm_Calendar *obj, Elm_Calendar_Format_Cb format_function)
 Set a function to format the string that will be used to display month and year;. More...
 
const Eina_Listelm_calendar_marks_get (const Elm_Calendar *obj)
 Get a list of all the calendar marks. More...
 
void elm_calendar_selected_time_set (Elm_Calendar *obj, Efl_Time *selected_time)
 Set selected date to be highlighted on calendar. More...
 
Eina_Bool elm_calendar_selected_time_get (const Elm_Calendar *obj, Efl_Time *selected_time)
 Get selected date. More...
 
Elm_Calendar_Markelm_calendar_mark_add (Elm_Calendar *obj, const char *mark_type, Efl_Time *mark_time, Elm_Calendar_Mark_Repeat_Type repeat)
 Add a new mark to the calendar. More...
 
void elm_calendar_marks_clear (Elm_Calendar *obj)
 Remove all calendar's marks. More...
 
void elm_calendar_marks_draw (Elm_Calendar *obj)
 Draw calendar marks. More...
 
Eina_Bool elm_calendar_displayed_time_get (const Elm_Calendar *obj, Efl_Time *displayed_time)
 Get the current time displayed in the widget. More...
 
Evas_Objectelm_calendar_add (Evas_Object *parent)
 Add a new calendar widget to the given parent Elementary (container) object. More...
 

Detailed Description

calendar_inheritance_tree.png

This is a calendar widget. It helps applications to flexibly display a calendar with day of the week, date, year and month. Applications are able to set specific dates to be reported back, when selected, in the smart callbacks of the calendar widget. The API of this widget lets the applications perform other functions, like:

This widget inherits from the Layout one, so that all the functions acting on it also work for calendar objects.

This widget emits the following signals, besides the ones sent from Layout:

Supported elm_object common APIs.

Here is some sample code using it:

Macro Definition Documentation

§ ELM_CALENDAR_CLASS

#define ELM_CALENDAR_CLASS   elm_calendar_class_get()

Calendar widget.

It helps applications to flexibly display a calendar with day of the week, date, year and month. Applications are able to set specific dates to be reported back, when selected, in the smart callbacks of the calendar widget.

Typedef Documentation

§ Elm_Calendar_Mark [1/2]

Item handle for a calendar mark.

Created with elm_obj_calendar_mark_add and deleted with elm_obj_calendar_mark_del.

§ Elm_Calendar_Mark [2/2]

Item handle for a calendar mark.

Created with elm_calendar_mark_add and deleted with Elm.Calendar.mark_del.

§ Elm_Calendar_Format_Cb

typedef char*(* Elm_Calendar_Format_Cb) (struct tm *stime)

This callback type is used to format the string that will be used to display month and year.

Parameters
stimeStruct representing time.
Returns
String representing time that will be set to calendar's text.
See also
elm_calendar_format_function_set()

Enumeration Type Documentation

§ Elm_Calendar_Weekday [1/2]

A weekday.

See also elm_obj_calendar_first_day_of_week_set.

Enumerator
ELM_DAY_MONDAY 

Sunday weekday.

ELM_DAY_TUESDAY 

Monday weekday.

ELM_DAY_WEDNESDAY 

Tusday weekday.

ELM_DAY_THURSDAY 

Wednesday weekday.

ELM_DAY_FRIDAY 

Thursday weekday.

ELM_DAY_SATURDAY 

Friday weekday.

ELM_DAY_LAST 

Saturday weekday.

Sentinel value to mark last entry

ELM_DAY_MONDAY 

Sunday weekday.

ELM_DAY_TUESDAY 

Monday weekday.

ELM_DAY_WEDNESDAY 

Tusday weekday.

ELM_DAY_THURSDAY 

Wednesday weekday.

ELM_DAY_FRIDAY 

Thursday weekday.

ELM_DAY_SATURDAY 

Friday weekday.

ELM_DAY_LAST 

Saturday weekday.

Sentinel value to mark last entry

§ Elm_Calendar_Selectable [1/2]

A bitmask used to define which fields of a tm struct will be taken into account, when elm_calendar_selected_time_set() is invoked.

See also elm_obj_calendar_selectable_set, elm_obj_calendar_selected_time_set.

Since
1.8
Enumerator
ELM_CALENDAR_SELECTABLE_YEAR 

Take no field into account.

ELM_CALENDAR_SELECTABLE_MONTH 

Take year field into account.

ELM_CALENDAR_SELECTABLE_DAY 

Take month field into account.

ELM_CALENDAR_SELECTABLE_YEAR 

Take no field into account.

ELM_CALENDAR_SELECTABLE_MONTH 

Take year field into account.

ELM_CALENDAR_SELECTABLE_DAY 

Take month field into account.

§ Elm_Calendar_Weekday [2/2]

A weekday.

See also elm_calendar_first_day_of_week_set.

Enumerator
ELM_DAY_MONDAY 

Sunday weekday.

ELM_DAY_TUESDAY 

Monday weekday.

ELM_DAY_WEDNESDAY 

Tusday weekday.

ELM_DAY_THURSDAY 

Wednesday weekday.

ELM_DAY_FRIDAY 

Thursday weekday.

ELM_DAY_SATURDAY 

Friday weekday.

ELM_DAY_LAST 

Saturday weekday.

Sentinel value to mark last entry

ELM_DAY_MONDAY 

Sunday weekday.

ELM_DAY_TUESDAY 

Monday weekday.

ELM_DAY_WEDNESDAY 

Tusday weekday.

ELM_DAY_THURSDAY 

Wednesday weekday.

ELM_DAY_FRIDAY 

Thursday weekday.

ELM_DAY_SATURDAY 

Friday weekday.

ELM_DAY_LAST 

Saturday weekday.

Sentinel value to mark last entry

§ Elm_Calendar_Selectable [2/2]

A bitmask used to define which fields of a tm struct will be taken into account, when elm_calendar_selected_time_set() is invoked.

See also elm_calendar_selectable_set, elm_calendar_selected_time_set.

Since
1.8
Enumerator
ELM_CALENDAR_SELECTABLE_YEAR 

Take no field into account.

ELM_CALENDAR_SELECTABLE_MONTH 

Take year field into account.

ELM_CALENDAR_SELECTABLE_DAY 

Take month field into account.

ELM_CALENDAR_SELECTABLE_YEAR 

Take no field into account.

ELM_CALENDAR_SELECTABLE_MONTH 

Take year field into account.

ELM_CALENDAR_SELECTABLE_DAY 

Take month field into account.

Function Documentation

§ elm_obj_calendar_first_day_of_week_set()

EOAPI void elm_obj_calendar_first_day_of_week_set ( Eo obj,
Elm_Calendar_Weekday  day 
)

The first day of week to use on calendar widgets'.

Parameters
[in]dayWeekday enum value, see Elm_Calendar_Weekday

Referenced by elm_calendar_first_day_of_week_set().

§ elm_obj_calendar_first_day_of_week_get()

EOAPI Elm_Calendar_Weekday elm_obj_calendar_first_day_of_week_get ( const Eo obj)

The first day of week to use on calendar widgets'.

Returns
Weekday enum value, see Elm_Calendar_Weekday

Referenced by elm_calendar_first_day_of_week_get().

§ elm_obj_calendar_selectable_set()

EOAPI void elm_obj_calendar_selectable_set ( Eo obj,
Elm_Calendar_Selectable  selectable 
)

Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked.

By Default the bitmask is set to use all fields of a tm struct (year, month and day of the month).

See also elm_obj_calendar_selected_time_set.

Parameters
[in]selectableA bitmask of Elm_Calendar_Selectable
Since
1.8

Referenced by elm_calendar_selectable_set().

§ elm_obj_calendar_selectable_get()

EOAPI Elm_Calendar_Selectable elm_obj_calendar_selectable_get ( const Eo obj)

Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked.

By Default the bitmask is set to use all fields of a tm struct (year, month and day of the month).

See also elm_obj_calendar_selected_time_set.

Returns
A bitmask of Elm_Calendar_Selectable
Since
1.8

Referenced by elm_calendar_selectable_get().

§ elm_obj_calendar_interval_set()

EOAPI void elm_obj_calendar_interval_set ( Eo obj,
double  interval 
)

The interval on time updates for an user mouse button hold on calendar widgets' month/year selection.

This interval value is decreased while the user holds the mouse pointer either selecting next or previous month/year.

This helps the user to get to a given month distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds.

The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little bit.

The default starting interval value for automatic changes is 0.85 seconds.

Parameters
[in]intervalThe (first) interval value in seconds

Referenced by elm_calendar_interval_set().

§ elm_obj_calendar_interval_get()

EOAPI double elm_obj_calendar_interval_get ( const Eo obj)

The interval on time updates for an user mouse button hold on calendar widgets' month/year selection.

This interval value is decreased while the user holds the mouse pointer either selecting next or previous month/year.

This helps the user to get to a given month distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds.

The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little bit.

The default starting interval value for automatic changes is 0.85 seconds.

Returns
The (first) interval value in seconds

Referenced by elm_calendar_interval_get().

§ elm_obj_calendar_weekdays_names_set()

EOAPI void elm_obj_calendar_weekdays_names_set ( Eo obj,
const char **  weekdays 
)

Weekdays names to be displayed by the calendar.

By default, weekdays abbreviations get from system are displayed: E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"

The first string should be related to Sunday, the second to Monday...

See also elm_obj_calendar_weekdays_names_get.

calendar_example_02. calendar_example_05.

Parameters
[in]weekdaysArray of seven strings to be used as weekday names. Warning: It must have 7 elements, or it will access invalid memory. Warning: The strings must be null terminated ('\0').

Referenced by elm_calendar_weekdays_names_set().

§ elm_obj_calendar_weekdays_names_get()

EOAPI const char** elm_obj_calendar_weekdays_names_get ( const Eo obj)

Weekdays names to be displayed by the calendar.

By default, weekdays abbreviations get from system are displayed: E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"

The first string should be related to Sunday, the second to Monday...

See also elm_obj_calendar_weekdays_names_get.

calendar_example_02. calendar_example_05.

Returns
Array of seven strings to be used as weekday names. Warning: It must have 7 elements, or it will access invalid memory. Warning: The strings must be null terminated ('\0').

Referenced by elm_calendar_weekdays_names_get().

§ elm_obj_calendar_select_mode_set()

EOAPI void elm_obj_calendar_select_mode_set ( Eo obj,
Elm_Calendar_Select_Mode  mode 
)

Select day mode to use.

The day selection mode used.

Parameters
[in]modeThe select mode to use.

Referenced by elm_calendar_select_mode_set().

§ elm_obj_calendar_select_mode_get()

EOAPI Elm_Calendar_Select_Mode elm_obj_calendar_select_mode_get ( const Eo obj)

Select day mode to use.

The day selection mode used.

Returns
The select mode to use.

Referenced by elm_calendar_select_mode_get().

§ elm_obj_calendar_min_max_year_set()

EOAPI void elm_obj_calendar_min_max_year_set ( Eo obj,
int  min,
int  max 
)

The minimum and maximum values for the year.

Maximum must be greater than minimum, except if you don't want to set maximum year. Default values are 1902 and -1.

If the maximum year is a negative value, it will be limited depending on the platform architecture (year 2037 for 32 bits);

See also elm_obj_calendar_min_max_year_get.

calendar_example_03. calendar_example_05.

Parameters
[in]minThe minimum year, greater than 1901;
[in]maxThe maximum year;

Referenced by elm_calendar_min_max_year_set().

§ elm_obj_calendar_min_max_year_get()

EOAPI void elm_obj_calendar_min_max_year_get ( const Eo obj,
int *  min,
int *  max 
)

The minimum and maximum values for the year.

Maximum must be greater than minimum, except if you don't want to set maximum year. Default values are 1902 and -1.

If the maximum year is a negative value, it will be limited depending on the platform architecture (year 2037 for 32 bits);

See also elm_obj_calendar_min_max_year_get.

calendar_example_03. calendar_example_05.

Parameters
[out]minThe minimum year, greater than 1901;
[out]maxThe maximum year;

Referenced by elm_calendar_min_max_year_get().

§ elm_obj_calendar_format_function_set()

EOAPI void elm_obj_calendar_format_function_set ( Eo obj,
Elm_Calendar_Format_Cb  format_function 
)

Set a function to format the string that will be used to display month and year;.

By default it uses strftime with "%B %Y" format string. It should allocate the memory that will be used by the string, that will be freed by the widget after usage. A pointer to the string and a pointer to the time struct will be provided.

calendar_example_02.

Parameters
[in]format_functionFunction to set the month-year string given the selected date.

Referenced by elm_calendar_format_function_set().

§ elm_obj_calendar_marks_get()

EOAPI const Eina_List* elm_obj_calendar_marks_get ( const Eo obj)

Get a list of all the calendar marks.

See also elm_obj_calendar_mark_add, elm_obj_calendar_mark_del(), elm_obj_calendar_marks_clear.

Returns
List with all calendar marks

Referenced by elm_calendar_marks_get().

§ elm_obj_calendar_selected_time_set()

EOAPI void elm_obj_calendar_selected_time_set ( Eo obj,
Efl_Time *  selected_time 
)

Set selected date to be highlighted on calendar.

Set the selected date, changing the displayed month if needed. Selected date changes when the user goes to next/previous month or select a day pressing over it on calendar.

See also elm_obj_calendar_selected_time_get.

calendar_example_04

Parameters
[in]selected_timeA tm struct to represent the selected date.

Referenced by elm_calendar_selected_time_set().

§ elm_obj_calendar_selected_time_get()

EOAPI Eina_Bool elm_obj_calendar_selected_time_get ( const Eo obj,
Efl_Time *  selected_time 
)

Get selected date.

Get date selected by the user or set by function elm_obj_calendar_selected_time_set(). Selected date changes when the user goes to next/previous month or select a day pressing over it on calendar.

See also elm_obj_calendar_selected_time_get.

calendar_example_05.

Parameters
[in,out]selected_timeA tm struct to point to selected date.
Returns
true if the method succeeded, false otherwise

Referenced by elm_calendar_selected_time_get().

§ elm_obj_calendar_mark_add()

EOAPI Elm_Calendar_Mark* elm_obj_calendar_mark_add ( Eo obj,
const char *  mark_type,
Efl_Time *  mark_time,
Elm_Calendar_Mark_Repeat_Type  repeat 
)

Add a new mark to the calendar.

Add a mark that will be drawn in the calendar respecting the insertion time and periodicity. It will emit the type as signal to the widget theme. Default theme supports "holiday" and "checked", but it can be extended.

It won't immediately update the calendar, drawing the marks. For this, elm_obj_calendar_marks_draw(). However, when user selects next or previous month calendar forces marks drawn.

Marks created with this method can be deleted with elm_obj_calendar_mark_del().

See also elm_obj_calendar_marks_draw, elm_obj_calendar_mark_del().

calendar_example_06

Parameters
[in]mark_typeA string used to define the type of mark. It will be emitted to the theme, that should display a related modification on these days representation.
[in]mark_timeA time struct to represent the date of inclusion of the mark. For marks that repeats it will just be displayed after the inclusion date in the calendar.
[in]repeatRepeat the event following this periodicity. Can be a unique mark (that don't repeat), daily, weekly, monthly or annually.
Returns
The newly added calendar mark

Referenced by elm_calendar_mark_add().

§ elm_obj_calendar_mark_del()

EOAPI void elm_obj_calendar_mark_del ( Eo obj,
Elm_Calendar_Mark mark 
)

Delete mark from the calendar.

If deleting all calendar marks is required, elm_obj_calendar_marks_clear() should be used instead of getting marks list and deleting each one.

See also elm_obj_calendar_mark_add(), elm_obj_calendar_marks_clear().

Parameters
[in]markThe mark to be deleted.

§ elm_obj_calendar_marks_clear()

EOAPI void elm_obj_calendar_marks_clear ( Eo obj)

Remove all calendar's marks.

See also elm_obj_calendar_mark_add, elm_obj_calendar_mark_del().

Referenced by elm_calendar_marks_clear().

§ elm_obj_calendar_marks_draw()

EOAPI void elm_obj_calendar_marks_draw ( Eo obj)

Draw calendar marks.

Should be used after adding, removing or clearing marks. It will go through the entire marks list updating the calendar. If lots of marks will be added, add all the marks and then call this function.

When the month is changed, i.e. user selects next or previous month, marks will be drawn.

See also elm_obj_calendar_mark_add, elm_obj_calendar_mark_del(), elm_obj_calendar_marks_clear.

calendar_example_06

Referenced by elm_calendar_marks_draw().

§ elm_obj_calendar_displayed_time_get()

EOAPI Eina_Bool elm_obj_calendar_displayed_time_get ( const Eo obj,
Efl_Time *  displayed_time 
)

Get the current time displayed in the widget.

Parameters
[in,out]displayed_timeA tm struct to point to displayed date.
Returns
true if the method succeeded, false otherwise
Since
1.8

Referenced by elm_calendar_displayed_time_get().

§ elm_calendar_first_day_of_week_set()

void elm_calendar_first_day_of_week_set ( Elm_Calendar *  obj,
Elm_Calendar_Weekday  day 
)

Calendar widget.

It helps applications to flexibly display a calendar with day of the week, date, year and month. Applications are able to set specific dates to be reported back, when selected, in the smart callbacks of the calendar widget. The first day of week to use on calendar widgets'.

Parameters
[in]dayWeekday enum value, see Elm_Calendar_Weekday

References elm_obj_calendar_first_day_of_week_set().

§ elm_calendar_first_day_of_week_get()

Elm_Calendar_Weekday elm_calendar_first_day_of_week_get ( const Elm_Calendar *  obj)

The first day of week to use on calendar widgets'.

Returns
Weekday enum value, see Elm_Calendar_Weekday

References elm_obj_calendar_first_day_of_week_get().

§ elm_calendar_selectable_set()

void elm_calendar_selectable_set ( Elm_Calendar *  obj,
Elm_Calendar_Selectable  selectable 
)

Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked.

By Default the bitmask is set to use all fields of a tm struct (year, month and day of the month).

See also elm_calendar_selected_time_set.

Parameters
[in]selectableA bitmask of Elm_Calendar_Selectable
Since
1.8

References elm_obj_calendar_selectable_set().

§ elm_calendar_selectable_get()

Elm_Calendar_Selectable elm_calendar_selectable_get ( const Elm_Calendar *  obj)

Define which fields of a tm struct will be taken into account, when Elm.Calendar.selected_time.set is invoked.

By Default the bitmask is set to use all fields of a tm struct (year, month and day of the month).

See also elm_calendar_selected_time_set.

Returns
A bitmask of Elm_Calendar_Selectable
Since
1.8

References elm_obj_calendar_selectable_get().

§ elm_calendar_interval_set()

void elm_calendar_interval_set ( Elm_Calendar *  obj,
double  interval 
)

The interval on time updates for an user mouse button hold on calendar widgets' month/year selection.

This interval value is decreased while the user holds the mouse pointer either selecting next or previous month/year.

This helps the user to get to a given month distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds.

The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little bit.

The default starting interval value for automatic changes is 0.85 seconds.

Parameters
[in]intervalThe (first) interval value in seconds

References elm_obj_calendar_interval_set().

§ elm_calendar_interval_get()

double elm_calendar_interval_get ( const Elm_Calendar *  obj)

The interval on time updates for an user mouse button hold on calendar widgets' month/year selection.

This interval value is decreased while the user holds the mouse pointer either selecting next or previous month/year.

This helps the user to get to a given month distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds.

The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little bit.

The default starting interval value for automatic changes is 0.85 seconds.

Returns
The (first) interval value in seconds

References elm_obj_calendar_interval_get().

§ elm_calendar_weekdays_names_set()

void elm_calendar_weekdays_names_set ( Elm_Calendar *  obj,
const char **  weekdays 
)

Weekdays names to be displayed by the calendar.

By default, weekdays abbreviations get from system are displayed: E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"

The first string should be related to Sunday, the second to Monday...

See also elm_calendar_weekdays_names_get.

calendar_example_02. calendar_example_05.

Parameters
[in]weekdaysArray of seven strings to be used as weekday names. Warning: It must have 7 elements, or it will access invalid memory. Warning: The strings must be null terminated ('\0').

References elm_obj_calendar_weekdays_names_set().

§ elm_calendar_weekdays_names_get()

const char** elm_calendar_weekdays_names_get ( const Elm_Calendar *  obj)

Weekdays names to be displayed by the calendar.

By default, weekdays abbreviations get from system are displayed: E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"

The first string should be related to Sunday, the second to Monday...

See also elm_calendar_weekdays_names_get.

calendar_example_02. calendar_example_05.

Returns
Array of seven strings to be used as weekday names. Warning: It must have 7 elements, or it will access invalid memory. Warning: The strings must be null terminated ('\0').

References elm_obj_calendar_weekdays_names_get().

§ elm_calendar_select_mode_set()

void elm_calendar_select_mode_set ( Elm_Calendar *  obj,
Elm_Calendar_Select_Mode  mode 
)

Select day mode to use.

The day selection mode used.

Parameters
[in]modeThe select mode to use.

References elm_obj_calendar_select_mode_set().

§ elm_calendar_select_mode_get()

Elm_Calendar_Select_Mode elm_calendar_select_mode_get ( const Elm_Calendar *  obj)

Select day mode to use.

The day selection mode used.

Returns
The select mode to use.

References elm_obj_calendar_select_mode_get().

§ elm_calendar_min_max_year_set()

void elm_calendar_min_max_year_set ( Elm_Calendar *  obj,
int  min,
int  max 
)

The minimum and maximum values for the year.

Maximum must be greater than minimum, except if you don't want to set maximum year. Default values are 1902 and -1.

If the maximum year is a negative value, it will be limited depending on the platform architecture (year 2037 for 32 bits);

See also elm_calendar_min_max_year_get.

calendar_example_03. calendar_example_05.

Parameters
[in]minThe minimum year, greater than 1901;
[in]maxThe maximum year;

References elm_obj_calendar_min_max_year_set().

§ elm_calendar_min_max_year_get()

void elm_calendar_min_max_year_get ( const Elm_Calendar *  obj,
int *  min,
int *  max 
)

The minimum and maximum values for the year.

Maximum must be greater than minimum, except if you don't want to set maximum year. Default values are 1902 and -1.

If the maximum year is a negative value, it will be limited depending on the platform architecture (year 2037 for 32 bits);

See also elm_calendar_min_max_year_get.

calendar_example_03. calendar_example_05.

Parameters
[out]minThe minimum year, greater than 1901;
[out]maxThe maximum year;

References elm_obj_calendar_min_max_year_get().

§ elm_calendar_format_function_set()

void elm_calendar_format_function_set ( Elm_Calendar *  obj,
Elm_Calendar_Format_Cb  format_function 
)

Set a function to format the string that will be used to display month and year;.

By default it uses strftime with "%B %Y" format string. It should allocate the memory that will be used by the string, that will be freed by the widget after usage. A pointer to the string and a pointer to the time struct will be provided.

calendar_example_02.

Parameters
[in]format_functionFunction to set the month-year string given the selected date.

References elm_obj_calendar_format_function_set().

§ elm_calendar_marks_get()

const Eina_List* elm_calendar_marks_get ( const Elm_Calendar *  obj)

Get a list of all the calendar marks.

See also elm_calendar_mark_add, Elm.Calendar.mark_del(), elm_calendar_marks_clear.

Returns
List with all calendar marks

References elm_obj_calendar_marks_get().

§ elm_calendar_selected_time_set()

void elm_calendar_selected_time_set ( Elm_Calendar *  obj,
Efl_Time *  selected_time 
)

Set selected date to be highlighted on calendar.

Set the selected date, changing the displayed month if needed. Selected date changes when the user goes to next/previous month or select a day pressing over it on calendar.

See also elm_calendar_selected_time_get.

calendar_example_04

Parameters
[in]selected_timeA tm struct to represent the selected date.

References elm_obj_calendar_selected_time_set().

§ elm_calendar_selected_time_get()

Eina_Bool elm_calendar_selected_time_get ( const Elm_Calendar *  obj,
Efl_Time *  selected_time 
)

Get selected date.

Get date selected by the user or set by function elm_calendar_selected_time_set(). Selected date changes when the user goes to next/previous month or select a day pressing over it on calendar.

See also elm_calendar_selected_time_get.

calendar_example_05.

Parameters
[in,out]selected_timeA tm struct to point to selected date.
Returns
true if the method succeeded, false otherwise

References elm_obj_calendar_selected_time_get().

§ elm_calendar_mark_add()

Elm_Calendar_Mark* elm_calendar_mark_add ( Elm_Calendar *  obj,
const char *  mark_type,
Efl_Time *  mark_time,
Elm_Calendar_Mark_Repeat_Type  repeat 
)

Add a new mark to the calendar.

Add a mark that will be drawn in the calendar respecting the insertion time and periodicity. It will emit the type as signal to the widget theme. Default theme supports "holiday" and "checked", but it can be extended.

It won't immediately update the calendar, drawing the marks. For this, elm_calendar_marks_draw(). However, when user selects next or previous month calendar forces marks drawn.

Marks created with this method can be deleted with Elm.Calendar.mark_del().

See also elm_calendar_marks_draw, Elm.Calendar.mark_del().

calendar_example_06

Parameters
[in]mark_typeA string used to define the type of mark. It will be emitted to the theme, that should display a related modification on these days representation.
[in]mark_timeA time struct to represent the date of inclusion of the mark. For marks that repeats it will just be displayed after the inclusion date in the calendar.
[in]repeatRepeat the event following this periodicity. Can be a unique mark (that don't repeat), daily, weekly, monthly or annually.
Returns
The newly added calendar mark

References elm_obj_calendar_mark_add().

§ elm_calendar_marks_clear()

void elm_calendar_marks_clear ( Elm_Calendar *  obj)

Remove all calendar's marks.

See also elm_calendar_mark_add, Elm.Calendar.mark_del().

References elm_obj_calendar_marks_clear().

§ elm_calendar_marks_draw()

void elm_calendar_marks_draw ( Elm_Calendar *  obj)

Draw calendar marks.

Should be used after adding, removing or clearing marks. It will go through the entire marks list updating the calendar. If lots of marks will be added, add all the marks and then call this function.

When the month is changed, i.e. user selects next or previous month, marks will be drawn.

See also elm_calendar_mark_add, Elm.Calendar.mark_del(), elm_calendar_marks_clear.

calendar_example_06

References elm_obj_calendar_marks_draw().

§ elm_calendar_displayed_time_get()

Eina_Bool elm_calendar_displayed_time_get ( const Elm_Calendar *  obj,
Efl_Time *  displayed_time 
)

Get the current time displayed in the widget.

Parameters
[in,out]displayed_timeA tm struct to point to displayed date.
Returns
true if the method succeeded, false otherwise
Since
1.8

References elm_obj_calendar_displayed_time_get().

§ elm_calendar_add()

Evas_Object* elm_calendar_add ( Evas_Object parent)

Add a new calendar widget to the given parent Elementary (container) object.

Parameters
parentThe parent object.
Returns
a new calendar widget handle or NULL, on errors.

This function inserts a new calendar widget on the canvas.

calendar_example_01