- 添加新的UI页面基础架构(ui_page.h),包含页面操作接口 - 创建设置页面控制器(ui_settings_controller.h/.c)来管理页面导航 - 实现具体的设置页面类型:根页面、BLE页面、主题页面 - 修改display_module.c以使用新的页面系统替代旧的状态机 - 移除过时的settings_ui.h头文件和相关状态结构 - 更新事件处理逻辑以使用页面指针而非状态数据传递 - 修改主界面实现以适配统一的页面接口标准
36 lines
707 B
C
36 lines
707 B
C
#ifndef BLINKY_SETTINGS_VIEW_EVENT_H_
|
|
#define BLINKY_SETTINGS_VIEW_EVENT_H_
|
|
|
|
#include <app_event_manager.h>
|
|
#include <app_event_manager_profiler_tracer.h>
|
|
|
|
#include "ui/ui_settings_page.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct settings_view_event {
|
|
struct app_event_header header;
|
|
struct ui_settings_page *page;
|
|
bool animate;
|
|
};
|
|
|
|
APP_EVENT_TYPE_DECLARE(settings_view_event);
|
|
|
|
static inline void submit_settings_view_event(struct ui_settings_page *page,
|
|
bool animate)
|
|
{
|
|
struct settings_view_event *event = new_settings_view_event();
|
|
|
|
event->page = page;
|
|
event->animate = animate;
|
|
APP_EVENT_SUBMIT(event);
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* BLINKY_SETTINGS_VIEW_EVENT_H_ */
|