Architecture
UltimateUI turns C# UI operations into compact, validated binary wire frames. This keeps user code JS-free while still allowing DOM mutation in modern WebKit.
Data Flow
C# Element tree
-> MountContext / DomUpdateContext
-> RingEncoder
-> IDomBackend
-> WebKitGTK WebView
-> embedded shim decoder
-> DOM
Reverse event path:
DOM event
-> shim listener table
-> window.webkit.messageHandlers.uui
-> WebKitGtkSurface
-> EventDispatcher
-> C# delegate
Main Modules
| Path | Responsibility |
|---|---|
spec/*.json | Single source of truth for opcodes, elements, events, and styles |
src/UltimateUI.SourceGen/ | Generates DOM types, writers, dispatchers, and the shim asset from spec |
src/UltimateUI.Core/ | Element tree, arena, encoder, mount/update transactions, listener registry |
src/UltimateUI.Hosting/ | Render host, backend probe, WebKitGTK host, JS evaluate backend |
src/UltimateUI.Native/ | WebKitGTK, JSC, GLib, and GTK P/Invoke surface |
shim/ | TypeScript DOM decoder and renderer event bridge |
samples/Hello/ | CSX + WebKitGTK end-to-end sample |
Why A Shim Exists
Modern WebKit no longer exposes the public webkit_dom_* C API. The viable
external process channel for DOM mutation is the JavaScript engine. UltimateUI
encapsulates that detail in a fixed shim: users call C# APIs, the framework
submits binary frames, and the shim only decodes and executes them.