config LV_USE_WAYLAND
	bool "Wayland"
	default n
	help
		Open a window on a Wayland compositor on Linux or BSD and read mouse, keyboard and touch input.

if LV_USE_WAYLAND

config LV_WAYLAND_DIRECT_EXIT
	bool "Exit when the last window closes"
	default y
	help
		LVGL is deinitialized before the application exits.

config LV_WAYLAND_USE_SHM
	bool "SHM (Shared Memory) Backend"
	default y
	depends on !LV_USE_DRAW_OPENGLES && !LV_USE_DRAW_NANOVG
	help
		Default backend, using wl_shm for double-buffered direct rendering.
		Compatible with all Wayland compositors; no special hardware required.
		Unavailable with the OpenGL ES and NanoVG renderers, which can only
		render into a GPU surface.

config LV_WAYLAND_USE_DMABUF
	bool "DMA-BUF Backend"
	depends on !LV_USE_DRAW_OPENGLES && !LV_USE_DRAW_NANOVG
	select LV_WAYLAND_USE_DMABUF_PROTOCOL
	help
		Presents software-rendered frames through linear DMA-BUFs that the
		compositor can scan out directly, saving its copy out of shared memory.
		Requires a compositor with zwp_linux_dmabuf_v1 and a gbm implementation
		able to allocate CPU-mappable buffers, plus libdrm and gbm (-ldrm -lgbm).
		Needs no GPU API: unavailable with the OpenGL ES and NanoVG renderers,
		which can only render into a GPU surface.

config LV_WAYLAND_USE_EGL
	bool "EGL (OpenGL ES, hardware-accelerated) Backend"
	default y if LV_USE_DRAW_OPENGLES || LV_USE_DRAW_NANOVG
	select LV_USE_EGL
	select LV_USE_OPENGLES
	help
		Hardware-accelerated rendering via OpenGL ES 2.0 and EGL, compatible
		with LVGL 3D/glTF rendering. Requires OpenGL ES 2.0 on the target
		hardware and linking with wayland-egl (-lwayland-egl).
		The only backend available with the OpenGL ES and NanoVG renderers.

config LV_WAYLAND_USE_G2D
	bool "G2D (NXP i.MX hardware accelerator)"
	depends on !LV_USE_DRAW_OPENGLES && !LV_USE_DRAW_NANOVG
	select LV_USE_DRAW_G2D
	select LV_WAYLAND_USE_DMABUF_PROTOCOL
	help
		Hardware-accelerated 2D rendering via NXP's G2D engine.
		Supports NXP i.MX6/i.MX8 platforms with G2D library installed.
		Unavailable with the OpenGL ES and NanoVG renderers, which can only
		render into a GPU surface.

config LV_WAYLAND_USE_DMABUF_PROTOCOL
	bool

endif # LV_USE_WAYLAND
