Trait webview2_sys::ICoreWebView2Controller2 [−][src]
pub trait ICoreWebView2Controller2: ICoreWebView2Controller { unsafe fn get_default_background_color(
&self,
background_color: *mut Color
) -> HRESULT; unsafe fn put_default_background_color(
&self,
background_color: Color
) -> HRESULT; }
A continuation of the ICoreWebView2Controller interface
Required methods
unsafe fn get_default_background_color(
&self,
background_color: *mut Color
) -> HRESULT
[src]
&self,
background_color: *mut Color
) -> HRESULT
The DefaultBackgroundColor
property allows developers to set the color
that shows when WebView has not loaded any web content and when a webpage
does not specify a background color. Color is specified by the
COREWEBVIEW2_COLOR value meaning the background color can also be
transparent.
The WebView background color will show before the initial navigation,
between navigations before the next page has rendered, and for pages with
no background
style properties set. To clarify the latter case, WebView
will always honor a webpage’s background content. DefaultBackgroundColor
will only show in the absence of css background
style properties. In
that case, WebView will render web content over the
DefaultBackgroundColor
color. For a transparent background, web content
will render over hosting app content. WebView’s default background color
is white to resemble the browser experience.
It is important to note that while COREWEBVIEW2_COLOR has A
an alpha
value, semi-transparent colors are not supported by this API and setting
DefaultBackgroundColor
to a semi-transparent color will fail with
E_INVALIDARG. The only supported alpha values are 0 and 255, all other
values will result in E_INVALIDARG.
DefaultBackgroundColor
can only be an opaque color or transparent.
The DefaultBackgroundColor
property enables a smoother UI experience.
Developers can choose the color that shows between loading pages and
eliminate any ‘white flash.’ For websites with no specified
background color, developers can display web contents over a color of
their choosing. They can also do away with the background color entirely
with transparency and have the ‘in between pages color’ just be hosting
content, or have hosting app content be the backdrop for webpages without
a background color specified.
\snippet ViewComponent.cpp DefaultBackgroundColor
unsafe fn put_default_background_color(
&self,
background_color: Color
) -> HRESULT
[src]
&self,
background_color: Color
) -> HRESULT
Sets the DefaultBackgroundColor
property.
Trait Implementations
impl ComInterface for dyn ICoreWebView2Controller2
[src]
impl ComInterface for dyn ICoreWebView2Controller2
[src]type VTable = ICoreWebView2Controller2VTable
A COM compatible V-Table
type Super = dyn ICoreWebView2Controller
The interface that this interface inherits from
const IID: IID
[src]
pub fn is_iid_in_inheritance_chain(riid: &GUID) -> bool
[src]
impl<C: ICoreWebView2Controller2> ProductionComInterface<C> for dyn ICoreWebView2Controller2
[src]
impl<C: ICoreWebView2Controller2> ProductionComInterface<C> for dyn ICoreWebView2Controller2
[src]Implementations on Foreign Types
impl<T: ICoreWebView2Controller2 + ComInterface + ?Sized> ICoreWebView2Controller2 for ComRc<T>
[src]
impl<T: ICoreWebView2Controller2 + ComInterface + ?Sized> ICoreWebView2Controller2 for ComRc<T>
[src]unsafe fn get_default_background_color(
&self,
background_color: *mut Color
) -> HRESULT
[src]
&self,
background_color: *mut Color
) -> HRESULT
unsafe fn put_default_background_color(
&self,
background_color: Color
) -> HRESULT
[src]
&self,
background_color: Color
) -> HRESULT
impl<T: ICoreWebView2Controller2 + ComInterface + ?Sized> ICoreWebView2Controller2 for ComPtr<T>
[src]
impl<T: ICoreWebView2Controller2 + ComInterface + ?Sized> ICoreWebView2Controller2 for ComPtr<T>
[src]unsafe fn get_default_background_color(
&self,
background_color: *mut Color
) -> HRESULT
[src]
&self,
background_color: *mut Color
) -> HRESULT
unsafe fn put_default_background_color(
&self,
background_color: Color
) -> HRESULT
[src]
&self,
background_color: Color
) -> HRESULT