refactor(hello): 视图框架批次③ — 目录嵌套(ui/home/home.c, ui/demo/demo.c+ui/demo/list/list.c) + 视图深度化(demo列表区抽 CONTAINER 子视图, 子>父命中) + on_draw 链路实测通过(list标题改由子视图 on_draw 经注册表绘制) + g_ds.prog 上收 logic/state.c (agent-181)
hello c06b3b4f→07b1ee37; mipsel -Wall -Wextra 0 warning; 宿主 P1c/P2/P3 + widgets 全 PASS SDK 后续项(本批 App 层显式驱动适配, 未动 SDK): view enter/leave 不递归 children + on_event 路由未接线 — 待 SDK 侧补
This commit is contained in:
1 parent
d1a3cce7f1
commit
040e799c5f
9 files changed
+281
-63
No files matched your search
@@ -8,6 +8,7 @@
|
||||
|
||||
static int g_taps = 0;
|
||||
static int g_secs = 0;
|
||||
static int g_prog = 0; /* demo 进度语义值 0..100(批③ 自 ui/demo/demo.c 上收) */
|
||||
static logic_listener_fn g_listener = NULL;
|
||||
static void *g_listener_ctx = NULL;
|
||||
|
||||
@@ -31,6 +32,18 @@ void logic_secs_add(int n)
|
||||
if (g_listener) g_listener(LOGIC_EV_SECS, g_listener_ctx);
|
||||
}
|
||||
|
||||
int logic_prog_get(void)
|
||||
{
|
||||
return g_prog;
|
||||
}
|
||||
void logic_prog_set(int p)
|
||||
{
|
||||
if (p < 0) p = 0;
|
||||
if (p > 100) p = 100;
|
||||
g_prog = p;
|
||||
if (g_listener) g_listener(LOGIC_EV_PROG, g_listener_ctx);
|
||||
}
|
||||
|
||||
void logic_set_listener(logic_listener_fn cb, void *ctx)
|
||||
{
|
||||
g_listener = cb;
|
||||
|
||||
Reference in new issue
Block a user