lv_windows_display.h
API reference for lv_windows_display.h
Functions
lv_windows_get_display_window_handle
Get the window handle from specific LVGL display object.
HWND lv_windows_get_display_window_handle(lv_display_t *display)| Name | Type | Description |
|---|---|---|
display | lv_display_t * | The specific LVGL display object. |
Returns: HWND — The window handle from specific LVGL display object.
lv_windows_create_display
Create a LVGL display object.
lv_display_t * lv_windows_create_display(const wchar_t *title, int32_t hor_res, int32_t ver_res, int32_t zoom_level, bool allow_dpi_override, bool simulator_mode)| Name | Type | Description |
|---|---|---|
title | const wchar_t * | The window title of LVGL display. |
hor_res | int32_t | The horizontal resolution value of LVGL display. |
ver_res | int32_t | The vertical resolution value of LVGL display. |
zoom_level | int32_t | The zoom level value. Base value is 100 a.k.a 100%. |
allow_dpi_override | bool | Allow DPI override if true, or follow the Windows DPI scaling setting dynamically. |
simulator_mode | bool | Create simulator mode display if true (not resizable), or create application mode display (resizable). |
Returns: lv_display_t * — The created LVGL display object.
lv_windows_zoom_to_logical
Get logical pixel value from physical pixel value taken account with zoom level.
int32_t lv_windows_zoom_to_logical(int32_t physical, int32_t zoom_level)| Name | Type | Description |
|---|---|---|
physical | int32_t | The physical pixel value taken account with zoom level. |
zoom_level | int32_t | The zoom level value. Base value is 100 a.k.a 100%. |
Returns: int32_t — The logical pixel value.
Remark: It uses the same calculation style as Windows OS implementation. It will be useful for integrate LVGL Windows backend to other Windows applications.
lv_windows_zoom_to_physical
Get physical pixel value taken account with zoom level from logical pixel value.
int32_t lv_windows_zoom_to_physical(int32_t logical, int32_t zoom_level)| Name | Type | Description |
|---|---|---|
logical | int32_t | The logical pixel value. |
zoom_level | int32_t | The zoom level value. Base value is 100 a.k.a 100%. |
Returns: int32_t — The physical pixel value taken account with zoom level.
Remark: It uses the same calculation style as Windows OS implementation. It will be useful for integrate LVGL Windows backend to other Windows applications.
lv_windows_dpi_to_logical
Get logical pixel value from physical pixel value taken account with DPI scaling.
int32_t lv_windows_dpi_to_logical(int32_t physical, int32_t dpi)| Name | Type | Description |
|---|---|---|
physical | int32_t | The physical pixel value taken account with DPI scaling. |
dpi | int32_t | The DPI scaling value. Base value is USER_DEFAULT_SCREEN_DPI. |
Returns: int32_t — The logical pixel value.
Remark: It uses the same calculation style as Windows OS implementation. It will be useful for integrate LVGL Windows backend to other Windows applications.
lv_windows_dpi_to_physical
Get physical pixel value taken account with DPI scaling from logical pixel value.
int32_t lv_windows_dpi_to_physical(int32_t logical, int32_t dpi)| Name | Type | Description |
|---|---|---|
logical | int32_t | The logical pixel value. |
dpi | int32_t | The DPI scaling value. Base value is USER_DEFAULT_SCREEN_DPI. |
Returns: int32_t — The physical pixel value taken account with DPI scaling.
Remark: It uses the same calculation style as Windows OS implementation. It will be useful for integrate LVGL Windows backend to other Windows applications.
Typedefs
HWND
typedef struct HWND__* HWNDUsed by 4 functions
lv_windows_get_window_context— paramwindow_handlelv_windows_pointer_device_window_message_handler— paramhWndlv_windows_keypad_device_window_message_handler— paramhWndlv_windows_encoder_device_window_message_handler— paramhWnd
Macros
LV_WINDOWS_ZOOM_BASE_LEVEL
#define LV_WINDOWS_ZOOM_BASE_LEVEL 100USER_DEFAULT_SCREEN_DPI
#define USER_DEFAULT_SCREEN_DPI 96Dependencies
Last updated on