NativeMessageBox is split into a small set of clear layers so platform behavior stays isolated while the public API stays stable.
| Component | Role |
|---|---|
Native runtime (src/native) |
Implements per-platform dialogs for Windows, macOS, Linux, iOS, Android, and browser |
Shared runtime helpers (src/shared) |
Holds ABI helpers, allocator support, and runtime utility code |
Managed wrapper (src/dotnet/NativeMessageBox) |
Exposes typed .NET API, marshaling, host abstraction, and diagnostics |
| Samples and tests | Exercise packaging, platform integration, and high-level usage |
flowchart LR
A["App code"] --> B["NativeMessageBoxClient / C ABI"]
B --> C["Host configuration and validation"]
C --> D["Marshaling into native structs"]
D --> E["Platform implementation"]
E --> F["Native result + logs"]
F --> G["MessageBoxResult / result codes"]
The separation keeps the API stable while still letting the project support platform-specific features such as: