lv_wayland_backend_private.h

API reference for lv_wayland_backend_private.h

Report on GitHub

Functions

lv_wayland_set_backend_display_data

Set the backend-specific display data.

The backend display data is set automatically to the return type of the init_display/resize_display, this function should only be used in special cases where it needs to be overridden temporarily

 
void lv_wayland_set_backend_display_data(lv_display_t *display, void *data)
Parameters
NameTypeDescription
[in] displaylv_display_t *Pointer to the LVGL display object
[in] datavoid *Pointer to backend-specific display data

Structs

struct

lv_wayland_backend_ops_t

Wayland backend operations structure.

This structure defines the complete set of operations that a Wayland backend must implement. All function pointers must be non-NULL.

MemberTypeDescription
initlv_wayland_backend_init_tInitialize backend context
global_handlerlv_wayland_backend_global_handler_tHandle Wayland global objects
init_displaylv_wayland_backend_init_display_tInitialize a new display
resize_displaylv_wayland_backend_resize_display_tResize or reconfigure display
deinit_displaylv_wayland_backend_destroy_display_tDestroy a display
deinitlv_wayland_backend_deinit_tDeinitialize backend context

Lifecycle Order:: 1. init() - Initialize backend context 2. global_handler() - Called for each Wayland global (may be called multiple times) 3. init_display() - Create display (may be called multiple times for multiple displays) 4. resize_display() - Resize display (called as needed) 5. deinit_display() - Destroy display (called once per display) 6. deinit() - Clean up backend context

Typedefs

lv_wayland_backend_init_t

 
lv_wayland_backend_init_t

Initialize the backend context.

This function is called once when the Wayland driver is initialized to create the global backend context. The returned pointer will be passed as backend_ctx to all other backend operations.

lv_wayland_backend_deinit_t

 
lv_wayland_backend_deinit_t

Deinitialize the backend context.

This function is called when the Wayland driver is deinitialized. It must clean up all resources allocated in the init function and free the backend context.

lv_wayland_backend_init_display_t

 
lv_wayland_backend_init_display_t

Initialize a new display.

This function is called when creating a new LVGL display on Wayland. It should allocate and initialize per-display resources needed for rendering.

lv_wayland_backend_resize_display_t

 
lv_wayland_backend_resize_display_t

Resize or reconfigure a display.

This function is called when a display needs to be resized or when its rotation is modified. The backend should update its rendering resources accordingly.

lv_wayland_backend_destroy_display_t

 
lv_wayland_backend_destroy_display_t

Destroy a display.

This function is called when an LVGL display is being destroyed. It must clean up all per-display resources and free the display data that was allocated in init_display.

lv_wayland_backend_global_handler_t

 
lv_wayland_backend_global_handler_t

Handle Wayland global objects.

This function is called for every global object advertised by the Wayland compositor. The backend can use this to bind to Wayland protocols it requires (e.g., wl_shm, EGL extensions, DMA-BUF protocols, etc.).

Variables

wl_backend_ops

 
const lv_wayland_backend_ops_t wl_backend_ops

Dependencies

How is this guide?

Last updated on

On this page