Tizen Native API
4.0
|
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:
- placing marks on specific dates
- setting the bounds for the calendar (minimum and maximum years)
- setting the day names of the week (e.g. "Thu" or "Thursday")
- setting the year and month format.
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 Elm_Layout:
"changed"
- emitted when the date in the calendar is changed."display,changed"
- emitted when the current month displayed in the calendar is changed."focused"
- When the calendar has received focus. (since 1.8)"unfocused"
- When the calendar has lost focus. (since 1.8)"language,changed"
- the program's language changed (since 1.9)
Supported elm_object common APIs.
Functions | |
void | elm_calendar_date_min_set (Elm_Calendar *obj, const Elm_Calendar_Time *min) |
Minimum date on calendar. | |
const Elm_Calendar_Time * | elm_calendar_date_min_get (const Elm_Calendar *obj) |
Minimum date on calendar. | |
void | elm_calendar_date_max_set (Elm_Calendar *obj, const Elm_Calendar_Time *max) |
Maximum date on calendar. | |
const Elm_Calendar_Time * | elm_calendar_date_max_get (const Elm_Calendar *obj) |
Maximum date on calendar. | |
EINA_DEPRECATED void | elm_calendar_text_saturday_color_set (Evas_Object *obj, int pos) |
EINA_DEPRECATED void | elm_calendar_text_sunday_color_set (Evas_Object *obj, int pos) |
EINA_DEPRECATED void | elm_calendar_text_weekday_color_set (Evas_Object *obj, int pos) |
Typedefs | |
typedef struct _Elm_Calendar_Mark | Elm_Calendar_Mark |
typedef char *(* | Elm_Calendar_Format_Cb )(struct tm *stime) |
Typedef Documentation
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:
-
stime Struct representing time.
- Returns:
- String representing time that will be set to calendar's text.
- See also:
- elm_calendar_format_function_set()
typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark |
Item handle for a calendar mark. Created with elm_calendar_mark_add() and deleted with elm_calendar_mark_del().
Enumeration Type Documentation
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 (EFL) :
- 1.8
enum Elm_Calendar_Weekday |
A weekday.
See also elm_calendar_first_day_of_week_set.
Function Documentation
const Elm_Calendar_Time* elm_calendar_date_max_get | ( | const Elm_Calendar * | obj | ) |
Maximum date on calendar.
See also elm_calendar_date_min_set, elm_calendar_date_min_get
Get maximum date.
Default maximum year is -1. Default maximum day and month are 31 and DEC.
If the maximum year is a negative value, it will be limited depending on the platform architecture (year 2037 for 32 bits);
- Parameters:
-
[in] obj The object.
- Returns:
- A tm struct to point to maximum date.
- Since (EFL) :
- 1.19
void elm_calendar_date_max_set | ( | Elm_Calendar * | obj, |
const Elm_Calendar_Time * | max | ||
) |
Maximum date on calendar.
See also elm_calendar_date_min_set, elm_calendar_date_min_get
Set maximum date on calendar.
Set the maximum date, changing the displayed month or year if needed. Displayed day also to be disabled if it is bigger than maximum date.
- Parameters:
-
[in] obj The object. [in] max A tm struct to point to maximum date.
- Since (EFL) :
- 1.19
const Elm_Calendar_Time* elm_calendar_date_min_get | ( | const Elm_Calendar * | obj | ) |
Minimum date on calendar.
See also elm_calendar_date_max_set, elm_calendar_date_max_get
Get minimum date.
Default value is 1 JAN,1902.
- Parameters:
-
[in] obj The object.
- Returns:
- A tm struct to point to minimum date.
- Since (EFL) :
- 1.19
void elm_calendar_date_min_set | ( | Elm_Calendar * | obj, |
const Elm_Calendar_Time * | min | ||
) |
Minimum date on calendar.
See also elm_calendar_date_max_set, elm_calendar_date_max_get
Set minimum date on calendar.
Set the minimum date, changing the displayed month or year if needed. Displayed day also to be disabled if it is smaller than minimum date.
- Parameters:
-
[in] obj The object. [in] min A tm struct to point to minimum date.
- Since (EFL) :
- 1.19
EINA_DEPRECATED void elm_calendar_text_saturday_color_set | ( | Evas_Object * | obj, |
int | pos | ||
) |
Set a day text color to the same that represents Saturdays.
- Parameters:
-
obj The calendar object. pos The text position. Position is the cell counter, from left to right, up to down. It starts on 0 and ends on 41.
- Deprecated:
- use elm_calendar_mark_add() instead like:
struct tm t = { 0, 0, 12, 6, 0, 0, 6, 6, -1 }; elm_calendar_mark_add(obj, "sat", &t, ELM_CALENDAR_WEEKLY);
- See also:
- elm_calendar_mark_add()
EINA_DEPRECATED void elm_calendar_text_sunday_color_set | ( | Evas_Object * | obj, |
int | pos | ||
) |
Set a day text color to the same that represents Sundays.
- Parameters:
-
obj The calendar object. pos The text position. Position is the cell counter, from left to right, up to down. It starts on 0 and ends on 41.
- Deprecated:
- use elm_calendar_mark_add() instead like:
struct tm t = { 0, 0, 12, 7, 0, 0, 0, 0, -1 }; elm_calendar_mark_add(obj, "sat", &t, ELM_CALENDAR_WEEKLY);
- See also:
- elm_calendar_mark_add()
EINA_DEPRECATED void elm_calendar_text_weekday_color_set | ( | Evas_Object * | obj, |
int | pos | ||
) |
Set a day text color to the same that represents Weekdays.
- Parameters:
-
obj The calendar object pos The text position. Position is the cell counter, from left to right, up to down. It starts on 0 and ends on 41.
- Deprecated:
- use elm_calendar_mark_add() instead like:
struct tm t = { 0, 0, 12, 1, 0, 0, 0, 0, -1 }; elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // monday t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // tuesday t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // wednesday t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // thursday t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // friday
- See also:
- elm_calendar_mark_add()