Skip to main content

Crate lingxia_webview

Crate lingxia_webview 

Source
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::NavigationCancellationReason;
pub use events::NavigationEvent;
pub use events::NavigationId;
pub use events::NavigationProgress;
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§

BrowserWebViewBuilder
ClearSiteDataOptions
Data categories to remove for one site via WebViewController::clear_site_data.
ClearSiteDataResult
Outcome of WebViewController::clear_site_data. Each flag means “this category was requested AND the platform fully honored it” — false both when the category was not requested and when it could not be fully cleared.
ClickOptions
DownloadRequest
FileChooserFile
FileChooserRequest
FillOptions
LoadDataRequest
LoadError
Error reported when a main-frame page load fails (DNS, network, TLS, etc.).
LoadErrorPage
Localized content for the built-in WebView load-error document.
NavigationRequest
A platform navigation request passed to the registered policy handler.
NetworkCaptureSnapshot
A point-in-time view of the capture buffer.
NetworkEntry
One captured network request and its response (when it completed).
PressOptions
ProxyApplyReport
ProxyConfig
Global HTTP proxy configuration shared by all WebViews in the process.
ScrollOptions
StrictWebViewBuilder
SystemPipeReader
Cross‑platform system pipe reader (read end)
TypeOptions
WebResourceResponse
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
WebViewBuilder
Entry point for mode-specific WebView creation.
WebViewCookie
WebViewCookieSetRequest
WebViewEventSubscription
WebViewSession

Enums§

FileChooserResponse
LoadErrorKind
Normalized category for a main-frame page load failure.
LogLevel
Log levels for WebView logging
NavigationPolicy
Navigation policy decision returned by the navigation handler.
NetworkBody
Response body of a captured entry.
NewWindowPolicy
New-window policy decision returned by the new-window handler.
ProxyActivation
ProxyApplyStatus
SchemeOutcome
Outcome of handling a scheme request.
UserAgentOverride
Per-WebView user-agent override.
WebResourceBody
Body source for WebResourceResponse
WebViewCookieSameSite
WebViewCreateStage
WebViewDataMode
Website-data lifetime for a WebView.
WebViewError
WebView-specific error types
WebViewEvent
WebViewInputError
WebViewScriptError

Traits§

WebViewController
Interface for controlling WebView (100% copy from lxapp)
WebViewDelegate
WebView delegate: typed navigation lifecycle, observable state, page messaging, and logging for one WebView. Exactly one owner per WebView (an lxapp PageInstance or a browser tab delegate); read-only watchers use crate::events::normalizer::add_observer-registered observers.
WebViewInputController

Functions§

render_load_error_page
Render the one cross-platform load-error document used by managed WebViews and native URL surfaces.