mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
refactor(display): display_remove->display_delete
This commit is contained in:
parent
1d5dd3c2f3
commit
224fb43703
@ -98,7 +98,7 @@ void lv_nuttx_init(const lv_nuttx_dsc_t * dsc, lv_nuttx_result_t * result)
|
||||
#else
|
||||
disp = lv_nuttx_fbdev_create();
|
||||
if(lv_nuttx_fbdev_set_file(disp, dsc->fb_path) != 0) {
|
||||
lv_display_remove(disp);
|
||||
lv_display_delete(disp);
|
||||
disp = NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -246,7 +246,7 @@ static void sdl_event_handler(lv_timer_t * t)
|
||||
lv_refr_now(disp);
|
||||
break;
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
lv_display_remove(disp);
|
||||
lv_display_delete(disp);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -189,7 +189,7 @@ static void x11_resolution_evt_cb(lv_event_t * e)
|
||||
}
|
||||
|
||||
/**
|
||||
* event callbed by lvgl display if display has been closed (@ref lv_display_remove has been called)
|
||||
* event callbed by lvgl display if display has been closed (@ref lv_display_delete has been called)
|
||||
* @param[in] e event data, containing lv_display_t object
|
||||
*/
|
||||
static void x11_disp_delete_evt_cb(lv_event_t * e)
|
||||
@ -273,13 +273,13 @@ static void x11_event_handler(lv_timer_t * t)
|
||||
xd->terminated = true;
|
||||
void * ret = NULL;
|
||||
pthread_join(xd->thr_tick, &ret);
|
||||
lv_display_remove(disp);
|
||||
lv_display_delete(disp);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case MapNotify:
|
||||
case ReparentNotify:
|
||||
/*supress unhandled warning*/
|
||||
/*suppress unhandled warning*/
|
||||
break;
|
||||
default:
|
||||
LV_LOG_WARN("unhandled x11 event: %d", event.type);
|
||||
|
@ -133,7 +133,7 @@ static void x11_inp_event_handler(lv_timer_t * t)
|
||||
}
|
||||
|
||||
/**
|
||||
* event callbed by lvgl display if display has been closed (@ref lv_display_remove has been called)
|
||||
* event callbed by lvgl display if display has been closed (@ref lv_display_delete has been called)
|
||||
* @param[in] e event data, containing lv_display_t object
|
||||
*/
|
||||
static void x11_inp_delete_evt_cb(lv_event_t * e)
|
||||
|
@ -135,7 +135,7 @@ lv_display_t * lv_display_create(int32_t hor_res, int32_t ver_res)
|
||||
return disp;
|
||||
}
|
||||
|
||||
void lv_display_remove(lv_display_t * disp)
|
||||
void lv_display_delete(lv_display_t * disp)
|
||||
{
|
||||
bool was_default = false;
|
||||
if(disp == lv_display_get_default()) was_default = true;
|
||||
@ -694,7 +694,7 @@ lv_event_dsc_t * lv_display_get_event_dsc(lv_display_t * disp, uint32_t index)
|
||||
|
||||
}
|
||||
|
||||
bool lv_display_remove_event(lv_display_t * disp, uint32_t index)
|
||||
bool lv_display_delete_event(lv_display_t * disp, uint32_t index)
|
||||
{
|
||||
LV_ASSERT_NULL(disp);
|
||||
|
||||
|
@ -101,7 +101,7 @@ lv_display_t * lv_display_create(int32_t hor_res, int32_t ver_res);
|
||||
* Remove a display
|
||||
* @param disp pointer to display
|
||||
*/
|
||||
void lv_display_remove(lv_display_t * disp);
|
||||
void lv_display_delete(lv_display_t * disp);
|
||||
|
||||
/**
|
||||
* Set a default display. The new screens will be created on it by default.
|
||||
@ -450,7 +450,7 @@ lv_event_dsc_t * lv_display_get_event_dsc(lv_display_t * disp, uint32_t index);
|
||||
* @param index the index of the event to remove
|
||||
* @return true: and event was removed; false: no event was removed
|
||||
*/
|
||||
bool lv_display_remove_event(lv_display_t * disp, uint32_t index);
|
||||
bool lv_display_delete_event(lv_display_t * disp, uint32_t index);
|
||||
|
||||
/**
|
||||
* Send an event to a display
|
||||
|
@ -105,7 +105,7 @@ static inline void lv_obj_move_background(lv_obj_t * obj)
|
||||
#define lv_indev_get_act lv_indev_active
|
||||
#define lv_scr_act lv_screen_active
|
||||
#define lv_disp_create lv_display_create
|
||||
#define lv_disp_remove lv_display_remove
|
||||
#define lv_disp_remove lv_display_delete
|
||||
#define lv_disp_set_default lv_display_set_default
|
||||
#define lv_disp_get_default lv_display_get_default
|
||||
#define lv_disp_get_next lv_display_get_next
|
||||
@ -140,7 +140,7 @@ static inline void lv_obj_move_background(lv_obj_t * obj)
|
||||
#define lv_disp_add_event lv_display_add_event
|
||||
#define lv_disp_get_event_count lv_display_get_event_count
|
||||
#define lv_disp_get_event_dsc lv_display_get_event_dsc
|
||||
#define lv_disp_remove_event lv_display_remove_event
|
||||
#define lv_disp_remove_event lv_display_delete_event
|
||||
#define lv_disp_send_event lv_display_send_event
|
||||
#define lv_disp_set_theme lv_display_set_theme
|
||||
#define lv_disp_get_theme lv_display_get_theme
|
||||
|
@ -96,7 +96,7 @@ static inline void _lv_cleanup_devices(lv_global_t * global)
|
||||
if(global) {
|
||||
/* cleanup indev and display */
|
||||
_lv_ll_clear_custom(&(global->indev_ll), (void (*)(void *)) lv_indev_delete);
|
||||
_lv_ll_clear_custom(&(global->disp_ll), (void (*)(void *)) lv_display_remove);
|
||||
_lv_ll_clear_custom(&(global->disp_ll), (void (*)(void *)) lv_display_delete);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user