feat: 添加 UI 组件支持,整合界面元素和全局变量管理
This commit is contained in:
39
components/ui/screens.h
Normal file
39
components/ui/screens.h
Normal 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*/
|
||||
Reference in New Issue
Block a user