start to implement the new generic event system
This commit is contained in:
@@ -41,9 +41,9 @@ static bool set_valid_drag_dirs(lv_obj_t * tileview);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static lv_signal_func_t ancestor_signal;
|
||||
static lv_signal_func_t ancestor_scrl_signal;
|
||||
static lv_design_func_t ancestor_design;
|
||||
static lv_signal_cb_t ancestor_signal;
|
||||
static lv_signal_cb_t ancestor_scrl_signal;
|
||||
static lv_design_cb_t ancestor_design;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@@ -84,8 +84,8 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
ext->valid_pos = NULL;
|
||||
|
||||
/*The signal and design functions are not copied so set them here*/
|
||||
lv_obj_set_signal_func(new_tileview, lv_tileview_signal);
|
||||
lv_obj_set_signal_func(lv_page_get_scrl(new_tileview), lv_tileview_scrl_signal);
|
||||
lv_obj_set_signal_cb(new_tileview, lv_tileview_signal);
|
||||
lv_obj_set_signal_cb(lv_page_get_scrl(new_tileview), lv_tileview_scrl_signal);
|
||||
|
||||
/*Init the new tileview*/
|
||||
if(copy == NULL) {
|
||||
@@ -132,7 +132,7 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
void lv_tileview_add_element(lv_obj_t * element)
|
||||
{
|
||||
lv_obj_set_free_ptr(element, lv_obj_get_signal_func(element));
|
||||
lv_obj_set_signal_func(element, element_signal_func);
|
||||
lv_obj_set_signal_cb(element, element_signal_func);
|
||||
lv_obj_set_drag_parent(element, true);
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ static lv_res_t element_signal_func(lv_obj_t * element, lv_signal_t sign, void *
|
||||
lv_res_t res;
|
||||
|
||||
/* Include the ancient signal function */
|
||||
lv_signal_func_t sign_func = lv_obj_get_free_ptr(element);
|
||||
lv_signal_cb_t sign_func = lv_obj_get_free_ptr(element);
|
||||
res = sign_func(element, sign, param);
|
||||
if(res != LV_RES_OK) return res;
|
||||
|
||||
@@ -483,7 +483,7 @@ static lv_res_t element_signal_func(lv_obj_t * element, lv_signal_t sign, void *
|
||||
if(drag_obj == NULL) break;
|
||||
}
|
||||
indev->proc.drag_in_prog = 0;
|
||||
if(drag_obj) drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, NULL);
|
||||
if(drag_obj) drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, NULL);
|
||||
}
|
||||
|
||||
drag_end_handler(tileview);
|
||||
|
||||
Reference in New Issue
Block a user