X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Flib%2Felm_calendar.h;h=0eb7eac777e276363d1c85ab4a7d8a4028988ddb;hb=37237c075439a1aa749a37cb0aff7a301f0f66e7;hp=cc9464672b8e28af9eb027a14b709935c98a2104;hpb=b234ec25a9ccc449f1e5d743227b865ae56cab82;p=framework%2Fuifw%2Felementary.git diff --git a/src/lib/elm_calendar.h b/src/lib/elm_calendar.h index cc94646..0eb7eac 100644 --- a/src/lib/elm_calendar.h +++ b/src/lib/elm_calendar.h @@ -1,5 +1,6 @@ /** * @defgroup Calendar Calendar + * @ingroup Elementary * * This is a Calendar widget. Calender widget helps applications to flexibly * display a calender with day of the week, day, year and month. Applications will be @@ -15,9 +16,9 @@ * - @c "changed" - emitted when the date in the calendar is changed. * * Supported elm_object common APIs. - * @li elm_object_signal_emit - * @li elm_object_signal_callback_add - * @li elm_object_signal_callback_del + * @li @ref elm_object_signal_emit + * @li @ref elm_object_signal_callback_add + * @li @ref elm_object_signal_callback_del * * Here is some sample code using it: * @li @ref calendar_example_01 @@ -85,6 +86,27 @@ typedef enum */ typedef _Elm_Calendar_Weekday Elm_Calendar_Weekday; + +typedef enum +{ + ELM_CALENDAR_SELECT_MODE_DEFAULT = 0, /**< Default value. a day is always selected. */ + ELM_CALENDAR_SELECT_MODE_ALWAYS, /**< a day is always selected. */ + ELM_CALENDAR_SELECT_MODE_NONE, /**< None of the days can be selected. */ + ELM_CALENDAR_SELECT_MODE_ONDEMAND /**< User may have selected a day or not. */ +} _Elm_Calendar_Select_Mode; + +/** + * @enum _Elm_Calendar_Select_Mode + * @typedef Elm_Calendar_Select_Mode + * + * the mode, who determine how user could select a day + * + * @see elm_calendar_select_mode_set() + * + * @ingroup Calendar + */ +typedef _Elm_Calendar_Select_Mode Elm_Calendar_Select_Mode; + 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(). */ /** @@ -97,6 +119,8 @@ typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark; /**< Item handle for a c * @return String representing time that will be set to calendar's text. * * @see elm_calendar_format_function_set() + * + * @ingroup Calendar */ typedef char * (*Elm_Calendar_Format_Cb)(struct tm *stime); @@ -204,41 +228,31 @@ EAPI void elm_calendar_min_max_year_set(Evas_Object *obj, int mi EAPI void elm_calendar_min_max_year_get(const Evas_Object *obj, int *min, int *max); /** - * Enable or disable day selection + * Set select day mode to use. * * @param obj The calendar object. - * @param disabled @c EINA_TRUE to disable selection or @c EINA_FALSE to - * enable it. - * - * Enabled by default. If disabled, the user still can select months, - * but not days. Selected days are highlighted on calendar. - * It should be used if you won't need such selection for the widget usage. - * - * When a day is selected, or month is changed, smart callbacks for - * signal "changed" will be called. + * @param select_mdoe The select mode to use. * - * @see elm_calendar_day_selection_disabled_get() - * - * @ref calendar_example_04 + * Set the day selection mode used. * * @ingroup Calendar */ -EAPI void elm_calendar_day_selection_disabled_set(Evas_Object *obj, Eina_Bool disabled); +EAPI void elm_calendar_select_mode_set(Evas_Object *obj, Elm_Calendar_Select_Mode mode); /** - * Get a value whether day selection is disabled or not. + * Get the select day mode used. * * @param obj The calendar object. - * @return EINA_TRUE means day selection is disabled. EINA_FALSE indicates - * it's enabled. If @p obj is NULL, EINA_FALSE is returned. * - * @see elm_calendar_day_selection_disabled_set() for details. + * @return the selected mode * - * @ref calendar_example_05 + * Get the day selection mode used. + * + * @see elm_calendar_select_mode_set() for more details * * @ingroup Calendar */ -EAPI Eina_Bool elm_calendar_day_selection_disabled_get(const Evas_Object *obj); +EAPI Elm_Calendar_Select_Mode elm_calendar_select_mode_get(const Evas_Object *obj); /** * Set selected date to be highlighted on calendar.