- 添加新的UI页面基础架构(ui_page.h),包含页面操作接口 - 创建设置页面控制器(ui_settings_controller.h/.c)来管理页面导航 - 实现具体的设置页面类型:根页面、BLE页面、主题页面 - 修改display_module.c以使用新的页面系统替代旧的状态机 - 移除过时的settings_ui.h头文件和相关状态结构 - 更新事件处理逻辑以使用页面指针而非状态数据传递 - 修改主界面实现以适配统一的页面接口标准
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
#ifndef BLINKY_UI_SETTINGS_CONTROLLER_H_
|
|
#define BLINKY_UI_SETTINGS_CONTROLLER_H_
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include "theme_color.h"
|
|
#include "ui_page.h"
|
|
#include "ui_settings_page.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void ui_settings_controller_open(void);
|
|
void ui_settings_controller_close(void);
|
|
bool ui_settings_controller_back(void);
|
|
void ui_settings_controller_select(void);
|
|
void ui_settings_controller_move(int8_t delta);
|
|
void ui_settings_controller_refresh(bool animate);
|
|
bool ui_settings_controller_is_active(void);
|
|
|
|
void ui_settings_controller_switch_to(struct ui_settings_page *page,
|
|
struct ui_page *parent);
|
|
|
|
const char *ui_settings_ble_current_label(void);
|
|
const char *ui_settings_ble_slot_label(uint8_t slot);
|
|
void ui_settings_ble_select_slot(uint8_t slot);
|
|
void ui_settings_ble_erase_current(void);
|
|
void ui_settings_theme_set_current(struct theme_rgb theme);
|
|
const char *ui_settings_theme_current_name(void);
|
|
uint8_t ui_settings_theme_current_index(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* BLINKY_UI_SETTINGS_CONTROLLER_H_ */
|