feat: 添加 UI 组件支持,整合界面元素和全局变量管理

This commit is contained in:
Wang Beihong
2026-03-06 20:03:31 +08:00
parent b8f33364d7
commit d532d037ab
18 changed files with 544 additions and 23 deletions

39
components/ui/screens.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef EEZ_LVGL_UI_SCREENS_H
#define EEZ_LVGL_UI_SCREENS_H
#include <lvgl.h>
#ifdef __cplusplus
extern "C" {
#endif
// Screens
enum ScreensEnum {
_SCREEN_ID_FIRST = 1,
SCREEN_ID_MAIN = 1,
_SCREEN_ID_LAST = 1
};
typedef struct _objects_t {
lv_obj_t *main;
lv_obj_t *obj0;
lv_obj_t *obj1;
lv_obj_t *obj2;
} objects_t;
extern objects_t objects;
void create_screen_main();
void tick_screen_main();
void tick_screen_by_id(enum ScreensEnum screenId);
void tick_screen(int screen_index);
void create_screens();
#ifdef __cplusplus
}
#endif
#endif /*EEZ_LVGL_UI_SCREENS_H*/