[−][src]Crate webview2
Rust bindings for WebView2.
The new Chromium based Edge browser (>= 82.0.430.0) need to be installed for
this to actually work. Or the
build
method will return an
error.
By default, this crate ships a copy of the WebView2Loader.dll
file for the
target platform. At runtime, this dll will be loaded from memory with the
memory-module-sys library.
License of the DLL file (part of the WebView2 SDK) is included in the
Microsoft.Web.WebView2.0.9.430
folder. You can also use an external
WebView2Loader.dll
file.
There are high level, idiomatic Rust wrappers for most APIs. And there are
bindings to almost all the raw COM APIs in the webview2-sys
crate. You can
use the as_raw
methods to convert to raw COM objects and call all those
methods. The callback
macro can be helpful for implementing callbacks as
COM objects.
Macros
callback | Returns a pointer that implements the COM callback interface with the specified closure. Inspired by C++ Microsoft::WRT::Callback. |
Structs
AcceleratorKeyPressedEventArgs |
|
ContentLoadingEventArgs |
|
Deferral |
|
Environment |
|
EnvironmentBuilder | A builder for calling the |
Error | A webview2 error. Actually, an |
EventRegistrationToken | |
Host |
|
HttpHeadersCollectionIterator |
|
HttpRequestHeaders |
|
HttpResponseHeaders |
|
MoveFocusRequestedEventArgs |
|
NavigationCompletedEventArgs |
|
NavigationStartingEventArgs |
|
NewWindowRequestedEventArgs |
|
PermissionRequestedEventArgs |
|
PhysicalKeyStatus | A structure representing the information packed into the LPARAM given to a Win32 key event. See the documentation for WM_KEYDOWN for details at https://docs.microsoft.com/windows/win32/inputdev/wm-keydown |
ProcessFailedEventArgs |
|
ScriptDialogOpeningEventArgs |
|
Settings |
|
SourceChangedEventArgs |
|
Stream |
|
WebMessageReceivedEventArgs |
|
WebResourceRequest |
|
WebResourceRequestedEventArgs |
|
WebResourceResponse |
|
WebView |
|
Enums
CapturePreviewImageFormat | Image format used by the ICoreWebView2::CapturePreview method. |
KeyEventKind | The type of key event that triggered an AcceleratorKeyPressed event. |
MoveFocusReason | Reason for moving focus. |
PermissionKind | The type of a permission request. |
PermissionState | Response to a permission request. |
ProcessFailedKind | Kind of process failure used in the ICoreWebView2ProcessFailedEventHandler interface. |
ScriptDialogKind | Kind of JavaScript dialog used in the ICoreWebView2ScriptDialogOpeningEventHandler interface. |
WebErrorStatus | Error status values for web navigations. |
WebResourceContext | Enum for web resource request contexts. |
Functions
check_hresult | Check a |
Type Definitions
Result |