Files
AtomUI/docs/modules/native/overview.md
T

1.5 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 的协议对象解析与 NWayland 调用;调用时机、输入矩形计算和 Window 状态策略仍属于 AtomUI.Desktop.Controls。
  • 为 AtomUI.Core 和 AtomUI.Desktop.Controls 提供内部基础设施。

目录结构

src/AtomUI.Native/
├── WindowExtensions.cs
├── Windows/
├── MacOS/
└── Linux/
    ├── X11/XCB/Xlib helpers
    ├── WaylandWindowReflectionExtensions.cs
    └── WaylandWindowUtils.cs

每个平台目录中通常拆分为:

  • WindowUtils.Interop.cs:P/Invoke 声明、结构体、枚举。
  • WindowUtils.<Platform>.cs:平台业务逻辑。

模块文档

Native 模块专题文档已合并到本目录: