1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

chore(api_map_v8): API for adapting imagebutton for version V8 (#6641)

Signed-off-by: lhdjply <lhdjply@126.com>
This commit is contained in:
Liu Yi 2024-08-05 20:33:27 +08:00 committed by GitHub
parent 1d647adaef
commit 2bb3d62435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,6 +59,15 @@ typedef lv_screen_load_anim_t lv_scr_load_anim_t;
typedef lv_buttonmatrix_ctrl_t lv_btnmatrix_ctrl_t;
#endif /* LV_USE_BUTTONMATRIX */
#if LV_USE_IMAGEBUTTON
#define LV_IMGBTN_STATE_RELEASED LV_IMAGEBUTTON_STATE_RELEASED
#define LV_IMGBTN_STATE_PRESSED LV_IMAGEBUTTON_STATE_PRESSED
#define LV_IMGBTN_STATE_DISABLED LV_IMAGEBUTTON_STATE_DISABLED
#define LV_IMGBTN_STATE_CHECKED_RELEASED LV_IMAGEBUTTON_STATE_CHECKED_RELEASED
#define LV_IMGBTN_STATE_CHECKED_PRESSED LV_IMAGEBUTTON_STATE_CHECKED_PRESSED
#define LV_IMGBTN_STATE_CHECKED_DISABLED LV_IMAGEBUTTON_STATE_CHECKED_DISABLED
#endif /* LV_USE_IMAGEBUTTON */
/**********************
* GLOBAL PROTOTYPES
**********************/
@ -177,6 +186,15 @@ static inline void lv_obj_move_background(lv_obj_t * obj)
#define lv_img_get_antialias lv_image_get_antialias
#endif /* LV_USE_IMAGE */
#if LV_USE_IMAGEBUTTON
#define lv_imgbtn_create lv_imagebutton_create
#define lv_imgbtn_set_src lv_imagebutton_set_src
#define lv_imgbtn_set_state lv_imagebutton_set_state
#define lv_imgbtn_get_src_left lv_imagebutton_get_src_left
#define lv_imgbtn_get_src_middle lv_imagebutton_get_src_middle
#define lv_imgbtn_get_src_right lv_imagebutton_get_src_right
#endif /* LV_USE_IMAGEBUTTON */
#if LV_USE_LIST
#define lv_list_set_btn_text lv_list_set_button_text
#define lv_list_get_btn_text lv_list_get_button_text