1 /** 2 * @file lv_refr.h 3 * 4 */ 5 6 #ifndef LV_REFR_H 7 #define LV_REFR_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "lv_obj.h" 17 #include <stdbool.h> 18 19 /********************* 20 * DEFINES 21 *********************/ 22 23 /********************** 24 * TYPEDEFS 25 **********************/ 26 27 /********************** 28 * STATIC PROTOTYPES 29 **********************/ 30 31 /********************** 32 * STATIC VARIABLES 33 **********************/ 34 35 /********************** 36 * MACROS 37 **********************/ 38 39 /********************** 40 * GLOBAL FUNCTIONS 41 **********************/ 42 43 /** 44 * Initialize the screen refresh subsystem 45 */ 46 void lv_refr_init(void); 47 48 /** 49 * Redraw the invalidated areas now. 50 * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process 51 * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process 52 * (e.g. progress bar) this function can be called when the screen should be updated. 53 * @param disp pointer to display to refresh. NULL to refresh all displays. 54 */ 55 void lv_refr_now(lv_disp_t * disp); 56 57 /** 58 * Invalidate an area on display to redraw it 59 * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas) 60 * @param disp pointer to display where the area should be invalidated (NULL can be used if there is 61 * only one display) 62 */ 63 void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); 64 65 /** 66 * Get the display which is being refreshed 67 * @return the display being refreshed 68 */ 69 lv_disp_t * lv_refr_get_disp_refreshing(void); 70 71 /** 72 * Set the display which is being refreshed. 73 * It shouldn1t be used directly by the user. 74 * It can be used to trick the drawing functions about there is an active display. 75 * @param the display being refreshed 76 */ 77 void lv_refr_set_disp_refreshing(lv_disp_t * disp); 78 79 /** 80 * Called periodically to handle the refreshing 81 * @param task pointer to the task itself 82 */ 83 void lv_disp_refr_task(lv_task_t * task); 84 85 /********************** 86 * STATIC FUNCTIONS 87 **********************/ 88 89 #ifdef __cplusplus 90 } /* extern "C" */ 91 #endif 92 93 #endif /*LV_REFR_H*/ 94