From 711d3bb0f5b90220727357cbf8afafe16ee6ddce Mon Sep 17 00:00:00 2001 From: sanjeev Date: Thu, 1 Mar 2012 03:38:56 +0000 Subject: [PATCH] Rename enum as per review comment. Signed-off-by: Sanjeev BA git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68562 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_calendar.c | 6 +++--- src/lib/elm_calendar.h | 25 +++++++++++++------------ src/lib/elm_deprecated.h | 5 +++++ 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c index 5f82b7c..e2ffb62 100644 --- a/src/lib/elm_calendar.c +++ b/src/lib/elm_calendar.c @@ -39,7 +39,7 @@ struct _Elm_Calendar_Mark Eina_List *node; struct tm mark_time; const char *mark_type; - Elm_Calendar_Mark_Repeat repeat; + Elm_Calendar_Mark_Repeat_Type repeat; }; static const char *widtype = NULL; @@ -69,7 +69,7 @@ static int _days_in_month[2][12] = }; static Elm_Calendar_Mark * -_mark_new(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat) +_mark_new(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat) { Widget_Data *wd = elm_widget_data_get(obj); Elm_Calendar_Mark *mark; @@ -937,7 +937,7 @@ elm_calendar_format_function_set(Evas_Object *obj, char * (*format_function) (st } EAPI Elm_Calendar_Mark * -elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat) +elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; Widget_Data *wd = elm_widget_data_get(obj); diff --git a/src/lib/elm_calendar.h b/src/lib/elm_calendar.h index 0d0d284..a8c0f76 100644 --- a/src/lib/elm_calendar.h +++ b/src/lib/elm_calendar.h @@ -26,9 +26,18 @@ * @{ */ +typedef enum +{ + ELM_CALENDAR_UNIQUE, /**< Default value. Marks will be displayed only on event day. */ + ELM_CALENDAR_DAILY, /**< Marks will be displayed everyday after event day (inclusive). */ + ELM_CALENDAR_WEEKLY, /**< Marks will be displayed every week after event day (inclusive) - i.e. each seven days. */ + ELM_CALENDAR_MONTHLY, /**< Marks will be displayed every month day that coincides to event day. E.g.: if an event is set to 30th Jan, no marks will be displayed on Feb, but will be displayed on 30th Mar*/ + ELM_CALENDAR_ANNUALLY /**< Marks will be displayed every year that coincides to event day (and month). E.g. an event added to 30th Jan 2012 will be repeated on 30th Jan 2013. */ +} _Elm_Calendar_Mark_Repeat_Type; + /** - * @enum _Elm_Calendar_Mark_Repeat - * @typedef Elm_Calendar_Mark_Repeat + * @enum _Elm_Calendar_Mark_Repeat_Type + * @typedef Elm_Calendar_Mark_Repeat_Type * * Event periodicity, used to define if a mark should be repeated * @b beyond event's day. It's set when a mark is added. @@ -43,15 +52,7 @@ * * @ingroup Calendar */ -typedef enum -{ - ELM_CALENDAR_UNIQUE, /**< Default value. Marks will be displayed only on event day. */ - ELM_CALENDAR_DAILY, /**< Marks will be displayed everyday after event day (inclusive). */ - ELM_CALENDAR_WEEKLY, /**< Marks will be displayed every week after event day (inclusive) - i.e. each seven days. */ - ELM_CALENDAR_MONTHLY, /**< Marks will be displayed every month day that coincides to event day. E.g.: if an event is set to 30th Jan, no marks will be displayed on Feb, but will be displayed on 30th Mar*/ - ELM_CALENDAR_ANNUALLY /**< Marks will be displayed every year that coincides to event day (and month). E.g. an event added to 30th Jan 2012 will be repeated on 30th Jan 2013. */ -} Elm_Calendar_Mark_Repeat; -// XXX: Elm_Calendar_Mark_Repeat_Type +typedef _Elm_Calendar_Mark_Repeat_Type Elm_Calendar_Mark_Repeat_Type; 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(). */ @@ -315,7 +316,7 @@ EAPI void elm_calendar_format_function_set(Evas_Object *obj, cha * * @ingroup Calendar */ -EAPI Elm_Calendar_Mark *elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat); +EAPI Elm_Calendar_Mark *elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat); /** * Delete mark from the calendar. diff --git a/src/lib/elm_deprecated.h b/src/lib/elm_deprecated.h index b687dd5..7471291 100644 --- a/src/lib/elm_deprecated.h +++ b/src/lib/elm_deprecated.h @@ -4394,5 +4394,10 @@ EINA_DEPRECATED EAPI void elm_calendar_day_selection_enabled_set EINA_DEPRECATED EAPI Eina_Bool elm_calendar_day_selection_enabled_get(const Evas_Object *obj); /** + * @deprecated Use Elm_Calendar_Mark_Repeat_Type instead. + */ +typedef _Elm_Calendar_Mark_Repeat_Type Elm_Calendar_Mark_Repeat EINA_DEPRECATED; + +/** * @} */ -- 2.7.4