「App:Library:LVGL:docs:Overview:Displays」の版間の差分
(→API) |
(→API) |
||
234行目: | 234行目: | ||
:: '''disp''' -- pointer to a display | :: '''disp''' -- pointer to a display | ||
− | lv_theme_t *lv_disp_get_theme(lv_disp_t *disp) | + | <span style="background-color:#e7f2fa;color:#2980b9;">lv_theme_t *lv_disp_get_theme(lv_disp_t *disp) </span> |
: Get the theme of a display | : Get the theme of a display | ||
: '''Parameters''' | : '''Parameters''' |
2022年7月1日 (金) 12:00時点における版
https://docs.lvgl.io/8.2/overview/display.html
Displays
英文 | 自動翻訳 |
---|---|
Important The basic concept of a display in LVGL is explained in the [Porting](/porting/display) section. So before reading further, please read the [Porting](/porting/display) section first. |
Multiple display support
英文 | 自動翻訳 |
---|---|
In LVGL you can have multiple displays, each with their own driver and objects. The only limitation is that every display needs to have the same color depth (as defined in Creating more displays is easy: just initialize more display buffers and register another driver for every display. When you create the UI, use Why would you want multi-display support? Here are some examples:
|
Using only one display
英文 | 自動翻訳 |
---|---|
Using more displays can be useful but in most cases it's not required. Therefore, the whole concept of multi-display handling is completely hidden if you register only one display. By default, the last created (and only) display is used.
|
Mirror display
英文 | 自動翻訳 |
---|---|
To mirror the image of a display to another display, you don't need to use multi-display support. Just transfer the buffer received in |
Split image
英文 | 自動翻訳 |
---|---|
You can create a larger virtual display from an array of smaller ones. You can create it as below:
|
Screens
英文 | 自動翻訳 |
---|---|
Every display has its own set of screens and the objects on each screen. Be sure not to confuse displays and screens:
Screens can be considered the highest level containers which have no parent. A screen's size is always equal to its display and their origin is (0;0). Therefore, a screen's coordinates can't be changed, i.e. A screen can be created from any object type but the two most typical types are Base object and Image (to create a wallpaper). To create a screen, use To load a screen, use Screens can be deleted with |
Transparent screens
英文 | 自動翻訳 |
---|---|
Usually, the opacity of the screen is This configuration (transparent screen and display) could be used to create for example OSD menus where a video is played on a lower layer, and a menu is overlayed on an upper layer. To handle transparent displays, special (slower) color mixing algorithms need to be used by LVGL so this feature needs to enabled with In summary, to enable transparent screens and displays for OSD menu-like UIs:
|
Features of displays
Inactivity
英文 | 自動翻訳 |
---|---|
A user's inactivity time is measured on each display. Every use of an Input device (if associated with the display) counts as an activity. To get time elapsed since the last activity, use You can manually trigger an activity using |
Background
英文 | 自動翻訳 |
---|---|
Every display has a background color, background image and background opacity properties. They become visible when the current screen is transparent or not positioned to cover the whole display. The background color is a simple color to fill the display. It can be adjusted with The display background image is a path to a file or a pointer to an The opacity of the background color or image can be adjusted with The |
API
英文 | 自動翻訳 |
---|---|
Enums enum lv_scr_load_anim_t
Functions lv_obj_t *lv_disp_get_scr_act(lv_disp_t *disp)
lv_obj_t *lv_disp_get_scr_prev(lv_disp_t *disp)
void lv_disp_load_scr(lv_obj_t *scr)
lv_obj_t *lv_disp_get_layer_top(lv_disp_t *disp)
lv_obj_t *lv_disp_get_layer_sys(lv_disp_t *disp)
void lv_disp_set_theme(lv_disp_t *disp, lv_theme_t *th)
lv_theme_t *lv_disp_get_theme(lv_disp_t *disp)
void lv_disp_set_bg_color(lv_disp_t *disp, lv_color_t color)
void lv_disp_set_bg_image(lv_disp_t *disp, const void *img_src)
void lv_disp_set_bg_opa(lv_disp_t *disp, lv_opa_t opa)
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)
uint32_t lv_disp_get_inactive_time(const lv_disp_t *disp)
void lv_disp_trig_activity(lv_disp_t *disp)
void lv_disp_clean_dcache(lv_disp_t *disp)
lv_timer_t *_lv_disp_get_refr_timer(lv_disp_t *disp)
static inline lv_obj_t *lv_scr_act(void)
static inline lv_obj_t *lv_layer_top(void)
static inline lv_obj_t *lv_layer_sys(void)
static inline void lv_scr_load(lv_obj_t *scr) static inline lv_coord_t lv_dpx(lv_coord_t n)
static inline lv_coord_t lv_disp_dpx(const lv_disp_t *disp, lv_coord_t n)
|