「App:Library:LVGL:docs:Overview:Displays」の版間の差分
(→API) |
|||
18行目: | 18行目: | ||
ですから、この先を読む前に、まず[Porting](/porting/display)のセクションを読んでください。 | ですから、この先を読む前に、まず[Porting](/porting/display)のセクションを読んでください。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
59行目: | 59行目: | ||
* 2つの大きなTFTディスプレイを持つ:1つは顧客用、もう1つは店員用。 | * 2つの大きなTFTディスプレイを持つ:1つは顧客用、もう1つは店員用。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
91行目: | 91行目: | ||
例えば、<code style="color: #bb0000;">lv_disp_trig_activity(NULL)</code> は、デフォルトのディスプレイでユーザ活動を開始します。(後述する非活性化を参照)。 | 例えば、<code style="color: #bb0000;">lv_disp_trig_activity(NULL)</code> は、デフォルトのディスプレイでユーザ活動を開始します。(後述する非活性化を参照)。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
107行目: | 107行目: | ||
<code style="color: #bb0000;">drv.flush_cb</code> で受け取ったバッファをもう一方のディスプレイにも転送するだけです。 | <code style="color: #bb0000;">drv.flush_cb</code> で受け取ったバッファをもう一方のディスプレイにも転送するだけです。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
129行目: | 129行目: | ||
# バッファの内容を、切り捨てた領域で各実ディスプレイに送信する。 | # バッファの内容を、切り捨てた領域で各実ディスプレイに送信する。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
214行目: | 214行目: | ||
スクリーンは<code style="color: #bb0000;">lv_obj_del(scr)</code>で削除できますが、現在ロードされているスクリーンを削除しないように注意してください。 | スクリーンは<code style="color: #bb0000;">lv_obj_del(scr)</code>で削除できますが、現在ロードされているスクリーンを削除しないように注意してください。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
276行目: | 276行目: | ||
* 表示の不透明度を<code style="color: #bb0000;">lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP);</code>と共に <code style="color: #bb0000;">LV_OPA_TRANSP</code> に設定します。 | * 表示の不透明度を<code style="color: #bb0000;">lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP);</code>と共に <code style="color: #bb0000;">LV_OPA_TRANSP</code> に設定します。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
311行目: | 311行目: | ||
<code style="color: #bb0000;">disp</code>が<code style="color: #bb0000;">NULL</code>の場合、デフォルトのスクリーンが使用されます (すべてのディスプレイではありません) 。 | <code style="color: #bb0000;">disp</code>が<code style="color: #bb0000;">NULL</code>の場合、デフォルトのスクリーンが使用されます (すべてのディスプレイではありません) 。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
361行目: | 361行目: | ||
これらの関数の <code style="color: #bb0000;">disp</code> パラメータを <code style="color: #bb0000;">NULL</code> にすると、デフォルトの表示が選択されます。 | これらの関数の <code style="color: #bb0000;">disp</code> パラメータを <code style="color: #bb0000;">NULL</code> にすると、デフォルトの表示が選択されます。 | ||
|} | |} | ||
− | :[[App:Library:LVGL:docs:Overview|戻る : Previous]] | + | :[[App:Library:LVGL:docs:Overview#Displays|戻る : Previous]] |
688行目: | 688行目: | ||
− | + | [[App:Library:LVGL#Overview|戻る : Previous]] |
2022年7月2日 (土) 10:18時点における最新版
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. |
重要
LVGLにおけるディスプレイの基本的な考え方は、[Porting](/porting/display)のセクションで説明されています。 ですから、この先を読む前に、まず[Porting](/porting/display)のセクションを読んでください。 |
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 If the displays are different in this regard the rendered image can be converted to the correct format in the drivers
When you create the UI, use Why would you want multi-display support? Here are some examples:
|
LVGLでは、複数のディスプレイを持つことができ、それぞれが独自のドライバとオブジェクトを持つことができます。唯一の制限は、すべてのディスプレイが同じ色深度(LV_COLOR_DEPTH )である必要があることです。
ディスプレイが異なる場合、レンダリング画像はドライバの
UI を作成するとき、
|
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.
E.g. |
より多くのディスプレイを使用することは便利ですが、ほとんどの場合、それは必要ではありません。
したがって、ディスプレイを1つだけ登録する場合、マルチディスプレイ処理の全コンセプトは完全に隠蔽されます。デフォルトでは、最後に作成された(そして唯一の)ディスプレイが使用されます。
例えば、 |
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:
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).
use
To get the active screen, use These functions work on the default display.
A screen can be loaded with animations too. Read more here. Screens can be deleted with |
ディスプレイには、それぞれ画面とその画面上にあるオブジェクトがあります。
ディスプレイとスクリーンを混同しないように注意してください。
スクリーンのサイズは常にディスプレイと同じで、その原点は(0;0)です。 つまり、
を使用します。
アクティブなスクリーンを取得するには、 これらの関数は、デフォルトのディスプレイで動作します。
画面にアニメーションを読み込むこともできます。 詳細はこちら。
|
Transparent screens
英文 | 自動翻訳 |
---|---|
Usually, the opacity of the screen is If this is not the case (opacity < 100%) the display's background color or image will be visible. See the Display background section for more details. If the display's background opacity is also not 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.
As this mode operates on the Alpha channel of the pixels The Alpha channel of 32-bit colors will be 0 where there are no objects and 255 where there are solid objects. In summary, to enable transparent screens and displays for OSD menu-like UIs:
|
通常、スクリーンの不透明度は LV_OPA_COVER で、その子にソリッドな背景を提供します。
そうでない場合 (不透明度<100%) 、ディスプレイの背景色またはイメージが表示されます。 詳細については、 「背景を表示する」 セクションを参照してください。 ディスプレイの背景の不透明度も
このモードはピクセルのアルファチャネルで動作するため、LV_COLOR_DEPTH=32も必要です。 32ビットカラーのアルファチャネルは、オブジェクトがない場合は0、ソリッドオブジェクトがある場合は255になります。透明ディスプレイを扱うには、特別な (遅い) カラーミキシングアルゴリズムをLVGLで使用する必要があるため、lv_conf.hのLV_COLOR_SCREEN_TRANSPでこの機能を有効にする必要があります。 このモードはピクセルのアルファチャネルで動作するため、 32ビットカラーのアルファチャネルは、オブジェクトがない場合は0、ソリッドオブジェクトがある場合は255になります。
|
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 If
If |
ユーザーの非アクティブ時間は、各ディスプレイで測定されます。
入力デバイス (ディスプレイに関連付けられている場合) を使用するたびに、アクティビティとしてカウントされます。 最後のアクティビティからの経過時間を取得するには、
|
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.
It can be adjusted with
It can be set with If a background image is configured the background won't be filled with 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)
|
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)
|