mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-23 07:46:36 +08:00
chore(indev, disp): add lv_indev_read_cb_t and lv_disp_flush_cb_t typedefs
related to https://forum.lvgl.io/t/use-lvgl-with-python3/10686/39?u=kisvegabor
This commit is contained in:
+1
-2
@@ -399,8 +399,7 @@ void lv_disp_set_draw_buffers(lv_disp_t * disp, void * buf1, void * buf2, uint32
|
||||
disp->render_mode = render_mode;
|
||||
}
|
||||
|
||||
void lv_disp_set_flush_cb(lv_disp_t * disp, void (*flush_cb)(struct _lv_disp_t * disp, const lv_area_t * area,
|
||||
lv_color_t * color_p))
|
||||
void lv_disp_set_flush_cb(lv_disp_t * disp, lv_disp_flush_cb_t flush_cb)
|
||||
{
|
||||
if(disp == NULL) disp = lv_disp_get_default();
|
||||
if(disp == NULL) return;
|
||||
|
||||
+4
-2
@@ -84,6 +84,9 @@ typedef enum {
|
||||
LV_SCR_LOAD_ANIM_OUT_BOTTOM,
|
||||
} lv_scr_load_anim_t;
|
||||
|
||||
|
||||
typedef void (*lv_disp_flush_cb_t)(struct _lv_disp_t * disp, const lv_area_t * area, lv_color_t * px_map);
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
@@ -247,8 +250,7 @@ void lv_disp_set_draw_buffers(lv_disp_t * disp, void * buf1, void * buf2, uint32
|
||||
* @param disp pointer to a display
|
||||
* @param flush_cb the flush callback (`px_map` contains the rendered image as raw pixel map and it should be copied to `area` on the display)
|
||||
*/
|
||||
void lv_disp_set_flush_cb(lv_disp_t * disp, void (*flush_cb)(struct _lv_disp_t * disp, const lv_area_t * area,
|
||||
lv_color_t * px_map));
|
||||
void lv_disp_set_flush_cb(lv_disp_t * disp, lv_disp_flush_cb_t flush_cb);
|
||||
/**
|
||||
* Set the color format of the display.
|
||||
* If set to other than `LV_COLOR_FORMAT_NATIVE` the draw_ctx's `buffer_convert` function will be used
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ void lv_indev_set_type(lv_indev_t * indev, lv_indev_type_t indev_type)
|
||||
indev->reset_query = 1;
|
||||
}
|
||||
|
||||
void lv_indev_set_read_cb(lv_indev_t * indev, void (*read_cb)(struct _lv_indev_t * indev, lv_indev_data_t * data))
|
||||
void lv_indev_set_read_cb(lv_indev_t * indev, lv_indev_read_cb_t read_cb)
|
||||
{
|
||||
if(indev == NULL) return;
|
||||
|
||||
|
||||
+2
-1
@@ -57,6 +57,7 @@ typedef struct {
|
||||
bool continue_reading; /**< If set to true, the read callback is invoked again*/
|
||||
} lv_indev_data_t;
|
||||
|
||||
typedef void (*lv_indev_read_cb_t)(struct _lv_indev_t * indev, lv_indev_data_t * data);
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
@@ -112,7 +113,7 @@ lv_indev_t * lv_indev_get_act(void);
|
||||
*/
|
||||
void lv_indev_set_type(lv_indev_t * indev, lv_indev_type_t indev_type);
|
||||
|
||||
void lv_indev_set_read_cb(lv_indev_t * indev, void (*read_cb)(struct _lv_indev_t * indev, lv_indev_data_t * data));
|
||||
void lv_indev_set_read_cb(lv_indev_t * indev, lv_indev_read_cb_t read_cb);
|
||||
|
||||
void lv_indev_set_user_data(lv_indev_t * indev, void * user_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user