feat(event) add more event code specific wrappers for lv_event_get_param()

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-13 17:08:49 +02:00
parent e3425188f5
commit 052c3c9f3e
14 changed files with 150 additions and 39 deletions

View File

@@ -595,14 +595,14 @@ void lv_obj_get_content_coords(const lv_obj_t * obj, lv_area_t * area)
lv_coord_t lv_obj_get_self_width(const lv_obj_t * obj)
{
lv_point_t p = {0, LV_COORD_MIN};
lv_event_send((lv_obj_t * )obj, LV_EVENT_REFR_SELF_SIZE, &p);
lv_event_send((lv_obj_t * )obj, LV_EVENT_GET_SELF_SIZE, &p);
return p.x;
}
lv_coord_t lv_obj_get_self_height(const lv_obj_t * obj)
{
lv_point_t p = {LV_COORD_MIN, 0};
lv_event_send((lv_obj_t * )obj, LV_EVENT_REFR_SELF_SIZE, &p);
lv_event_send((lv_obj_t * )obj, LV_EVENT_GET_SELF_SIZE, &p);
return p.y;
}
@@ -892,9 +892,9 @@ bool lv_obj_hit_test(lv_obj_t * obj, const lv_point_t * point)
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_ADV_HITTEST)) {
lv_hit_test_info_t hit_info;
hit_info.point = point;
hit_info.result = true;
hit_info.res = true;
lv_event_send(obj, LV_EVENT_HIT_TEST, &hit_info);
return hit_info.result;
return hit_info.res;
}
return res;