diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index 159bd70ab2..34a4b0fc0b 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -78,6 +78,8 @@ static void delete_on_screen_unloaded_event_cb(lv_event_t * e); #if LV_USE_OBJ_PROPERTY static lv_result_t lv_obj_set_any(lv_obj_t *, lv_prop_id_t, const lv_property_t *); static lv_result_t lv_obj_get_any(const lv_obj_t *, lv_prop_id_t, lv_property_t *); + + static lv_point_t lv_obj_get_scroll_end_helper(lv_obj_t * obj); #endif /********************** @@ -166,7 +168,7 @@ static const lv_property_ops_t properties[] = { }, { .id = LV_PROPERTY_OBJ_SCROLL_END, - .getter = lv_obj_get_scroll_end, + .getter = lv_obj_get_scroll_end_helper, }, { .id = LV_PROPERTY_OBJ_EXT_DRAW_SIZE, @@ -1192,6 +1194,13 @@ static void delete_on_screen_unloaded_event_cb(lv_event_t * e) } #if LV_USE_OBJ_PROPERTY +static lv_point_t lv_obj_get_scroll_end_helper(lv_obj_t * obj) +{ + lv_point_t point; + lv_obj_get_scroll_end(obj, &point); + return point; +} + static lv_result_t lv_obj_set_any(lv_obj_t * obj, lv_prop_id_t id, const lv_property_t * prop) { LV_ASSERT_OBJ(obj, MY_CLASS); @@ -1241,4 +1250,4 @@ static lv_result_t lv_obj_get_any(const lv_obj_t * obj, lv_prop_id_t id, lv_prop return LV_RESULT_INVALID; } } -#endif +#endif /*LV_USE_OBJ_PROPERTY*/ diff --git a/src/core/lv_obj.h b/src/core/lv_obj.h index ead6ba5a5b..bfc69da6ac 100644 --- a/src/core/lv_obj.h +++ b/src/core/lv_obj.h @@ -160,7 +160,7 @@ enum _lv_signed_prop_id_t { LV_PROPERTY_ID(OBJ, SCROLL_BOTTOM, LV_PROPERTY_TYPE_INT, 64), LV_PROPERTY_ID(OBJ, SCROLL_LEFT, LV_PROPERTY_TYPE_INT, 65), LV_PROPERTY_ID(OBJ, SCROLL_RIGHT, LV_PROPERTY_TYPE_INT, 66), - LV_PROPERTY_ID(OBJ, SCROLL_END, LV_PROPERTY_TYPE_INT, 67), + LV_PROPERTY_ID(OBJ, SCROLL_END, LV_PROPERTY_TYPE_POINT, 67), LV_PROPERTY_ID(OBJ, EXT_DRAW_SIZE, LV_PROPERTY_TYPE_INT, 68), LV_PROPERTY_ID(OBJ, EVENT_COUNT, LV_PROPERTY_TYPE_INT, 69), LV_PROPERTY_ID(OBJ, SCREEN, LV_PROPERTY_TYPE_OBJ, 70),