mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
feat(indev): change the feedback callback parameter to lv_event_t* (#4435)
Signed-off-by: qinshijing <qinshijing@xiaomi.com> Co-authored-by: qinshijing <qinshijing@xiaomi.com>
This commit is contained in:
parent
96cb434a64
commit
9c7fcdaf19
@ -292,7 +292,7 @@ static lv_res_t event_send_core(lv_event_t * e)
|
||||
/*Call the input device's feedback callback if set*/
|
||||
lv_indev_t * indev_act = lv_indev_get_act();
|
||||
if(indev_act) {
|
||||
if(indev_act->feedback_cb) indev_act->feedback_cb(indev_act, e->code);
|
||||
if(indev_act->feedback_cb) indev_act->feedback_cb(indev_act, e);
|
||||
if(e->stop_processing) return LV_RES_OK;
|
||||
if(e->deleted) return LV_RES_INV;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ extern "C" {
|
||||
**********************/
|
||||
|
||||
struct _lv_indev_t;
|
||||
struct _lv_event_t;
|
||||
|
||||
struct _lv_indev_t {
|
||||
/**< Input device type*/
|
||||
@ -32,8 +33,8 @@ struct _lv_indev_t {
|
||||
lv_indev_read_cb_t read_cb;
|
||||
|
||||
/** Called when an action happened on the input device.
|
||||
* The second parameter is the event from `lv_event_t`*/
|
||||
void (*feedback_cb)(struct _lv_indev_t * indev, uint8_t event_code);
|
||||
* The second parameter is the event structure pointer*/
|
||||
void (*feedback_cb)(struct _lv_indev_t * indev, struct _lv_event_t * e);
|
||||
|
||||
lv_indev_state_t state; /**< Current state of the input device.*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user