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 general set of operations that a Wayland backend must implement. All function pointers must be non-NULL.

MemberTypeDescription
initlv_wayland_backend_init_tInitialize backend data
global_handlerlv_wayland_backend_global_handler_tHandle Wayland global objects
deinitlv_wayland_backend_deinit_tDeinitialize backend data

Lifecycle Order:: 1. init() - Initialize backend data 2. global_handler() - Called for each Wayland global (may be called multiple times) 3. deinit() - Clean up backend data

struct

lv_wayland_backend_display_ops_t

Wayland backend display operations structure.

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

MemberTypeDescription
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

Lifecycle Order:: 1. init_display() - Create display (may be called multiple times for multiple displays) 2. resize_display() - Resize display (called as needed) 3. deinit_display() - Destroy display (called once per display)

struct

lv_wayland_backend_display_data_t

MemberTypeDescription
opsconst lv_wayland_backend_display_ops_t *Backend display specific operations
backend_datavoid *General backend data
display_datavoid *Specific display backend data
Used by 2 functions
  • lv_wayland_backend_init_display — param backend_ddata
  • lv_wayland_backend_deinit_display — param backend_ddata

Typedefs

lv_wayland_backend_init_t

 
lv_wayland_backend_init_t

Initialize the backend data.

This function is called once when the Wayland driver is initialized to create the global backend data. The context written to backend_data is passed back to every other operation of the backend. It may be left NULL by a backend that keeps no global state.

lv_wayland_backend_deinit_t

 
lv_wayland_backend_deinit_t

Deinitialize the backend data.

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.).

Dependencies

  • lvgl_public.h
  • wayland-client.h

Last updated on

On this page