mikroSDK Reference Manual
lv_disp.h
Go to the documentation of this file.
1
6#ifndef LV_DISP_H
7#define LV_DISP_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
16#include "../hal/lv_hal.h"
17#include "lv_obj.h"
18#include "lv_theme.h"
19
20/*********************
21 * DEFINES
22 *********************/
23
24/**********************
25 * TYPEDEFS
26 **********************/
27
28typedef enum {
29 LV_SCR_LOAD_ANIM_NONE,
30 LV_SCR_LOAD_ANIM_OVER_LEFT,
31 LV_SCR_LOAD_ANIM_OVER_RIGHT,
32 LV_SCR_LOAD_ANIM_OVER_TOP,
33 LV_SCR_LOAD_ANIM_OVER_BOTTOM,
34 LV_SCR_LOAD_ANIM_MOVE_LEFT,
35 LV_SCR_LOAD_ANIM_MOVE_RIGHT,
36 LV_SCR_LOAD_ANIM_MOVE_TOP,
37 LV_SCR_LOAD_ANIM_MOVE_BOTTOM,
38 LV_SCR_LOAD_ANIM_FADE_IN,
39 LV_SCR_LOAD_ANIM_FADE_ON = LV_SCR_LOAD_ANIM_FADE_IN, /*For backward compatibility*/
40 LV_SCR_LOAD_ANIM_FADE_OUT,
41 LV_SCR_LOAD_ANIM_OUT_LEFT,
42 LV_SCR_LOAD_ANIM_OUT_RIGHT,
43 LV_SCR_LOAD_ANIM_OUT_TOP,
44 LV_SCR_LOAD_ANIM_OUT_BOTTOM,
45} lv_scr_load_anim_t;
46
47/**********************
48 * GLOBAL PROTOTYPES
49 **********************/
50
58
66
72
79
87
93
100
106void lv_disp_set_bg_color(lv_disp_t * disp, lv_color_t color);
107
113void lv_disp_set_bg_image(lv_disp_t * disp, const void * img_src);
114
120void lv_disp_set_bg_opa(lv_disp_t * disp, lv_opa_t opa);
121
130void lv_scr_load_anim(lv_obj_t * scr, lv_scr_load_anim_t anim_type, uint32_t time, uint32_t delay, bool auto_del);
131
138
144
150
157
164
172
173/*------------------------------------------------
174 * To improve backward compatibility
175 * Recommended only if you have one display
176 *------------------------------------------------*/
177
182static inline lv_obj_t * lv_scr_act(void)
183{
185}
186
191static inline lv_obj_t * lv_layer_top(void)
192{
194}
195
200static inline lv_obj_t * lv_layer_sys(void)
201{
203}
204
205static inline void lv_scr_load(lv_obj_t * scr)
206{
207 lv_disp_load_scr(scr);
208}
209
210/**********************
211 * MACROS
212 **********************/
213
214/*------------------------------------------------
215 * To improve backward compatibility
216 * Recommended only if you have one display
217 *------------------------------------------------*/
218
219#ifndef LV_HOR_RES
223#define LV_HOR_RES lv_disp_get_hor_res(lv_disp_get_default())
224#endif
225
226#ifndef LV_VER_RES
230#define LV_VER_RES lv_disp_get_ver_res(lv_disp_get_default())
231#endif
232
241static inline lv_coord_t lv_dpx(lv_coord_t n)
242{
243 return LV_DPX(n);
244}
245
255static inline lv_coord_t lv_disp_dpx(const lv_disp_t * disp, lv_coord_t n)
256{
257 return _LV_DPX_CALC(lv_disp_get_dpi(disp), n);
258}
259
260#ifdef __cplusplus
261} /*extern "C"*/
262#endif
263
264#endif /*LV_DISP_H*/
lv_obj_t * lv_disp_get_layer_sys(lv_disp_t *disp)
void lv_scr_load_anim(lv_obj_t *scr, lv_scr_load_anim_t anim_type, uint32_t time, uint32_t delay, bool auto_del)
void lv_disp_clean_dcache(lv_disp_t *disp)
void lv_disp_trig_activity(lv_disp_t *disp)
uint32_t lv_disp_get_inactive_time(const lv_disp_t *disp)
lv_obj_t * lv_disp_get_layer_top(lv_disp_t *disp)
lv_theme_t * lv_disp_get_theme(lv_disp_t *disp)
void lv_disp_load_scr(lv_obj_t *scr)
void lv_disp_set_bg_opa(lv_disp_t *disp, lv_opa_t opa)
lv_obj_t * lv_disp_get_scr_prev(lv_disp_t *disp)
lv_timer_t * _lv_disp_get_refr_timer(lv_disp_t *disp)
void lv_disp_set_theme(lv_disp_t *disp, lv_theme_t *th)
lv_obj_t * lv_disp_get_scr_act(lv_disp_t *disp)
void lv_disp_set_bg_color(lv_disp_t *disp, lv_color_t color)
void lv_disp_enable_invalidation(lv_disp_t *disp, bool en)
void lv_disp_set_bg_image(lv_disp_t *disp, const void *img_src)
bool lv_disp_is_invalidation_enabled(lv_disp_t *disp)
#define _LV_DPX_CALC(dpi, n)
Definition lv_hal.h:29
lv_coord_t lv_disp_get_dpi(const lv_disp_t *disp)
lv_disp_t * lv_disp_get_default(void)
Definition lv_hal_disp.h:158
Definition lv_obj.h:174
Definition lv_theme.h:31
Definition lv_timer.h:44