Trait webview2_sys::ICoreWebView2Environment3[][src]

pub trait ICoreWebView2Environment3: ICoreWebView2Environment2 {
    unsafe fn create_core_web_view2_composition_controller(
        &self,
        parent_window: HWND,
        handler: *mut *mut ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandlerVTable
    ) -> HRESULT;
unsafe fn create_core_web_view2_pointer_info(
        &self,
        pointer_info: *mut *mut *mut ICoreWebView2PointerInfoVTable
    ) -> HRESULT; }
Expand description

A continuation of the ICoreWebView2Environment2 interface.

Required methods

Asynchronously create a new WebView for use with visual hosting.

parentWindow is the HWND in which the app will connect the visual tree of the WebView. This will be the HWND that the app will receive pointer/ mouse input meant for the WebView (and will need to use SendMouseInput/ SendPointerInput to forward). If the app moves the WebView visual tree to underneath a different window, then it needs to call put_ParentWindow to update the new parent HWND of the visual tree.

Use put_RootVisualTarget on the created CoreWebView2CompositionController to provide a visual to host the browser’s visual tree.

It is recommended that the application set Application User Model ID for the process or the application window. If none is set, during WebView creation a generated Application User Model ID is set to root window of parentWindow. \snippet AppWindow.cpp CreateCoreWebView2Controller

It is recommended that the application handles restart manager messages so that it can be restarted gracefully in the case when the app is using Edge for WebView from a certain installation and that installation is being uninstalled. For example, if a user installs Edge from Dev channel and opts to use Edge from that channel for testing the app, and then uninstalls Edge from that channel without closing the app, the app will be restarted to allow uninstallation of the dev channel to succeed. \snippet AppWindow.cpp RestartManager

Create an empty ICoreWebView2PointerInfo. The returned ICoreWebView2PointerInfo needs to be populated with all of the relevant info before calling SendPointerInput.

Trait Implementations

A COM compatible V-Table

The interface that this interface inherits from

The associated id for this interface

Check whether a given IID is in the inheritance hierarchy of this interface

Get the vtable for a particular COM interface

Implementations on Foreign Types

Implementors