ICoreWebView2Settings5

Trait ICoreWebView2Settings5 

Source
pub trait ICoreWebView2Settings5: ICoreWebView2Settings4 {
    // Required methods
    unsafe fn get_is_pinch_zoom_enabled(&self, enabled: *mut BOOL) -> HRESULT;
    unsafe fn put_is_pinch_zoom_enabled(&self, enabled: BOOL) -> HRESULT;
}
Expand description

A continuation of the ICoreWebView2Settings interface to manage pinch zoom.

Required Methods§

Source

unsafe fn get_is_pinch_zoom_enabled(&self, enabled: *mut BOOL) -> HRESULT

Pinch-zoom, referred to as “Page Scale” zoom, is performed as a post-rendering step, it changes the page scale factor property and scales the surface the web page is rendered onto when user performs a pinch zooming action. It does not change the layout but rather changes the viewport and clips the web content, the content outside of the viewport isn’t visible onscreen and users can’t reach this content using mouse.

The IsPinchZoomEnabled property enables or disables the ability of the end user to use a pinching motion on touch input enabled devices to scale the web content in the WebView2. It defaults to TRUE. When set to FALSE, the end user cannot pinch zoom after the next navigation. Disabling/Enabling IsPinchZoomEnabled only affects the end user’s ability to use pinch motions and does not change the page scale factor. This API only affects the Page Scale zoom and has no effect on the existing browser zoom properties (IsZoomControlEnabled and ZoomFactor) or other end user mechanisms for zooming.

\snippet SettingsComponent.cpp TogglePinchZoomEnabled

Source

unsafe fn put_is_pinch_zoom_enabled(&self, enabled: BOOL) -> HRESULT

Set the IsPinchZoomEnabled property

Trait Implementations§

Source§

impl ComInterface for dyn ICoreWebView2Settings5

Source§

const IID: IID = IID_ICORE_WEB_VIEW2_SETTINGS5

The associated id for this interface
Source§

type VTable = ICoreWebView2Settings5VTable

A COM compatible V-Table
Source§

type Super = dyn ICoreWebView2Settings4

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: ICoreWebView2Settings5> ProductionComInterface<C> for dyn ICoreWebView2Settings5

Source§

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

Get the vtable for a particular COM interface

Implementations on Foreign Types§

Source§

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

Source§

unsafe fn get_is_pinch_zoom_enabled(&self, enabled: *mut BOOL) -> HRESULT

Source§

unsafe fn put_is_pinch_zoom_enabled(&self, enabled: BOOL) -> HRESULT

Source§

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

Source§

unsafe fn get_is_pinch_zoom_enabled(&self, enabled: *mut BOOL) -> HRESULT

Source§

unsafe fn put_is_pinch_zoom_enabled(&self, enabled: BOOL) -> HRESULT

Implementors§