lv_refr.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /**
  2. * @file lv_refr.h
  3. *
  4. */
  5. #ifndef LV_REFR_H
  6. #define LV_REFR_H
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /*********************
  11. * INCLUDES
  12. *********************/
  13. #include "lv_obj.h"
  14. #include <stdbool.h>
  15. /*********************
  16. * DEFINES
  17. *********************/
  18. /**********************
  19. * TYPEDEFS
  20. **********************/
  21. /**********************
  22. * STATIC PROTOTYPES
  23. **********************/
  24. /**********************
  25. * STATIC VARIABLES
  26. **********************/
  27. /**********************
  28. * MACROS
  29. **********************/
  30. /**********************
  31. * GLOBAL FUNCTIONS
  32. **********************/
  33. /**
  34. * Initialize the screen refresh subsystem
  35. */
  36. void lv_refr_init(void);
  37. /**
  38. * Invalidate an area
  39. * @param area_p pointer to area which should be invalidated
  40. */
  41. void lv_inv_area(const lv_area_t * area_p);
  42. /**
  43. * Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels
  44. * @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num))
  45. */
  46. void lv_refr_set_monitor_cb(void (*cb)(uint32_t, uint32_t));
  47. /**
  48. * Called when an area is invalidated to modify the coordinates of the area.
  49. * Special display controllers may require special coordinate rounding
  50. * @param cb pointer to the a function which will modify the area
  51. */
  52. void lv_refr_set_round_cb(void(*cb)(lv_area_t*));
  53. /**
  54. * Get the number of areas in the buffer
  55. * @return number of invalid areas
  56. */
  57. uint16_t lv_refr_get_buf_size(void);
  58. /**
  59. * Pop (delete) the last 'num' invalidated areas from the buffer
  60. * @param num number of areas to delete
  61. */
  62. void lv_refr_pop_from_buf(uint16_t num);
  63. /**********************
  64. * STATIC FUNCTIONS
  65. **********************/
  66. #ifdef __cplusplus
  67. } /* extern "C" */
  68. #endif
  69. #endif /*LV_REFR_H*/