forked from enlightenment/efl
Elm_Calendar: fix function pointer as arg
Spotted by Michael Blumenkrantz SVN revision: 68864
This commit is contained in:
parent
5f7aecca69
commit
3718134a2a
|
@ -26,7 +26,7 @@ struct _Widget_Data
|
|||
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
|
||||
|
@ -917,7 +917,7 @@ elm_calendar_selected_time_get(const Evas_Object *obj, struct tm *selected_time)
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -56,6 +56,19 @@ 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(). */
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
@ -265,7 +278,7 @@ EAPI Eina_Bool elm_calendar_selected_time_get(const Evas_Object *obj,
|
|||
*
|
||||
* @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
|
||||
|
|
Loading…
Reference in New Issue