lv_obj_user_data_ptr initial commit. Also deleted an unused variable in lv_indev to prevent compiler warnings

This commit is contained in:
Brian Pugh
2019-05-09 09:02:11 -07:00
parent 523170297e
commit 7631d41c88
3 changed files with 20 additions and 4 deletions

View File

@@ -1970,15 +1970,25 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf)
#if LV_USE_USER_DATA_SINGLE
/**
* Get a pointer to the object's user data
* Get the object's user data
* @param obj pointer to an object
* @return pointer to the user data
* @return user data
*/
lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj)
{
return obj->user_data;
}
/**
* Get a pointer to the object's user data
* @param obj pointer to an object
* @return pointer to the user data
*/
lv_obj_user_data_t *lv_obj_get_user_data_ptr(lv_obj_t * obj)
{
return &obj->user_data;
}
/**
* Set the object's user data. The data will be copied.
* @param obj pointer to an object