richerfu 更新 AccessKit 的 OpenHarmony 适配器 PR
richerfu 说明 AccessKit 的 OpenHarmony 适配器 PR 已补充树变化事件、滚动与点击处理、aarch64-unknown-linux-ohos CI、可运行 showcase 示例和构建文档,并另开 accesskit-c 绑定 PR;主 PR 仍为草稿,相关支持尚未合并发布。
作者原文@richerfuThanks for the thorough review! I have updated the PR to address all feedback:
- Cargo manifest & MSRV:
- Inherited
rust-version.workspace = true(1.87) and addedexclude = ["examples"]inadapters/ohos/Cargo.toml.- Re-exported
ohos_accessibility_binding(AccessibilityError,Provider,Result) fromaccesskit_ohos.
- Tree change handling & events (
TreeChangeHandler):
- Replaced the no-op change handler with
AdapterChangeHandlerto emitEventType::Announcefor live regions (node_added/node_updated),EventType::TextUpdate,EventType::Selected,EventType::Scrolled, andEventType::FocusNodeUpdate, while still sendingEventType::PageContentUpdateon the root node.
- Actions & node properties:
- Mapped
ActionType::ScrollForward/ActionType::ScrollBackwardtoAction::Increment/Action::Decrementwhen supported, and passedActionData::ScrollUnit(ScrollUnit::Page)for scroll actions.- Added
Click-to-Focusfallback for focusable nodes that do not explicitly supportAction::Click, and emittedEventType::Clickedafter click actions.
- CI &
accesskit-cbindings:
- Added
aarch64-unknown-linux-ohostocargo-deny,clippy,doc, andtestin.github/workflows/ci.yml.- Opened the companion C bindings PR at https://github.com/AccessKit/accesskit-c/pull/117.
- Runnable
showcaseexample & documentation:
- Added
adapters/ohos/examples/showcase.rs(built onexample_common) and the host DevEco Studio / Hvigor project inadapters/ohos/examples/showcase_app/.OpenHarmony / HarmonyOS Development & Testing Guide
- Official documentation & IDE: The overall HarmonyOS / OpenHarmony development documentation is available at https://developer.huawei.com/consumer/en/doc/harmonyos-guides/start-overview. For local development and compilation, you can download DevEco Studio from the official website, which bundles the OpenHarmony SDK, NDK,
hvigorw,hdc, and an official emulator.- Emulator & accessibility testing (
ohos-qemu): Note that the official DevEco Studio emulator does not currently support the accessibility subsystem. If you want to run and verify the end-to-end accessibility workflow without a physical device, you can use the OpenHarmony QEMU images I maintain at https://github.com/harmony-contrib/ohos-qemu.- Build, HAP signing, and QEMU usage: Full instructions for building
showcase, packaging and signing the.hap(including CLI signing viahapsigner), and installing/verifying the accessibility tree onohos-qemuare documented inadapters/ohos/README.md.