mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-20 15:52:17 +08:00
1.4 KiB
1.4 KiB
AtomUI.Native 模块概览
AtomUI.Native 是 AtomUI 的原生平台交互层,RootNamespace 为 AtomUI.Native。它通过 P/Invoke
封装 Windows、macOS、Linux/X11 的窗口级能力,并通过 NWayland 表达 Wayland 协议请求。
职责
- 提供 Windows/macOS 整窗鼠标穿透能力。
- 提供 macOS 标题栏按钮位置、尺寸、关闭按钮状态等窗口能力。
- 提供 Linux/X11 输入区域、窗口几何等底层辅助能力。
- 承载 Wayland input-region 的协议调用;Avalonia worker/proxy 的发现与调度策略仍属于
AtomUI.Desktop.Controls,不能下沉到 Native。 - 为
AtomUI.Core和AtomUI.Desktop.Controls提供内部基础设施。
目录结构
src/AtomUI.Native/
├── WindowExtensions.cs
├── Windows/
├── MacOS/
└── Linux/
├── X11/XCB/Xlib helpers
└── WaylandWindowUtils.cs
每个平台目录中通常拆分为:
WindowUtils.Interop.cs:P/Invoke 声明、结构体、枚举。WindowUtils.<Platform>.cs:平台业务逻辑。
模块文档
Native 模块专题文档已合并到本目录: