ICoreWebView2Environment3

Trait ICoreWebView2Environment3 

Source
pub trait ICoreWebView2Environment3: ICoreWebView2Environment2 {
    // Required methods
    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§

Source

unsafe fn create_core_web_view2_composition_controller( &self, parent_window: HWND, handler: *mut *mut ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandlerVTable, ) -> HRESULT

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

Source

unsafe fn create_core_web_view2_pointer_info( &self, pointer_info: *mut *mut *mut ICoreWebView2PointerInfoVTable, ) -> HRESULT

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

Trait Implementations§

Source§

impl ComInterface for dyn ICoreWebView2Environment3

Source§

const IID: IID = IID_ICORE_WEB_VIEW2_ENVIRONMENT3

The associated id for this interface
Source§

type VTable = ICoreWebView2Environment3VTable

A COM compatible V-Table
Source§

type Super = dyn ICoreWebView2Environment2

The interface that this interface inherits from
Source§

fn is_iid_in_inheritance_chain(riid: &GUID) -> bool

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

impl<C: ICoreWebView2Environment3> ProductionComInterface<C> for dyn ICoreWebView2Environment3

Source§

fn vtable<O: Offset>() -> Self::VTable

Get the vtable for a particular COM interface

Implementations on Foreign Types§

Source§

impl<T: ICoreWebView2Environment3 + ComInterface + ?Sized> ICoreWebView2Environment3 for ComPtr<T>

Source§

impl<T: ICoreWebView2Environment3 + ComInterface + ?Sized> ICoreWebView2Environment3 for ComRc<T>

Implementors§