ui/webview_mac
lib/ui/webview_mac.vklib/ui/webview_mac.vk
Pure-Veko macOS WKWebView host & deterministic headless simulator (Slice 3).
- Zero top-level mut globals: all state lives in MacWebViewHandle.
- Zero .net imports or net/* builtins: offline html, about:blank, veko://, data:text/html work without .net.
- Calls ffi/* builtins directly inside tiny local ObjC helpers (no use [ffi]) so consumers work under .ui.
MacWebViewHandle = struct { id str, win_id str, parent_view i64 = ..., ns_wv i64 = ..., ns_cfg i64 = ..., ns_ucc i64 = ..., headless bool = ..., backend enum = ..., allow_net bool = ..., ready bool = ..., url str = ..., html str = ..., js_history block = ..., ipc_outbox block = ..., sim_ipc_events block = ..., x i64 = ..., y i64 = ..., w i64 = ..., h i64 = ... }
to-mac-wv = fn [raw any] MacWebViewHandle
mac-wv-create = fn [id str, win_id str, parent_view i64, delegate_obj i64, headless bool, allow_net bool, props map] MacWebViewHandle
mac-wv-set-bounds = fn [mut h MacWebViewHandle, win_h i64, x i64, y i64, w i64, h_px i64]
mac-wv-set-html = fn [mut h MacWebViewHandle, html str] any
mac-wv-eval-js = fn [mut h MacWebViewHandle, js str] any
mac-wv-post-message = fn [mut h MacWebViewHandle, msg str] any
mac-wv-decode-ipc = fn [wk_msg_ptr i64] str
mac-wv-sim-ipc = fn [mut h MacWebViewHandle, payload str]
mac-wv-drain-sim-ipc = fn [mut h MacWebViewHandle] block
mac-wv-destroy = fn [mut h MacWebViewHandle]