feat(sdk): 中文拼音输入法落地 (agent-229, 设计稿 IME_PINYIN_DESIGN.md) — 静态表词库(403音节+329词,rodata ~20.5KB,零堆)+引擎(meow_pinyin.c,音节切分DFS+联想)+SDK集成(MEOW_IME_PINYIN尾部追加零ABI破坏,组合条+候选栏+翻页+中英切换,英文零回归)
meow_ui.a→a7a9043e; hello/files/ncm重链已部署; test_pinyin 5项全过+test_ime_fix零回归
This commit is contained in:
1 parent
f34818037f
commit
e9b6b690c1
16 files changed
+2261
-11
No files matched your search
@@ -522,6 +522,9 @@ void meow_ui_run(const meow_ui_events *ev)
|
||||
if (!meow_ime_active()) {
|
||||
meow_widget_touch_refresh();
|
||||
if (now_ms() >= startup_cooldown_until) meow_input_long_press_poll();
|
||||
} else if (meow_ime_mode_pinyin()) {
|
||||
/* 拼音 IME 打开:喂长按轮询(长按退格清空字段)。英文模式不喂(保持既有行为)。 */
|
||||
if (now_ms() >= startup_cooldown_until) meow_input_long_press_poll();
|
||||
}
|
||||
|
||||
meow_input_ev e;
|
||||
@@ -537,7 +540,7 @@ void meow_ui_run(const meow_ui_events *ev)
|
||||
/* 抬手未达标:清视觉条 */
|
||||
meow_ui_swipe_hint(-1);
|
||||
meow_ui_flush_region(0, meow_ui_statusbar_height(), meow_ui_width(), 6);
|
||||
if (meow_ime_active() && meow_ime_handle_tap(e.a, e.b)) continue;
|
||||
if (meow_ime_active() && meow_ime_handle_event(&e)) continue;
|
||||
/* §6.1 触摸分流:③ 系统全局(IME/状态栏…已在上面消费) → ② App 全局控件
|
||||
* (命中返回 1=消费,否则落到 ① active Activity 页面控件)。 */
|
||||
if (meow_ui_global_hit(e.a, e.b)) continue;
|
||||
@@ -549,6 +552,8 @@ void meow_ui_run(const meow_ui_events *ev)
|
||||
/* 抬手达标:清视觉条(左滑返回),触发行消失 */
|
||||
meow_ui_swipe_hint(-1);
|
||||
meow_ui_flush_region(0, meow_ui_statusbar_height(), meow_ui_width(), 6);
|
||||
/* 拼音 IME 候选栏横滑翻页(英文模式 handle_event 返回 0 → 沿用既有行为)。 */
|
||||
if (meow_ime_active() && meow_ime_handle_event(&e)) continue;
|
||||
/* A-0 全局左缘返回(方案A):
|
||||
* - APP 注册 on_swipe → APP 接管,自行决定(meow_ui_request_exit / 页内返回);
|
||||
* - APP 未注册 on_swipe 且非全屏(sb_active)→ SDK 默认退出 app(返回=退出);
|
||||
@@ -569,9 +574,10 @@ void meow_ui_run(const meow_ui_events *ev)
|
||||
} else if (e.type == MEOW_EV_TOUCH_DOWN || e.type == MEOW_EV_TOUCH_MOVE) {
|
||||
/* M2.71-bug2/6:拖动过程(跟手)。IME 弹出时触摸优先喂键盘(键盘覆盖层拦截,
|
||||
* on_touch_* 丢弃,避免按到键盘却在背后控件上锁拖拽);启动窗口也吞(防残留点按
|
||||
* 误锁拖拽)。模态(dialog/sheet)期间本主循环被阻塞,天然不在此分发。 */
|
||||
* 误锁拖拽)。模态(dialog/sheet)期间本主循环被阻塞,天然不在此分发。
|
||||
* IME 打开时先把压点喂给拼音(候选栏滑动翻页判定 g_ime_swipe_y),再丢弃。 */
|
||||
if (in_startup) continue;
|
||||
if (meow_ime_active()) continue;
|
||||
if (meow_ime_active()) { meow_ime_handle_event(&e); continue; }
|
||||
if (g_events_set && g_events.on_touch_down && e.type == MEOW_EV_TOUCH_DOWN)
|
||||
g_events.on_touch_down(e.a, e.b);
|
||||
if (g_events_set && g_events.on_touch_move && e.type == MEOW_EV_TOUCH_MOVE)
|
||||
@@ -596,6 +602,8 @@ void meow_ui_run(const meow_ui_events *ev)
|
||||
* meow_widget_hit/meow_listview_hit 判定命中控件/行)。已注册回调则分发;
|
||||
* 其抬手已被 touch_release 抑制(不再产生 TAP/SWIPE),此处无需吞后续 tap。 */
|
||||
if (in_startup) continue;
|
||||
/* 拼音 IME 打开:长按退格清空字段(英文模式 handle_event 返回 0 → 走既有长按回调)。 */
|
||||
if (meow_ime_active() && meow_ime_handle_event(&e)) continue;
|
||||
if (g_long_press_cb) g_long_press_cb(e.a, e.b);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user