Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lvgl/lvgl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: amirgon/lvgl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 26, 2021

  1. fix(obj) Add missing getter and setter for user_data

    This is needed for Micropython bindings, which stores a reference to the Python object which wraps the LVGL object.
    amirgon committed Apr 26, 2021
    Copy the full SHA
    1b7ca6f View commit details

Commits on Apr 27, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    85aac33 View commit details
Showing with 24 additions and 0 deletions.
  1. +24 −0 src/core/lv_obj.h
24 changes: 24 additions & 0 deletions src/core/lv_obj.h
Original file line number Diff line number Diff line change
@@ -263,6 +263,18 @@ void lv_obj_clear_state(lv_obj_t * obj, lv_state_t state);
*/
void lv_obj_set_base_dir(lv_obj_t * obj, lv_bidi_dir_t dir);

/**
* Set the user_data field of the object
* @param obj pointer to an object
* @param user_data pointer to the new user_data.
*/
#if LV_USE_USER_DATA
static inline void lv_obj_set_user_data(lv_obj_t * obj, void * user_data)
{
obj->user_data = user_data;
}
#endif

/*=======================
* Getter functions
*======================*/
@@ -313,6 +325,18 @@ bool lv_obj_has_state(const lv_obj_t * obj, lv_state_t state);
*/
void * lv_obj_get_group(const lv_obj_t * obj);

/**
* Get the user_data field of the object
* @param obj pointer to an object
* @return the pointer to the user_data of the object
*/
#if LV_USE_USER_DATA
static inline void * lv_obj_get_user_data(lv_obj_t * obj)
{
return obj->user_data;
}
#endif

/*=======================
* Other functions
*======================*/