ui/webview_win
lib/ui/webview_win.vklib/ui/webview_win.vk
Pure-Veko Windows Edge WebView2 COM host & deterministic headless simulator.
- Zero top-level mut globals: all state lives in WebViewHandle.
- Zero .net imports or net/* builtins: offline html and veko:// work without .net.
- Calls ffi/* builtins directly without use [ffi] so lib/ui/* operates under .ui.
WebViewHandle = struct { id str, win_id str, parent_hwnd i64 = ..., headless bool = ..., backend enum = ..., dll_path str = ..., dll_h i64 = ..., env_ptr i64 = ..., ctrl_ptr i64 = ..., wv_ptr i64 = ..., env_cb_obj i64 = ..., ctrl_cb_obj i64 = ..., msg_cb_obj i64 = ..., ready bool = ..., allow_net bool = ..., url str = ..., html str = ..., pending_url str = ..., pending_html str = ..., pending_js block = ..., js_history block = ..., ipc_outbox block = ..., sim_ipc_events block = ..., x i64 = ..., y i64 = ..., w i64 = ..., h i64 = ... }
to-wv-handle = fn [raw any] WebViewHandle
classify-url = fn [url str] enum
check-url-policy = fn [url str, allow_net bool] any
discover-webview2-dll = fn [] map
wv-create = fn [id str, win_id str, parent_hwnd i64, headless bool, allow_net bool, props map] WebViewHandle
wv-set-bounds = fn [mut wv WebViewHandle, x i64, y i64, w i64, h i64]
wv-set-html = fn [mut wv WebViewHandle, html str] any
wv-eval-js = fn [mut wv WebViewHandle, js str] any
wv-post-message = fn [mut wv WebViewHandle, msg str] any
wv-handle-callback = fn [mut wv WebViewHandle, slot i64, a0 i64, a1 i64, a2 i64] block
wv-sim-ipc = fn [mut wv WebViewHandle, payload str]
wv-drain-sim-ipc = fn [mut wv WebViewHandle] block
wv-destroy = fn [mut wv WebViewHandle]