lv_wayland.h

API reference for lv_wayland.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_wayland_private.h
Summary

Functions

lv_wayland_get_fd

Retrieves the file descriptor of the wayland socket

 
int lv_wayland_get_fd(void)

lv_wayland_get_output_count

Get the number of physical outputs (screens) advertised by the compositor

 
uint8_t lv_wayland_get_output_count(void)

Returns: uint8_t — the number of outputs, 0 if the driver isn't initialized yet

lv_wayland_get_output_name

Get the name of a physical output

 
const char * lv_wayland_get_output_name(uint8_t output)
Parameters
NameTypeDescription
outputuint8_tindex of the output, 0..lv_wayland_get_output_count() - 1

Returns: const char * — the connector name, e.g. "HDMI-A-1", or NULL if output is out of range. The string is owned by the driver and stays valid until lv_wayland_deinit

lv_wayland_get_output_size

Get the size of a physical output

 
bool lv_wayland_get_output_size(uint8_t output, int32_t *width, int32_t *height)
Parameters
NameTypeDescription
outputuint8_tindex of the output, 0..lv_wayland_get_output_count() - 1
widthint32_t *pointer to store the width in pixels May be NULL.
heightint32_t *pointer to store the height in pixels May be NULL.

Returns: bool — true if the size is known, false if output is out of range or the compositor hasn't reported a size yet

lv_wayland_get_display_size

Look up a physical output by name and get its size

 
int32_t lv_wayland_get_display_size(const char *name, int32_t *width, int32_t *height)
Parameters
NameTypeDescription
nameconst char *connector name of the output, e.g. "DSI-1" or "HDMI-A-1"
widthint32_t *pointer to store the width in pixels May be NULL.
heightint32_t *pointer to store the height in pixels May be NULL.

Returns: int32_t — the index of the output, to be passed to lv_wayland_window_set_physical_display, or -1 if no output goes by that name

Dependencies

Last updated on

On this page