1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix callback conventions

This commit is contained in:
Gabor Kiss-Vamosi 2019-06-20 06:19:07 +02:00
parent c630493fc0
commit d84e977218
3 changed files with 12 additions and 5 deletions

View File

@ -536,13 +536,15 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data);
/**
* Call an event function with an object, event, and data.
* @param event_cb an event callback function
* @param event_xcb an event callback function. If `NULL` `LV_RES_OK` will return without any actions.
* (the 'x' in the argument name indicates that its not a fully generic function because it not follows
* the `func_name(object, callback, ...)` convention)
* @param obj pointer to an object to associate with the event (can be `NULL` to simply call the `event_cb`)
* @param event an event
* @param data pointer to a custom data
* @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event
*/
lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t event, const void * data);
lv_res_t lv_event_send_func(lv_event_cb_t event_xcb, lv_obj_t * obj, lv_event_t event, const void * data);
/**
* Get the `data` parameter of the current event

View File

@ -212,7 +212,9 @@ lv_task_t * lv_task_create_basic(void)
/**
* Create a new lv_task
* @param task a function which is the task itself
* @param task_xcb a callback which is the task itself. It will be called periodically.
* (the 'x' in the argument name indicates that its not a fully generic function because it not follows
* the `func_name(object, callback, ...)` convention)
* @param period call period in ms unit
* @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped)
* @param user_data custom parameter

View File

@ -92,15 +92,18 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void);
*/
lv_task_t * lv_task_create_basic(void);
/**
* Create a new lv_task
* @param task a function which is the task itself
* @param task_xcb a callback which is the task itself. It will be called periodically.
* (the 'x' in the argument name indicates that its not a fully generic function because it not follows
* the `func_name(object, callback, ...)` convention)
* @param period call period in ms unit
* @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped)
* @param user_data custom parameter
* @return pointer to the new task
*/
lv_task_t * lv_task_create(lv_task_cb_t task_cb, uint32_t period, lv_task_prio_t prio, void * user_data);
lv_task_t * lv_task_create(lv_task_cb_t task_xcb, uint32_t period, lv_task_prio_t prio, void * user_data);
/**
* Delete a lv_task