From 6c86969ee002fb50099a3906de837d6aac023d80 Mon Sep 17 00:00:00 2001 From: Oleg Belousov Date: Fri, 10 Nov 2023 15:51:05 +0300 Subject: [PATCH] fix(table) user data API functions renamed (#4769) Co-authored-by: Oleg Belousov --- src/widgets/lv_table.c | 4 ++-- src/widgets/lv_table.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/widgets/lv_table.c b/src/widgets/lv_table.c index 40c75b906..e2c2ebf75 100644 --- a/src/widgets/lv_table.c +++ b/src/widgets/lv_table.c @@ -378,7 +378,7 @@ void lv_table_clear_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_tab } #if LV_USE_USER_DATA -void lv_table_set_user_data(lv_obj_t * obj, uint16_t row, uint16_t col, void * user_data) +void lv_table_set_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col, void * user_data) { LV_ASSERT_OBJ(obj, MY_CLASS); @@ -481,7 +481,7 @@ void lv_table_get_selected_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col) } #if LV_USE_USER_DATA -void * lv_table_get_user_data(lv_obj_t * obj, uint16_t row, uint16_t col) +void * lv_table_get_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col) { LV_ASSERT_OBJ(obj, MY_CLASS); diff --git a/src/widgets/lv_table.h b/src/widgets/lv_table.h index e5af7299a..9c60a7673 100644 --- a/src/widgets/lv_table.h +++ b/src/widgets/lv_table.h @@ -159,9 +159,9 @@ void lv_table_clear_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_tab * @param obj pointer to a Table object * @param row id of the row [0 .. row_cnt -1] * @param col id of the column [0 .. col_cnt -1] - * @param user_data pointer to the new user_data. + * @param user_data pointer to the new user_data. It must be allocated by user as it will be freed automatically */ -void lv_table_set_user_data(lv_obj_t * obj, uint16_t row, uint16_t col, void * user_data); +void lv_table_set_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col, void * user_data); #endif /*===================== @@ -224,7 +224,7 @@ void lv_table_get_selected_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col); * @param row id of the row [0 .. row_cnt -1] * @param col id of the column [0 .. col_cnt -1] */ -void * lv_table_get_user_data(lv_obj_t * obj, uint16_t row, uint16_t col); +void * lv_table_get_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col); #endif /**********************