2022-05-21 11:02:23 +00:00
|
|
|
/**
|
|
|
|
|
* Copyright 2022 Eugenio Paolantonio (g7)
|
2024-01-12 09:51:43 +01:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2022-05-21 11:02:23 +00:00
|
|
|
*/
|
|
|
|
|
|
2024-01-25 09:59:45 +00:00
|
|
|
|
2022-05-21 11:02:23 +00:00
|
|
|
#ifndef UL_BACKENDS_H
|
|
|
|
|
#define UL_BACKENDS_H
|
|
|
|
|
|
2024-01-25 09:59:45 +00:00
|
|
|
#include "lvgl/lvgl.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Backend identifiers
|
|
|
|
|
*
|
|
|
|
|
* Only UL_BACKENDS_BACKEND_NONE should have an explicit value assigned
|
|
|
|
|
*/
|
2022-05-21 11:02:23 +00:00
|
|
|
typedef enum {
|
|
|
|
|
UL_BACKENDS_BACKEND_NONE = -1,
|
2024-01-25 09:59:45 +00:00
|
|
|
#if LV_USE_LINUX_FBDEV
|
2022-05-21 11:02:23 +00:00
|
|
|
UL_BACKENDS_BACKEND_FBDEV,
|
2024-01-25 09:59:45 +00:00
|
|
|
#endif /* LV_USE_LINUX_FBDEV */
|
|
|
|
|
#if LV_USE_LINUX_DRM
|
2022-05-21 11:02:23 +00:00
|
|
|
UL_BACKENDS_BACKEND_DRM,
|
2024-01-25 09:59:45 +00:00
|
|
|
#endif /* LV_USE_LINUX_DRM */
|
2022-05-21 11:02:23 +00:00
|
|
|
} ul_backends_backend_id_t;
|
|
|
|
|
|
2024-01-25 09:59:45 +00:00
|
|
|
/**
|
|
|
|
|
* Actual backends
|
|
|
|
|
*/
|
2022-05-21 11:02:23 +00:00
|
|
|
extern const char *ul_backends_backends[];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Find the first backend with a given name.
|
|
|
|
|
*
|
|
|
|
|
* @param name backend name
|
|
|
|
|
* @return ID of the first matching backend or UL_BACKENDS_BACKEND_NONE if no backend matched
|
|
|
|
|
*/
|
|
|
|
|
ul_backends_backend_id_t ul_backends_find_backend_with_name(const char *name);
|
|
|
|
|
|
|
|
|
|
#endif /* UL_BACKENDS_H */
|