int year_min, year_max, spin_speed;
int today_it, selected_it, first_day_it;
Ecore_Timer *spin, *update_timer;
- char * (*format_func) (struct tm *selected_time);
+ Elm_Calendar_Format_Cb format_func;
const char *weekdays[7];
struct tm current_time, selected_time;
Day_Color day_color[42]; // EINA_DEPRECATED
}
EAPI void
-elm_calendar_format_function_set(Evas_Object *obj, char * (*format_function) (struct tm *selected_time))
+elm_calendar_format_function_set(Evas_Object *obj, Elm_Calendar_Format_Cb format_function)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
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(). */
/**
+ * @typedef Elm_Calendar_Format_Cb
+ *
+ * This callback type is used to format the string that will be used
+ * to display month and year.
+ *
+ * @param stime Struct representing time.
+ * @return String represeting time that will be set to calendar's text.
+ *
+ * @see elm_calendar_format_function_set()
+ */
+typedef char * (*Elm_Calendar_Format_Cb)(struct tm *stime);
+
+/**
* Add a new calendar widget to the given parent Elementary
* (container) object.
*
*
* @ingroup Calendar
*/
-EAPI void elm_calendar_format_function_set(Evas_Object *obj, char *(*format_function)(struct tm *stime));
+EAPI void elm_calendar_format_function_set(Evas_Object *obj, Elm_Calendar_Format_Cb format_func);
/**
* Add a new mark to the calendar