/* ui/lock/lock.c — 锁屏页(ACT_LOCK)M3 桩 + M5 接缝。 * * M5 在此实现「APP 启动 PIN」:lock_view_should_show() 读配置决定是否锁, * 锁屏页负责 PIN 输入/校验后 page_pop 回书库。本批桩恒返回 0(不锁),页面仅可编译占位。 */ #include "tuku_internal.h" static mr_page_ctrl g_ctrl; int lock_view_should_show(void) { return 0; /* M5:读 APP 启动 PIN 配置后返回 1 */ } static void lock_draw(meow_view *v, const meow_theme *th, void *ctx) { (void)v; (void)ctx; int w = meow_ui_width(); int h = meow_ui_height(); int cy = h / 2; meow_ui_text_center(w / 2, cy - 80, "LOCKED", th->font_title, th->primary); meow_ui_text_center(w / 2, cy - 36, "Startup PIN (M5)", th->font_body, th->onSurface); meow_ui_text_center(w / 2, cy + 8, "PIN entry will be implemented in M5", th->font_body, th->onSurfaceVariant); } static void lock_page_enter(meow_view *v, void *ctx) { ((mr_page_ctrl *)ctx)->active = 1; v->x = 0; v->y = 0; v->w = meow_ui_width(); v->h = meow_ui_height(); meow_ui_set_fullscreen(0); meow_ui_set_page_bg(meow_theme_get()->bg); mr_nav_report(); meow_ui_paint_full(); } static void lock_page_leave(meow_view *v, void *ctx) { (void)v; ((mr_page_ctrl *)ctx)->active = 0; } meow_view *lock_view_create(void) { static const meow_view_hooks h = { .on_enter = lock_page_enter, .on_leave = lock_page_leave, .on_draw = lock_draw, }; return meow_view_create(ACT_LOCK, MEOW_VIEW_ACTIVITY, &h, &g_ctrl); }