Expand description
Cross-platform WebView hosting layer for LingXia.
This crate is strictly generic webview hosting: webview creation and lifecycle, navigation/scheme/event plumbing, and minimal native surface ownership required by each platform WebView runtime. It contains no product UI.
On Windows, host-window grouping, chrome, panels, and app layout live in
lingxia-windows-sdk; this crate only provides the WebView2 surface.
Re-exports§
pub use events::ObservedWebViewState;pub use events::WebViewEventObserver;pub use events::WebViewObservedEvent;pub use events::WebViewStateChange;
Modules§
- data_
store - Global website-data operations for privacy surfaces: usage counts, clear cache, clear cookies & site data.
- events
- Typed delegate events: correlated navigation lifecycle, observable state snapshots, and the canonical derived-state folds. Typed WebView delegate events: correlated navigation lifecycle, observable state snapshots, and the canonical derived-state folds every consumer must use instead of hand-rolled equivalents.
- platform
- Platform-specific APIs used by SDK/FFI integration layers.
- runtime
- Runtime-scoped APIs (instance lookup/destruction, proxy state).
- url_
callback - Process-local URL callback channels for navigation handoff. Process-local URL callback channels for WebView navigation.
Structs§
- Browser
WebView Builder - Clear
Site Data Options - Data categories to remove for one site via
WebViewController::clear_site_data. - Clear
Site Data Result - Outcome of
WebViewController::clear_site_data. Each flag means “this category was requested AND the platform fully honored it” —falseboth when the category was not requested and when it could not be fully cleared. - Click
Options - Download
Request - File
Chooser File - File
Chooser Request - Fill
Options - Load
Data Request - Load
Error - Error reported when a main-frame page load fails (DNS, network, TLS, etc.).
- Load
Error Page - Localized content for the built-in WebView load-error document.
- Navigation
Request - A platform navigation request passed to the registered policy handler.
- Network
Capture Snapshot - A point-in-time view of the capture buffer.
- Network
Entry - One captured network request and its response (when it completed).
- Press
Options - Proxy
Apply Report - Proxy
Config - Global HTTP proxy configuration shared by all WebViews in the process.
- Scroll
Options - Strict
WebView Builder - System
Pipe Reader - Cross‑platform system pipe reader (read end)
- Type
Options - WebResource
Response - Represents an HTTP response whose body is provided by a file path, pipe, or in-memory bytes.
- WebTag
- WebView identifier combining appid, path, and optional session id.
Example:
appid:path#123. - WebView
- WebView type that includes inner implementation and delegate
- WebView
Builder - Entry point for mode-specific WebView creation.
- WebView
Cookie - WebView
Cookie SetRequest - WebView
Event Subscription - WebView
Session
Enums§
- File
Chooser Response - Load
Error Kind - Normalized category for a main-frame page load failure.
- LogLevel
- Log levels for WebView logging
- Navigation
Policy - Navigation policy decision returned by the navigation handler.
- Network
Body - Response body of a captured entry.
- NewWindow
Policy - New-window policy decision returned by the new-window handler.
- Proxy
Activation - Proxy
Apply Status - Scheme
Outcome - Outcome of handling a scheme request.
- User
Agent Override - Per-WebView user-agent override.
- WebResource
Body - Body source for WebResourceResponse
- WebView
Cookie Same Site - WebView
Create Stage - WebView
Data Mode - Website-data lifetime for a WebView.
- WebView
Error - WebView-specific error types
- WebView
Event - WebView
Input Error - WebView
Script Error
Traits§
- WebView
Controller - Interface for controlling WebView (100% copy from lxapp)
- WebView
Delegate - WebView delegate: typed navigation lifecycle, observable state, page
messaging, and logging for one WebView. Exactly one owner per WebView
(an lxapp
PageInstanceor a browser tab delegate); read-only watchers usecrate::events::normalizer::add_observer-registered observers. - WebView
Input Controller
Functions§
- render_
load_ error_ page - Render the one cross-platform load-error document used by managed WebViews and native URL surfaces.