2016-06-08 07:25:08 +02:00
|
|
|
/**
|
|
|
|
* @file lv_refr.h
|
2018-06-19 09:49:58 +02:00
|
|
|
*
|
2016-06-08 07:25:08 +02:00
|
|
|
*/
|
|
|
|
|
2017-07-09 15:32:49 +02:00
|
|
|
#ifndef LV_REFR_H
|
|
|
|
#define LV_REFR_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-06-08 07:25:08 +02:00
|
|
|
/*********************
|
|
|
|
* INCLUDES
|
|
|
|
*********************/
|
|
|
|
#include "lv_obj.h"
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2017-07-09 15:32:49 +02:00
|
|
|
|
2016-06-08 07:25:08 +02:00
|
|
|
/*********************
|
|
|
|
* DEFINES
|
|
|
|
*********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* TYPEDEFS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* STATIC PROTOTYPES
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* STATIC VARIABLES
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* MACROS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL FUNCTIONS
|
|
|
|
**********************/
|
2017-01-13 23:27:49 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the screen refresh subsystem
|
|
|
|
*/
|
2016-06-08 07:25:08 +02:00
|
|
|
void lv_refr_init(void);
|
2017-01-13 23:27:49 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalidate an area
|
|
|
|
* @param area_p pointer to area which should be invalidated
|
|
|
|
*/
|
2017-11-23 21:28:36 +01:00
|
|
|
void lv_inv_area(const lv_area_t * area_p);
|
2016-06-08 07:25:08 +02:00
|
|
|
|
2017-07-07 18:40:35 +02:00
|
|
|
/**
|
|
|
|
* Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels
|
|
|
|
* @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num))
|
|
|
|
*/
|
|
|
|
void lv_refr_set_monitor_cb(void (*cb)(uint32_t, uint32_t));
|
2017-07-09 15:32:49 +02:00
|
|
|
|
2018-02-24 11:55:39 +01:00
|
|
|
/**
|
|
|
|
* Called when an area is invalidated to modify the coordinates of the area.
|
|
|
|
* Special display controllers may require special coordinate rounding
|
|
|
|
* @param cb pointer to the a function which will modify the area
|
|
|
|
*/
|
2018-03-02 15:34:22 +01:00
|
|
|
void lv_refr_set_round_cb(void(*cb)(lv_area_t*));
|
2018-02-24 11:55:39 +01:00
|
|
|
|
2018-02-24 15:36:06 +01:00
|
|
|
/**
|
|
|
|
* Get the number of areas in the buffer
|
|
|
|
* @return number of invalid areas
|
|
|
|
*/
|
|
|
|
uint16_t lv_refr_get_buf_size(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pop (delete) the last 'num' invalidated areas from the buffer
|
|
|
|
* @param num number of areas to delete
|
|
|
|
*/
|
|
|
|
void lv_refr_pop_from_buf(uint16_t num);
|
2016-06-08 07:25:08 +02:00
|
|
|
/**********************
|
|
|
|
* STATIC FUNCTIONS
|
2017-01-13 23:27:49 +01:00
|
|
|
**********************/
|
2017-07-09 15:32:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /*LV_REFR_H*/
|