#![allow(
non_snake_case,
non_upper_case_globals,
non_camel_case_types,
clippy::all
)]
#[inline]
pub unsafe fn CompareBrowserVersions<P0, P1>(
version1: P0,
version2: P1,
result: *mut i32,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
#[cfg_attr(
target_env = "msvc",
link(name = "WebView2LoaderStatic", kind = "static")
)]
#[cfg_attr(not(target_env = "msvc"), link(name = "WebView2Loader"))]
extern "system" {
fn CompareBrowserVersions(
version1: ::windows::core::PCWSTR,
version2: ::windows::core::PCWSTR,
result: *mut i32,
) -> ::windows::core::HRESULT;
}
CompareBrowserVersions(version1.into().abi(), version2.into().abi(), result).ok()
}
#[inline]
pub unsafe fn CreateCoreWebView2Environment<P0>(
environmentcreatedhandler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>,
>,
{
#[cfg_attr(
target_env = "msvc",
link(name = "WebView2LoaderStatic", kind = "static")
)]
#[cfg_attr(not(target_env = "msvc"), link(name = "WebView2Loader"))]
extern "system" {
fn CreateCoreWebView2Environment(
environmentcreatedhandler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT;
}
CreateCoreWebView2Environment(environmentcreatedhandler.into().abi()).ok()
}
#[inline]
pub unsafe fn CreateCoreWebView2EnvironmentWithOptions<P0, P1, P2, P3>(
browserexecutablefolder: P0,
userdatafolder: P1,
environmentoptions: P2,
environmentcreatedhandler: P3,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2EnvironmentOptions>>,
P3: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>,
>,
{
#[cfg_attr(
target_env = "msvc",
link(name = "WebView2LoaderStatic", kind = "static")
)]
#[cfg_attr(not(target_env = "msvc"), link(name = "WebView2Loader"))]
extern "system" {
fn CreateCoreWebView2EnvironmentWithOptions(
browserexecutablefolder: ::windows::core::PCWSTR,
userdatafolder: ::windows::core::PCWSTR,
environmentoptions: *mut ::core::ffi::c_void,
environmentcreatedhandler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT;
}
CreateCoreWebView2EnvironmentWithOptions(
browserexecutablefolder.into().abi(),
userdatafolder.into().abi(),
environmentoptions.into().abi(),
environmentcreatedhandler.into().abi(),
)
.ok()
}
#[inline]
pub unsafe fn GetAvailableCoreWebView2BrowserVersionString<P0>(
browserexecutablefolder: P0,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
#[cfg_attr(
target_env = "msvc",
link(name = "WebView2LoaderStatic", kind = "static")
)]
#[cfg_attr(not(target_env = "msvc"), link(name = "WebView2Loader"))]
extern "system" {
fn GetAvailableCoreWebView2BrowserVersionString(
browserexecutablefolder: ::windows::core::PCWSTR,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT;
}
GetAvailableCoreWebView2BrowserVersionString(browserexecutablefolder.into().abi(), versioninfo)
.ok()
}
#[repr(transparent)]
pub struct ICoreWebView2(::windows::core::IUnknown);
impl ICoreWebView2 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Settings)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).Navigate)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
)
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self).AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Reload)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).BrowserProcessId)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).CanGoBack)(
::windows::core::Vtable::as_raw(self),
cangoback,
)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).CanGoForward)(
::windows::core::Vtable::as_raw(self),
cangoforward,
)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).GoBack)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Stop)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DocumentTitle)(
::windows::core::Vtable::as_raw(self),
title,
)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).OpenDevToolsWindow)(::windows::core::Vtable::as_raw(
self,
))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2 {}
impl ::core::fmt::Debug for ICoreWebView2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2 {
type Vtable = ICoreWebView2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x76eceacb_0462_4d94_ac83_423a6793775e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Settings: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
settings: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Source: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Navigate: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub NavigateToString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
htmlcontent: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub add_NavigationStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_NavigationStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_ContentLoading: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ContentLoading: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_SourceChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_SourceChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_HistoryChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_HistoryChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_NavigationCompleted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_NavigationCompleted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_FrameNavigationStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_FrameNavigationStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_FrameNavigationCompleted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_FrameNavigationCompleted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_ScriptDialogOpening: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ScriptDialogOpening: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_PermissionRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_PermissionRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_ProcessFailed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ProcessFailed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub AddScriptToExecuteOnDocumentCreated: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
javascript: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
)
-> ::windows::core::HRESULT,
pub RemoveScriptToExecuteOnDocumentCreated:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
id: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub ExecuteScript: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
javascript: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub CapturePreview: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Reload:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub PostWebMessageAsJson: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
webmessageasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub PostWebMessageAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
webmessageasstring: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub add_WebMessageReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_WebMessageReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub CallDevToolsProtocolMethod: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
methodname: ::windows::core::PCWSTR,
parametersasjson: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub BrowserProcessId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub CanGoBack: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub CanGoForward: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GoBack:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub GoForward:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub GetDevToolsProtocolEventReceiver: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventname: ::windows::core::PCWSTR,
receiver: *mut *mut ::core::ffi::c_void,
)
-> ::windows::core::HRESULT,
pub Stop: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub add_NewWindowRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_NewWindowRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_DocumentTitleChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_DocumentTitleChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub DocumentTitle: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub AddHostObjectToScript: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::HRESULT,
pub RemoveHostObjectFromScript: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub OpenDevToolsWindow:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub add_ContainsFullScreenElementChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub remove_ContainsFullScreenElementChanged:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub ContainsFullScreenElement: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub add_WebResourceRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_WebResourceRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub AddWebResourceRequestedFilter: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::HRESULT,
pub RemoveWebResourceRequestedFilter: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
)
-> ::windows::core::HRESULT,
pub add_WindowCloseRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_WindowCloseRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2AcceleratorKeyPressedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2AcceleratorKeyPressedEventArgs {
pub unsafe fn KeyEventKind(
&self,
keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).KeyEventKind)(
::windows::core::Vtable::as_raw(self),
keyeventkind,
)
.ok()
}
pub unsafe fn VirtualKey(&self, virtualkey: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).VirtualKey)(
::windows::core::Vtable::as_raw(self),
virtualkey,
)
.ok()
}
pub unsafe fn KeyEventLParam(&self, lparam: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).KeyEventLParam)(
::windows::core::Vtable::as_raw(self),
lparam,
)
.ok()
}
pub unsafe fn PhysicalKeyStatus(
&self,
physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PhysicalKeyStatus)(
::windows::core::Vtable::as_raw(self),
physicalkeystatus,
)
.ok()
}
pub unsafe fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Handled)(
::windows::core::Vtable::as_raw(self),
handled,
)
.ok()
}
pub unsafe fn SetHandled<P0>(&self, handled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetHandled)(
::windows::core::Vtable::as_raw(self),
handled.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2AcceleratorKeyPressedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2AcceleratorKeyPressedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2AcceleratorKeyPressedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2AcceleratorKeyPressedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2AcceleratorKeyPressedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2AcceleratorKeyPressedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2AcceleratorKeyPressedEventArgs {
type Vtable = ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2AcceleratorKeyPressedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x9f760f8a_fb79_42be_9990_7b56900fa9c7);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub KeyEventKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
) -> ::windows::core::HRESULT,
pub VirtualKey: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
virtualkey: *mut u32,
) -> ::windows::core::HRESULT,
pub KeyEventLParam: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
lparam: *mut i32,
) -> ::windows::core::HRESULT,
pub PhysicalKeyStatus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
) -> ::windows::core::HRESULT,
pub Handled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetHandled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2AcceleratorKeyPressedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2AcceleratorKeyPressedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Controller>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2AcceleratorKeyPressedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2AcceleratorKeyPressedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2AcceleratorKeyPressedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2AcceleratorKeyPressedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2AcceleratorKeyPressedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2AcceleratorKeyPressedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2AcceleratorKeyPressedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2AcceleratorKeyPressedEventHandler {
type Vtable = ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2AcceleratorKeyPressedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb29c7e28_fa79_41a8_8e44_65811c76dcb2);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler(
::windows::core::IUnknown,
);
impl ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
id.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable
for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler
{
type Vtable = ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb99369f3_9b11_47b5_bc6f_8e7895fcea17);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
id: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2BasicAuthenticationRequestedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2BasicAuthenticationRequestedEventArgs {
pub unsafe fn Uri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Uri)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Challenge(
&self,
challenge: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Challenge)(
::windows::core::Vtable::as_raw(self),
challenge,
)
.ok()
}
pub unsafe fn Response(
&self,
) -> ::windows::core::Result<ICoreWebView2BasicAuthenticationResponse> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Response)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Cancel(
&self,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Cancel)(
::windows::core::Vtable::as_raw(self),
cancel,
)
.ok()
}
pub unsafe fn SetCancel<P0>(&self, cancel: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetCancel)(
::windows::core::Vtable::as_raw(self),
cancel.into(),
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2BasicAuthenticationRequestedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2BasicAuthenticationRequestedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2BasicAuthenticationRequestedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2BasicAuthenticationRequestedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2BasicAuthenticationRequestedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2BasicAuthenticationRequestedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2BasicAuthenticationRequestedEventArgs {
type Vtable = ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2BasicAuthenticationRequestedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xef05516f_d897_4f9e_b672_d8e2307a3fb0);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Uri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Challenge: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
challenge: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Response: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Cancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetCancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cancel: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2BasicAuthenticationRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2BasicAuthenticationRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2BasicAuthenticationRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2BasicAuthenticationRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2BasicAuthenticationRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2BasicAuthenticationRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2BasicAuthenticationRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2BasicAuthenticationRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2BasicAuthenticationRequestedEventHandler {
type Vtable = ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2BasicAuthenticationRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x58b4d6c2_18d4_497e_b39b_9a96533fa278);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2BasicAuthenticationResponse(::windows::core::IUnknown);
impl ICoreWebView2BasicAuthenticationResponse {
pub unsafe fn UserName(
&self,
username: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).UserName)(
::windows::core::Vtable::as_raw(self),
username,
)
.ok()
}
pub unsafe fn SetUserName<P0>(&self, username: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetUserName)(
::windows::core::Vtable::as_raw(self),
username.into().abi(),
)
.ok()
}
pub unsafe fn Password(
&self,
password: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Password)(
::windows::core::Vtable::as_raw(self),
password,
)
.ok()
}
pub unsafe fn SetPassword<P0>(&self, password: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetPassword)(
::windows::core::Vtable::as_raw(self),
password.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2BasicAuthenticationResponse,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2BasicAuthenticationResponse {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2BasicAuthenticationResponse {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2BasicAuthenticationResponse {}
impl ::core::fmt::Debug for ICoreWebView2BasicAuthenticationResponse {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2BasicAuthenticationResponse")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2BasicAuthenticationResponse {
type Vtable = ICoreWebView2BasicAuthenticationResponse_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2BasicAuthenticationResponse {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x07023f7d_2d77_4d67_9040_6e7d428c6a40);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2BasicAuthenticationResponse_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub UserName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
username: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetUserName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
username: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub Password: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
password: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetPassword: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
password: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2BrowserProcessExitedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2BrowserProcessExitedEventArgs {
pub unsafe fn BrowserProcessExitKind(
&self,
browserprocessexitkind: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).BrowserProcessExitKind)(
::windows::core::Vtable::as_raw(self),
browserprocessexitkind,
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).BrowserProcessId)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2BrowserProcessExitedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2BrowserProcessExitedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2BrowserProcessExitedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2BrowserProcessExitedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2BrowserProcessExitedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2BrowserProcessExitedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2BrowserProcessExitedEventArgs {
type Vtable = ICoreWebView2BrowserProcessExitedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2BrowserProcessExitedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x1f00663f_af8c_4782_9cdd_dd01c52e34cb);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2BrowserProcessExitedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub BrowserProcessExitKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
browserprocessexitkind: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
) -> ::windows::core::HRESULT,
pub BrowserProcessId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2BrowserProcessExitedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2BrowserProcessExitedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Environment>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2BrowserProcessExitedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2BrowserProcessExitedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2BrowserProcessExitedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2BrowserProcessExitedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2BrowserProcessExitedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2BrowserProcessExitedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2BrowserProcessExitedEventHandler {
type Vtable = ICoreWebView2BrowserProcessExitedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2BrowserProcessExitedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xfa504257_a216_4911_a860_fe8825712861);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2BrowserProcessExitedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2BytesReceivedChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2BytesReceivedChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2DownloadOperation>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2BytesReceivedChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2BytesReceivedChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2BytesReceivedChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2BytesReceivedChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2BytesReceivedChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2BytesReceivedChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2BytesReceivedChangedEventHandler {
type Vtable = ICoreWebView2BytesReceivedChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2BytesReceivedChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x828e8ab6_d94c_4264_9cef_5217170d6251);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2BytesReceivedChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CallDevToolsProtocolMethodCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
returnobjectasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
returnobjectasjson.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CallDevToolsProtocolMethodCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CallDevToolsProtocolMethodCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
type Vtable = ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x5c4889f0_5ef6_4c5a_952c_d8f1b92d0574);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
returnobjectasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CapturePreviewCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2CapturePreviewCompletedHandler {
pub unsafe fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CapturePreviewCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CapturePreviewCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CapturePreviewCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CapturePreviewCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2CapturePreviewCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CapturePreviewCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CapturePreviewCompletedHandler {
type Vtable = ICoreWebView2CapturePreviewCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CapturePreviewCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x697e05e9_3d8f_45fa_96f4_8ffe1ededaf5);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CapturePreviewCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Certificate(::windows::core::IUnknown);
impl ICoreWebView2Certificate {
pub unsafe fn Subject(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Subject)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Issuer(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Issuer)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn ValidFrom(&self, value: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ValidFrom)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ValidTo(&self, value: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ValidTo)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn DerEncodedSerialNumber(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DerEncodedSerialNumber)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn DisplayName(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DisplayName)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ToPemEncoding(
&self,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ToPemEncoding)(
::windows::core::Vtable::as_raw(self),
pemencodeddata,
)
.ok()
}
pub unsafe fn PemEncodedIssuerCertificateChain(
&self,
) -> ::windows::core::Result<ICoreWebView2StringCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).PemEncodedIssuerCertificateChain)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Certificate, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Certificate {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Certificate {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Certificate {}
impl ::core::fmt::Debug for ICoreWebView2Certificate {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Certificate")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Certificate {
type Vtable = ICoreWebView2Certificate_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Certificate {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xc5fb2fce_1cac_4aee_9c79_5ed0362eaae0);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Certificate_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Subject: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Issuer: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ValidFrom: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT,
pub ValidTo: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT,
pub DerEncodedSerialNumber: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub DisplayName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ToPemEncoding: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub PemEncodedIssuerCertificateChain: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ClearBrowsingDataCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2ClearBrowsingDataCompletedHandler {
pub unsafe fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ClearBrowsingDataCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ClearBrowsingDataCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ClearBrowsingDataCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ClearBrowsingDataCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2ClearBrowsingDataCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ClearBrowsingDataCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ClearBrowsingDataCompletedHandler {
type Vtable = ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ClearBrowsingDataCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe9710a06_1d1d_49b2_8234_226f35846ae5);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler(
::windows::core::IUnknown,
);
impl ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {
pub unsafe fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable
for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler
{
type Vtable = ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x3b40aac6_acfe_4ffd_8211_f607b96e2d5b);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ClientCertificate(::windows::core::IUnknown);
impl ICoreWebView2ClientCertificate {
pub unsafe fn Subject(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Subject)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Issuer(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Issuer)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn ValidFrom(&self, value: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ValidFrom)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ValidTo(&self, value: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ValidTo)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn DerEncodedSerialNumber(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DerEncodedSerialNumber)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn DisplayName(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DisplayName)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ToPemEncoding(
&self,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ToPemEncoding)(
::windows::core::Vtable::as_raw(self),
pemencodeddata,
)
.ok()
}
pub unsafe fn PemEncodedIssuerCertificateChain(
&self,
) -> ::windows::core::Result<ICoreWebView2StringCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).PemEncodedIssuerCertificateChain)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Kind(
&self,
value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Kind)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2ClientCertificate, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2ClientCertificate {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ClientCertificate {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ClientCertificate {}
impl ::core::fmt::Debug for ICoreWebView2ClientCertificate {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ClientCertificate")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ClientCertificate {
type Vtable = ICoreWebView2ClientCertificate_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ClientCertificate {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe7188076_bcc3_11eb_8529_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ClientCertificate_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Subject: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Issuer: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ValidFrom: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT,
pub ValidTo: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT,
pub DerEncodedSerialNumber: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub DisplayName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ToPemEncoding: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub PemEncodedIssuerCertificateChain: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
)
-> ::windows::core::HRESULT,
pub Kind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ClientCertificateCollection(::windows::core::IUnknown);
impl ICoreWebView2ClientCertificateCollection {
pub unsafe fn Count(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Count)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn GetValueAtIndex(
&self,
index: u32,
) -> ::windows::core::Result<ICoreWebView2ClientCertificate> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetValueAtIndex)(
::windows::core::Vtable::as_raw(self),
index,
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ClientCertificateCollection,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ClientCertificateCollection {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ClientCertificateCollection {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ClientCertificateCollection {}
impl ::core::fmt::Debug for ICoreWebView2ClientCertificateCollection {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ClientCertificateCollection")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ClientCertificateCollection {
type Vtable = ICoreWebView2ClientCertificateCollection_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ClientCertificateCollection {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xef5674d2_bcc3_11eb_8529_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ClientCertificateCollection_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Count: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub GetValueAtIndex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
certificate: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ClientCertificateRequestedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2ClientCertificateRequestedEventArgs {
pub unsafe fn Host(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Host)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Port(&self, value: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Port)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn IsProxy(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsProxy)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn AllowedCertificateAuthorities(
&self,
) -> ::windows::core::Result<ICoreWebView2StringCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).AllowedCertificateAuthorities)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn MutuallyTrustedCertificates(
&self,
) -> ::windows::core::Result<ICoreWebView2ClientCertificateCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).MutuallyTrustedCertificates)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SelectedCertificate(
&self,
) -> ::windows::core::Result<ICoreWebView2ClientCertificate> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).SelectedCertificate)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SetSelectedCertificate<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ClientCertificate>>,
{
(::windows::core::Vtable::vtable(self).SetSelectedCertificate)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn Cancel(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Cancel)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetCancel<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetCancel)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn Handled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Handled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetHandled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetHandled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ClientCertificateRequestedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ClientCertificateRequestedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ClientCertificateRequestedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ClientCertificateRequestedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2ClientCertificateRequestedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ClientCertificateRequestedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ClientCertificateRequestedEventArgs {
type Vtable = ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ClientCertificateRequestedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xbc59db28_bcc3_11eb_8529_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Host: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Port: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT,
pub IsProxy: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub AllowedCertificateAuthorities: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub MutuallyTrustedCertificates: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SelectedCertificate: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SetSelectedCertificate: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Cancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetCancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub Handled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetHandled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ClientCertificateRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ClientCertificateRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ClientCertificateRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ClientCertificateRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ClientCertificateRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ClientCertificateRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ClientCertificateRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ClientCertificateRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ClientCertificateRequestedEventHandler {
type Vtable = ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ClientCertificateRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xd7175ba2_bcc3_11eb_8529_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CompositionController(::windows::core::IUnknown);
impl ICoreWebView2CompositionController {
pub unsafe fn RootVisualTarget(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).RootVisualTarget)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SetRootVisualTarget<P0>(&self, target: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).SetRootVisualTarget)(
::windows::core::Vtable::as_raw(self),
target.into().abi(),
)
.ok()
}
pub unsafe fn SendMouseInput(
&self,
eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
mousedata: u32,
point: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SendMouseInput)(
::windows::core::Vtable::as_raw(self),
eventkind,
virtualkeys,
mousedata,
::core::mem::transmute(point),
)
.ok()
}
pub unsafe fn SendPointerInput<P0>(
&self,
eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
pointerinfo: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PointerInfo>>,
{
(::windows::core::Vtable::vtable(self).SendPointerInput)(
::windows::core::Vtable::as_raw(self),
eventkind,
pointerinfo.into().abi(),
)
.ok()
}
pub unsafe fn Cursor(
&self,
cursor: *mut ::windows::Win32::UI::WindowsAndMessaging::HCURSOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Cursor)(
::windows::core::Vtable::as_raw(self),
cursor,
)
.ok()
}
pub unsafe fn SystemCursorId(&self, systemcursorid: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SystemCursorId)(
::windows::core::Vtable::as_raw(self),
systemcursorid,
)
.ok()
}
pub unsafe fn add_CursorChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2CursorChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_CursorChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_CursorChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_CursorChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CompositionController,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CompositionController {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CompositionController {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CompositionController {}
impl ::core::fmt::Debug for ICoreWebView2CompositionController {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CompositionController")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CompositionController {
type Vtable = ICoreWebView2CompositionController_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CompositionController {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x3df9b733_b9ae_4a15_86b4_eb9ee9826469);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CompositionController_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub RootVisualTarget: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
target: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SetRootVisualTarget: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
target: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SendMouseInput: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
mousedata: u32,
point: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub SendPointerInput: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
pointerinfo: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Cursor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cursor: *mut ::windows::Win32::UI::WindowsAndMessaging::HCURSOR,
) -> ::windows::core::HRESULT,
pub SystemCursorId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
systemcursorid: *mut u32,
) -> ::windows::core::HRESULT,
pub add_CursorChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_CursorChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CompositionController2(::windows::core::IUnknown);
impl ICoreWebView2CompositionController2 {
pub unsafe fn RootVisualTarget(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.RootVisualTarget)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn SetRootVisualTarget<P0>(&self, target: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetRootVisualTarget)(::windows::core::Vtable::as_raw(self), target.into().abi())
.ok()
}
pub unsafe fn SendMouseInput(
&self,
eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
mousedata: u32,
point: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SendMouseInput)(
::windows::core::Vtable::as_raw(self),
eventkind,
virtualkeys,
mousedata,
::core::mem::transmute(point),
)
.ok()
}
pub unsafe fn SendPointerInput<P0>(
&self,
eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
pointerinfo: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PointerInfo>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SendPointerInput)(
::windows::core::Vtable::as_raw(self),
eventkind,
pointerinfo.into().abi(),
)
.ok()
}
pub unsafe fn Cursor(
&self,
cursor: *mut ::windows::Win32::UI::WindowsAndMessaging::HCURSOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Cursor)(
::windows::core::Vtable::as_raw(self),
cursor,
)
.ok()
}
pub unsafe fn SystemCursorId(&self, systemcursorid: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SystemCursorId)(
::windows::core::Vtable::as_raw(self),
systemcursorid,
)
.ok()
}
pub unsafe fn add_CursorChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2CursorChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_CursorChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_CursorChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_CursorChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AutomationProvider(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).AutomationProvider)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CompositionController2,
::windows::core::IUnknown,
ICoreWebView2CompositionController
);
impl ::core::clone::Clone for ICoreWebView2CompositionController2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CompositionController2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CompositionController2 {}
impl ::core::fmt::Debug for ICoreWebView2CompositionController2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CompositionController2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CompositionController2 {
type Vtable = ICoreWebView2CompositionController2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CompositionController2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x0b6a3d24_49cb_4806_ba20_b5e0734a7b26);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CompositionController2_Vtbl {
pub base__: ICoreWebView2CompositionController_Vtbl,
pub AutomationProvider: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
provider: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CompositionController3(::windows::core::IUnknown);
impl ICoreWebView2CompositionController3 {
pub unsafe fn RootVisualTarget(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.RootVisualTarget)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn SetRootVisualTarget<P0>(&self, target: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetRootVisualTarget)(::windows::core::Vtable::as_raw(self), target.into().abi())
.ok()
}
pub unsafe fn SendMouseInput(
&self,
eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
mousedata: u32,
point: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SendMouseInput)(
::windows::core::Vtable::as_raw(self),
eventkind,
virtualkeys,
mousedata,
::core::mem::transmute(point),
)
.ok()
}
pub unsafe fn SendPointerInput<P0>(
&self,
eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
pointerinfo: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PointerInfo>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SendPointerInput)(
::windows::core::Vtable::as_raw(self),
eventkind,
pointerinfo.into().abi(),
)
.ok()
}
pub unsafe fn Cursor(
&self,
cursor: *mut ::windows::Win32::UI::WindowsAndMessaging::HCURSOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Cursor)(
::windows::core::Vtable::as_raw(self),
cursor,
)
.ok()
}
pub unsafe fn SystemCursorId(&self, systemcursorid: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SystemCursorId)(::windows::core::Vtable::as_raw(self), systemcursorid)
.ok()
}
pub unsafe fn add_CursorChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2CursorChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_CursorChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_CursorChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_CursorChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AutomationProvider(&self) -> ::windows::core::Result<::windows::core::IUnknown> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.AutomationProvider)(
::windows::core::Vtable::as_raw(self), result__.as_mut_ptr()
)
.from_abi(result__)
}
pub unsafe fn DragEnter<P0>(
&self,
dataobject: P0,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<::windows::Win32::System::Com::IDataObject>,
>,
{
(::windows::core::Vtable::vtable(self).DragEnter)(
::windows::core::Vtable::as_raw(self),
dataobject.into().abi(),
keystate,
::core::mem::transmute(point),
effect,
)
.ok()
}
pub unsafe fn DragLeave(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DragLeave)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DragOver(
&self,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DragOver)(
::windows::core::Vtable::as_raw(self),
keystate,
::core::mem::transmute(point),
effect,
)
.ok()
}
pub unsafe fn Drop<P0>(
&self,
dataobject: P0,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<::windows::Win32::System::Com::IDataObject>,
>,
{
(::windows::core::Vtable::vtable(self).Drop)(
::windows::core::Vtable::as_raw(self),
dataobject.into().abi(),
keystate,
::core::mem::transmute(point),
effect,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CompositionController3,
::windows::core::IUnknown,
ICoreWebView2CompositionController,
ICoreWebView2CompositionController2
);
impl ::core::clone::Clone for ICoreWebView2CompositionController3 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CompositionController3 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CompositionController3 {}
impl ::core::fmt::Debug for ICoreWebView2CompositionController3 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CompositionController3")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CompositionController3 {
type Vtable = ICoreWebView2CompositionController3_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CompositionController3 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x9570570e_4d76_4361_9ee1_f04d0dbdfb1e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CompositionController3_Vtbl {
pub base__: ICoreWebView2CompositionController2_Vtbl,
pub DragEnter: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
dataobject: *mut ::core::ffi::c_void,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::HRESULT,
pub DragLeave:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub DragOver: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::HRESULT,
pub Drop: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
dataobject: *mut ::core::ffi::c_void,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContainsFullScreenElementChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ContainsFullScreenElementChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ContainsFullScreenElementChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ContainsFullScreenElementChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContainsFullScreenElementChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContainsFullScreenElementChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ContainsFullScreenElementChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContainsFullScreenElementChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContainsFullScreenElementChangedEventHandler {
type Vtable = ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2ContainsFullScreenElementChangedEventHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe45d98b1_afef_45be_8baf_6c7728867f73);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContentLoadingEventArgs(::windows::core::IUnknown);
impl ICoreWebView2ContentLoadingEventArgs {
pub unsafe fn IsErrorPage(
&self,
iserrorpage: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsErrorPage)(
::windows::core::Vtable::as_raw(self),
iserrorpage,
)
.ok()
}
pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).NavigationId)(
::windows::core::Vtable::as_raw(self),
navigationid,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ContentLoadingEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ContentLoadingEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContentLoadingEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContentLoadingEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2ContentLoadingEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContentLoadingEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContentLoadingEventArgs {
type Vtable = ICoreWebView2ContentLoadingEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ContentLoadingEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x0c8a1275_9b6b_4901_87ad_70df25bafa6e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContentLoadingEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub IsErrorPage: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
iserrorpage: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub NavigationId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContentLoadingEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ContentLoadingEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ContentLoadingEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ContentLoadingEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContentLoadingEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContentLoadingEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ContentLoadingEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContentLoadingEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContentLoadingEventHandler {
type Vtable = ICoreWebView2ContentLoadingEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ContentLoadingEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x364471e7_f2be_4910_bdba_d72077d51c4b);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContentLoadingEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContextMenuItem(::windows::core::IUnknown);
impl ICoreWebView2ContextMenuItem {
pub unsafe fn Name(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Name)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Label(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Label)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CommandId(&self, value: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).CommandId)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ShortcutKeyDescription(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShortcutKeyDescription)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Icon(&self) -> ::windows::core::Result<::windows::Win32::System::Com::IStream> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Icon)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Kind(
&self,
value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Kind)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsEnabled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn IsEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsEnabled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsChecked<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsChecked)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn IsChecked(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsChecked)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Children(
&self,
) -> ::windows::core::Result<ICoreWebView2ContextMenuItemCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Children)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_CustomItemSelected<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CustomItemSelectedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_CustomItemSelected)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_CustomItemSelected(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_CustomItemSelected)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2ContextMenuItem, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2ContextMenuItem {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContextMenuItem {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContextMenuItem {}
impl ::core::fmt::Debug for ICoreWebView2ContextMenuItem {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContextMenuItem")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContextMenuItem {
type Vtable = ICoreWebView2ContextMenuItem_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ContextMenuItem {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x7aed49e3_a93f_497a_811c_749c6b6b6c65);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContextMenuItem_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Name: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Label: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub CommandId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT,
pub ShortcutKeyDescription: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Icon: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Kind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
) -> ::windows::core::HRESULT,
pub SetIsEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsChecked: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsChecked: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub Children: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub add_CustomItemSelected: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_CustomItemSelected: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContextMenuItemCollection(::windows::core::IUnknown);
impl ICoreWebView2ContextMenuItemCollection {
pub unsafe fn Count(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Count)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn GetValueAtIndex(
&self,
index: u32,
) -> ::windows::core::Result<ICoreWebView2ContextMenuItem> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetValueAtIndex)(
::windows::core::Vtable::as_raw(self),
index,
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn RemoveValueAtIndex(&self, index: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).RemoveValueAtIndex)(
::windows::core::Vtable::as_raw(self),
index,
)
.ok()
}
pub unsafe fn InsertValueAtIndex<P0>(
&self,
index: u32,
value: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContextMenuItem>>,
{
(::windows::core::Vtable::vtable(self).InsertValueAtIndex)(
::windows::core::Vtable::as_raw(self),
index,
value.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ContextMenuItemCollection,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ContextMenuItemCollection {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContextMenuItemCollection {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContextMenuItemCollection {}
impl ::core::fmt::Debug for ICoreWebView2ContextMenuItemCollection {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContextMenuItemCollection")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContextMenuItemCollection {
type Vtable = ICoreWebView2ContextMenuItemCollection_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ContextMenuItemCollection {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf562a2f5_c415_45cf_b909_d4b7c1e276d3);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContextMenuItemCollection_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Count: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub GetValueAtIndex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub RemoveValueAtIndex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
) -> ::windows::core::HRESULT,
pub InsertValueAtIndex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
value: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContextMenuRequestedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2ContextMenuRequestedEventArgs {
pub unsafe fn MenuItems(
&self,
) -> ::windows::core::Result<ICoreWebView2ContextMenuItemCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).MenuItems)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn ContextMenuTarget(
&self,
) -> ::windows::core::Result<ICoreWebView2ContextMenuTarget> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).ContextMenuTarget)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Location(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Location)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetSelectedCommandId(&self, value: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetSelectedCommandId)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SelectedCommandId(&self, value: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SelectedCommandId)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetHandled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetHandled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn Handled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Handled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ContextMenuRequestedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ContextMenuRequestedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContextMenuRequestedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContextMenuRequestedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2ContextMenuRequestedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContextMenuRequestedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContextMenuRequestedEventArgs {
type Vtable = ICoreWebView2ContextMenuRequestedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ContextMenuRequestedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xa1d309ee_c03f_11eb_8529_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContextMenuRequestedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub MenuItems: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub ContextMenuTarget: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Location: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub SetSelectedCommandId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows::core::HRESULT,
pub SelectedCommandId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT,
pub SetHandled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub Handled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContextMenuRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ContextMenuRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContextMenuRequestedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ContextMenuRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ContextMenuRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContextMenuRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContextMenuRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ContextMenuRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContextMenuRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContextMenuRequestedEventHandler {
type Vtable = ICoreWebView2ContextMenuRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ContextMenuRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x04d3fe1d_ab87_42fb_a898_da241d35b63c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContextMenuRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ContextMenuTarget(::windows::core::IUnknown);
impl ICoreWebView2ContextMenuTarget {
pub unsafe fn Kind(
&self,
value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Kind)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn IsEditable(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsEditable)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn IsRequestedForMainFrame(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsRequestedForMainFrame)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn PageUri(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PageUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn FrameUri(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).FrameUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn HasLinkUri(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasLinkUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn LinkUri(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).LinkUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn HasLinkText(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasLinkText)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn LinkText(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).LinkText)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn HasSourceUri(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasSourceUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SourceUri(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SourceUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn HasSelection(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasSelection)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SelectionText(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SelectionText)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2ContextMenuTarget, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2ContextMenuTarget {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ContextMenuTarget {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ContextMenuTarget {}
impl ::core::fmt::Debug for ICoreWebView2ContextMenuTarget {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ContextMenuTarget")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ContextMenuTarget {
type Vtable = ICoreWebView2ContextMenuTarget_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ContextMenuTarget {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb8611d99_eed6_4f3f_902c_a198502ad472);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ContextMenuTarget_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Kind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
) -> ::windows::core::HRESULT,
pub IsEditable: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsRequestedForMainFrame: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub PageUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub FrameUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub HasLinkUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub LinkUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub HasLinkText: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub LinkText: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub HasSourceUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SourceUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub HasSelection: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SelectionText: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Controller(::windows::core::IUnknown);
impl ICoreWebView2Controller {
pub unsafe fn IsVisible(
&self,
isvisible: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsVisible)(
::windows::core::Vtable::as_raw(self),
isvisible,
)
.ok()
}
pub unsafe fn SetIsVisible<P0>(&self, isvisible: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsVisible)(
::windows::core::Vtable::as_raw(self),
isvisible.into(),
)
.ok()
}
pub unsafe fn Bounds(
&self,
bounds: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Bounds)(
::windows::core::Vtable::as_raw(self),
bounds,
)
.ok()
}
pub unsafe fn SetBounds(
&self,
bounds: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetBounds)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
)
.ok()
}
pub unsafe fn ZoomFactor(&self, zoomfactor: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ZoomFactor)(
::windows::core::Vtable::as_raw(self),
zoomfactor,
)
.ok()
}
pub unsafe fn SetZoomFactor(&self, zoomfactor: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetZoomFactor)(
::windows::core::Vtable::as_raw(self),
zoomfactor,
)
.ok()
}
pub unsafe fn add_ZoomFactorChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ZoomFactorChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ZoomFactorChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn SetBoundsAndZoomFactor(
&self,
bounds: ::windows::Win32::Foundation::RECT,
zoomfactor: f64,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetBoundsAndZoomFactor)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
zoomfactor,
)
.ok()
}
pub unsafe fn MoveFocus(
&self,
reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MoveFocus)(
::windows::core::Vtable::as_raw(self),
reason,
)
.ok()
}
pub unsafe fn add_MoveFocusRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2MoveFocusRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_MoveFocusRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_GotFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_GotFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_GotFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_GotFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_LostFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_LostFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_LostFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_LostFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_AcceleratorKeyPressed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2AcceleratorKeyPressedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_AcceleratorKeyPressed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ParentWindow(
&self,
parentwindow: *mut ::windows::Win32::Foundation::HWND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ParentWindow)(
::windows::core::Vtable::as_raw(self),
parentwindow,
)
.ok()
}
pub unsafe fn SetParentWindow<P0>(&self, parentwindow: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
(::windows::core::Vtable::vtable(self).SetParentWindow)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
)
.ok()
}
pub unsafe fn NotifyParentWindowPositionChanged(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).NotifyParentWindowPositionChanged)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
pub unsafe fn Close(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Close)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn CoreWebView2(&self) -> ::windows::core::Result<ICoreWebView2> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CoreWebView2)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Controller, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Controller {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Controller {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Controller {}
impl ::core::fmt::Debug for ICoreWebView2Controller {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Controller")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Controller {
type Vtable = ICoreWebView2Controller_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Controller {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4d00c0d1_9434_4eb6_8078_8697a560334f);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Controller_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub IsVisible: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isvisible: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsVisible: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isvisible: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub Bounds: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
bounds: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub SetBounds: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
bounds: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub ZoomFactor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
zoomfactor: *mut f64,
) -> ::windows::core::HRESULT,
pub SetZoomFactor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
zoomfactor: f64,
) -> ::windows::core::HRESULT,
pub add_ZoomFactorChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ZoomFactorChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub SetBoundsAndZoomFactor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
bounds: ::windows::Win32::Foundation::RECT,
zoomfactor: f64,
) -> ::windows::core::HRESULT,
pub MoveFocus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::HRESULT,
pub add_MoveFocusRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_MoveFocusRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_GotFocus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_GotFocus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_LostFocus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_LostFocus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_AcceleratorKeyPressed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_AcceleratorKeyPressed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub ParentWindow: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
parentwindow: *mut ::windows::Win32::Foundation::HWND,
) -> ::windows::core::HRESULT,
pub SetParentWindow: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
) -> ::windows::core::HRESULT,
pub NotifyParentWindowPositionChanged:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub Close:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub CoreWebView2: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
corewebview2: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Controller2(::windows::core::IUnknown);
impl ICoreWebView2Controller2 {
pub unsafe fn IsVisible(
&self,
isvisible: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsVisible)(
::windows::core::Vtable::as_raw(self),
isvisible,
)
.ok()
}
pub unsafe fn SetIsVisible<P0>(&self, isvisible: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).base__.SetIsVisible)(
::windows::core::Vtable::as_raw(self),
isvisible.into(),
)
.ok()
}
pub unsafe fn Bounds(
&self,
bounds: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Bounds)(
::windows::core::Vtable::as_raw(self),
bounds,
)
.ok()
}
pub unsafe fn SetBounds(
&self,
bounds: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetBounds)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
)
.ok()
}
pub unsafe fn ZoomFactor(&self, zoomfactor: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.ZoomFactor)(
::windows::core::Vtable::as_raw(self),
zoomfactor,
)
.ok()
}
pub unsafe fn SetZoomFactor(&self, zoomfactor: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetZoomFactor)(
::windows::core::Vtable::as_raw(self),
zoomfactor,
)
.ok()
}
pub unsafe fn add_ZoomFactorChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ZoomFactorChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ZoomFactorChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn SetBoundsAndZoomFactor(
&self,
bounds: ::windows::Win32::Foundation::RECT,
zoomfactor: f64,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.SetBoundsAndZoomFactor)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
zoomfactor,
)
.ok()
}
pub unsafe fn MoveFocus(
&self,
reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.MoveFocus)(
::windows::core::Vtable::as_raw(self),
reason,
)
.ok()
}
pub unsafe fn add_MoveFocusRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2MoveFocusRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_MoveFocusRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_GotFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).base__.add_GotFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_GotFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.remove_GotFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_LostFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).base__.add_LostFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_LostFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_LostFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_AcceleratorKeyPressed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2AcceleratorKeyPressedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_AcceleratorKeyPressed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ParentWindow(
&self,
parentwindow: *mut ::windows::Win32::Foundation::HWND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.ParentWindow)(
::windows::core::Vtable::as_raw(self),
parentwindow,
)
.ok()
}
pub unsafe fn SetParentWindow<P0>(&self, parentwindow: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
(::windows::core::Vtable::vtable(self).base__.SetParentWindow)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
)
.ok()
}
pub unsafe fn NotifyParentWindowPositionChanged(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.NotifyParentWindowPositionChanged)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn Close(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Close)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CoreWebView2(&self) -> ::windows::core::Result<ICoreWebView2> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.CoreWebView2)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn DefaultBackgroundColor(
&self,
backgroundcolor: *mut COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DefaultBackgroundColor)(
::windows::core::Vtable::as_raw(self),
backgroundcolor,
)
.ok()
}
pub unsafe fn SetDefaultBackgroundColor(
&self,
backgroundcolor: COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetDefaultBackgroundColor)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(backgroundcolor),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Controller2,
::windows::core::IUnknown,
ICoreWebView2Controller
);
impl ::core::clone::Clone for ICoreWebView2Controller2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Controller2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Controller2 {}
impl ::core::fmt::Debug for ICoreWebView2Controller2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Controller2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Controller2 {
type Vtable = ICoreWebView2Controller2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Controller2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xc979903e_d4ca_4228_92eb_47ee3fa96eab);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Controller2_Vtbl {
pub base__: ICoreWebView2Controller_Vtbl,
pub DefaultBackgroundColor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
backgroundcolor: *mut COREWEBVIEW2_COLOR,
) -> ::windows::core::HRESULT,
pub SetDefaultBackgroundColor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
backgroundcolor: COREWEBVIEW2_COLOR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Controller3(::windows::core::IUnknown);
impl ICoreWebView2Controller3 {
pub unsafe fn IsVisible(
&self,
isvisible: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsVisible)(::windows::core::Vtable::as_raw(self), isvisible)
.ok()
}
pub unsafe fn SetIsVisible<P0>(&self, isvisible: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsVisible)(::windows::core::Vtable::as_raw(self), isvisible.into())
.ok()
}
pub unsafe fn Bounds(
&self,
bounds: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Bounds)(
::windows::core::Vtable::as_raw(self),
bounds,
)
.ok()
}
pub unsafe fn SetBounds(
&self,
bounds: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetBounds)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
)
.ok()
}
pub unsafe fn ZoomFactor(&self, zoomfactor: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.ZoomFactor)(::windows::core::Vtable::as_raw(self), zoomfactor)
.ok()
}
pub unsafe fn SetZoomFactor(&self, zoomfactor: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetZoomFactor)(::windows::core::Vtable::as_raw(self), zoomfactor)
.ok()
}
pub unsafe fn add_ZoomFactorChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ZoomFactorChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ZoomFactorChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn SetBoundsAndZoomFactor(
&self,
bounds: ::windows::Win32::Foundation::RECT,
zoomfactor: f64,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetBoundsAndZoomFactor)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
zoomfactor,
)
.ok()
}
pub unsafe fn MoveFocus(
&self,
reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.MoveFocus)(::windows::core::Vtable::as_raw(self), reason)
.ok()
}
pub unsafe fn add_MoveFocusRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2MoveFocusRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_MoveFocusRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_GotFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_GotFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_GotFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_GotFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_LostFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_LostFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_LostFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_LostFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_AcceleratorKeyPressed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2AcceleratorKeyPressedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_AcceleratorKeyPressed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ParentWindow(
&self,
parentwindow: *mut ::windows::Win32::Foundation::HWND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.ParentWindow)(::windows::core::Vtable::as_raw(self), parentwindow)
.ok()
}
pub unsafe fn SetParentWindow<P0>(&self, parentwindow: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetParentWindow)(::windows::core::Vtable::as_raw(self), parentwindow.into())
.ok()
}
pub unsafe fn NotifyParentWindowPositionChanged(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.NotifyParentWindowPositionChanged)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn Close(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Close)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
pub unsafe fn CoreWebView2(&self) -> ::windows::core::Result<ICoreWebView2> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CoreWebView2)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn DefaultBackgroundColor(
&self,
backgroundcolor: *mut COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.DefaultBackgroundColor)(::windows::core::Vtable::as_raw(self), backgroundcolor)
.ok()
}
pub unsafe fn SetDefaultBackgroundColor(
&self,
backgroundcolor: COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.SetDefaultBackgroundColor)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(backgroundcolor),
)
.ok()
}
pub unsafe fn RasterizationScale(&self, scale: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).RasterizationScale)(
::windows::core::Vtable::as_raw(self),
scale,
)
.ok()
}
pub unsafe fn SetRasterizationScale(&self, scale: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetRasterizationScale)(
::windows::core::Vtable::as_raw(self),
scale,
)
.ok()
}
pub unsafe fn ShouldDetectMonitorScaleChanges(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldDetectMonitorScaleChanges)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetShouldDetectMonitorScaleChanges<P0>(
&self,
value: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetShouldDetectMonitorScaleChanges)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn add_RasterizationScaleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2RasterizationScaleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_RasterizationScaleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_RasterizationScaleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_RasterizationScaleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn BoundsMode(
&self,
boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).BoundsMode)(
::windows::core::Vtable::as_raw(self),
boundsmode,
)
.ok()
}
pub unsafe fn SetBoundsMode(
&self,
boundsmode: COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetBoundsMode)(
::windows::core::Vtable::as_raw(self),
boundsmode,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Controller3,
::windows::core::IUnknown,
ICoreWebView2Controller,
ICoreWebView2Controller2
);
impl ::core::clone::Clone for ICoreWebView2Controller3 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Controller3 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Controller3 {}
impl ::core::fmt::Debug for ICoreWebView2Controller3 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Controller3")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Controller3 {
type Vtable = ICoreWebView2Controller3_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Controller3 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf9614724_5d2b_41dc_aef7_73d62b51543b);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Controller3_Vtbl {
pub base__: ICoreWebView2Controller2_Vtbl,
pub RasterizationScale: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
scale: *mut f64,
) -> ::windows::core::HRESULT,
pub SetRasterizationScale: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
scale: f64,
) -> ::windows::core::HRESULT,
pub ShouldDetectMonitorScaleChanges: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetShouldDetectMonitorScaleChanges: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
)
-> ::windows::core::HRESULT,
pub add_RasterizationScaleChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_RasterizationScaleChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub BoundsMode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::HRESULT,
pub SetBoundsMode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
boundsmode: COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Controller4(::windows::core::IUnknown);
impl ICoreWebView2Controller4 {
pub unsafe fn IsVisible(
&self,
isvisible: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsVisible)(::windows::core::Vtable::as_raw(self), isvisible)
.ok()
}
pub unsafe fn SetIsVisible<P0>(&self, isvisible: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsVisible)(::windows::core::Vtable::as_raw(self), isvisible.into())
.ok()
}
pub unsafe fn Bounds(
&self,
bounds: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Bounds)(::windows::core::Vtable::as_raw(self), bounds)
.ok()
}
pub unsafe fn SetBounds(
&self,
bounds: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetBounds)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
)
.ok()
}
pub unsafe fn ZoomFactor(&self, zoomfactor: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.ZoomFactor)(::windows::core::Vtable::as_raw(self), zoomfactor)
.ok()
}
pub unsafe fn SetZoomFactor(&self, zoomfactor: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetZoomFactor)(::windows::core::Vtable::as_raw(self), zoomfactor)
.ok()
}
pub unsafe fn add_ZoomFactorChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ZoomFactorChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ZoomFactorChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ZoomFactorChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn SetBoundsAndZoomFactor(
&self,
bounds: ::windows::Win32::Foundation::RECT,
zoomfactor: f64,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetBoundsAndZoomFactor)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(bounds),
zoomfactor,
)
.ok()
}
pub unsafe fn MoveFocus(
&self,
reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.MoveFocus)(::windows::core::Vtable::as_raw(self), reason)
.ok()
}
pub unsafe fn add_MoveFocusRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2MoveFocusRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_MoveFocusRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_MoveFocusRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_GotFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_GotFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_GotFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_GotFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_LostFocus<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FocusChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_LostFocus)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_LostFocus(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_LostFocus)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_AcceleratorKeyPressed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2AcceleratorKeyPressedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_AcceleratorKeyPressed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_AcceleratorKeyPressed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ParentWindow(
&self,
parentwindow: *mut ::windows::Win32::Foundation::HWND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.ParentWindow)(::windows::core::Vtable::as_raw(self), parentwindow)
.ok()
}
pub unsafe fn SetParentWindow<P0>(&self, parentwindow: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetParentWindow)(::windows::core::Vtable::as_raw(self), parentwindow.into())
.ok()
}
pub unsafe fn NotifyParentWindowPositionChanged(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.NotifyParentWindowPositionChanged)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn Close(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Close)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CoreWebView2(&self) -> ::windows::core::Result<ICoreWebView2> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CoreWebView2)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn DefaultBackgroundColor(
&self,
backgroundcolor: *mut COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.DefaultBackgroundColor)(::windows::core::Vtable::as_raw(self), backgroundcolor)
.ok()
}
pub unsafe fn SetDefaultBackgroundColor(
&self,
backgroundcolor: COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetDefaultBackgroundColor)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(backgroundcolor),
)
.ok()
}
pub unsafe fn RasterizationScale(&self, scale: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.RasterizationScale)(::windows::core::Vtable::as_raw(self), scale)
.ok()
}
pub unsafe fn SetRasterizationScale(&self, scale: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.SetRasterizationScale)(::windows::core::Vtable::as_raw(self), scale)
.ok()
}
pub unsafe fn ShouldDetectMonitorScaleChanges(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.ShouldDetectMonitorScaleChanges)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetShouldDetectMonitorScaleChanges<P0>(
&self,
value: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetShouldDetectMonitorScaleChanges)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn add_RasterizationScaleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2RasterizationScaleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_RasterizationScaleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_RasterizationScaleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_RasterizationScaleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn BoundsMode(
&self,
boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.BoundsMode)(
::windows::core::Vtable::as_raw(self),
boundsmode,
)
.ok()
}
pub unsafe fn SetBoundsMode(
&self,
boundsmode: COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetBoundsMode)(
::windows::core::Vtable::as_raw(self),
boundsmode,
)
.ok()
}
pub unsafe fn AllowExternalDrop(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AllowExternalDrop)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetAllowExternalDrop<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetAllowExternalDrop)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Controller4,
::windows::core::IUnknown,
ICoreWebView2Controller,
ICoreWebView2Controller2,
ICoreWebView2Controller3
);
impl ::core::clone::Clone for ICoreWebView2Controller4 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Controller4 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Controller4 {}
impl ::core::fmt::Debug for ICoreWebView2Controller4 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Controller4")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Controller4 {
type Vtable = ICoreWebView2Controller4_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Controller4 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x97d418d5_a426_4e49_a151_e1a10f327d9e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Controller4_Vtbl {
pub base__: ICoreWebView2Controller3_Vtbl,
pub AllowExternalDrop: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetAllowExternalDrop: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ControllerOptions(::windows::core::IUnknown);
impl ICoreWebView2ControllerOptions {
pub unsafe fn ProfileName(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ProfileName)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetProfileName<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetProfileName)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn IsInPrivateModeEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsInPrivateModeEnabled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsInPrivateModeEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsInPrivateModeEnabled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2ControllerOptions, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2ControllerOptions {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ControllerOptions {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ControllerOptions {}
impl ::core::fmt::Debug for ICoreWebView2ControllerOptions {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ControllerOptions")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ControllerOptions {
type Vtable = ICoreWebView2ControllerOptions_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ControllerOptions {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x12aae616_8ccb_44ec_bcb3_eb1831881635);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ControllerOptions_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub ProfileName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetProfileName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub IsInPrivateModeEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsInPrivateModeEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Cookie(::windows::core::IUnknown);
impl ICoreWebView2Cookie {
pub unsafe fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Name)(::windows::core::Vtable::as_raw(self), name)
.ok()
}
pub unsafe fn Value(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Value)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetValue<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetValue)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn Domain(
&self,
domain: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Domain)(
::windows::core::Vtable::as_raw(self),
domain,
)
.ok()
}
pub unsafe fn Path(&self, path: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Path)(::windows::core::Vtable::as_raw(self), path)
.ok()
}
pub unsafe fn Expires(&self, expires: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Expires)(
::windows::core::Vtable::as_raw(self),
expires,
)
.ok()
}
pub unsafe fn SetExpires(&self, expires: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetExpires)(
::windows::core::Vtable::as_raw(self),
expires,
)
.ok()
}
pub unsafe fn IsHttpOnly(
&self,
ishttponly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsHttpOnly)(
::windows::core::Vtable::as_raw(self),
ishttponly,
)
.ok()
}
pub unsafe fn SetIsHttpOnly<P0>(&self, ishttponly: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsHttpOnly)(
::windows::core::Vtable::as_raw(self),
ishttponly.into(),
)
.ok()
}
pub unsafe fn SameSite(
&self,
samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SameSite)(
::windows::core::Vtable::as_raw(self),
samesite,
)
.ok()
}
pub unsafe fn SetSameSite(
&self,
samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetSameSite)(
::windows::core::Vtable::as_raw(self),
samesite,
)
.ok()
}
pub unsafe fn IsSecure(
&self,
issecure: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsSecure)(
::windows::core::Vtable::as_raw(self),
issecure,
)
.ok()
}
pub unsafe fn SetIsSecure<P0>(&self, issecure: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsSecure)(
::windows::core::Vtable::as_raw(self),
issecure.into(),
)
.ok()
}
pub unsafe fn IsSession(
&self,
issession: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsSession)(
::windows::core::Vtable::as_raw(self),
issession,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Cookie, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Cookie {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Cookie {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Cookie {}
impl ::core::fmt::Debug for ICoreWebView2Cookie {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Cookie").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Cookie {
type Vtable = ICoreWebView2Cookie_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Cookie {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xad26d6be_1486_43e6_bf87_a2034006ca21);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Cookie_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Name: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Value: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetValue: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub Domain: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
domain: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Path: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
path: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Expires: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
expires: *mut f64,
) -> ::windows::core::HRESULT,
pub SetExpires: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
expires: f64,
) -> ::windows::core::HRESULT,
pub IsHttpOnly: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ishttponly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsHttpOnly: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ishttponly: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SameSite: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::HRESULT,
pub SetSameSite: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::HRESULT,
pub IsSecure: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
issecure: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsSecure: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
issecure: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsSession: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
issession: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CookieList(::windows::core::IUnknown);
impl ICoreWebView2CookieList {
pub unsafe fn Count(&self, count: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Count)(::windows::core::Vtable::as_raw(self), count)
.ok()
}
pub unsafe fn GetValueAtIndex(
&self,
index: u32,
) -> ::windows::core::Result<ICoreWebView2Cookie> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetValueAtIndex)(
::windows::core::Vtable::as_raw(self),
index,
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2CookieList, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2CookieList {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CookieList {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CookieList {}
impl ::core::fmt::Debug for ICoreWebView2CookieList {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CookieList")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CookieList {
type Vtable = ICoreWebView2CookieList_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CookieList {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf7f6f714_5d2a_43c6_9503_346ece02d186);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CookieList_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Count: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
count: *mut u32,
) -> ::windows::core::HRESULT,
pub GetValueAtIndex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
cookie: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CookieManager(::windows::core::IUnknown);
impl ICoreWebView2CookieManager {
pub unsafe fn CreateCookie<P0, P1, P2, P3>(
&self,
name: P0,
value: P1,
domain: P2,
path: P3,
) -> ::windows::core::Result<ICoreWebView2Cookie>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CreateCookie)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
value.into().abi(),
domain.into().abi(),
path.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CopyCookie<P0>(
&self,
cookieparam: P0,
) -> ::windows::core::Result<ICoreWebView2Cookie>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Cookie>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CopyCookie)(
::windows::core::Vtable::as_raw(self),
cookieparam.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetCookies<P0, P1>(&self, uri: P0, handler: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2GetCookiesCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).GetCookies)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn AddOrUpdateCookie<P0>(&self, cookie: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Cookie>>,
{
(::windows::core::Vtable::vtable(self).AddOrUpdateCookie)(
::windows::core::Vtable::as_raw(self),
cookie.into().abi(),
)
.ok()
}
pub unsafe fn DeleteCookie<P0>(&self, cookie: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Cookie>>,
{
(::windows::core::Vtable::vtable(self).DeleteCookie)(
::windows::core::Vtable::as_raw(self),
cookie.into().abi(),
)
.ok()
}
pub unsafe fn DeleteCookies<P0, P1>(&self, name: P0, uri: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).DeleteCookies)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
uri.into().abi(),
)
.ok()
}
pub unsafe fn DeleteCookiesWithDomainAndPath<P0, P1, P2>(
&self,
name: P0,
domain: P1,
path: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).DeleteCookiesWithDomainAndPath)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
domain.into().abi(),
path.into().abi(),
)
.ok()
}
pub unsafe fn DeleteAllCookies(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DeleteAllCookies)(::windows::core::Vtable::as_raw(
self,
))
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2CookieManager, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2CookieManager {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CookieManager {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CookieManager {}
impl ::core::fmt::Debug for ICoreWebView2CookieManager {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CookieManager")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CookieManager {
type Vtable = ICoreWebView2CookieManager_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CookieManager {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x177cd9e7_b6f5_451a_94a0_5d7a3a4c4141);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CookieManager_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub CreateCookie: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: ::windows::core::PCWSTR,
domain: ::windows::core::PCWSTR,
path: ::windows::core::PCWSTR,
cookie: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub CopyCookie: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cookieparam: *mut ::core::ffi::c_void,
cookie: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub GetCookies: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub AddOrUpdateCookie: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cookie: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub DeleteCookie: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cookie: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub DeleteCookies: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
uri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub DeleteCookiesWithDomainAndPath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
domain: ::windows::core::PCWSTR,
path: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub DeleteAllCookies:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler(
::windows::core::IUnknown,
);
impl ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
webview: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2CompositionController>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
webview.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq
for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler
{
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable
for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler
{
type Vtable = ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x02fab84b_1428_4fb7_ad45_1b2e64736184);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
webview: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CreateCoreWebView2ControllerCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
createdcontroller: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Controller>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
createdcontroller.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CreateCoreWebView2ControllerCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CreateCoreWebView2ControllerCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {
type Vtable = ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x6c4819f3_c9b7_4260_8127_c9f5bde7f68c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
createdcontroller: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
createdenvironment: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Environment>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
createdenvironment.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
type Vtable = ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4e8a3389_c9d8_4bd2_b6b5_124fee6cc14d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
createdenvironment: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CursorChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2CursorChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2CompositionController>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CursorChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CursorChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CursorChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CursorChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2CursorChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CursorChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CursorChangedEventHandler {
type Vtable = ICoreWebView2CursorChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CursorChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x9da43ccc_26e1_4dad_b56c_d8961c94c571);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CursorChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2CustomItemSelectedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2CustomItemSelectedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContextMenuItem>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2CustomItemSelectedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2CustomItemSelectedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2CustomItemSelectedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2CustomItemSelectedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2CustomItemSelectedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2CustomItemSelectedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2CustomItemSelectedEventHandler {
type Vtable = ICoreWebView2CustomItemSelectedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2CustomItemSelectedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x49e1d0bc_fe9e_4481_b7c2_32324aa21998);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2CustomItemSelectedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DOMContentLoadedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2DOMContentLoadedEventArgs {
pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).NavigationId)(
::windows::core::Vtable::as_raw(self),
navigationid,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DOMContentLoadedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DOMContentLoadedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DOMContentLoadedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DOMContentLoadedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2DOMContentLoadedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DOMContentLoadedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DOMContentLoadedEventArgs {
type Vtable = ICoreWebView2DOMContentLoadedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DOMContentLoadedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x16b1e21a_c503_44f2_84c9_70aba5031283);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DOMContentLoadedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub NavigationId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DOMContentLoadedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2DOMContentLoadedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2DOMContentLoadedEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DOMContentLoadedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DOMContentLoadedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DOMContentLoadedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DOMContentLoadedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2DOMContentLoadedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DOMContentLoadedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DOMContentLoadedEventHandler {
type Vtable = ICoreWebView2DOMContentLoadedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DOMContentLoadedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4bac7e9c_199e_49ed_87ed_249303acf019);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DOMContentLoadedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Deferral(::windows::core::IUnknown);
impl ICoreWebView2Deferral {
pub unsafe fn Complete(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Complete)(::windows::core::Vtable::as_raw(self)).ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Deferral, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Deferral {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Deferral {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Deferral {}
impl ::core::fmt::Debug for ICoreWebView2Deferral {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Deferral")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Deferral {
type Vtable = ICoreWebView2Deferral_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Deferral {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xc10e7f7b_b585_46f0_a623_8befbf3e4ee0);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Deferral_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Complete:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
pub unsafe fn ParameterObjectAsJson(
&self,
parameterobjectasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ParameterObjectAsJson)(
::windows::core::Vtable::as_raw(self),
parameterobjectasjson,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DevToolsProtocolEventReceivedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DevToolsProtocolEventReceivedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
type Vtable = ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x653c2959_bb3a_4377_8632_b58ada4e66c4);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub ParameterObjectAsJson: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
parameterobjectasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs2(::windows::core::IUnknown);
impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
pub unsafe fn ParameterObjectAsJson(
&self,
parameterobjectasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.ParameterObjectAsJson)(
::windows::core::Vtable::as_raw(self), parameterobjectasjson
)
.ok()
}
pub unsafe fn SessionId(
&self,
sessionid: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SessionId)(
::windows::core::Vtable::as_raw(self),
sessionid,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DevToolsProtocolEventReceivedEventArgs2,
::windows::core::IUnknown,
ICoreWebView2DevToolsProtocolEventReceivedEventArgs
);
impl ::core::clone::Clone for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {}
impl ::core::fmt::Debug for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DevToolsProtocolEventReceivedEventArgs2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
type Vtable = ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x2dc4959d_1494_4393_95ba_bea4cb9ebd1b);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl {
pub base__: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl,
pub SessionId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sessionid: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DevToolsProtocolEventReceivedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DevToolsProtocolEventReceivedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DevToolsProtocolEventReceivedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DevToolsProtocolEventReceivedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
type Vtable = ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe2fda4be_5456_406c_a261_3d452138362c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DevToolsProtocolEventReceiver(::windows::core::IUnknown);
impl ICoreWebView2DevToolsProtocolEventReceiver {
pub unsafe fn add_DevToolsProtocolEventReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DevToolsProtocolEventReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_DevToolsProtocolEventReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DevToolsProtocolEventReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_DevToolsProtocolEventReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DevToolsProtocolEventReceiver,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DevToolsProtocolEventReceiver {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DevToolsProtocolEventReceiver {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DevToolsProtocolEventReceiver {}
impl ::core::fmt::Debug for ICoreWebView2DevToolsProtocolEventReceiver {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DevToolsProtocolEventReceiver")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DevToolsProtocolEventReceiver {
type Vtable = ICoreWebView2DevToolsProtocolEventReceiver_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DevToolsProtocolEventReceiver {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb32ca51a_8371_45e9_9317_af021d080367);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DevToolsProtocolEventReceiver_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub add_DevToolsProtocolEventReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub remove_DevToolsProtocolEventReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DocumentTitleChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2DocumentTitleChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DocumentTitleChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DocumentTitleChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DocumentTitleChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DocumentTitleChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2DocumentTitleChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DocumentTitleChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DocumentTitleChangedEventHandler {
type Vtable = ICoreWebView2DocumentTitleChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DocumentTitleChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf5f2b923_953e_4042_9f95_f3a118e1afd4);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DocumentTitleChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DownloadOperation(::windows::core::IUnknown);
impl ICoreWebView2DownloadOperation {
pub unsafe fn add_BytesReceivedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BytesReceivedChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_BytesReceivedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BytesReceivedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_BytesReceivedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_EstimatedEndTimeChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2EstimatedEndTimeChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_EstimatedEndTimeChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_EstimatedEndTimeChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_EstimatedEndTimeChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_StateChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2StateChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_StateChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_StateChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_StateChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Uri)(::windows::core::Vtable::as_raw(self), uri).ok()
}
pub unsafe fn ContentDisposition(
&self,
contentdisposition: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ContentDisposition)(
::windows::core::Vtable::as_raw(self),
contentdisposition,
)
.ok()
}
pub unsafe fn MimeType(
&self,
mimetype: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MimeType)(
::windows::core::Vtable::as_raw(self),
mimetype,
)
.ok()
}
pub unsafe fn TotalBytesToReceive(
&self,
totalbytestoreceive: *mut i64,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TotalBytesToReceive)(
::windows::core::Vtable::as_raw(self),
totalbytestoreceive,
)
.ok()
}
pub unsafe fn BytesReceived(&self, bytesreceived: *mut i64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).BytesReceived)(
::windows::core::Vtable::as_raw(self),
bytesreceived,
)
.ok()
}
pub unsafe fn EstimatedEndTime(
&self,
estimatedendtime: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).EstimatedEndTime)(
::windows::core::Vtable::as_raw(self),
estimatedendtime,
)
.ok()
}
pub unsafe fn ResultFilePath(
&self,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ResultFilePath)(
::windows::core::Vtable::as_raw(self),
resultfilepath,
)
.ok()
}
pub unsafe fn State(
&self,
downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).State)(
::windows::core::Vtable::as_raw(self),
downloadstate,
)
.ok()
}
pub unsafe fn InterruptReason(
&self,
interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).InterruptReason)(
::windows::core::Vtable::as_raw(self),
interruptreason,
)
.ok()
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Cancel)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn Pause(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Pause)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Resume)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn CanResume(
&self,
canresume: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).CanResume)(
::windows::core::Vtable::as_raw(self),
canresume,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2DownloadOperation, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2DownloadOperation {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DownloadOperation {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DownloadOperation {}
impl ::core::fmt::Debug for ICoreWebView2DownloadOperation {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DownloadOperation")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DownloadOperation {
type Vtable = ICoreWebView2DownloadOperation_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DownloadOperation {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x3d6b6cf2_afe1_44c7_a995_c65117714336);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DownloadOperation_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub add_BytesReceivedChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_BytesReceivedChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_EstimatedEndTimeChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_EstimatedEndTimeChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_StateChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_StateChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub Uri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ContentDisposition: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
contentdisposition: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub MimeType: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mimetype: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub TotalBytesToReceive: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
totalbytestoreceive: *mut i64,
) -> ::windows::core::HRESULT,
pub BytesReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
bytesreceived: *mut i64,
) -> ::windows::core::HRESULT,
pub EstimatedEndTime: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
estimatedendtime: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ResultFilePath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub State: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE,
) -> ::windows::core::HRESULT,
pub InterruptReason: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
) -> ::windows::core::HRESULT,
pub Cancel:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub Pause:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub Resume:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub CanResume: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
canresume: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DownloadStartingEventArgs(::windows::core::IUnknown);
impl ICoreWebView2DownloadStartingEventArgs {
pub unsafe fn DownloadOperation(
&self,
) -> ::windows::core::Result<ICoreWebView2DownloadOperation> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).DownloadOperation)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Cancel(
&self,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Cancel)(
::windows::core::Vtable::as_raw(self),
cancel,
)
.ok()
}
pub unsafe fn SetCancel<P0>(&self, cancel: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetCancel)(
::windows::core::Vtable::as_raw(self),
cancel.into(),
)
.ok()
}
pub unsafe fn ResultFilePath(
&self,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ResultFilePath)(
::windows::core::Vtable::as_raw(self),
resultfilepath,
)
.ok()
}
pub unsafe fn SetResultFilePath<P0>(&self, resultfilepath: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetResultFilePath)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
)
.ok()
}
pub unsafe fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Handled)(
::windows::core::Vtable::as_raw(self),
handled,
)
.ok()
}
pub unsafe fn SetHandled<P0>(&self, handled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetHandled)(
::windows::core::Vtable::as_raw(self),
handled.into(),
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DownloadStartingEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DownloadStartingEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DownloadStartingEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DownloadStartingEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2DownloadStartingEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DownloadStartingEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DownloadStartingEventArgs {
type Vtable = ICoreWebView2DownloadStartingEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DownloadStartingEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe99bbe21_43e9_4544_a732_282764eafa60);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DownloadStartingEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub DownloadOperation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
downloadoperation: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Cancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetCancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cancel: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub ResultFilePath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetResultFilePath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
resultfilepath: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub Handled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetHandled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2DownloadStartingEventHandler(::windows::core::IUnknown);
impl ICoreWebView2DownloadStartingEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2DownloadStartingEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2DownloadStartingEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2DownloadStartingEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2DownloadStartingEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2DownloadStartingEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2DownloadStartingEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2DownloadStartingEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2DownloadStartingEventHandler {
type Vtable = ICoreWebView2DownloadStartingEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2DownloadStartingEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xefedc989_c396_41ca_83f7_07f845a55724);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2DownloadStartingEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment(::windows::core::IUnknown);
impl ICoreWebView2Environment {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).BrowserVersionString)(
::windows::core::Vtable::as_raw(self),
versioninfo,
)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Environment, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Environment {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment {}
impl ::core::fmt::Debug for ICoreWebView2Environment {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment {
type Vtable = ICoreWebView2Environment_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb96d755e_0319_4e92_a296_23436f46a1fc);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub CreateCoreWebView2Controller: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub CreateWebResourceResponse: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
content: *mut ::core::ffi::c_void,
statuscode: i32,
reasonphrase: ::windows::core::PCWSTR,
headers: ::windows::core::PCWSTR,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub BrowserVersionString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub add_NewBrowserVersionAvailable: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_NewBrowserVersionAvailable: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment10(::windows::core::IUnknown);
impl ICoreWebView2Environment10 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_BrowserProcessExited<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BrowserProcessExited(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreatePrintSettings(
&self,
) -> ::windows::core::Result<ICoreWebView2PrintSettings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CreatePrintSettings)(
::windows::core::Vtable::as_raw(self), result__.as_mut_ptr()
)
.from_abi(result__)
}
pub unsafe fn UserDataFolder(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.UserDataFolder)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_ProcessInfosChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ProcessInfosChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessInfosChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn GetProcessInfos(
&self,
) -> ::windows::core::Result<ICoreWebView2ProcessInfoCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.GetProcessInfos)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn CreateContextMenuItem<P0, P1>(
&self,
label: P0,
iconstream: P1,
kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
) -> ::windows::core::Result<ICoreWebView2ContextMenuItem>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.CreateContextMenuItem)(
::windows::core::Vtable::as_raw(self),
label.into().abi(),
iconstream.into().abi(),
kind,
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2ControllerOptions(
&self,
) -> ::windows::core::Result<ICoreWebView2ControllerOptions> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CreateCoreWebView2ControllerOptions)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2ControllerWithOptions<P0, P1, P2>(
&self,
parentwindow: P0,
options: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ControllerOptions>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).CreateCoreWebView2ControllerWithOptions)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
options.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2CompositionControllerWithOptions<P0, P1, P2>(
&self,
parentwindow: P0,
options: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ControllerOptions>>,
P2: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self).CreateCoreWebView2CompositionControllerWithOptions)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
options.into().abi(),
handler.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment10,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3,
ICoreWebView2Environment4,
ICoreWebView2Environment5,
ICoreWebView2Environment6,
ICoreWebView2Environment7,
ICoreWebView2Environment8,
ICoreWebView2Environment9
);
impl ::core::clone::Clone for ICoreWebView2Environment10 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment10 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment10 {}
impl ::core::fmt::Debug for ICoreWebView2Environment10 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment10")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment10 {
type Vtable = ICoreWebView2Environment10_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment10 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xee0eb9df_6f12_46ce_b53f_3f47b9c928e0);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment10_Vtbl {
pub base__: ICoreWebView2Environment9_Vtbl,
pub CreateCoreWebView2ControllerOptions: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
options: *mut *mut ::core::ffi::c_void,
)
-> ::windows::core::HRESULT,
pub CreateCoreWebView2ControllerWithOptions:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
options: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub CreateCoreWebView2CompositionControllerWithOptions:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
options: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment11(::windows::core::IUnknown);
impl ICoreWebView2Environment11 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_BrowserProcessExited<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BrowserProcessExited(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreatePrintSettings(
&self,
) -> ::windows::core::Result<ICoreWebView2PrintSettings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CreatePrintSettings)(
::windows::core::Vtable::as_raw(self), result__.as_mut_ptr()
)
.from_abi(result__)
}
pub unsafe fn UserDataFolder(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.UserDataFolder)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_ProcessInfosChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ProcessInfosChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessInfosChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn GetProcessInfos(
&self,
) -> ::windows::core::Result<ICoreWebView2ProcessInfoCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.GetProcessInfos)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn CreateContextMenuItem<P0, P1>(
&self,
label: P0,
iconstream: P1,
kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
) -> ::windows::core::Result<ICoreWebView2ContextMenuItem>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CreateContextMenuItem)(
::windows::core::Vtable::as_raw(self),
label.into().abi(),
iconstream.into().abi(),
kind,
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2ControllerOptions(
&self,
) -> ::windows::core::Result<ICoreWebView2ControllerOptions> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.CreateCoreWebView2ControllerOptions)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2ControllerWithOptions<P0, P1, P2>(
&self,
parentwindow: P0,
options: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ControllerOptions>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.CreateCoreWebView2ControllerWithOptions)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
options.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2CompositionControllerWithOptions<P0, P1, P2>(
&self,
parentwindow: P0,
options: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ControllerOptions>>,
P2: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.CreateCoreWebView2CompositionControllerWithOptions)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
options.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn FailureReportFolderPath(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).FailureReportFolderPath)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment11,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3,
ICoreWebView2Environment4,
ICoreWebView2Environment5,
ICoreWebView2Environment6,
ICoreWebView2Environment7,
ICoreWebView2Environment8,
ICoreWebView2Environment9,
ICoreWebView2Environment10
);
impl ::core::clone::Clone for ICoreWebView2Environment11 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment11 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment11 {}
impl ::core::fmt::Debug for ICoreWebView2Environment11 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment11")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment11 {
type Vtable = ICoreWebView2Environment11_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment11 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf0913dc6_a0ec_42ef_9805_91dff3a2966a);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment11_Vtbl {
pub base__: ICoreWebView2Environment10_Vtbl,
pub FailureReportFolderPath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment2(::windows::core::IUnknown);
impl ICoreWebView2Environment2 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment2,
::windows::core::IUnknown,
ICoreWebView2Environment
);
impl ::core::clone::Clone for ICoreWebView2Environment2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment2 {}
impl ::core::fmt::Debug for ICoreWebView2Environment2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment2 {
type Vtable = ICoreWebView2Environment2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x41f3632b_5ef4_404f_ad82_2d606c5a9a21);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment2_Vtbl {
pub base__: ICoreWebView2Environment_Vtbl,
pub CreateWebResourceRequest: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
method: ::windows::core::PCWSTR,
postdata: *mut ::core::ffi::c_void,
headers: ::windows::core::PCWSTR,
request: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment3(::windows::core::IUnknown);
impl ICoreWebView2Environment3 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self).CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment3,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2
);
impl ::core::clone::Clone for ICoreWebView2Environment3 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment3 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment3 {}
impl ::core::fmt::Debug for ICoreWebView2Environment3 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment3")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment3 {
type Vtable = ICoreWebView2Environment3_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment3 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x80a22ae3_be7c_4ce2_afe1_5a50056cdeeb);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment3_Vtbl {
pub base__: ICoreWebView2Environment2_Vtbl,
pub CreateCoreWebView2CompositionController:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub CreateCoreWebView2PointerInfo: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerinfo: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment4(::windows::core::IUnknown);
impl ICoreWebView2Environment4 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment4,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3
);
impl ::core::clone::Clone for ICoreWebView2Environment4 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment4 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment4 {}
impl ::core::fmt::Debug for ICoreWebView2Environment4 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment4")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment4 {
type Vtable = ICoreWebView2Environment4_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment4 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x20944379_6dcf_41d6_a0a0_abc0fc50de0d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment4_Vtbl {
pub base__: ICoreWebView2Environment3_Vtbl,
pub GetAutomationProviderForWindow: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hwnd: ::windows::Win32::Foundation::HWND,
provider: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment5(::windows::core::IUnknown);
impl ICoreWebView2Environment5 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_BrowserProcessExited<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BrowserProcessExited(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment5,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3,
ICoreWebView2Environment4
);
impl ::core::clone::Clone for ICoreWebView2Environment5 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment5 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment5 {}
impl ::core::fmt::Debug for ICoreWebView2Environment5 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment5")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment5 {
type Vtable = ICoreWebView2Environment5_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment5 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x319e423d_e0d7_4b8d_9254_ae9475de9b17);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment5_Vtbl {
pub base__: ICoreWebView2Environment4_Vtbl,
pub add_BrowserProcessExited: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_BrowserProcessExited: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment6(::windows::core::IUnknown);
impl ICoreWebView2Environment6 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_BrowserProcessExited<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BrowserProcessExited(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreatePrintSettings(
&self,
) -> ::windows::core::Result<ICoreWebView2PrintSettings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CreatePrintSettings)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment6,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3,
ICoreWebView2Environment4,
ICoreWebView2Environment5
);
impl ::core::clone::Clone for ICoreWebView2Environment6 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment6 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment6 {}
impl ::core::fmt::Debug for ICoreWebView2Environment6 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment6")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment6 {
type Vtable = ICoreWebView2Environment6_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment6 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe59ee362_acbd_4857_9a8e_d3644d9459a9);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment6_Vtbl {
pub base__: ICoreWebView2Environment5_Vtbl,
pub CreatePrintSettings: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
printsettings: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment7(::windows::core::IUnknown);
impl ICoreWebView2Environment7 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_BrowserProcessExited<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BrowserProcessExited(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreatePrintSettings(
&self,
) -> ::windows::core::Result<ICoreWebView2PrintSettings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.CreatePrintSettings)(
::windows::core::Vtable::as_raw(self), result__.as_mut_ptr()
)
.from_abi(result__)
}
pub unsafe fn UserDataFolder(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).UserDataFolder)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment7,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3,
ICoreWebView2Environment4,
ICoreWebView2Environment5,
ICoreWebView2Environment6
);
impl ::core::clone::Clone for ICoreWebView2Environment7 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment7 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment7 {}
impl ::core::fmt::Debug for ICoreWebView2Environment7 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment7")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment7 {
type Vtable = ICoreWebView2Environment7_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment7 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x43c22296_3bbd_43a4_9c00_5c0df6dd29a2);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment7_Vtbl {
pub base__: ICoreWebView2Environment6_Vtbl,
pub UserDataFolder: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment8(::windows::core::IUnknown);
impl ICoreWebView2Environment8 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_BrowserProcessExited<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BrowserProcessExited(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreatePrintSettings(
&self,
) -> ::windows::core::Result<ICoreWebView2PrintSettings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CreatePrintSettings)(
::windows::core::Vtable::as_raw(self), result__.as_mut_ptr()
)
.from_abi(result__)
}
pub unsafe fn UserDataFolder(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.UserDataFolder)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn add_ProcessInfosChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ProcessInfosChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessInfosChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn GetProcessInfos(
&self,
) -> ::windows::core::Result<ICoreWebView2ProcessInfoCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetProcessInfos)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment8,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3,
ICoreWebView2Environment4,
ICoreWebView2Environment5,
ICoreWebView2Environment6,
ICoreWebView2Environment7
);
impl ::core::clone::Clone for ICoreWebView2Environment8 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment8 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment8 {}
impl ::core::fmt::Debug for ICoreWebView2Environment8 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment8")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment8 {
type Vtable = ICoreWebView2Environment8_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment8 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xd6eb91dd_c3d2_45e5_bd29_6dc2bc4de9cf);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment8_Vtbl {
pub base__: ICoreWebView2Environment7_Vtbl,
pub add_ProcessInfosChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ProcessInfosChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub GetProcessInfos: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Environment9(::windows::core::IUnknown);
impl ICoreWebView2Environment9 {
pub unsafe fn CreateCoreWebView2Controller<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2Controller)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateWebResourceResponse<P0, P1, P2>(
&self,
content: P0,
statuscode: i32,
reasonphrase: P1,
headers: P2,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceResponse)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
statuscode,
reasonphrase.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserVersionString)(::windows::core::Vtable::as_raw(self), versioninfo)
.ok()
}
pub unsafe fn add_NewBrowserVersionAvailable<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewBrowserVersionAvailable(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewBrowserVersionAvailable)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
&self,
uri: P0,
method: P1,
postdata: P2,
headers: P3,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P3: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CreateWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
method.into().abi(),
postdata.into().abi(),
headers.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateCoreWebView2CompositionController<P0, P1>(
&self,
parentwindow: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2CompositionController)(
::windows::core::Vtable::as_raw(self),
parentwindow.into(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CreateCoreWebView2PointerInfo(
&self,
) -> ::windows::core::Result<ICoreWebView2PointerInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CreateCoreWebView2PointerInfo)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetAutomationProviderForWindow<P0>(
&self,
hwnd: P0,
) -> ::windows::core::Result<::windows::core::IUnknown>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::HWND>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.GetAutomationProviderForWindow)(
::windows::core::Vtable::as_raw(self),
hwnd.into(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_BrowserProcessExited<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BrowserProcessExitedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BrowserProcessExited(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_BrowserProcessExited)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CreatePrintSettings(
&self,
) -> ::windows::core::Result<ICoreWebView2PrintSettings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CreatePrintSettings)(
::windows::core::Vtable::as_raw(self), result__.as_mut_ptr()
)
.from_abi(result__)
}
pub unsafe fn UserDataFolder(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.UserDataFolder)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_ProcessInfosChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ProcessInfosChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessInfosChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ProcessInfosChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn GetProcessInfos(
&self,
) -> ::windows::core::Result<ICoreWebView2ProcessInfoCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.GetProcessInfos)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn CreateContextMenuItem<P0, P1>(
&self,
label: P0,
iconstream: P1,
kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
) -> ::windows::core::Result<ICoreWebView2ContextMenuItem>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CreateContextMenuItem)(
::windows::core::Vtable::as_raw(self),
label.into().abi(),
iconstream.into().abi(),
kind,
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Environment9,
::windows::core::IUnknown,
ICoreWebView2Environment,
ICoreWebView2Environment2,
ICoreWebView2Environment3,
ICoreWebView2Environment4,
ICoreWebView2Environment5,
ICoreWebView2Environment6,
ICoreWebView2Environment7,
ICoreWebView2Environment8
);
impl ::core::clone::Clone for ICoreWebView2Environment9 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Environment9 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Environment9 {}
impl ::core::fmt::Debug for ICoreWebView2Environment9 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Environment9")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Environment9 {
type Vtable = ICoreWebView2Environment9_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Environment9 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf06f41bf_4b5a_49d8_b9f6_fa16cd29f274);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Environment9_Vtbl {
pub base__: ICoreWebView2Environment8_Vtbl,
pub CreateContextMenuItem: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
label: ::windows::core::PCWSTR,
iconstream: *mut ::core::ffi::c_void,
kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
item: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2EnvironmentOptions(::windows::core::IUnknown);
impl ICoreWebView2EnvironmentOptions {
pub unsafe fn AdditionalBrowserArguments(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AdditionalBrowserArguments)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetAdditionalBrowserArguments<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetAdditionalBrowserArguments)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn Language(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Language)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetLanguage<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetLanguage)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn TargetCompatibleBrowserVersion(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TargetCompatibleBrowserVersion)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetTargetCompatibleBrowserVersion<P0>(
&self,
value: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetTargetCompatibleBrowserVersion)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn AllowSingleSignOnUsingOSPrimaryAccount(
&self,
allow: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AllowSingleSignOnUsingOSPrimaryAccount)(
::windows::core::Vtable::as_raw(self),
allow,
)
.ok()
}
pub unsafe fn SetAllowSingleSignOnUsingOSPrimaryAccount<P0>(
&self,
allow: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetAllowSingleSignOnUsingOSPrimaryAccount)(
::windows::core::Vtable::as_raw(self),
allow.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2EnvironmentOptions, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2EnvironmentOptions {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2EnvironmentOptions {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2EnvironmentOptions {}
impl ::core::fmt::Debug for ICoreWebView2EnvironmentOptions {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2EnvironmentOptions")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2EnvironmentOptions {
type Vtable = ICoreWebView2EnvironmentOptions_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2EnvironmentOptions {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x2fde08a8_1e9a_4766_8c05_95a9ceb9d1c5);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2EnvironmentOptions_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub AdditionalBrowserArguments: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetAdditionalBrowserArguments: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub Language: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetLanguage: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub TargetCompatibleBrowserVersion: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetTargetCompatibleBrowserVersion: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
)
-> ::windows::core::HRESULT,
pub AllowSingleSignOnUsingOSPrimaryAccount:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
allow: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetAllowSingleSignOnUsingOSPrimaryAccount:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
allow: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2EnvironmentOptions2(::windows::core::IUnknown);
impl ICoreWebView2EnvironmentOptions2 {
pub unsafe fn ExclusiveUserDataFolderAccess(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ExclusiveUserDataFolderAccess)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetExclusiveUserDataFolderAccess<P0>(
&self,
value: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetExclusiveUserDataFolderAccess)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2EnvironmentOptions2, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2EnvironmentOptions2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2EnvironmentOptions2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2EnvironmentOptions2 {}
impl ::core::fmt::Debug for ICoreWebView2EnvironmentOptions2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2EnvironmentOptions2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2EnvironmentOptions2 {
type Vtable = ICoreWebView2EnvironmentOptions2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2EnvironmentOptions2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xff85c98a_1ba7_4a6b_90c8_2b752c89e9e2);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2EnvironmentOptions2_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub ExclusiveUserDataFolderAccess: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetExclusiveUserDataFolderAccess: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2EnvironmentOptions3(::windows::core::IUnknown);
impl ICoreWebView2EnvironmentOptions3 {
pub unsafe fn IsCustomCrashReportingEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsCustomCrashReportingEnabled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsCustomCrashReportingEnabled<P0>(
&self,
value: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsCustomCrashReportingEnabled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2EnvironmentOptions3, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2EnvironmentOptions3 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2EnvironmentOptions3 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2EnvironmentOptions3 {}
impl ::core::fmt::Debug for ICoreWebView2EnvironmentOptions3 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2EnvironmentOptions3")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2EnvironmentOptions3 {
type Vtable = ICoreWebView2EnvironmentOptions3_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2EnvironmentOptions3 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4a5c436e_a9e3_4a2e_89c3_910d3513f5cc);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2EnvironmentOptions3_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub IsCustomCrashReportingEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsCustomCrashReportingEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2EstimatedEndTimeChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2EstimatedEndTimeChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2DownloadOperation>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2EstimatedEndTimeChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2EstimatedEndTimeChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2EstimatedEndTimeChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2EstimatedEndTimeChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2EstimatedEndTimeChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2EstimatedEndTimeChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2EstimatedEndTimeChangedEventHandler {
type Vtable = ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2EstimatedEndTimeChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x28f0d425_93fe_4e63_9f8d_2aeec6d3ba1e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ExecuteScriptCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2ExecuteScriptCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
resultobjectasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
resultobjectasjson.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ExecuteScriptCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ExecuteScriptCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ExecuteScriptCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ExecuteScriptCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2ExecuteScriptCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ExecuteScriptCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ExecuteScriptCompletedHandler {
type Vtable = ICoreWebView2ExecuteScriptCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ExecuteScriptCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x49511172_cc67_4bca_9923_137112f4c4cc);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ExecuteScriptCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
resultobjectasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FaviconChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FaviconChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FaviconChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FaviconChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FaviconChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FaviconChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FaviconChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FaviconChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FaviconChangedEventHandler {
type Vtable = ICoreWebView2FaviconChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FaviconChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x2913da94_833d_4de0_8dca_900fc524a1a4);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FaviconChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FocusChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FocusChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Controller>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FocusChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FocusChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FocusChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FocusChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FocusChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FocusChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FocusChangedEventHandler {
type Vtable = ICoreWebView2FocusChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FocusChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x05ea24bd_6452_4926_9014_4b82b498135d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FocusChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Frame(::windows::core::IUnknown);
impl ICoreWebView2Frame {
pub unsafe fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Name)(::windows::core::Vtable::as_raw(self), name)
.ok()
}
pub unsafe fn add_NameChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameNameChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_NameChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NameChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_NameChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddHostObjectToScriptWithOrigins<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
originscount: u32,
origins: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).AddHostObjectToScriptWithOrigins)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
originscount,
origins,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
)
.ok()
}
pub unsafe fn add_Destroyed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameDestroyedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_Destroyed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_Destroyed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_Destroyed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDestroyed(
&self,
destroyed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsDestroyed)(
::windows::core::Vtable::as_raw(self),
destroyed,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Frame, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Frame {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Frame {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Frame {}
impl ::core::fmt::Debug for ICoreWebView2Frame {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Frame").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Frame {
type Vtable = ICoreWebView2Frame_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Frame {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf1131a5e_9ba9_11eb_a8b3_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Frame_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Name: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub add_NameChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_NameChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub AddHostObjectToScriptWithOrigins: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
object: *mut ::windows::Win32::System::Com::VARIANT,
originscount: u32,
origins: *mut ::windows::core::PWSTR,
)
-> ::windows::core::HRESULT,
pub RemoveHostObjectFromScript: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub add_Destroyed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_Destroyed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub IsDestroyed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
destroyed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Frame2(::windows::core::IUnknown);
impl ICoreWebView2Frame2 {
pub unsafe fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Name)(
::windows::core::Vtable::as_raw(self),
name,
)
.ok()
}
pub unsafe fn add_NameChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameNameChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).base__.add_NameChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NameChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_NameChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddHostObjectToScriptWithOrigins<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
originscount: u32,
origins: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.AddHostObjectToScriptWithOrigins)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
originscount,
origins,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn add_Destroyed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameDestroyedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).base__.add_Destroyed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_Destroyed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_Destroyed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDestroyed(
&self,
destroyed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsDestroyed)(
::windows::core::Vtable::as_raw(self),
destroyed,
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameNavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameContentLoadingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameNavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameDOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameWebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Frame2,
::windows::core::IUnknown,
ICoreWebView2Frame
);
impl ::core::clone::Clone for ICoreWebView2Frame2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Frame2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Frame2 {}
impl ::core::fmt::Debug for ICoreWebView2Frame2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Frame2").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Frame2 {
type Vtable = ICoreWebView2Frame2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Frame2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x7a6a5834_d185_4dbf_b63f_4a9bc43107d4);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Frame2_Vtbl {
pub base__: ICoreWebView2Frame_Vtbl,
pub add_NavigationStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_NavigationStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_ContentLoading: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ContentLoading: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_NavigationCompleted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_NavigationCompleted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_DOMContentLoaded: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_DOMContentLoaded: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub ExecuteScript: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
javascript: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub PostWebMessageAsJson: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
webmessageasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub PostWebMessageAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
webmessageasstring: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub add_WebMessageReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_WebMessageReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Frame3(::windows::core::IUnknown);
impl ICoreWebView2Frame3 {
pub unsafe fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Name)(
::windows::core::Vtable::as_raw(self),
name,
)
.ok()
}
pub unsafe fn add_NameChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameNameChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_NameChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NameChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_NameChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddHostObjectToScriptWithOrigins<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
originscount: u32,
origins: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AddHostObjectToScriptWithOrigins)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
originscount,
origins,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn add_Destroyed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameDestroyedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_Destroyed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_Destroyed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_Destroyed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDestroyed(
&self,
destroyed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsDestroyed)(::windows::core::Vtable::as_raw(self), destroyed)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameNavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameContentLoadingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameNavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameDOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).base__.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FrameWebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2FramePermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Frame3,
::windows::core::IUnknown,
ICoreWebView2Frame,
ICoreWebView2Frame2
);
impl ::core::clone::Clone for ICoreWebView2Frame3 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Frame3 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Frame3 {}
impl ::core::fmt::Debug for ICoreWebView2Frame3 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Frame3").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Frame3 {
type Vtable = ICoreWebView2Frame3_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Frame3 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb50d82cc_cc28_481d_9614_cb048895e6a0);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Frame3_Vtbl {
pub base__: ICoreWebView2Frame2_Vtbl,
pub add_PermissionRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_PermissionRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameContentLoadingEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameContentLoadingEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameContentLoadingEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameContentLoadingEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameContentLoadingEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameContentLoadingEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameContentLoadingEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameContentLoadingEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameContentLoadingEventHandler {
type Vtable = ICoreWebView2FrameContentLoadingEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameContentLoadingEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x0d6156f2_d332_49a7_9e03_7d8f2feeee54);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameContentLoadingEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameCreatedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2FrameCreatedEventArgs {
pub unsafe fn Frame(&self) -> ::windows::core::Result<ICoreWebView2Frame> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Frame)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameCreatedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameCreatedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameCreatedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameCreatedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2FrameCreatedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameCreatedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameCreatedEventArgs {
type Vtable = ICoreWebView2FrameCreatedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameCreatedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4d6e7b5e_9baa_11eb_a8b3_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameCreatedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Frame: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
frame: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameCreatedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameCreatedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameCreatedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameCreatedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameCreatedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameCreatedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameCreatedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameCreatedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameCreatedEventHandler {
type Vtable = ICoreWebView2FrameCreatedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameCreatedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x38059770_9baa_11eb_a8b3_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameCreatedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameDOMContentLoadedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameDOMContentLoadedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2DOMContentLoadedEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameDOMContentLoadedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameDOMContentLoadedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameDOMContentLoadedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameDOMContentLoadedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameDOMContentLoadedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameDOMContentLoadedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameDOMContentLoadedEventHandler {
type Vtable = ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameDOMContentLoadedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x38d9520d_340f_4d1e_a775_43fce9753683);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameDestroyedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameDestroyedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameDestroyedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameDestroyedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameDestroyedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameDestroyedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameDestroyedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameDestroyedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameDestroyedEventHandler {
type Vtable = ICoreWebView2FrameDestroyedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameDestroyedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x59dd7b4c_9baa_11eb_a8b3_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameDestroyedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameInfo(::windows::core::IUnknown);
impl ICoreWebView2FrameInfo {
pub unsafe fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Name)(::windows::core::Vtable::as_raw(self), name)
.ok()
}
pub unsafe fn Source(
&self,
source: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Source)(
::windows::core::Vtable::as_raw(self),
source,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2FrameInfo, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2FrameInfo {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameInfo {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameInfo {}
impl ::core::fmt::Debug for ICoreWebView2FrameInfo {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameInfo")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameInfo {
type Vtable = ICoreWebView2FrameInfo_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameInfo {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xda86b8a1_bdf3_4f11_9955_528cefa59727);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameInfo_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Name: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Source: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
source: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameInfoCollection(::windows::core::IUnknown);
impl ICoreWebView2FrameInfoCollection {
pub unsafe fn GetIterator(
&self,
) -> ::windows::core::Result<ICoreWebView2FrameInfoCollectionIterator> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetIterator)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2FrameInfoCollection, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2FrameInfoCollection {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameInfoCollection {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameInfoCollection {}
impl ::core::fmt::Debug for ICoreWebView2FrameInfoCollection {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameInfoCollection")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameInfoCollection {
type Vtable = ICoreWebView2FrameInfoCollection_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameInfoCollection {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x8f834154_d38e_4d90_affb_6800a7272839);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameInfoCollection_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub GetIterator: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameInfoCollectionIterator(::windows::core::IUnknown);
impl ICoreWebView2FrameInfoCollectionIterator {
pub unsafe fn HasCurrent(
&self,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasCurrent)(
::windows::core::Vtable::as_raw(self),
hascurrent,
)
.ok()
}
pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<ICoreWebView2FrameInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetCurrent)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn MoveNext(
&self,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MoveNext)(
::windows::core::Vtable::as_raw(self),
hasnext,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameInfoCollectionIterator,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameInfoCollectionIterator {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameInfoCollectionIterator {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameInfoCollectionIterator {}
impl ::core::fmt::Debug for ICoreWebView2FrameInfoCollectionIterator {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameInfoCollectionIterator")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameInfoCollectionIterator {
type Vtable = ICoreWebView2FrameInfoCollectionIterator_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameInfoCollectionIterator {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x1bf89e2d_1b2b_4629_b28f_05099b41bb03);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameInfoCollectionIterator_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub HasCurrent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GetCurrent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
frameinfo: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub MoveNext: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameNameChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameNameChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameNameChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameNameChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameNameChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameNameChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameNameChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameNameChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameNameChangedEventHandler {
type Vtable = ICoreWebView2FrameNameChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameNameChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x435c7dc8_9baa_11eb_a8b3_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameNameChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameNavigationCompletedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameNavigationCompletedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameNavigationCompletedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameNavigationCompletedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameNavigationCompletedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameNavigationCompletedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameNavigationCompletedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameNavigationCompletedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameNavigationCompletedEventHandler {
type Vtable = ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameNavigationCompletedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x609302ad_0e36_4f9a_a210_6a45272842a9);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameNavigationStartingEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameNavigationStartingEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameNavigationStartingEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameNavigationStartingEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameNavigationStartingEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameNavigationStartingEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameNavigationStartingEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameNavigationStartingEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameNavigationStartingEventHandler {
type Vtable = ICoreWebView2FrameNavigationStartingEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameNavigationStartingEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe79908bf_2d5d_4968_83db_263fea2c1da3);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameNavigationStartingEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FramePermissionRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FramePermissionRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventArgs2>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FramePermissionRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FramePermissionRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FramePermissionRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FramePermissionRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FramePermissionRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FramePermissionRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FramePermissionRequestedEventHandler {
type Vtable = ICoreWebView2FramePermissionRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FramePermissionRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x845d0edd_8bd8_429b_9915_4821789f23e9);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FramePermissionRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2FrameWebMessageReceivedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2FrameWebMessageReceivedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Frame>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2FrameWebMessageReceivedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2FrameWebMessageReceivedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2FrameWebMessageReceivedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2FrameWebMessageReceivedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2FrameWebMessageReceivedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2FrameWebMessageReceivedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2FrameWebMessageReceivedEventHandler {
type Vtable = ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2FrameWebMessageReceivedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe371e005_6d1d_4517_934b_a8f1629c62a5);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2GetCookiesCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2GetCookiesCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
result: ::windows::core::HRESULT,
cookielist: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2CookieList>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
result,
cookielist.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2GetCookiesCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2GetCookiesCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2GetCookiesCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2GetCookiesCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2GetCookiesCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2GetCookiesCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2GetCookiesCompletedHandler {
type Vtable = ICoreWebView2GetCookiesCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2GetCookiesCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x5a4f5069_5c15_47c3_8646_f4de1c116670);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2GetCookiesCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result: ::windows::core::HRESULT,
cookielist: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2GetFaviconCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2GetFaviconCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
faviconstream: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
faviconstream.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2GetFaviconCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2GetFaviconCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2GetFaviconCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2GetFaviconCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2GetFaviconCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2GetFaviconCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2GetFaviconCompletedHandler {
type Vtable = ICoreWebView2GetFaviconCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2GetFaviconCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xa2508329_7da8_49d7_8c05_fa125e4aee8d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2GetFaviconCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
faviconstream: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2HistoryChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2HistoryChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2HistoryChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2HistoryChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2HistoryChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2HistoryChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2HistoryChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2HistoryChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2HistoryChangedEventHandler {
type Vtable = ICoreWebView2HistoryChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2HistoryChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xc79a420c_efd9_4058_9295_3e8b4bcab645);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2HistoryChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2HttpHeadersCollectionIterator(::windows::core::IUnknown);
impl ICoreWebView2HttpHeadersCollectionIterator {
pub unsafe fn GetCurrentHeader(
&self,
name: *mut ::windows::core::PWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).GetCurrentHeader)(
::windows::core::Vtable::as_raw(self),
name,
value,
)
.ok()
}
pub unsafe fn HasCurrentHeader(
&self,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasCurrentHeader)(
::windows::core::Vtable::as_raw(self),
hascurrent,
)
.ok()
}
pub unsafe fn MoveNext(
&self,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MoveNext)(
::windows::core::Vtable::as_raw(self),
hasnext,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2HttpHeadersCollectionIterator,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2HttpHeadersCollectionIterator {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2HttpHeadersCollectionIterator {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2HttpHeadersCollectionIterator {}
impl ::core::fmt::Debug for ICoreWebView2HttpHeadersCollectionIterator {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2HttpHeadersCollectionIterator")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2HttpHeadersCollectionIterator {
type Vtable = ICoreWebView2HttpHeadersCollectionIterator_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2HttpHeadersCollectionIterator {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x0702fc30_f43b_47bb_ab52_a42cb552ad9f);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2HttpHeadersCollectionIterator_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub GetCurrentHeader: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub HasCurrentHeader: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub MoveNext: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2HttpRequestHeaders(::windows::core::IUnknown);
impl ICoreWebView2HttpRequestHeaders {
pub unsafe fn GetHeader<P0>(
&self,
name: P0,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).GetHeader)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
value,
)
.ok()
}
pub unsafe fn GetHeaders<P0>(
&self,
name: P0,
) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetHeaders)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Contains<P0>(
&self,
name: P0,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).Contains)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
contains,
)
.ok()
}
pub unsafe fn SetHeader<P0, P1>(&self, name: P0, value: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetHeader)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
value.into().abi(),
)
.ok()
}
pub unsafe fn RemoveHeader<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).RemoveHeader)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
)
.ok()
}
pub unsafe fn GetIterator(
&self,
) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetIterator)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2HttpRequestHeaders, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2HttpRequestHeaders {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2HttpRequestHeaders {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2HttpRequestHeaders {}
impl ::core::fmt::Debug for ICoreWebView2HttpRequestHeaders {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2HttpRequestHeaders")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2HttpRequestHeaders {
type Vtable = ICoreWebView2HttpRequestHeaders_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2HttpRequestHeaders {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe86cac0e_5523_465c_b536_8fb9fc8c8c60);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2HttpRequestHeaders_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub GetHeader: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub GetHeaders: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Contains: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetHeader: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub RemoveHeader: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub GetIterator: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2HttpResponseHeaders(::windows::core::IUnknown);
impl ICoreWebView2HttpResponseHeaders {
pub unsafe fn AppendHeader<P0, P1>(&self, name: P0, value: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).AppendHeader)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
value.into().abi(),
)
.ok()
}
pub unsafe fn Contains<P0>(
&self,
name: P0,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).Contains)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
contains,
)
.ok()
}
pub unsafe fn GetHeader<P0>(
&self,
name: P0,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).GetHeader)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
value,
)
.ok()
}
pub unsafe fn GetHeaders<P0>(
&self,
name: P0,
) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetHeaders)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn GetIterator(
&self,
) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetIterator)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2HttpResponseHeaders, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2HttpResponseHeaders {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2HttpResponseHeaders {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2HttpResponseHeaders {}
impl ::core::fmt::Debug for ICoreWebView2HttpResponseHeaders {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2HttpResponseHeaders")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2HttpResponseHeaders {
type Vtable = ICoreWebView2HttpResponseHeaders_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2HttpResponseHeaders {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x03c5ff5a_9b45_4a88_881c_89a9f328619c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2HttpResponseHeaders_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub AppendHeader: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub Contains: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GetHeader: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub GetHeaders: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub GetIterator: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable
for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler
{
type Vtable = ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x3117da26_ae13_438d_bd46_edbeb2c4ce81);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2IsDocumentPlayingAudioChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2IsDocumentPlayingAudioChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2IsDocumentPlayingAudioChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
type Vtable = ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x5def109a_2f4b_49fa_b7f6_11c39e513328);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2IsMutedChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2IsMutedChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2IsMutedChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2IsMutedChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2IsMutedChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2IsMutedChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2IsMutedChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2IsMutedChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2IsMutedChangedEventHandler {
type Vtable = ICoreWebView2IsMutedChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2IsMutedChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x57d90347_cd0e_4952_a4a2_7483a2756f08);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2IsMutedChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2MoveFocusRequestedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2MoveFocusRequestedEventArgs {
pub unsafe fn Reason(
&self,
reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Reason)(
::windows::core::Vtable::as_raw(self),
reason,
)
.ok()
}
pub unsafe fn Handled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Handled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetHandled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetHandled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2MoveFocusRequestedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2MoveFocusRequestedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2MoveFocusRequestedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2MoveFocusRequestedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2MoveFocusRequestedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2MoveFocusRequestedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2MoveFocusRequestedEventArgs {
type Vtable = ICoreWebView2MoveFocusRequestedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2MoveFocusRequestedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x2d6aa13b_3839_4a15_92fc_d88b3c0d9c9d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2MoveFocusRequestedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Reason: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::HRESULT,
pub Handled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetHandled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2MoveFocusRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2MoveFocusRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Controller>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2MoveFocusRequestedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2MoveFocusRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2MoveFocusRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2MoveFocusRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2MoveFocusRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2MoveFocusRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2MoveFocusRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2MoveFocusRequestedEventHandler {
type Vtable = ICoreWebView2MoveFocusRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2MoveFocusRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x69035451_6dc7_4cb8_9bce_b2bd70ad289f);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2MoveFocusRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NavigationCompletedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2NavigationCompletedEventArgs {
pub unsafe fn IsSuccess(
&self,
issuccess: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsSuccess)(
::windows::core::Vtable::as_raw(self),
issuccess,
)
.ok()
}
pub unsafe fn WebErrorStatus(
&self,
weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).WebErrorStatus)(
::windows::core::Vtable::as_raw(self),
weberrorstatus,
)
.ok()
}
pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).NavigationId)(
::windows::core::Vtable::as_raw(self),
navigationid,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NavigationCompletedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2NavigationCompletedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NavigationCompletedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NavigationCompletedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2NavigationCompletedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NavigationCompletedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NavigationCompletedEventArgs {
type Vtable = ICoreWebView2NavigationCompletedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NavigationCompletedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x30d68b7d_20d9_4752_a9ca_ec8448fbb5c1);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NavigationCompletedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub IsSuccess: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
issuccess: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub WebErrorStatus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::HRESULT,
pub NavigationId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NavigationCompletedEventArgs2(::windows::core::IUnknown);
impl ICoreWebView2NavigationCompletedEventArgs2 {
pub unsafe fn IsSuccess(
&self,
issuccess: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsSuccess)(
::windows::core::Vtable::as_raw(self),
issuccess,
)
.ok()
}
pub unsafe fn WebErrorStatus(
&self,
weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.WebErrorStatus)(
::windows::core::Vtable::as_raw(self),
weberrorstatus,
)
.ok()
}
pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.NavigationId)(
::windows::core::Vtable::as_raw(self),
navigationid,
)
.ok()
}
pub unsafe fn HttpStatusCode(&self, http_status_code: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HttpStatusCode)(
::windows::core::Vtable::as_raw(self),
http_status_code,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NavigationCompletedEventArgs2,
::windows::core::IUnknown,
ICoreWebView2NavigationCompletedEventArgs
);
impl ::core::clone::Clone for ICoreWebView2NavigationCompletedEventArgs2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NavigationCompletedEventArgs2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NavigationCompletedEventArgs2 {}
impl ::core::fmt::Debug for ICoreWebView2NavigationCompletedEventArgs2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NavigationCompletedEventArgs2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NavigationCompletedEventArgs2 {
type Vtable = ICoreWebView2NavigationCompletedEventArgs2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NavigationCompletedEventArgs2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xfdf8b738_ee1e_4db2_a329_8d7d7b74d792);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NavigationCompletedEventArgs2_Vtbl {
pub base__: ICoreWebView2NavigationCompletedEventArgs_Vtbl,
pub HttpStatusCode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
http_status_code: *mut i32,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NavigationCompletedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2NavigationCompletedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NavigationCompletedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2NavigationCompletedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NavigationCompletedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NavigationCompletedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2NavigationCompletedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NavigationCompletedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NavigationCompletedEventHandler {
type Vtable = ICoreWebView2NavigationCompletedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NavigationCompletedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xd33a35bf_1c49_4f98_93ab_006e0533fe1c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NavigationCompletedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NavigationStartingEventArgs(::windows::core::IUnknown);
impl ICoreWebView2NavigationStartingEventArgs {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Uri)(::windows::core::Vtable::as_raw(self), uri).ok()
}
pub unsafe fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsUserInitiated)(
::windows::core::Vtable::as_raw(self),
isuserinitiated,
)
.ok()
}
pub unsafe fn IsRedirected(
&self,
isredirected: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsRedirected)(
::windows::core::Vtable::as_raw(self),
isredirected,
)
.ok()
}
pub unsafe fn RequestHeaders(
&self,
) -> ::windows::core::Result<ICoreWebView2HttpRequestHeaders> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).RequestHeaders)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Cancel(
&self,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Cancel)(
::windows::core::Vtable::as_raw(self),
cancel,
)
.ok()
}
pub unsafe fn SetCancel<P0>(&self, cancel: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetCancel)(
::windows::core::Vtable::as_raw(self),
cancel.into(),
)
.ok()
}
pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).NavigationId)(
::windows::core::Vtable::as_raw(self),
navigationid,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NavigationStartingEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2NavigationStartingEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NavigationStartingEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NavigationStartingEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2NavigationStartingEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NavigationStartingEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NavigationStartingEventArgs {
type Vtable = ICoreWebView2NavigationStartingEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NavigationStartingEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x5b495469_e119_438a_9b18_7604f25f2e49);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NavigationStartingEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Uri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub IsUserInitiated: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsRedirected: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isredirected: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub RequestHeaders: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
requestheaders: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Cancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetCancel: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cancel: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub NavigationId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NavigationStartingEventArgs2(::windows::core::IUnknown);
impl ICoreWebView2NavigationStartingEventArgs2 {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Uri)(
::windows::core::Vtable::as_raw(self),
uri,
)
.ok()
}
pub unsafe fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsUserInitiated)(
::windows::core::Vtable::as_raw(self),
isuserinitiated,
)
.ok()
}
pub unsafe fn IsRedirected(
&self,
isredirected: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsRedirected)(
::windows::core::Vtable::as_raw(self),
isredirected,
)
.ok()
}
pub unsafe fn RequestHeaders(
&self,
) -> ::windows::core::Result<ICoreWebView2HttpRequestHeaders> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.RequestHeaders)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Cancel(
&self,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Cancel)(
::windows::core::Vtable::as_raw(self),
cancel,
)
.ok()
}
pub unsafe fn SetCancel<P0>(&self, cancel: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).base__.SetCancel)(
::windows::core::Vtable::as_raw(self),
cancel.into(),
)
.ok()
}
pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.NavigationId)(
::windows::core::Vtable::as_raw(self),
navigationid,
)
.ok()
}
pub unsafe fn AdditionalAllowedFrameAncestors(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AdditionalAllowedFrameAncestors)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetAdditionalAllowedFrameAncestors<P0>(
&self,
value: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetAdditionalAllowedFrameAncestors)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NavigationStartingEventArgs2,
::windows::core::IUnknown,
ICoreWebView2NavigationStartingEventArgs
);
impl ::core::clone::Clone for ICoreWebView2NavigationStartingEventArgs2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NavigationStartingEventArgs2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NavigationStartingEventArgs2 {}
impl ::core::fmt::Debug for ICoreWebView2NavigationStartingEventArgs2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NavigationStartingEventArgs2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NavigationStartingEventArgs2 {
type Vtable = ICoreWebView2NavigationStartingEventArgs2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NavigationStartingEventArgs2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x9086be93_91aa_472d_a7e0_579f2ba006ad);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NavigationStartingEventArgs2_Vtbl {
pub base__: ICoreWebView2NavigationStartingEventArgs_Vtbl,
pub AdditionalAllowedFrameAncestors: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetAdditionalAllowedFrameAncestors: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NavigationStartingEventHandler(::windows::core::IUnknown);
impl ICoreWebView2NavigationStartingEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NavigationStartingEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2NavigationStartingEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NavigationStartingEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NavigationStartingEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2NavigationStartingEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NavigationStartingEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NavigationStartingEventHandler {
type Vtable = ICoreWebView2NavigationStartingEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NavigationStartingEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x9adbe429_f36d_432b_9ddc_f8881fbd76e3);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NavigationStartingEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NewBrowserVersionAvailableEventHandler(::windows::core::IUnknown);
impl ICoreWebView2NewBrowserVersionAvailableEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Environment>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NewBrowserVersionAvailableEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2NewBrowserVersionAvailableEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NewBrowserVersionAvailableEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NewBrowserVersionAvailableEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2NewBrowserVersionAvailableEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NewBrowserVersionAvailableEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NewBrowserVersionAvailableEventHandler {
type Vtable = ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NewBrowserVersionAvailableEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf9a2976e_d34e_44fc_adee_81b6b57ca914);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NewWindowRequestedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2NewWindowRequestedEventArgs {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Uri)(::windows::core::Vtable::as_raw(self), uri).ok()
}
pub unsafe fn SetNewWindow<P0>(&self, newwindow: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
{
(::windows::core::Vtable::vtable(self).SetNewWindow)(
::windows::core::Vtable::as_raw(self),
newwindow.into().abi(),
)
.ok()
}
pub unsafe fn NewWindow(&self) -> ::windows::core::Result<ICoreWebView2> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).NewWindow)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SetHandled<P0>(&self, handled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetHandled)(
::windows::core::Vtable::as_raw(self),
handled.into(),
)
.ok()
}
pub unsafe fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Handled)(
::windows::core::Vtable::as_raw(self),
handled,
)
.ok()
}
pub unsafe fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsUserInitiated)(
::windows::core::Vtable::as_raw(self),
isuserinitiated,
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn WindowFeatures(&self) -> ::windows::core::Result<ICoreWebView2WindowFeatures> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).WindowFeatures)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NewWindowRequestedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2NewWindowRequestedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NewWindowRequestedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NewWindowRequestedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2NewWindowRequestedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NewWindowRequestedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NewWindowRequestedEventArgs {
type Vtable = ICoreWebView2NewWindowRequestedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NewWindowRequestedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x34acb11c_fc37_4418_9132_f9c21d1eafb9);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NewWindowRequestedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Uri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetNewWindow: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
newwindow: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub NewWindow: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
newwindow: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SetHandled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub Handled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsUserInitiated: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub WindowFeatures: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NewWindowRequestedEventArgs2(::windows::core::IUnknown);
impl ICoreWebView2NewWindowRequestedEventArgs2 {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Uri)(
::windows::core::Vtable::as_raw(self),
uri,
)
.ok()
}
pub unsafe fn SetNewWindow<P0>(&self, newwindow: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
{
(::windows::core::Vtable::vtable(self).base__.SetNewWindow)(
::windows::core::Vtable::as_raw(self),
newwindow.into().abi(),
)
.ok()
}
pub unsafe fn NewWindow(&self) -> ::windows::core::Result<ICoreWebView2> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.NewWindow)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SetHandled<P0>(&self, handled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).base__.SetHandled)(
::windows::core::Vtable::as_raw(self),
handled.into(),
)
.ok()
}
pub unsafe fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Handled)(
::windows::core::Vtable::as_raw(self),
handled,
)
.ok()
}
pub unsafe fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsUserInitiated)(
::windows::core::Vtable::as_raw(self),
isuserinitiated,
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn WindowFeatures(&self) -> ::windows::core::Result<ICoreWebView2WindowFeatures> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.WindowFeatures)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Name(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Name)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NewWindowRequestedEventArgs2,
::windows::core::IUnknown,
ICoreWebView2NewWindowRequestedEventArgs
);
impl ::core::clone::Clone for ICoreWebView2NewWindowRequestedEventArgs2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NewWindowRequestedEventArgs2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NewWindowRequestedEventArgs2 {}
impl ::core::fmt::Debug for ICoreWebView2NewWindowRequestedEventArgs2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NewWindowRequestedEventArgs2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NewWindowRequestedEventArgs2 {
type Vtable = ICoreWebView2NewWindowRequestedEventArgs2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NewWindowRequestedEventArgs2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xbbc7baed_74c6_4c92_b63a_7f5aeae03de3);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NewWindowRequestedEventArgs2_Vtbl {
pub base__: ICoreWebView2NewWindowRequestedEventArgs_Vtbl,
pub Name: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2NewWindowRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2NewWindowRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2NewWindowRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2NewWindowRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2NewWindowRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2NewWindowRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2NewWindowRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2NewWindowRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2NewWindowRequestedEventHandler {
type Vtable = ICoreWebView2NewWindowRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2NewWindowRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xd4c185fe_c81c_4989_97af_2d3fa7ab5651);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2NewWindowRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PermissionRequestedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2PermissionRequestedEventArgs {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Uri)(::windows::core::Vtable::as_raw(self), uri).ok()
}
pub unsafe fn PermissionKind(
&self,
permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PermissionKind)(
::windows::core::Vtable::as_raw(self),
permissionkind,
)
.ok()
}
pub unsafe fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsUserInitiated)(
::windows::core::Vtable::as_raw(self),
isuserinitiated,
)
.ok()
}
pub unsafe fn State(
&self,
state: *mut COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).State)(::windows::core::Vtable::as_raw(self), state)
.ok()
}
pub unsafe fn SetState(
&self,
state: COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetState)(
::windows::core::Vtable::as_raw(self),
state,
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2PermissionRequestedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2PermissionRequestedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PermissionRequestedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PermissionRequestedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2PermissionRequestedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PermissionRequestedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PermissionRequestedEventArgs {
type Vtable = ICoreWebView2PermissionRequestedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PermissionRequestedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x973ae2ef_ff18_4894_8fb2_3c758f046810);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PermissionRequestedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Uri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub PermissionKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
) -> ::windows::core::HRESULT,
pub IsUserInitiated: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub State: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
state: *mut COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::HRESULT,
pub SetState: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
state: COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PermissionRequestedEventArgs2(::windows::core::IUnknown);
impl ICoreWebView2PermissionRequestedEventArgs2 {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Uri)(
::windows::core::Vtable::as_raw(self),
uri,
)
.ok()
}
pub unsafe fn PermissionKind(
&self,
permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.PermissionKind)(
::windows::core::Vtable::as_raw(self),
permissionkind,
)
.ok()
}
pub unsafe fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsUserInitiated)(
::windows::core::Vtable::as_raw(self),
isuserinitiated,
)
.ok()
}
pub unsafe fn State(
&self,
state: *mut COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.State)(
::windows::core::Vtable::as_raw(self),
state,
)
.ok()
}
pub unsafe fn SetState(
&self,
state: COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetState)(
::windows::core::Vtable::as_raw(self),
state,
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Handled)(
::windows::core::Vtable::as_raw(self),
handled,
)
.ok()
}
pub unsafe fn SetHandled<P0>(&self, handled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetHandled)(
::windows::core::Vtable::as_raw(self),
handled.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2PermissionRequestedEventArgs2,
::windows::core::IUnknown,
ICoreWebView2PermissionRequestedEventArgs
);
impl ::core::clone::Clone for ICoreWebView2PermissionRequestedEventArgs2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PermissionRequestedEventArgs2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PermissionRequestedEventArgs2 {}
impl ::core::fmt::Debug for ICoreWebView2PermissionRequestedEventArgs2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PermissionRequestedEventArgs2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PermissionRequestedEventArgs2 {
type Vtable = ICoreWebView2PermissionRequestedEventArgs2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PermissionRequestedEventArgs2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x74d7127f_9de6_4200_8734_42d6fb4ff741);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PermissionRequestedEventArgs2_Vtbl {
pub base__: ICoreWebView2PermissionRequestedEventArgs_Vtbl,
pub Handled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetHandled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PermissionRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2PermissionRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2PermissionRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2PermissionRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PermissionRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PermissionRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2PermissionRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PermissionRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PermissionRequestedEventHandler {
type Vtable = ICoreWebView2PermissionRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PermissionRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x15e1c6a3_c72a_4df3_91d7_d097fbec6bfd);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PermissionRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PointerInfo(::windows::core::IUnknown);
impl ICoreWebView2PointerInfo {
pub unsafe fn PointerKind(&self, pointerkind: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PointerKind)(
::windows::core::Vtable::as_raw(self),
pointerkind,
)
.ok()
}
pub unsafe fn SetPointerKind(&self, pointerkind: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPointerKind)(
::windows::core::Vtable::as_raw(self),
pointerkind,
)
.ok()
}
pub unsafe fn PointerId(&self, pointerid: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PointerId)(
::windows::core::Vtable::as_raw(self),
pointerid,
)
.ok()
}
pub unsafe fn SetPointerId(&self, pointerid: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPointerId)(
::windows::core::Vtable::as_raw(self),
pointerid,
)
.ok()
}
pub unsafe fn FrameId(&self, frameid: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).FrameId)(
::windows::core::Vtable::as_raw(self),
frameid,
)
.ok()
}
pub unsafe fn SetFrameId(&self, frameid: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetFrameId)(
::windows::core::Vtable::as_raw(self),
frameid,
)
.ok()
}
pub unsafe fn PointerFlags(&self, pointerflags: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PointerFlags)(
::windows::core::Vtable::as_raw(self),
pointerflags,
)
.ok()
}
pub unsafe fn SetPointerFlags(&self, pointerflags: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPointerFlags)(
::windows::core::Vtable::as_raw(self),
pointerflags,
)
.ok()
}
pub unsafe fn PointerDeviceRect(
&self,
pointerdevicerect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PointerDeviceRect)(
::windows::core::Vtable::as_raw(self),
pointerdevicerect,
)
.ok()
}
pub unsafe fn SetPointerDeviceRect(
&self,
pointerdevicerect: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPointerDeviceRect)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(pointerdevicerect),
)
.ok()
}
pub unsafe fn DisplayRect(
&self,
displayrect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DisplayRect)(
::windows::core::Vtable::as_raw(self),
displayrect,
)
.ok()
}
pub unsafe fn SetDisplayRect(
&self,
displayrect: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetDisplayRect)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(displayrect),
)
.ok()
}
pub unsafe fn PixelLocation(
&self,
pixellocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PixelLocation)(
::windows::core::Vtable::as_raw(self),
pixellocation,
)
.ok()
}
pub unsafe fn SetPixelLocation(
&self,
pixellocation: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPixelLocation)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(pixellocation),
)
.ok()
}
pub unsafe fn HimetricLocation(
&self,
himetriclocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HimetricLocation)(
::windows::core::Vtable::as_raw(self),
himetriclocation,
)
.ok()
}
pub unsafe fn SetHimetricLocation(
&self,
himetriclocation: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetHimetricLocation)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(himetriclocation),
)
.ok()
}
pub unsafe fn PixelLocationRaw(
&self,
pixellocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PixelLocationRaw)(
::windows::core::Vtable::as_raw(self),
pixellocationraw,
)
.ok()
}
pub unsafe fn SetPixelLocationRaw(
&self,
pixellocationraw: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPixelLocationRaw)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(pixellocationraw),
)
.ok()
}
pub unsafe fn HimetricLocationRaw(
&self,
himetriclocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HimetricLocationRaw)(
::windows::core::Vtable::as_raw(self),
himetriclocationraw,
)
.ok()
}
pub unsafe fn SetHimetricLocationRaw(
&self,
himetriclocationraw: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetHimetricLocationRaw)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(himetriclocationraw),
)
.ok()
}
pub unsafe fn Time(&self, time: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Time)(::windows::core::Vtable::as_raw(self), time)
.ok()
}
pub unsafe fn SetTime(&self, time: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetTime)(::windows::core::Vtable::as_raw(self), time)
.ok()
}
pub unsafe fn HistoryCount(&self, historycount: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HistoryCount)(
::windows::core::Vtable::as_raw(self),
historycount,
)
.ok()
}
pub unsafe fn SetHistoryCount(&self, historycount: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetHistoryCount)(
::windows::core::Vtable::as_raw(self),
historycount,
)
.ok()
}
pub unsafe fn InputData(&self, inputdata: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).InputData)(
::windows::core::Vtable::as_raw(self),
inputdata,
)
.ok()
}
pub unsafe fn SetInputData(&self, inputdata: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetInputData)(
::windows::core::Vtable::as_raw(self),
inputdata,
)
.ok()
}
pub unsafe fn KeyStates(&self, keystates: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).KeyStates)(
::windows::core::Vtable::as_raw(self),
keystates,
)
.ok()
}
pub unsafe fn SetKeyStates(&self, keystates: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetKeyStates)(
::windows::core::Vtable::as_raw(self),
keystates,
)
.ok()
}
pub unsafe fn PerformanceCount(
&self,
performancecount: *mut u64,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PerformanceCount)(
::windows::core::Vtable::as_raw(self),
performancecount,
)
.ok()
}
pub unsafe fn SetPerformanceCount(&self, performancecount: u64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPerformanceCount)(
::windows::core::Vtable::as_raw(self),
performancecount,
)
.ok()
}
pub unsafe fn ButtonChangeKind(
&self,
buttonchangekind: *mut i32,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ButtonChangeKind)(
::windows::core::Vtable::as_raw(self),
buttonchangekind,
)
.ok()
}
pub unsafe fn SetButtonChangeKind(&self, buttonchangekind: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetButtonChangeKind)(
::windows::core::Vtable::as_raw(self),
buttonchangekind,
)
.ok()
}
pub unsafe fn PenFlags(&self, penflags: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PenFlags)(
::windows::core::Vtable::as_raw(self),
penflags,
)
.ok()
}
pub unsafe fn SetPenFlags(&self, penflags: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPenFlags)(
::windows::core::Vtable::as_raw(self),
penflags,
)
.ok()
}
pub unsafe fn PenMask(&self, penmask: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PenMask)(
::windows::core::Vtable::as_raw(self),
penmask,
)
.ok()
}
pub unsafe fn SetPenMask(&self, penmask: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPenMask)(
::windows::core::Vtable::as_raw(self),
penmask,
)
.ok()
}
pub unsafe fn PenPressure(&self, penpressure: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PenPressure)(
::windows::core::Vtable::as_raw(self),
penpressure,
)
.ok()
}
pub unsafe fn SetPenPressure(&self, penpressure: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPenPressure)(
::windows::core::Vtable::as_raw(self),
penpressure,
)
.ok()
}
pub unsafe fn PenRotation(&self, penrotation: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PenRotation)(
::windows::core::Vtable::as_raw(self),
penrotation,
)
.ok()
}
pub unsafe fn SetPenRotation(&self, penrotation: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPenRotation)(
::windows::core::Vtable::as_raw(self),
penrotation,
)
.ok()
}
pub unsafe fn PenTiltX(&self, pentiltx: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PenTiltX)(
::windows::core::Vtable::as_raw(self),
pentiltx,
)
.ok()
}
pub unsafe fn SetPenTiltX(&self, pentiltx: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPenTiltX)(
::windows::core::Vtable::as_raw(self),
pentiltx,
)
.ok()
}
pub unsafe fn PenTiltY(&self, pentilty: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PenTiltY)(
::windows::core::Vtable::as_raw(self),
pentilty,
)
.ok()
}
pub unsafe fn SetPenTiltY(&self, pentilty: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPenTiltY)(
::windows::core::Vtable::as_raw(self),
pentilty,
)
.ok()
}
pub unsafe fn TouchFlags(&self, touchflags: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TouchFlags)(
::windows::core::Vtable::as_raw(self),
touchflags,
)
.ok()
}
pub unsafe fn SetTouchFlags(&self, touchflags: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetTouchFlags)(
::windows::core::Vtable::as_raw(self),
touchflags,
)
.ok()
}
pub unsafe fn TouchMask(&self, touchmask: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TouchMask)(
::windows::core::Vtable::as_raw(self),
touchmask,
)
.ok()
}
pub unsafe fn SetTouchMask(&self, touchmask: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetTouchMask)(
::windows::core::Vtable::as_raw(self),
touchmask,
)
.ok()
}
pub unsafe fn TouchContact(
&self,
touchcontact: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TouchContact)(
::windows::core::Vtable::as_raw(self),
touchcontact,
)
.ok()
}
pub unsafe fn SetTouchContact(
&self,
touchcontact: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetTouchContact)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(touchcontact),
)
.ok()
}
pub unsafe fn TouchContactRaw(
&self,
touchcontactraw: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TouchContactRaw)(
::windows::core::Vtable::as_raw(self),
touchcontactraw,
)
.ok()
}
pub unsafe fn SetTouchContactRaw(
&self,
touchcontactraw: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetTouchContactRaw)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(touchcontactraw),
)
.ok()
}
pub unsafe fn TouchOrientation(
&self,
touchorientation: *mut u32,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TouchOrientation)(
::windows::core::Vtable::as_raw(self),
touchorientation,
)
.ok()
}
pub unsafe fn SetTouchOrientation(&self, touchorientation: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetTouchOrientation)(
::windows::core::Vtable::as_raw(self),
touchorientation,
)
.ok()
}
pub unsafe fn TouchPressure(&self, touchpressure: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TouchPressure)(
::windows::core::Vtable::as_raw(self),
touchpressure,
)
.ok()
}
pub unsafe fn SetTouchPressure(&self, touchpressure: u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetTouchPressure)(
::windows::core::Vtable::as_raw(self),
touchpressure,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2PointerInfo, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2PointerInfo {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PointerInfo {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PointerInfo {}
impl ::core::fmt::Debug for ICoreWebView2PointerInfo {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PointerInfo")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PointerInfo {
type Vtable = ICoreWebView2PointerInfo_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PointerInfo {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe6995887_d10d_4f5d_9359_4ce46e4f96b9);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PointerInfo_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub PointerKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerkind: *mut u32,
) -> ::windows::core::HRESULT,
pub SetPointerKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerkind: u32,
) -> ::windows::core::HRESULT,
pub PointerId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerid: *mut u32,
) -> ::windows::core::HRESULT,
pub SetPointerId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerid: u32,
) -> ::windows::core::HRESULT,
pub FrameId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
frameid: *mut u32,
) -> ::windows::core::HRESULT,
pub SetFrameId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
frameid: u32,
) -> ::windows::core::HRESULT,
pub PointerFlags: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerflags: *mut u32,
) -> ::windows::core::HRESULT,
pub SetPointerFlags: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerflags: u32,
) -> ::windows::core::HRESULT,
pub PointerDeviceRect: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerdevicerect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub SetPointerDeviceRect: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pointerdevicerect: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub DisplayRect: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
displayrect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub SetDisplayRect: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
displayrect: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub PixelLocation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pixellocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub SetPixelLocation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pixellocation: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub HimetricLocation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
himetriclocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub SetHimetricLocation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
himetriclocation: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub PixelLocationRaw: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pixellocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub SetPixelLocationRaw: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pixellocationraw: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub HimetricLocationRaw: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
himetriclocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub SetHimetricLocationRaw: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
himetriclocationraw: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub Time: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
time: *mut u32,
) -> ::windows::core::HRESULT,
pub SetTime: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
time: u32,
) -> ::windows::core::HRESULT,
pub HistoryCount: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
historycount: *mut u32,
) -> ::windows::core::HRESULT,
pub SetHistoryCount: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
historycount: u32,
) -> ::windows::core::HRESULT,
pub InputData: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
inputdata: *mut i32,
) -> ::windows::core::HRESULT,
pub SetInputData: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
inputdata: i32,
) -> ::windows::core::HRESULT,
pub KeyStates: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
keystates: *mut u32,
) -> ::windows::core::HRESULT,
pub SetKeyStates: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
keystates: u32,
) -> ::windows::core::HRESULT,
pub PerformanceCount: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
performancecount: *mut u64,
) -> ::windows::core::HRESULT,
pub SetPerformanceCount: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
performancecount: u64,
) -> ::windows::core::HRESULT,
pub ButtonChangeKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
buttonchangekind: *mut i32,
) -> ::windows::core::HRESULT,
pub SetButtonChangeKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
buttonchangekind: i32,
) -> ::windows::core::HRESULT,
pub PenFlags: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penflags: *mut u32,
) -> ::windows::core::HRESULT,
pub SetPenFlags: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penflags: u32,
) -> ::windows::core::HRESULT,
pub PenMask: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penmask: *mut u32,
) -> ::windows::core::HRESULT,
pub SetPenMask: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penmask: u32,
) -> ::windows::core::HRESULT,
pub PenPressure: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penpressure: *mut u32,
) -> ::windows::core::HRESULT,
pub SetPenPressure: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penpressure: u32,
) -> ::windows::core::HRESULT,
pub PenRotation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penrotation: *mut u32,
) -> ::windows::core::HRESULT,
pub SetPenRotation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
penrotation: u32,
) -> ::windows::core::HRESULT,
pub PenTiltX: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pentiltx: *mut i32,
) -> ::windows::core::HRESULT,
pub SetPenTiltX: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pentiltx: i32,
) -> ::windows::core::HRESULT,
pub PenTiltY: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pentilty: *mut i32,
) -> ::windows::core::HRESULT,
pub SetPenTiltY: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pentilty: i32,
) -> ::windows::core::HRESULT,
pub TouchFlags: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchflags: *mut u32,
) -> ::windows::core::HRESULT,
pub SetTouchFlags: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchflags: u32,
) -> ::windows::core::HRESULT,
pub TouchMask: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchmask: *mut u32,
) -> ::windows::core::HRESULT,
pub SetTouchMask: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchmask: u32,
) -> ::windows::core::HRESULT,
pub TouchContact: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchcontact: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub SetTouchContact: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchcontact: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub TouchContactRaw: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchcontactraw: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub SetTouchContactRaw: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchcontactraw: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT,
pub TouchOrientation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchorientation: *mut u32,
) -> ::windows::core::HRESULT,
pub SetTouchOrientation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchorientation: u32,
) -> ::windows::core::HRESULT,
pub TouchPressure: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchpressure: *mut u32,
) -> ::windows::core::HRESULT,
pub SetTouchPressure: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
touchpressure: u32,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PrintCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2PrintCompletedHandler {
pub unsafe fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
printstatus: COREWEBVIEW2_PRINT_STATUS,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
printstatus,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2PrintCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2PrintCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PrintCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PrintCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2PrintCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PrintCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PrintCompletedHandler {
type Vtable = ICoreWebView2PrintCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PrintCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x8fd80075_ed08_42db_8570_f5d14977461e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PrintCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
printstatus: COREWEBVIEW2_PRINT_STATUS,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PrintSettings(::windows::core::IUnknown);
impl ICoreWebView2PrintSettings {
pub unsafe fn Orientation(
&self,
orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Orientation)(
::windows::core::Vtable::as_raw(self),
orientation,
)
.ok()
}
pub unsafe fn SetOrientation(
&self,
orientation: COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetOrientation)(
::windows::core::Vtable::as_raw(self),
orientation,
)
.ok()
}
pub unsafe fn ScaleFactor(&self, scalefactor: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ScaleFactor)(
::windows::core::Vtable::as_raw(self),
scalefactor,
)
.ok()
}
pub unsafe fn SetScaleFactor(&self, scalefactor: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetScaleFactor)(
::windows::core::Vtable::as_raw(self),
scalefactor,
)
.ok()
}
pub unsafe fn PageWidth(&self, pagewidth: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PageWidth)(
::windows::core::Vtable::as_raw(self),
pagewidth,
)
.ok()
}
pub unsafe fn SetPageWidth(&self, pagewidth: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPageWidth)(
::windows::core::Vtable::as_raw(self),
pagewidth,
)
.ok()
}
pub unsafe fn PageHeight(&self, pageheight: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PageHeight)(
::windows::core::Vtable::as_raw(self),
pageheight,
)
.ok()
}
pub unsafe fn SetPageHeight(&self, pageheight: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPageHeight)(
::windows::core::Vtable::as_raw(self),
pageheight,
)
.ok()
}
pub unsafe fn MarginTop(&self, margintop: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MarginTop)(
::windows::core::Vtable::as_raw(self),
margintop,
)
.ok()
}
pub unsafe fn SetMarginTop(&self, margintop: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetMarginTop)(
::windows::core::Vtable::as_raw(self),
margintop,
)
.ok()
}
pub unsafe fn MarginBottom(&self, marginbottom: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MarginBottom)(
::windows::core::Vtable::as_raw(self),
marginbottom,
)
.ok()
}
pub unsafe fn SetMarginBottom(&self, marginbottom: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetMarginBottom)(
::windows::core::Vtable::as_raw(self),
marginbottom,
)
.ok()
}
pub unsafe fn MarginLeft(&self, marginleft: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MarginLeft)(
::windows::core::Vtable::as_raw(self),
marginleft,
)
.ok()
}
pub unsafe fn SetMarginLeft(&self, marginleft: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetMarginLeft)(
::windows::core::Vtable::as_raw(self),
marginleft,
)
.ok()
}
pub unsafe fn MarginRight(&self, marginright: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MarginRight)(
::windows::core::Vtable::as_raw(self),
marginright,
)
.ok()
}
pub unsafe fn SetMarginRight(&self, marginright: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetMarginRight)(
::windows::core::Vtable::as_raw(self),
marginright,
)
.ok()
}
pub unsafe fn ShouldPrintBackgrounds(
&self,
shouldprintbackgrounds: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldPrintBackgrounds)(
::windows::core::Vtable::as_raw(self),
shouldprintbackgrounds,
)
.ok()
}
pub unsafe fn SetShouldPrintBackgrounds<P0>(
&self,
shouldprintbackgrounds: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetShouldPrintBackgrounds)(
::windows::core::Vtable::as_raw(self),
shouldprintbackgrounds.into(),
)
.ok()
}
pub unsafe fn ShouldPrintSelectionOnly(
&self,
shouldprintselectiononly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldPrintSelectionOnly)(
::windows::core::Vtable::as_raw(self),
shouldprintselectiononly,
)
.ok()
}
pub unsafe fn SetShouldPrintSelectionOnly<P0>(
&self,
shouldprintselectiononly: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetShouldPrintSelectionOnly)(
::windows::core::Vtable::as_raw(self),
shouldprintselectiononly.into(),
)
.ok()
}
pub unsafe fn ShouldPrintHeaderAndFooter(
&self,
shouldprintheaderandfooter: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldPrintHeaderAndFooter)(
::windows::core::Vtable::as_raw(self),
shouldprintheaderandfooter,
)
.ok()
}
pub unsafe fn SetShouldPrintHeaderAndFooter<P0>(
&self,
shouldprintheaderandfooter: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetShouldPrintHeaderAndFooter)(
::windows::core::Vtable::as_raw(self),
shouldprintheaderandfooter.into(),
)
.ok()
}
pub unsafe fn HeaderTitle(
&self,
headertitle: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HeaderTitle)(
::windows::core::Vtable::as_raw(self),
headertitle,
)
.ok()
}
pub unsafe fn SetHeaderTitle<P0>(&self, headertitle: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetHeaderTitle)(
::windows::core::Vtable::as_raw(self),
headertitle.into().abi(),
)
.ok()
}
pub unsafe fn FooterUri(
&self,
footeruri: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).FooterUri)(
::windows::core::Vtable::as_raw(self),
footeruri,
)
.ok()
}
pub unsafe fn SetFooterUri<P0>(&self, footeruri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetFooterUri)(
::windows::core::Vtable::as_raw(self),
footeruri.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2PrintSettings, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2PrintSettings {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PrintSettings {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PrintSettings {}
impl ::core::fmt::Debug for ICoreWebView2PrintSettings {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PrintSettings")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PrintSettings {
type Vtable = ICoreWebView2PrintSettings_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PrintSettings {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x377f3721_c74e_48ca_8db1_df68e51d60e2);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PrintSettings_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Orientation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::HRESULT,
pub SetOrientation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
orientation: COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::HRESULT,
pub ScaleFactor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
scalefactor: *mut f64,
) -> ::windows::core::HRESULT,
pub SetScaleFactor: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
scalefactor: f64,
) -> ::windows::core::HRESULT,
pub PageWidth: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pagewidth: *mut f64,
) -> ::windows::core::HRESULT,
pub SetPageWidth: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pagewidth: f64,
) -> ::windows::core::HRESULT,
pub PageHeight: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pageheight: *mut f64,
) -> ::windows::core::HRESULT,
pub SetPageHeight: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
pageheight: f64,
) -> ::windows::core::HRESULT,
pub MarginTop: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
margintop: *mut f64,
) -> ::windows::core::HRESULT,
pub SetMarginTop: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
margintop: f64,
) -> ::windows::core::HRESULT,
pub MarginBottom: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
marginbottom: *mut f64,
) -> ::windows::core::HRESULT,
pub SetMarginBottom: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
marginbottom: f64,
) -> ::windows::core::HRESULT,
pub MarginLeft: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
marginleft: *mut f64,
) -> ::windows::core::HRESULT,
pub SetMarginLeft: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
marginleft: f64,
) -> ::windows::core::HRESULT,
pub MarginRight: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
marginright: *mut f64,
) -> ::windows::core::HRESULT,
pub SetMarginRight: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
marginright: f64,
) -> ::windows::core::HRESULT,
pub ShouldPrintBackgrounds: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
shouldprintbackgrounds: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetShouldPrintBackgrounds: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
shouldprintbackgrounds: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub ShouldPrintSelectionOnly: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
shouldprintselectiononly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetShouldPrintSelectionOnly: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
shouldprintselectiononly: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub ShouldPrintHeaderAndFooter: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
shouldprintheaderandfooter: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetShouldPrintHeaderAndFooter: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
shouldprintheaderandfooter: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub HeaderTitle: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
headertitle: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetHeaderTitle: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
headertitle: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub FooterUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
footeruri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetFooterUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
footeruri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PrintSettings2(::windows::core::IUnknown);
impl ICoreWebView2PrintSettings2 {
pub unsafe fn Orientation(
&self,
orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Orientation)(
::windows::core::Vtable::as_raw(self),
orientation,
)
.ok()
}
pub unsafe fn SetOrientation(
&self,
orientation: COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetOrientation)(
::windows::core::Vtable::as_raw(self),
orientation,
)
.ok()
}
pub unsafe fn ScaleFactor(&self, scalefactor: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.ScaleFactor)(
::windows::core::Vtable::as_raw(self),
scalefactor,
)
.ok()
}
pub unsafe fn SetScaleFactor(&self, scalefactor: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetScaleFactor)(
::windows::core::Vtable::as_raw(self),
scalefactor,
)
.ok()
}
pub unsafe fn PageWidth(&self, pagewidth: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.PageWidth)(
::windows::core::Vtable::as_raw(self),
pagewidth,
)
.ok()
}
pub unsafe fn SetPageWidth(&self, pagewidth: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetPageWidth)(
::windows::core::Vtable::as_raw(self),
pagewidth,
)
.ok()
}
pub unsafe fn PageHeight(&self, pageheight: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.PageHeight)(
::windows::core::Vtable::as_raw(self),
pageheight,
)
.ok()
}
pub unsafe fn SetPageHeight(&self, pageheight: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetPageHeight)(
::windows::core::Vtable::as_raw(self),
pageheight,
)
.ok()
}
pub unsafe fn MarginTop(&self, margintop: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.MarginTop)(
::windows::core::Vtable::as_raw(self),
margintop,
)
.ok()
}
pub unsafe fn SetMarginTop(&self, margintop: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetMarginTop)(
::windows::core::Vtable::as_raw(self),
margintop,
)
.ok()
}
pub unsafe fn MarginBottom(&self, marginbottom: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.MarginBottom)(
::windows::core::Vtable::as_raw(self),
marginbottom,
)
.ok()
}
pub unsafe fn SetMarginBottom(&self, marginbottom: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetMarginBottom)(
::windows::core::Vtable::as_raw(self),
marginbottom,
)
.ok()
}
pub unsafe fn MarginLeft(&self, marginleft: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.MarginLeft)(
::windows::core::Vtable::as_raw(self),
marginleft,
)
.ok()
}
pub unsafe fn SetMarginLeft(&self, marginleft: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetMarginLeft)(
::windows::core::Vtable::as_raw(self),
marginleft,
)
.ok()
}
pub unsafe fn MarginRight(&self, marginright: *mut f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.MarginRight)(
::windows::core::Vtable::as_raw(self),
marginright,
)
.ok()
}
pub unsafe fn SetMarginRight(&self, marginright: f64) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.SetMarginRight)(
::windows::core::Vtable::as_raw(self),
marginright,
)
.ok()
}
pub unsafe fn ShouldPrintBackgrounds(
&self,
shouldprintbackgrounds: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.ShouldPrintBackgrounds)(
::windows::core::Vtable::as_raw(self),
shouldprintbackgrounds,
)
.ok()
}
pub unsafe fn SetShouldPrintBackgrounds<P0>(
&self,
shouldprintbackgrounds: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetShouldPrintBackgrounds)(
::windows::core::Vtable::as_raw(self),
shouldprintbackgrounds.into(),
)
.ok()
}
pub unsafe fn ShouldPrintSelectionOnly(
&self,
shouldprintselectiononly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.ShouldPrintSelectionOnly)(
::windows::core::Vtable::as_raw(self),
shouldprintselectiononly,
)
.ok()
}
pub unsafe fn SetShouldPrintSelectionOnly<P0>(
&self,
shouldprintselectiononly: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetShouldPrintSelectionOnly)(
::windows::core::Vtable::as_raw(self),
shouldprintselectiononly.into(),
)
.ok()
}
pub unsafe fn ShouldPrintHeaderAndFooter(
&self,
shouldprintheaderandfooter: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.ShouldPrintHeaderAndFooter)(
::windows::core::Vtable::as_raw(self),
shouldprintheaderandfooter,
)
.ok()
}
pub unsafe fn SetShouldPrintHeaderAndFooter<P0>(
&self,
shouldprintheaderandfooter: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetShouldPrintHeaderAndFooter)(
::windows::core::Vtable::as_raw(self),
shouldprintheaderandfooter.into(),
)
.ok()
}
pub unsafe fn HeaderTitle(
&self,
headertitle: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.HeaderTitle)(
::windows::core::Vtable::as_raw(self),
headertitle,
)
.ok()
}
pub unsafe fn SetHeaderTitle<P0>(&self, headertitle: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).base__.SetHeaderTitle)(
::windows::core::Vtable::as_raw(self),
headertitle.into().abi(),
)
.ok()
}
pub unsafe fn FooterUri(
&self,
footeruri: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.FooterUri)(
::windows::core::Vtable::as_raw(self),
footeruri,
)
.ok()
}
pub unsafe fn SetFooterUri<P0>(&self, footeruri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).base__.SetFooterUri)(
::windows::core::Vtable::as_raw(self),
footeruri.into().abi(),
)
.ok()
}
pub unsafe fn PageRanges(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PageRanges)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetPageRanges<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetPageRanges)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn PagesPerSide(&self, value: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PagesPerSide)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetPagesPerSide(&self, value: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPagesPerSide)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Copies(&self, value: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Copies)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetCopies(&self, value: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetCopies)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Collation(
&self,
value: *mut COREWEBVIEW2_PRINT_COLLATION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Collation)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetCollation(
&self,
value: COREWEBVIEW2_PRINT_COLLATION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetCollation)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ColorMode(
&self,
value: *mut COREWEBVIEW2_PRINT_COLOR_MODE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ColorMode)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetColorMode(
&self,
value: COREWEBVIEW2_PRINT_COLOR_MODE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetColorMode)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Duplex(
&self,
value: *mut COREWEBVIEW2_PRINT_DUPLEX,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Duplex)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDuplex(
&self,
value: COREWEBVIEW2_PRINT_DUPLEX,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetDuplex)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn MediaSize(
&self,
value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).MediaSize)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetMediaSize(
&self,
value: COREWEBVIEW2_PRINT_MEDIA_SIZE,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetMediaSize)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn PrinterName(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PrinterName)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetPrinterName<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetPrinterName)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2PrintSettings2,
::windows::core::IUnknown,
ICoreWebView2PrintSettings
);
impl ::core::clone::Clone for ICoreWebView2PrintSettings2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PrintSettings2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PrintSettings2 {}
impl ::core::fmt::Debug for ICoreWebView2PrintSettings2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PrintSettings2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PrintSettings2 {
type Vtable = ICoreWebView2PrintSettings2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PrintSettings2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xca7f0e1f_3484_41d1_8c1a_65cd44a63f8d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PrintSettings2_Vtbl {
pub base__: ICoreWebView2PrintSettings_Vtbl,
pub PageRanges: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetPageRanges: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub PagesPerSide: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT,
pub SetPagesPerSide: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows::core::HRESULT,
pub Copies: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT,
pub SetCopies: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows::core::HRESULT,
pub Collation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_COLLATION,
) -> ::windows::core::HRESULT,
pub SetCollation: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_COLLATION,
) -> ::windows::core::HRESULT,
pub ColorMode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_COLOR_MODE,
) -> ::windows::core::HRESULT,
pub SetColorMode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_COLOR_MODE,
) -> ::windows::core::HRESULT,
pub Duplex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_DUPLEX,
) -> ::windows::core::HRESULT,
pub SetDuplex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_DUPLEX,
) -> ::windows::core::HRESULT,
pub MediaSize: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
) -> ::windows::core::HRESULT,
pub SetMediaSize: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_MEDIA_SIZE,
) -> ::windows::core::HRESULT,
pub PrinterName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetPrinterName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PrintToPdfCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2PrintToPdfCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
issuccessful: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
issuccessful.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2PrintToPdfCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2PrintToPdfCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PrintToPdfCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PrintToPdfCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2PrintToPdfCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PrintToPdfCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PrintToPdfCompletedHandler {
type Vtable = ICoreWebView2PrintToPdfCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PrintToPdfCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xccf1ef04_fd8e_4d5f_b2de_0983e41b8c36);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PrintToPdfCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
issuccessful: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2PrintToPdfStreamCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2PrintToPdfStreamCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
pdfstream: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
pdfstream.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2PrintToPdfStreamCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2PrintToPdfStreamCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2PrintToPdfStreamCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2PrintToPdfStreamCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2PrintToPdfStreamCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2PrintToPdfStreamCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2PrintToPdfStreamCompletedHandler {
type Vtable = ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2PrintToPdfStreamCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4c9f8229_8f93_444f_a711_2c0dfd6359d5);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
pdfstream: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ProcessFailedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2ProcessFailedEventArgs {
pub unsafe fn ProcessFailedKind(
&self,
processfailedkind: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ProcessFailedKind)(
::windows::core::Vtable::as_raw(self),
processfailedkind,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ProcessFailedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ProcessFailedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ProcessFailedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ProcessFailedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2ProcessFailedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ProcessFailedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ProcessFailedEventArgs {
type Vtable = ICoreWebView2ProcessFailedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ProcessFailedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x8155a9a4_1474_4a86_8cae_151b0fa6b8ca);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ProcessFailedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub ProcessFailedKind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
processfailedkind: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ProcessFailedEventArgs2(::windows::core::IUnknown);
impl ICoreWebView2ProcessFailedEventArgs2 {
pub unsafe fn ProcessFailedKind(
&self,
processfailedkind: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.ProcessFailedKind)(::windows::core::Vtable::as_raw(self), processfailedkind)
.ok()
}
pub unsafe fn Reason(
&self,
reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Reason)(
::windows::core::Vtable::as_raw(self),
reason,
)
.ok()
}
pub unsafe fn ExitCode(&self, exitcode: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ExitCode)(
::windows::core::Vtable::as_raw(self),
exitcode,
)
.ok()
}
pub unsafe fn ProcessDescription(
&self,
processdescription: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ProcessDescription)(
::windows::core::Vtable::as_raw(self),
processdescription,
)
.ok()
}
pub unsafe fn FrameInfosForFailedProcess(
&self,
) -> ::windows::core::Result<ICoreWebView2FrameInfoCollection> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).FrameInfosForFailedProcess)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ProcessFailedEventArgs2,
::windows::core::IUnknown,
ICoreWebView2ProcessFailedEventArgs
);
impl ::core::clone::Clone for ICoreWebView2ProcessFailedEventArgs2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ProcessFailedEventArgs2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ProcessFailedEventArgs2 {}
impl ::core::fmt::Debug for ICoreWebView2ProcessFailedEventArgs2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ProcessFailedEventArgs2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ProcessFailedEventArgs2 {
type Vtable = ICoreWebView2ProcessFailedEventArgs2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ProcessFailedEventArgs2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4dab9422_46fa_4c3e_a5d2_41d2071d3680);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ProcessFailedEventArgs2_Vtbl {
pub base__: ICoreWebView2ProcessFailedEventArgs_Vtbl,
pub Reason: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
) -> ::windows::core::HRESULT,
pub ExitCode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
exitcode: *mut i32,
) -> ::windows::core::HRESULT,
pub ProcessDescription: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
processdescription: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub FrameInfosForFailedProcess: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
frames: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ProcessFailedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ProcessFailedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ProcessFailedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ProcessFailedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ProcessFailedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ProcessFailedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ProcessFailedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ProcessFailedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ProcessFailedEventHandler {
type Vtable = ICoreWebView2ProcessFailedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ProcessFailedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x79e0aea4_990b_42d9_aa1d_0fcc2e5bc7f1);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ProcessFailedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ProcessInfo(::windows::core::IUnknown);
impl ICoreWebView2ProcessInfo {
pub unsafe fn ProcessId(&self, value: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ProcessId)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Kind(&self, kind: *mut COREWEBVIEW2_PROCESS_KIND) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Kind)(::windows::core::Vtable::as_raw(self), kind)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2ProcessInfo, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2ProcessInfo {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ProcessInfo {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ProcessInfo {}
impl ::core::fmt::Debug for ICoreWebView2ProcessInfo {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ProcessInfo")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ProcessInfo {
type Vtable = ICoreWebView2ProcessInfo_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ProcessInfo {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x84fa7612_3f3d_4fbf_889d_fad000492d72);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ProcessInfo_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub ProcessId: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT,
pub Kind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
kind: *mut COREWEBVIEW2_PROCESS_KIND,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ProcessInfoCollection(::windows::core::IUnknown);
impl ICoreWebView2ProcessInfoCollection {
pub unsafe fn Count(&self, count: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Count)(::windows::core::Vtable::as_raw(self), count)
.ok()
}
pub unsafe fn GetValueAtIndex(
&self,
index: u32,
) -> ::windows::core::Result<ICoreWebView2ProcessInfo> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetValueAtIndex)(
::windows::core::Vtable::as_raw(self),
index,
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ProcessInfoCollection,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ProcessInfoCollection {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ProcessInfoCollection {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ProcessInfoCollection {}
impl ::core::fmt::Debug for ICoreWebView2ProcessInfoCollection {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ProcessInfoCollection")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ProcessInfoCollection {
type Vtable = ICoreWebView2ProcessInfoCollection_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ProcessInfoCollection {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x402b99cd_a0cc_4fa5_b7a5_51d86a1d2339);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ProcessInfoCollection_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Count: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
count: *mut u32,
) -> ::windows::core::HRESULT,
pub GetValueAtIndex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
processinfo: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ProcessInfosChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ProcessInfosChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Environment>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ProcessInfosChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ProcessInfosChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ProcessInfosChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ProcessInfosChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ProcessInfosChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ProcessInfosChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ProcessInfosChangedEventHandler {
type Vtable = ICoreWebView2ProcessInfosChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ProcessInfosChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf4af0c39_44b9_40e9_8b11_0484cfb9e0a1);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ProcessInfosChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Profile(::windows::core::IUnknown);
impl ICoreWebView2Profile {
pub unsafe fn ProfileName(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ProfileName)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn IsInPrivateModeEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsInPrivateModeEnabled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ProfilePath(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ProfilePath)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn DefaultDownloadFolderPath(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DefaultDownloadFolderPath)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetDefaultDownloadFolderPath<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetDefaultDownloadFolderPath)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn PreferredColorScheme(
&self,
value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).PreferredColorScheme)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetPreferredColorScheme(
&self,
value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetPreferredColorScheme)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Profile, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Profile {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Profile {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Profile {}
impl ::core::fmt::Debug for ICoreWebView2Profile {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Profile")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Profile {
type Vtable = ICoreWebView2Profile_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Profile {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x79110ad3_cd5d_4373_8bc3_c60658f17a5f);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Profile_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub ProfileName: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub IsInPrivateModeEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub ProfilePath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub DefaultDownloadFolderPath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetDefaultDownloadFolderPath: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub PreferredColorScheme: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::HRESULT,
pub SetPreferredColorScheme: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Profile2(::windows::core::IUnknown);
impl ICoreWebView2Profile2 {
pub unsafe fn ProfileName(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.ProfileName)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn IsInPrivateModeEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsInPrivateModeEnabled)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn ProfilePath(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.ProfilePath)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn DefaultDownloadFolderPath(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.DefaultDownloadFolderPath)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadFolderPath<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetDefaultDownloadFolderPath)(
::windows::core::Vtable::as_raw(self),
value.into().abi(),
)
.ok()
}
pub unsafe fn PreferredColorScheme(
&self,
value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.PreferredColorScheme)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetPreferredColorScheme(
&self,
value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.SetPreferredColorScheme)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn ClearBrowsingData<P0>(
&self,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
handler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClearBrowsingDataCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).ClearBrowsingData)(
::windows::core::Vtable::as_raw(self),
datakinds,
handler.into().abi(),
)
.ok()
}
pub unsafe fn ClearBrowsingDataInTimeRange<P0>(
&self,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
starttime: f64,
endtime: f64,
handler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClearBrowsingDataCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).ClearBrowsingDataInTimeRange)(
::windows::core::Vtable::as_raw(self),
datakinds,
starttime,
endtime,
handler.into().abi(),
)
.ok()
}
pub unsafe fn ClearBrowsingDataAll<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClearBrowsingDataCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).ClearBrowsingDataAll)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Profile2,
::windows::core::IUnknown,
ICoreWebView2Profile
);
impl ::core::clone::Clone for ICoreWebView2Profile2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Profile2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Profile2 {}
impl ::core::fmt::Debug for ICoreWebView2Profile2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Profile2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Profile2 {
type Vtable = ICoreWebView2Profile2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Profile2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xfa740d4b_5eae_4344_a8ad_74be31925397);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Profile2_Vtbl {
pub base__: ICoreWebView2Profile_Vtbl,
pub ClearBrowsingData: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub ClearBrowsingDataInTimeRange: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
starttime: f64,
endtime: f64,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub ClearBrowsingDataAll: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2RasterizationScaleChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2RasterizationScaleChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Controller>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2RasterizationScaleChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2RasterizationScaleChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2RasterizationScaleChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2RasterizationScaleChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2RasterizationScaleChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2RasterizationScaleChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2RasterizationScaleChangedEventHandler {
type Vtable = ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2RasterizationScaleChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x9c98c8b1_ac53_427e_a345_3049b5524bbe);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ScriptDialogOpeningEventArgs(::windows::core::IUnknown);
impl ICoreWebView2ScriptDialogOpeningEventArgs {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Uri)(::windows::core::Vtable::as_raw(self), uri).ok()
}
pub unsafe fn Kind(
&self,
kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Kind)(::windows::core::Vtable::as_raw(self), kind)
.ok()
}
pub unsafe fn Message(
&self,
message: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Message)(
::windows::core::Vtable::as_raw(self),
message,
)
.ok()
}
pub unsafe fn Accept(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Accept)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn DefaultText(
&self,
defaulttext: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DefaultText)(
::windows::core::Vtable::as_raw(self),
defaulttext,
)
.ok()
}
pub unsafe fn ResultText(
&self,
resulttext: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ResultText)(
::windows::core::Vtable::as_raw(self),
resulttext,
)
.ok()
}
pub unsafe fn SetResultText<P0>(&self, resulttext: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetResultText)(
::windows::core::Vtable::as_raw(self),
resulttext.into().abi(),
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ScriptDialogOpeningEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ScriptDialogOpeningEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ScriptDialogOpeningEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ScriptDialogOpeningEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2ScriptDialogOpeningEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ScriptDialogOpeningEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ScriptDialogOpeningEventArgs {
type Vtable = ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ScriptDialogOpeningEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x7390bb70_abe0_4843_9529_f143b31b03d6);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Uri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Kind: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
) -> ::windows::core::HRESULT,
pub Message: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
message: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub Accept:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub DefaultText: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
defaulttext: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ResultText: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
resulttext: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetResultText: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
resulttext: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ScriptDialogOpeningEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ScriptDialogOpeningEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ScriptDialogOpeningEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ScriptDialogOpeningEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ScriptDialogOpeningEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ScriptDialogOpeningEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ScriptDialogOpeningEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ScriptDialogOpeningEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ScriptDialogOpeningEventHandler {
type Vtable = ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ScriptDialogOpeningEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xef381bf9_afa8_4e37_91c4_8ac48524bdfb);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ServerCertificateErrorDetectedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2ServerCertificateErrorDetectedEventArgs {
pub unsafe fn ErrorStatus(
&self,
value: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ErrorStatus)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn RequestUri(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).RequestUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ServerCertificate(&self) -> ::windows::core::Result<ICoreWebView2Certificate> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).ServerCertificate)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Action(
&self,
value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Action)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetAction(
&self,
value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetAction)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ServerCertificateErrorDetectedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ServerCertificateErrorDetectedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ServerCertificateErrorDetectedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ServerCertificateErrorDetectedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2ServerCertificateErrorDetectedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ServerCertificateErrorDetectedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ServerCertificateErrorDetectedEventArgs {
type Vtable = ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ServerCertificateErrorDetectedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x012193ed_7c13_48ff_969d_a84c1f432a14);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub ErrorStatus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::HRESULT,
pub RequestUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub ServerCertificate: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Action: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::HRESULT,
pub SetAction: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ServerCertificateErrorDetectedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ServerCertificateErrorDetectedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ServerCertificateErrorDetectedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ServerCertificateErrorDetectedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ServerCertificateErrorDetectedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ServerCertificateErrorDetectedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ServerCertificateErrorDetectedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ServerCertificateErrorDetectedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ServerCertificateErrorDetectedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ServerCertificateErrorDetectedEventHandler {
type Vtable = ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ServerCertificateErrorDetectedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x969b3a26_d85e_4795_8199_fef57344da22);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Settings(::windows::core::IUnknown);
impl ICoreWebView2Settings {
pub unsafe fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled,
)
.ok()
}
pub unsafe fn SetIsScriptEnabled<P0>(&self, isscriptenabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled.into(),
)
.ok()
}
pub unsafe fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled,
)
.ok()
}
pub unsafe fn SetIsWebMessageEnabled<P0>(
&self,
iswebmessageenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled,
)
.ok()
}
pub unsafe fn SetAreDefaultScriptDialogsEnabled<P0>(
&self,
aredefaultscriptdialogsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetAreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled.into(),
)
.ok()
}
pub unsafe fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled,
)
.ok()
}
pub unsafe fn SetIsStatusBarEnabled<P0>(
&self,
isstatusbarenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled.into(),
)
.ok()
}
pub unsafe fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled,
)
.ok()
}
pub unsafe fn SetAreDevToolsEnabled<P0>(
&self,
aredevtoolsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetAreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled,
)
.ok()
}
pub unsafe fn SetAreDefaultContextMenusEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetAreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AreHostObjectsAllowed)(
::windows::core::Vtable::as_raw(self),
allowed,
)
.ok()
}
pub unsafe fn SetAreHostObjectsAllowed<P0>(&self, allowed: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetAreHostObjectsAllowed)(
::windows::core::Vtable::as_raw(self),
allowed.into(),
)
.ok()
}
pub unsafe fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsZoomControlEnabled)(
::windows::core::Vtable::as_raw(self),
enabled,
)
.ok()
}
pub unsafe fn SetIsZoomControlEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsZoomControlEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self),
enabled,
)
.ok()
}
pub unsafe fn SetIsBuiltInErrorPageEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2Settings, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2Settings {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Settings {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Settings {}
impl ::core::fmt::Debug for ICoreWebView2Settings {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Settings")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Settings {
type Vtable = ICoreWebView2Settings_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Settings {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe562e4f0_d7fa_43ac_8d71_c05150499f00);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Settings_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub IsScriptEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsScriptEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isscriptenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsWebMessageEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsWebMessageEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
iswebmessageenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub AreDefaultScriptDialogsEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetAreDefaultScriptDialogsEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
aredefaultscriptdialogsenabled: ::windows::Win32::Foundation::BOOL,
)
-> ::windows::core::HRESULT,
pub IsStatusBarEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsStatusBarEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isstatusbarenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub AreDevToolsEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetAreDevToolsEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
aredevtoolsenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub AreDefaultContextMenusEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetAreDefaultContextMenusEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
)
-> ::windows::core::HRESULT,
pub AreHostObjectsAllowed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetAreHostObjectsAllowed: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
allowed: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsZoomControlEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsZoomControlEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsBuiltInErrorPageEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsBuiltInErrorPageEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Settings2(::windows::core::IUnknown);
impl ICoreWebView2Settings2 {
pub unsafe fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled,
)
.ok()
}
pub unsafe fn SetIsScriptEnabled<P0>(&self, isscriptenabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled.into(),
)
.ok()
}
pub unsafe fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsWebMessageEnabled)(::windows::core::Vtable::as_raw(self), iswebmessageenabled)
.ok()
}
pub unsafe fn SetIsWebMessageEnabled<P0>(
&self,
iswebmessageenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.AreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled,
)
.ok()
}
pub unsafe fn SetAreDefaultScriptDialogsEnabled<P0>(
&self,
aredefaultscriptdialogsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetAreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled.into(),
)
.ok()
}
pub unsafe fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsStatusBarEnabled)(::windows::core::Vtable::as_raw(self), isstatusbarenabled)
.ok()
}
pub unsafe fn SetIsStatusBarEnabled<P0>(
&self,
isstatusbarenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled.into(),
)
.ok()
}
pub unsafe fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.AreDevToolsEnabled)(::windows::core::Vtable::as_raw(self), aredevtoolsenabled)
.ok()
}
pub unsafe fn SetAreDevToolsEnabled<P0>(
&self,
aredevtoolsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetAreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.AreDefaultContextMenusEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetAreDefaultContextMenusEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetAreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.AreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed)
.ok()
}
pub unsafe fn SetAreHostObjectsAllowed<P0>(&self, allowed: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetAreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed.into())
.ok()
}
pub unsafe fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsZoomControlEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsBuiltInErrorPageEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsBuiltInErrorPageEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self), enabled.into()
)
.ok()
}
pub unsafe fn UserAgent(
&self,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).UserAgent)(
::windows::core::Vtable::as_raw(self),
useragent,
)
.ok()
}
pub unsafe fn SetUserAgent<P0>(&self, useragent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetUserAgent)(
::windows::core::Vtable::as_raw(self),
useragent.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Settings2,
::windows::core::IUnknown,
ICoreWebView2Settings
);
impl ::core::clone::Clone for ICoreWebView2Settings2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Settings2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Settings2 {}
impl ::core::fmt::Debug for ICoreWebView2Settings2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Settings2")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Settings2 {
type Vtable = ICoreWebView2Settings2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Settings2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xee9a0f68_f46c_4e32_ac23_ef8cac224d2a);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Settings2_Vtbl {
pub base__: ICoreWebView2Settings_Vtbl,
pub UserAgent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetUserAgent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
useragent: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Settings3(::windows::core::IUnknown);
impl ICoreWebView2Settings3 {
pub unsafe fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsScriptEnabled)(::windows::core::Vtable::as_raw(self), isscriptenabled)
.ok()
}
pub unsafe fn SetIsScriptEnabled<P0>(&self, isscriptenabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled.into(),
)
.ok()
}
pub unsafe fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsWebMessageEnabled)(::windows::core::Vtable::as_raw(self), iswebmessageenabled)
.ok()
}
pub unsafe fn SetIsWebMessageEnabled<P0>(
&self,
iswebmessageenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled,
)
.ok()
}
pub unsafe fn SetAreDefaultScriptDialogsEnabled<P0>(
&self,
aredefaultscriptdialogsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetAreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled.into(),
)
.ok()
}
pub unsafe fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsStatusBarEnabled)(::windows::core::Vtable::as_raw(self), isstatusbarenabled)
.ok()
}
pub unsafe fn SetIsStatusBarEnabled<P0>(
&self,
isstatusbarenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled.into(),
)
.ok()
}
pub unsafe fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AreDevToolsEnabled)(::windows::core::Vtable::as_raw(self), aredevtoolsenabled)
.ok()
}
pub unsafe fn SetAreDevToolsEnabled<P0>(
&self,
aredevtoolsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetAreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AreDefaultContextMenusEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetAreDefaultContextMenusEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetAreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed)
.ok()
}
pub unsafe fn SetAreHostObjectsAllowed<P0>(&self, allowed: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetAreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed.into())
.ok()
}
pub unsafe fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsZoomControlEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsBuiltInErrorPageEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsBuiltInErrorPageEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self), enabled.into()
)
.ok()
}
pub unsafe fn UserAgent(
&self,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.UserAgent)(
::windows::core::Vtable::as_raw(self),
useragent,
)
.ok()
}
pub unsafe fn SetUserAgent<P0>(&self, useragent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).base__.SetUserAgent)(
::windows::core::Vtable::as_raw(self),
useragent.into().abi(),
)
.ok()
}
pub unsafe fn AreBrowserAcceleratorKeysEnabled(
&self,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).AreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled,
)
.ok()
}
pub unsafe fn SetAreBrowserAcceleratorKeysEnabled<P0>(
&self,
arebrowseracceleratorkeysenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetAreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Settings3,
::windows::core::IUnknown,
ICoreWebView2Settings,
ICoreWebView2Settings2
);
impl ::core::clone::Clone for ICoreWebView2Settings3 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Settings3 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Settings3 {}
impl ::core::fmt::Debug for ICoreWebView2Settings3 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Settings3")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Settings3 {
type Vtable = ICoreWebView2Settings3_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Settings3 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xfdb5ab74_af33_4854_84f0_0a631deb5eba);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Settings3_Vtbl {
pub base__: ICoreWebView2Settings2_Vtbl,
pub AreBrowserAcceleratorKeysEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
)
-> ::windows::core::HRESULT,
pub SetAreBrowserAcceleratorKeysEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
arebrowseracceleratorkeysenabled: ::windows::Win32::Foundation::BOOL,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Settings4(::windows::core::IUnknown);
impl ICoreWebView2Settings4 {
pub unsafe fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsScriptEnabled)(::windows::core::Vtable::as_raw(self), isscriptenabled)
.ok()
}
pub unsafe fn SetIsScriptEnabled<P0>(&self, isscriptenabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled.into(),
)
.ok()
}
pub unsafe fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsWebMessageEnabled)(::windows::core::Vtable::as_raw(self), iswebmessageenabled)
.ok()
}
pub unsafe fn SetIsWebMessageEnabled<P0>(
&self,
iswebmessageenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled,
)
.ok()
}
pub unsafe fn SetAreDefaultScriptDialogsEnabled<P0>(
&self,
aredefaultscriptdialogsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetAreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled.into(),
)
.ok()
}
pub unsafe fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsStatusBarEnabled)(::windows::core::Vtable::as_raw(self), isstatusbarenabled)
.ok()
}
pub unsafe fn SetIsStatusBarEnabled<P0>(
&self,
isstatusbarenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled.into(),
)
.ok()
}
pub unsafe fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AreDevToolsEnabled)(::windows::core::Vtable::as_raw(self), aredevtoolsenabled)
.ok()
}
pub unsafe fn SetAreDevToolsEnabled<P0>(
&self,
aredevtoolsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetAreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AreDefaultContextMenusEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetAreDefaultContextMenusEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetAreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed)
.ok()
}
pub unsafe fn SetAreHostObjectsAllowed<P0>(&self, allowed: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetAreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed.into())
.ok()
}
pub unsafe fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsZoomControlEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsBuiltInErrorPageEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsBuiltInErrorPageEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self), enabled.into()
)
.ok()
}
pub unsafe fn UserAgent(
&self,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.UserAgent)(::windows::core::Vtable::as_raw(self), useragent)
.ok()
}
pub unsafe fn SetUserAgent<P0>(&self, useragent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetUserAgent)(
::windows::core::Vtable::as_raw(self),
useragent.into().abi(),
)
.ok()
}
pub unsafe fn AreBrowserAcceleratorKeysEnabled(
&self,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.AreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled,
)
.ok()
}
pub unsafe fn SetAreBrowserAcceleratorKeysEnabled<P0>(
&self,
arebrowseracceleratorkeysenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetAreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled.into(),
)
.ok()
}
pub unsafe fn IsPasswordAutosaveEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsPasswordAutosaveEnabled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsPasswordAutosaveEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsPasswordAutosaveEnabled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn IsGeneralAutofillEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsGeneralAutofillEnabled)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsGeneralAutofillEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsGeneralAutofillEnabled)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Settings4,
::windows::core::IUnknown,
ICoreWebView2Settings,
ICoreWebView2Settings2,
ICoreWebView2Settings3
);
impl ::core::clone::Clone for ICoreWebView2Settings4 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Settings4 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Settings4 {}
impl ::core::fmt::Debug for ICoreWebView2Settings4 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Settings4")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Settings4 {
type Vtable = ICoreWebView2Settings4_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Settings4 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xcb56846c_4168_4d53_b04f_03b6d6796ff2);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Settings4_Vtbl {
pub base__: ICoreWebView2Settings3_Vtbl,
pub IsPasswordAutosaveEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsPasswordAutosaveEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub IsGeneralAutofillEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsGeneralAutofillEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Settings5(::windows::core::IUnknown);
impl ICoreWebView2Settings5 {
pub unsafe fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsScriptEnabled)(::windows::core::Vtable::as_raw(self), isscriptenabled)
.ok()
}
pub unsafe fn SetIsScriptEnabled<P0>(&self, isscriptenabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetIsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled.into(),
)
.ok()
}
pub unsafe fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsWebMessageEnabled)(::windows::core::Vtable::as_raw(self), iswebmessageenabled)
.ok()
}
pub unsafe fn SetIsWebMessageEnabled<P0>(
&self,
iswebmessageenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetIsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled,
)
.ok()
}
pub unsafe fn SetAreDefaultScriptDialogsEnabled<P0>(
&self,
aredefaultscriptdialogsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetAreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled.into(),
)
.ok()
}
pub unsafe fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsStatusBarEnabled)(::windows::core::Vtable::as_raw(self), isstatusbarenabled)
.ok()
}
pub unsafe fn SetIsStatusBarEnabled<P0>(
&self,
isstatusbarenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetIsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled.into(),
)
.ok()
}
pub unsafe fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AreDevToolsEnabled)(::windows::core::Vtable::as_raw(self), aredevtoolsenabled)
.ok()
}
pub unsafe fn SetAreDevToolsEnabled<P0>(
&self,
aredevtoolsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetAreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AreDefaultContextMenusEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetAreDefaultContextMenusEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetAreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed)
.ok()
}
pub unsafe fn SetAreHostObjectsAllowed<P0>(&self, allowed: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetAreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed.into())
.ok()
}
pub unsafe fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsZoomControlEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetIsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsBuiltInErrorPageEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsBuiltInErrorPageEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetIsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self), enabled.into()
)
.ok()
}
pub unsafe fn UserAgent(
&self,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.UserAgent)(::windows::core::Vtable::as_raw(self), useragent)
.ok()
}
pub unsafe fn SetUserAgent<P0>(&self, useragent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetUserAgent)(
::windows::core::Vtable::as_raw(self),
useragent.into().abi(),
)
.ok()
}
pub unsafe fn AreBrowserAcceleratorKeysEnabled(
&self,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled,
)
.ok()
}
pub unsafe fn SetAreBrowserAcceleratorKeysEnabled<P0>(
&self,
arebrowseracceleratorkeysenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetAreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled.into(),
)
.ok()
}
pub unsafe fn IsPasswordAutosaveEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsPasswordAutosaveEnabled)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsPasswordAutosaveEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsPasswordAutosaveEnabled)(
::windows::core::Vtable::as_raw(self), value.into()
)
.ok()
}
pub unsafe fn IsGeneralAutofillEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsGeneralAutofillEnabled)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsGeneralAutofillEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsGeneralAutofillEnabled)(
::windows::core::Vtable::as_raw(self), value.into()
)
.ok()
}
pub unsafe fn IsPinchZoomEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsPinchZoomEnabled)(
::windows::core::Vtable::as_raw(self),
enabled,
)
.ok()
}
pub unsafe fn SetIsPinchZoomEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsPinchZoomEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Settings5,
::windows::core::IUnknown,
ICoreWebView2Settings,
ICoreWebView2Settings2,
ICoreWebView2Settings3,
ICoreWebView2Settings4
);
impl ::core::clone::Clone for ICoreWebView2Settings5 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Settings5 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Settings5 {}
impl ::core::fmt::Debug for ICoreWebView2Settings5 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Settings5")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Settings5 {
type Vtable = ICoreWebView2Settings5_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Settings5 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x183e7052_1d03_43a0_ab99_98e043b66b39);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Settings5_Vtbl {
pub base__: ICoreWebView2Settings4_Vtbl,
pub IsPinchZoomEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsPinchZoomEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Settings6(::windows::core::IUnknown);
impl ICoreWebView2Settings6 {
pub unsafe fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsScriptEnabled)(::windows::core::Vtable::as_raw(self), isscriptenabled)
.ok()
}
pub unsafe fn SetIsScriptEnabled<P0>(&self, isscriptenabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetIsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled.into(),
)
.ok()
}
pub unsafe fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsWebMessageEnabled)(::windows::core::Vtable::as_raw(self), iswebmessageenabled)
.ok()
}
pub unsafe fn SetIsWebMessageEnabled<P0>(
&self,
iswebmessageenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetIsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.AreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled,
)
.ok()
}
pub unsafe fn SetAreDefaultScriptDialogsEnabled<P0>(
&self,
aredefaultscriptdialogsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetAreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled.into(),
)
.ok()
}
pub unsafe fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsStatusBarEnabled)(::windows::core::Vtable::as_raw(self), isstatusbarenabled)
.ok()
}
pub unsafe fn SetIsStatusBarEnabled<P0>(
&self,
isstatusbarenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetIsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled.into(),
)
.ok()
}
pub unsafe fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.AreDevToolsEnabled)(::windows::core::Vtable::as_raw(self), aredevtoolsenabled)
.ok()
}
pub unsafe fn SetAreDevToolsEnabled<P0>(
&self,
aredevtoolsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetAreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.AreDefaultContextMenusEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetAreDefaultContextMenusEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetAreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.AreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed)
.ok()
}
pub unsafe fn SetAreHostObjectsAllowed<P0>(&self, allowed: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetAreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed.into())
.ok()
}
pub unsafe fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsZoomControlEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetIsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsBuiltInErrorPageEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsBuiltInErrorPageEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetIsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self), enabled.into()
)
.ok()
}
pub unsafe fn UserAgent(
&self,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.UserAgent)(::windows::core::Vtable::as_raw(self), useragent)
.ok()
}
pub unsafe fn SetUserAgent<P0>(&self, useragent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetUserAgent)(
::windows::core::Vtable::as_raw(self),
useragent.into().abi(),
)
.ok()
}
pub unsafe fn AreBrowserAcceleratorKeysEnabled(
&self,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled,
)
.ok()
}
pub unsafe fn SetAreBrowserAcceleratorKeysEnabled<P0>(
&self,
arebrowseracceleratorkeysenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetAreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled.into(),
)
.ok()
}
pub unsafe fn IsPasswordAutosaveEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsPasswordAutosaveEnabled)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsPasswordAutosaveEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsPasswordAutosaveEnabled)(
::windows::core::Vtable::as_raw(self), value.into()
)
.ok()
}
pub unsafe fn IsGeneralAutofillEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsGeneralAutofillEnabled)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsGeneralAutofillEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsGeneralAutofillEnabled)(
::windows::core::Vtable::as_raw(self), value.into()
)
.ok()
}
pub unsafe fn IsPinchZoomEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsPinchZoomEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsPinchZoomEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsPinchZoomEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsSwipeNavigationEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsSwipeNavigationEnabled)(
::windows::core::Vtable::as_raw(self),
enabled,
)
.ok()
}
pub unsafe fn SetIsSwipeNavigationEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsSwipeNavigationEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Settings6,
::windows::core::IUnknown,
ICoreWebView2Settings,
ICoreWebView2Settings2,
ICoreWebView2Settings3,
ICoreWebView2Settings4,
ICoreWebView2Settings5
);
impl ::core::clone::Clone for ICoreWebView2Settings6 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Settings6 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Settings6 {}
impl ::core::fmt::Debug for ICoreWebView2Settings6 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Settings6")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Settings6 {
type Vtable = ICoreWebView2Settings6_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Settings6 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x11cb3acd_9bc8_43b8_83bf_f40753714f87);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Settings6_Vtbl {
pub base__: ICoreWebView2Settings5_Vtbl,
pub IsSwipeNavigationEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsSwipeNavigationEnabled: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2Settings7(::windows::core::IUnknown);
impl ICoreWebView2Settings7 {
pub unsafe fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsScriptEnabled)(::windows::core::Vtable::as_raw(self), isscriptenabled)
.ok()
}
pub unsafe fn SetIsScriptEnabled<P0>(&self, isscriptenabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsScriptEnabled)(
::windows::core::Vtable::as_raw(self),
isscriptenabled.into(),
)
.ok()
}
pub unsafe fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsWebMessageEnabled)(::windows::core::Vtable::as_raw(self), iswebmessageenabled)
.ok()
}
pub unsafe fn SetIsWebMessageEnabled<P0>(
&self,
iswebmessageenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsWebMessageEnabled)(
::windows::core::Vtable::as_raw(self),
iswebmessageenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.AreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled,
)
.ok()
}
pub unsafe fn SetAreDefaultScriptDialogsEnabled<P0>(
&self,
aredefaultscriptdialogsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetAreDefaultScriptDialogsEnabled)(
::windows::core::Vtable::as_raw(self),
aredefaultscriptdialogsenabled.into(),
)
.ok()
}
pub unsafe fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsStatusBarEnabled)(::windows::core::Vtable::as_raw(self), isstatusbarenabled)
.ok()
}
pub unsafe fn SetIsStatusBarEnabled<P0>(
&self,
isstatusbarenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsStatusBarEnabled)(
::windows::core::Vtable::as_raw(self),
isstatusbarenabled.into(),
)
.ok()
}
pub unsafe fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.AreDevToolsEnabled)(::windows::core::Vtable::as_raw(self), aredevtoolsenabled)
.ok()
}
pub unsafe fn SetAreDevToolsEnabled<P0>(
&self,
aredevtoolsenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetAreDevToolsEnabled)(
::windows::core::Vtable::as_raw(self),
aredevtoolsenabled.into(),
)
.ok()
}
pub unsafe fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.AreDefaultContextMenusEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetAreDefaultContextMenusEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetAreDefaultContextMenusEnabled)(
::windows::core::Vtable::as_raw(self),
enabled.into(),
)
.ok()
}
pub unsafe fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.AreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed)
.ok()
}
pub unsafe fn SetAreHostObjectsAllowed<P0>(&self, allowed: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetAreHostObjectsAllowed)(::windows::core::Vtable::as_raw(self), allowed.into())
.ok()
}
pub unsafe fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsZoomControlEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsZoomControlEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsBuiltInErrorPageEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsBuiltInErrorPageEnabled<P0>(
&self,
enabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsBuiltInErrorPageEnabled)(
::windows::core::Vtable::as_raw(self), enabled.into()
)
.ok()
}
pub unsafe fn UserAgent(
&self,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.UserAgent)(::windows::core::Vtable::as_raw(self), useragent)
.ok()
}
pub unsafe fn SetUserAgent<P0>(&self, useragent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetUserAgent)(
::windows::core::Vtable::as_raw(self),
useragent.into().abi(),
)
.ok()
}
pub unsafe fn AreBrowserAcceleratorKeysEnabled(
&self,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled,
)
.ok()
}
pub unsafe fn SetAreBrowserAcceleratorKeysEnabled<P0>(
&self,
arebrowseracceleratorkeysenabled: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetAreBrowserAcceleratorKeysEnabled)(
::windows::core::Vtable::as_raw(self),
arebrowseracceleratorkeysenabled.into(),
)
.ok()
}
pub unsafe fn IsPasswordAutosaveEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsPasswordAutosaveEnabled)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsPasswordAutosaveEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsPasswordAutosaveEnabled)(
::windows::core::Vtable::as_raw(self), value.into()
)
.ok()
}
pub unsafe fn IsGeneralAutofillEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsGeneralAutofillEnabled)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsGeneralAutofillEnabled<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsGeneralAutofillEnabled)(
::windows::core::Vtable::as_raw(self), value.into()
)
.ok()
}
pub unsafe fn IsPinchZoomEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsPinchZoomEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsPinchZoomEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsPinchZoomEnabled)(::windows::core::Vtable::as_raw(self), enabled.into())
.ok()
}
pub unsafe fn IsSwipeNavigationEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsSwipeNavigationEnabled)(::windows::core::Vtable::as_raw(self), enabled)
.ok()
}
pub unsafe fn SetIsSwipeNavigationEnabled<P0>(&self, enabled: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetIsSwipeNavigationEnabled)(
::windows::core::Vtable::as_raw(self), enabled.into()
)
.ok()
}
pub unsafe fn HiddenPdfToolbarItems(
&self,
hidden_pdf_toolbar_items: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HiddenPdfToolbarItems)(
::windows::core::Vtable::as_raw(self),
hidden_pdf_toolbar_items,
)
.ok()
}
pub unsafe fn SetHiddenPdfToolbarItems(
&self,
hidden_pdf_toolbar_items: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetHiddenPdfToolbarItems)(
::windows::core::Vtable::as_raw(self),
hidden_pdf_toolbar_items,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2Settings7,
::windows::core::IUnknown,
ICoreWebView2Settings,
ICoreWebView2Settings2,
ICoreWebView2Settings3,
ICoreWebView2Settings4,
ICoreWebView2Settings5,
ICoreWebView2Settings6
);
impl ::core::clone::Clone for ICoreWebView2Settings7 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2Settings7 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2Settings7 {}
impl ::core::fmt::Debug for ICoreWebView2Settings7 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2Settings7")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2Settings7 {
type Vtable = ICoreWebView2Settings7_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2Settings7 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x488dc902_35ef_42d2_bc7d_94b65c4bc49c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2Settings7_Vtbl {
pub base__: ICoreWebView2Settings6_Vtbl,
pub HiddenPdfToolbarItems: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hidden_pdf_toolbar_items: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::HRESULT,
pub SetHiddenPdfToolbarItems: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hidden_pdf_toolbar_items: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2SourceChangedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2SourceChangedEventArgs {
pub unsafe fn IsNewDocument(
&self,
isnewdocument: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsNewDocument)(
::windows::core::Vtable::as_raw(self),
isnewdocument,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2SourceChangedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2SourceChangedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2SourceChangedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2SourceChangedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2SourceChangedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2SourceChangedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2SourceChangedEventArgs {
type Vtable = ICoreWebView2SourceChangedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2SourceChangedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x31e0e545_1dba_4266_8914_f63848a1f7d7);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2SourceChangedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub IsNewDocument: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
isnewdocument: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2SourceChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2SourceChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventArgs>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2SourceChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2SourceChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2SourceChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2SourceChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2SourceChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2SourceChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2SourceChangedEventHandler {
type Vtable = ICoreWebView2SourceChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2SourceChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x3c067f9f_5388_4772_8b48_79f7ef1ab37c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2SourceChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2StateChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2StateChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2DownloadOperation>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2StateChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2StateChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2StateChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2StateChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2StateChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2StateChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2StateChangedEventHandler {
type Vtable = ICoreWebView2StateChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2StateChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x81336594_7ede_4ba9_bf71_acf0a95b58dd);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2StateChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2StatusBarTextChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2StatusBarTextChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2StatusBarTextChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2StatusBarTextChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2StatusBarTextChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2StatusBarTextChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2StatusBarTextChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2StatusBarTextChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2StatusBarTextChangedEventHandler {
type Vtable = ICoreWebView2StatusBarTextChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2StatusBarTextChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xa5e3b0d0_10df_4156_bfad_3b43867acac6);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2StatusBarTextChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2StringCollection(::windows::core::IUnknown);
impl ICoreWebView2StringCollection {
pub unsafe fn Count(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Count)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn GetValueAtIndex(
&self,
index: u32,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).GetValueAtIndex)(
::windows::core::Vtable::as_raw(self),
index,
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2StringCollection, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2StringCollection {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2StringCollection {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2StringCollection {}
impl ::core::fmt::Debug for ICoreWebView2StringCollection {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2StringCollection")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2StringCollection {
type Vtable = ICoreWebView2StringCollection_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2StringCollection {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf41f3f8a_bcc3_11eb_8529_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2StringCollection_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Count: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub GetValueAtIndex: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2TrySuspendCompletedHandler(::windows::core::IUnknown);
impl ICoreWebView2TrySuspendCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
issuccessful: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
issuccessful.into(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2TrySuspendCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2TrySuspendCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2TrySuspendCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2TrySuspendCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2TrySuspendCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2TrySuspendCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2TrySuspendCompletedHandler {
type Vtable = ICoreWebView2TrySuspendCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2TrySuspendCompletedHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x00f206a7_9d17_4605_91f6_4e8e4de192e3);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2TrySuspendCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
issuccessful: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebMessageReceivedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2WebMessageReceivedEventArgs {
pub unsafe fn Source(
&self,
source: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Source)(
::windows::core::Vtable::as_raw(self),
source,
)
.ok()
}
pub unsafe fn WebMessageAsJson(
&self,
webmessageasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).WebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson,
)
.ok()
}
pub unsafe fn TryGetWebMessageAsString(
&self,
webmessageasstring: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).TryGetWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebMessageReceivedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebMessageReceivedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebMessageReceivedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebMessageReceivedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2WebMessageReceivedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebMessageReceivedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebMessageReceivedEventArgs {
type Vtable = ICoreWebView2WebMessageReceivedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebMessageReceivedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x0f99a40c_e962_4207_9e92_e3d542eff849);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebMessageReceivedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Source: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
source: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub WebMessageAsJson: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
webmessageasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub TryGetWebMessageAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
webmessageasstring: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebMessageReceivedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2WebMessageReceivedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebMessageReceivedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebMessageReceivedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebMessageReceivedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebMessageReceivedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2WebMessageReceivedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebMessageReceivedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebMessageReceivedEventHandler {
type Vtable = ICoreWebView2WebMessageReceivedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebMessageReceivedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x57213f19_00e6_49fa_8e07_898ea01ecbd2);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebMessageReceivedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceRequest(::windows::core::IUnknown);
impl ICoreWebView2WebResourceRequest {
pub unsafe fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Uri)(::windows::core::Vtable::as_raw(self), uri).ok()
}
pub unsafe fn SetUri<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetUri)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
)
.ok()
}
pub unsafe fn Method(
&self,
method: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Method)(
::windows::core::Vtable::as_raw(self),
method,
)
.ok()
}
pub unsafe fn SetMethod<P0>(&self, method: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetMethod)(
::windows::core::Vtable::as_raw(self),
method.into().abi(),
)
.ok()
}
pub unsafe fn Content(
&self,
) -> ::windows::core::Result<::windows::Win32::System::Com::IStream> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Content)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SetContent<P0>(&self, content: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
(::windows::core::Vtable::vtable(self).SetContent)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
)
.ok()
}
pub unsafe fn Headers(&self) -> ::windows::core::Result<ICoreWebView2HttpRequestHeaders> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Headers)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2WebResourceRequest, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2WebResourceRequest {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceRequest {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceRequest {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceRequest {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceRequest")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebResourceRequest {
type Vtable = ICoreWebView2WebResourceRequest_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebResourceRequest {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x97055cd4_512c_4264_8b5f_e3f446cea6a5);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceRequest_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Uri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub Method: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
method: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetMethod: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
method: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
pub Content: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
content: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SetContent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
content: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Headers: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
headers: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceRequestedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2WebResourceRequestedEventArgs {
pub unsafe fn Request(&self) -> ::windows::core::Result<ICoreWebView2WebResourceRequest> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Request)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Response(&self) -> ::windows::core::Result<ICoreWebView2WebResourceResponse> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Response)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SetResponse<P0>(&self, response: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceResponse>>,
{
(::windows::core::Vtable::vtable(self).SetResponse)(
::windows::core::Vtable::as_raw(self),
response.into().abi(),
)
.ok()
}
pub unsafe fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).GetDeferral)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn ResourceContext(
&self,
context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ResourceContext)(
::windows::core::Vtable::as_raw(self),
context,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebResourceRequestedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebResourceRequestedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceRequestedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceRequestedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceRequestedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceRequestedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebResourceRequestedEventArgs {
type Vtable = ICoreWebView2WebResourceRequestedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebResourceRequestedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x453e667f_12c7_49d4_be6d_ddbe7956f57a);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceRequestedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Request: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
request: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Response: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SetResponse: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
response: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub ResourceContext: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2WebResourceRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebResourceRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebResourceRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebResourceRequestedEventHandler {
type Vtable = ICoreWebView2WebResourceRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebResourceRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xab00b74c_15f1_4646_80e8_e76341d25d71);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceResponse(::windows::core::IUnknown);
impl ICoreWebView2WebResourceResponse {
pub unsafe fn Content(
&self,
) -> ::windows::core::Result<::windows::Win32::System::Com::IStream> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Content)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn SetContent<P0>(&self, content: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
(::windows::core::Vtable::vtable(self).SetContent)(
::windows::core::Vtable::as_raw(self),
content.into().abi(),
)
.ok()
}
pub unsafe fn Headers(&self) -> ::windows::core::Result<ICoreWebView2HttpResponseHeaders> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Headers)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn StatusCode(&self, statuscode: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).StatusCode)(
::windows::core::Vtable::as_raw(self),
statuscode,
)
.ok()
}
pub unsafe fn SetStatusCode(&self, statuscode: i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetStatusCode)(
::windows::core::Vtable::as_raw(self),
statuscode,
)
.ok()
}
pub unsafe fn ReasonPhrase(
&self,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ReasonPhrase)(
::windows::core::Vtable::as_raw(self),
reasonphrase,
)
.ok()
}
pub unsafe fn SetReasonPhrase<P0>(&self, reasonphrase: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetReasonPhrase)(
::windows::core::Vtable::as_raw(self),
reasonphrase.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2WebResourceResponse, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2WebResourceResponse {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceResponse {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceResponse {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceResponse {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceResponse")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebResourceResponse {
type Vtable = ICoreWebView2WebResourceResponse_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebResourceResponse {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xaafcc94f_fa27_48fd_97df_830ef75aaec9);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceResponse_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Content: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
content: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub SetContent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
content: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Headers: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
headers: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub StatusCode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
statuscode: *mut i32,
) -> ::windows::core::HRESULT,
pub SetStatusCode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
statuscode: i32,
) -> ::windows::core::HRESULT,
pub ReasonPhrase: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub SetReasonPhrase: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
reasonphrase: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceResponseReceivedEventArgs(::windows::core::IUnknown);
impl ICoreWebView2WebResourceResponseReceivedEventArgs {
pub unsafe fn Request(&self) -> ::windows::core::Result<ICoreWebView2WebResourceRequest> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Request)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Response(&self) -> ::windows::core::Result<ICoreWebView2WebResourceResponseView> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Response)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebResourceResponseReceivedEventArgs,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebResourceResponseReceivedEventArgs {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceResponseReceivedEventArgs {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceResponseReceivedEventArgs {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceResponseReceivedEventArgs {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceResponseReceivedEventArgs")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebResourceResponseReceivedEventArgs {
type Vtable = ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebResourceResponseReceivedEventArgs {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xd1db483d_6796_4b8b_80fc_13712bb716f4);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Request: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
request: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Response: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceResponseReceivedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2WebResourceResponseReceivedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventArgs>,
>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebResourceResponseReceivedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebResourceResponseReceivedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceResponseReceivedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceResponseReceivedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceResponseReceivedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceResponseReceivedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebResourceResponseReceivedEventHandler {
type Vtable = ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebResourceResponseReceivedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x7de9898a_24f5_40c3_a2de_d4f458e69828);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceResponseView(::windows::core::IUnknown);
impl ICoreWebView2WebResourceResponseView {
pub unsafe fn Headers(&self) -> ::windows::core::Result<ICoreWebView2HttpResponseHeaders> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Headers)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn StatusCode(&self, statuscode: *mut i32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).StatusCode)(
::windows::core::Vtable::as_raw(self),
statuscode,
)
.ok()
}
pub unsafe fn ReasonPhrase(
&self,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ReasonPhrase)(
::windows::core::Vtable::as_raw(self),
reasonphrase,
)
.ok()
}
pub unsafe fn GetContent<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self).GetContent)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebResourceResponseView,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebResourceResponseView {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceResponseView {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceResponseView {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceResponseView {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceResponseView")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WebResourceResponseView {
type Vtable = ICoreWebView2WebResourceResponseView_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WebResourceResponseView {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x79701053_7759_4162_8f7d_f1b3f084928d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceResponseView_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Headers: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
headers: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub StatusCode: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
statuscode: *mut i32,
) -> ::windows::core::HRESULT,
pub ReasonPhrase: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub GetContent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WebResourceResponseViewGetContentCompletedHandler(
::windows::core::IUnknown,
);
impl ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {
pub unsafe fn Invoke<P0>(
&self,
errorcode: ::windows::core::HRESULT,
content: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
errorcode,
content.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {}
impl ::core::fmt::Debug for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WebResourceResponseViewGetContentCompletedHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable
for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler
{
type Vtable = ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl;
}
unsafe impl ::windows::core::Interface
for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler
{
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x875738e1_9fa2_40e3_8b74_2e8972dd6fe7);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
content: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WindowCloseRequestedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2WindowCloseRequestedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2WindowCloseRequestedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2WindowCloseRequestedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WindowCloseRequestedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WindowCloseRequestedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2WindowCloseRequestedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WindowCloseRequestedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WindowCloseRequestedEventHandler {
type Vtable = ICoreWebView2WindowCloseRequestedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WindowCloseRequestedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x5c19e9e0_092f_486b_affa_ca8231913039);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WindowCloseRequestedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2WindowFeatures(::windows::core::IUnknown);
impl ICoreWebView2WindowFeatures {
pub unsafe fn HasPosition(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasPosition)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn HasSize(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).HasSize)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Left(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Left)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Top(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Top)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Height(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Height)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Width(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Width)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn ShouldDisplayMenuBar(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldDisplayMenuBar)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ShouldDisplayStatus(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldDisplayStatus)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ShouldDisplayToolbar(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldDisplayToolbar)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn ShouldDisplayScrollBars(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShouldDisplayScrollBars)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(ICoreWebView2WindowFeatures, ::windows::core::IUnknown);
impl ::core::clone::Clone for ICoreWebView2WindowFeatures {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2WindowFeatures {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2WindowFeatures {}
impl ::core::fmt::Debug for ICoreWebView2WindowFeatures {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2WindowFeatures")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2WindowFeatures {
type Vtable = ICoreWebView2WindowFeatures_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2WindowFeatures {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x5eaf559f_b46e_4397_8860_e422f287ff1e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2WindowFeatures_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub HasPosition: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub HasSize: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub Left: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub Top: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub Height: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub Width: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT,
pub ShouldDisplayMenuBar: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub ShouldDisplayStatus: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub ShouldDisplayToolbar: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub ShouldDisplayScrollBars: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2ZoomFactorChangedEventHandler(::windows::core::IUnknown);
impl ICoreWebView2ZoomFactorChangedEventHandler {
pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2Controller>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::IUnknown>>,
{
(::windows::core::Vtable::vtable(self).Invoke)(
::windows::core::Vtable::as_raw(self),
sender.into().abi(),
args.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2ZoomFactorChangedEventHandler,
::windows::core::IUnknown
);
impl ::core::clone::Clone for ICoreWebView2ZoomFactorChangedEventHandler {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2ZoomFactorChangedEventHandler {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2ZoomFactorChangedEventHandler {}
impl ::core::fmt::Debug for ICoreWebView2ZoomFactorChangedEventHandler {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2ZoomFactorChangedEventHandler")
.field(&self.0)
.finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2ZoomFactorChangedEventHandler {
type Vtable = ICoreWebView2ZoomFactorChangedEventHandler_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2ZoomFactorChangedEventHandler {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb52d71d6_c4df_4543_a90c_64a3e60f38cb);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2ZoomFactorChangedEventHandler_Vtbl {
pub base__: ::windows::core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_10(::windows::core::IUnknown);
impl ICoreWebView2_10 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.IsMuted)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetIsMuted)(::windows::core::Vtable::as_raw(self), value.into())
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsDefaultDownloadDialogOpen)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.OpenDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.CloseDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.DefaultDownloadDialogMargin)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
pub unsafe fn add_BasicAuthenticationRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BasicAuthenticationRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_10,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8,
ICoreWebView2_9
);
impl ::core::clone::Clone for ICoreWebView2_10 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_10 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_10 {}
impl ::core::fmt::Debug for ICoreWebView2_10 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_10").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_10 {
type Vtable = ICoreWebView2_10_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_10 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xb1690564_6f5a_4983_8e48_31d1143fecdb);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_10_Vtbl {
pub base__: ICoreWebView2_9_Vtbl,
pub add_BasicAuthenticationRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub remove_BasicAuthenticationRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_11(::windows::core::IUnknown);
impl ICoreWebView2_11 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsMuted)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetIsMuted)(::windows::core::Vtable::as_raw(self), value.into())
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsDefaultDownloadDialogOpen)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.OpenDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CloseDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.DefaultDownloadDialogMargin)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
pub unsafe fn add_BasicAuthenticationRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BasicAuthenticationRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
&self,
sessionid: P0,
methodname: P1,
parametersasjson: P2,
handler: P3,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P3: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).CallDevToolsProtocolMethodForSession)(
::windows::core::Vtable::as_raw(self),
sessionid.into().abi(),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_ContextMenuRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContextMenuRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContextMenuRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_11,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8,
ICoreWebView2_9,
ICoreWebView2_10
);
impl ::core::clone::Clone for ICoreWebView2_11 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_11 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_11 {}
impl ::core::fmt::Debug for ICoreWebView2_11 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_11").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_11 {
type Vtable = ICoreWebView2_11_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_11 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x0be78e56_c193_4051_b943_23b460c08bdb);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_11_Vtbl {
pub base__: ICoreWebView2_10_Vtbl,
pub CallDevToolsProtocolMethodForSession: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
sessionid: ::windows::core::PCWSTR,
methodname: ::windows::core::PCWSTR,
parametersasjson: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
)
-> ::windows::core::HRESULT,
pub add_ContextMenuRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ContextMenuRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_12(::windows::core::IUnknown);
impl ICoreWebView2_12 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsMuted)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetIsMuted)(::windows::core::Vtable::as_raw(self), value.into())
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsDefaultDownloadDialogOpen)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.OpenDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CloseDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.DefaultDownloadDialogMargin)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
pub unsafe fn add_BasicAuthenticationRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BasicAuthenticationRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
&self,
sessionid: P0,
methodname: P1,
parametersasjson: P2,
handler: P3,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P3: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.CallDevToolsProtocolMethodForSession)(
::windows::core::Vtable::as_raw(self),
sessionid.into().abi(),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_ContextMenuRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContextMenuRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContextMenuRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_StatusBarTextChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2StatusBarTextChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_StatusBarTextChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn StatusBarText(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).StatusBarText)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_12,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8,
ICoreWebView2_9,
ICoreWebView2_10,
ICoreWebView2_11
);
impl ::core::clone::Clone for ICoreWebView2_12 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_12 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_12 {}
impl ::core::fmt::Debug for ICoreWebView2_12 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_12").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_12 {
type Vtable = ICoreWebView2_12_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_12 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x35d69927_bcfa_4566_9349_6b3e0d154cac);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_12_Vtbl {
pub base__: ICoreWebView2_11_Vtbl,
pub add_StatusBarTextChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_StatusBarTextChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub StatusBarText: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_13(::windows::core::IUnknown);
impl ICoreWebView2_13 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsMuted)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetIsMuted)(::windows::core::Vtable::as_raw(self), value.into())
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsDefaultDownloadDialogOpen)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.OpenDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CloseDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.DefaultDownloadDialogMargin)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
pub unsafe fn add_BasicAuthenticationRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BasicAuthenticationRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
&self,
sessionid: P0,
methodname: P1,
parametersasjson: P2,
handler: P3,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P3: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CallDevToolsProtocolMethodForSession)(
::windows::core::Vtable::as_raw(self),
sessionid.into().abi(),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_ContextMenuRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContextMenuRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContextMenuRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_StatusBarTextChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2StatusBarTextChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_StatusBarTextChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn StatusBarText(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.StatusBarText)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn Profile(&self) -> ::windows::core::Result<ICoreWebView2Profile> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Profile)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_13,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8,
ICoreWebView2_9,
ICoreWebView2_10,
ICoreWebView2_11,
ICoreWebView2_12
);
impl ::core::clone::Clone for ICoreWebView2_13 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_13 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_13 {}
impl ::core::fmt::Debug for ICoreWebView2_13 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_13").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_13 {
type Vtable = ICoreWebView2_13_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_13 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xf75f09a8_667e_4983_88d6_c8773f315e84);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_13_Vtbl {
pub base__: ICoreWebView2_12_Vtbl,
pub Profile: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_14(::windows::core::IUnknown);
impl ICoreWebView2_14 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsMuted)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsMuted)(::windows::core::Vtable::as_raw(self), value.into())
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsDefaultDownloadDialogOpen)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.OpenDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CloseDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.DefaultDownloadDialogMargin)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
pub unsafe fn add_BasicAuthenticationRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BasicAuthenticationRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
&self,
sessionid: P0,
methodname: P1,
parametersasjson: P2,
handler: P3,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P3: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CallDevToolsProtocolMethodForSession)(
::windows::core::Vtable::as_raw(self),
sessionid.into().abi(),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_ContextMenuRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContextMenuRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContextMenuRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_StatusBarTextChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2StatusBarTextChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_StatusBarTextChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn StatusBarText(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.StatusBarText)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Profile(&self) -> ::windows::core::Result<ICoreWebView2Profile> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.Profile)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_ServerCertificateErrorDetected<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ServerCertificateErrorDetectedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ServerCertificateErrorDetected)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ServerCertificateErrorDetected(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ServerCertificateErrorDetected)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ClearServerCertificateErrorActions<P0>(
&self,
handler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self).ClearServerCertificateErrorActions)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_14,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8,
ICoreWebView2_9,
ICoreWebView2_10,
ICoreWebView2_11,
ICoreWebView2_12,
ICoreWebView2_13
);
impl ::core::clone::Clone for ICoreWebView2_14 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_14 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_14 {}
impl ::core::fmt::Debug for ICoreWebView2_14 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_14").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_14 {
type Vtable = ICoreWebView2_14_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_14 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x6daa4f10_4a90_4753_8898_77c5df534165);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_14_Vtbl {
pub base__: ICoreWebView2_13_Vtbl,
pub add_ServerCertificateErrorDetected: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub remove_ServerCertificateErrorDetected:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub ClearServerCertificateErrorActions: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_15(::windows::core::IUnknown);
impl ICoreWebView2_15 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsMuted)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsMuted)(::windows::core::Vtable::as_raw(self), value.into())
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsDefaultDownloadDialogOpen)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CloseDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.DefaultDownloadDialogMargin)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
pub unsafe fn add_BasicAuthenticationRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BasicAuthenticationRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
&self,
sessionid: P0,
methodname: P1,
parametersasjson: P2,
handler: P3,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P3: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethodForSession)(
::windows::core::Vtable::as_raw(self),
sessionid.into().abi(),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_ContextMenuRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContextMenuRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContextMenuRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_StatusBarTextChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2StatusBarTextChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_StatusBarTextChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn StatusBarText(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.StatusBarText)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Profile(&self) -> ::windows::core::Result<ICoreWebView2Profile> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.base__.Profile)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn add_ServerCertificateErrorDetected<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ServerCertificateErrorDetectedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ServerCertificateErrorDetected)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ServerCertificateErrorDetected(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ServerCertificateErrorDetected)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ClearServerCertificateErrorActions<P0>(
&self,
handler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.ClearServerCertificateErrorActions)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_FaviconChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FaviconChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_FaviconChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FaviconChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_FaviconChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn FaviconUri(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).FaviconUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn GetFavicon<P0>(
&self,
format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
completedhandler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2GetFaviconCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).GetFavicon)(
::windows::core::Vtable::as_raw(self),
format,
completedhandler.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_15,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8,
ICoreWebView2_9,
ICoreWebView2_10,
ICoreWebView2_11,
ICoreWebView2_12,
ICoreWebView2_13,
ICoreWebView2_14
);
impl ::core::clone::Clone for ICoreWebView2_15 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_15 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_15 {}
impl ::core::fmt::Debug for ICoreWebView2_15 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_15").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_15 {
type Vtable = ICoreWebView2_15_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_15 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x517b2d1d_7dae_4a66_a4f4_10352ffb9518);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_15_Vtbl {
pub base__: ICoreWebView2_14_Vtbl,
pub add_FaviconChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_FaviconChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub FaviconUri: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT,
pub GetFavicon: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
completedhandler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_16(::windows::core::IUnknown);
impl ICoreWebView2_16 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsMuted)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetIsMuted)(::windows::core::Vtable::as_raw(self), value.into())
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.IsDefaultDownloadDialogOpen)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CloseDefaultDownloadDialog)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self), value
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DefaultDownloadDialogMargin)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
pub unsafe fn add_BasicAuthenticationRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_BasicAuthenticationRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_BasicAuthenticationRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
&self,
sessionid: P0,
methodname: P1,
parametersasjson: P2,
handler: P3,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P3: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethodForSession)(
::windows::core::Vtable::as_raw(self),
sessionid.into().abi(),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_ContextMenuRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContextMenuRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContextMenuRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_ContextMenuRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_StatusBarTextChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2StatusBarTextChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_StatusBarTextChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_StatusBarTextChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn StatusBarText(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.StatusBarText)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn Profile(&self) -> ::windows::core::Result<ICoreWebView2Profile> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Profile)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn add_ServerCertificateErrorDetected<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ServerCertificateErrorDetectedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ServerCertificateErrorDetected)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ServerCertificateErrorDetected(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ServerCertificateErrorDetected)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ClearServerCertificateErrorActions<P0>(
&self,
handler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.ClearServerCertificateErrorActions)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_FaviconChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FaviconChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_FaviconChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FaviconChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_FaviconChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn FaviconUri(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.FaviconUri)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn GetFavicon<P0>(
&self,
format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
completedhandler: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2GetFaviconCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).base__.GetFavicon)(
::windows::core::Vtable::as_raw(self),
format,
completedhandler.into().abi(),
)
.ok()
}
pub unsafe fn Print<P0, P1>(
&self,
printsettings: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).Print)(
::windows::core::Vtable::as_raw(self),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn ShowPrintUI(
&self,
printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).ShowPrintUI)(
::windows::core::Vtable::as_raw(self),
printdialogkind,
)
.ok()
}
pub unsafe fn PrintToPdfStream<P0, P1>(
&self,
printsettings: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PrintToPdfStreamCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).PrintToPdfStream)(
::windows::core::Vtable::as_raw(self),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_16,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8,
ICoreWebView2_9,
ICoreWebView2_10,
ICoreWebView2_11,
ICoreWebView2_12,
ICoreWebView2_13,
ICoreWebView2_14,
ICoreWebView2_15
);
impl ::core::clone::Clone for ICoreWebView2_16 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_16 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_16 {}
impl ::core::fmt::Debug for ICoreWebView2_16 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_16").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_16 {
type Vtable = ICoreWebView2_16_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_16 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x0eb34dc9_9f91_41e1_8639_95cd5943906b);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_16_Vtbl {
pub base__: ICoreWebView2_15_Vtbl,
pub Print: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
printsettings: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub ShowPrintUI: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
) -> ::windows::core::HRESULT,
pub PrintToPdfStream: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
printsettings: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_2(::windows::core::IUnknown);
impl ICoreWebView2_2 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.Settings)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Source)(
::windows::core::Vtable::as_raw(self),
uri,
)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).base__.Navigate)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
)
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).base__.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self).base__.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.CanGoBack)(
::windows::core::Vtable::as_raw(self),
cangoback,
)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.CanGoForward)(
::windows::core::Vtable::as_raw(self),
cangoforward,
)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.GoForward)(::windows::core::Vtable::as_raw(
self,
))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.DocumentTitle)(
::windows::core::Vtable::as_raw(self),
title,
)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self).NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).CookieManager)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).Environment)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
}
::windows::core::interface_hierarchy!(ICoreWebView2_2, ::windows::core::IUnknown, ICoreWebView2);
impl ::core::clone::Clone for ICoreWebView2_2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_2 {}
impl ::core::fmt::Debug for ICoreWebView2_2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_2").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_2 {
type Vtable = ICoreWebView2_2_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_2 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x9e8f0cf8_e670_4b5e_b2bc_73e061e3184c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_2_Vtbl {
pub base__: ICoreWebView2_Vtbl,
pub add_WebResourceResponseReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_WebResourceResponseReceived: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub NavigateWithWebResourceRequest: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
request: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub add_DOMContentLoaded: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_DOMContentLoaded: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub CookieManager: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
cookiemanager: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Environment: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
environment: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_3(::windows::core::IUnknown);
impl ICoreWebView2_3 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.base__.Settings)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Source)(
::windows::core::Vtable::as_raw(self),
uri,
)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).base__.base__.Navigate)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
)
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Reload)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.GoBack)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Stop)(::windows::core::Vtable::as_raw(
self,
))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.CookieManager)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self).base__.Environment)(
::windows::core::Vtable::as_raw(self),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).TrySuspend)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).Resume)(::windows::core::Vtable::as_raw(self)).ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsSuspended)(
::windows::core::Vtable::as_raw(self),
issuspended,
)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self).ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_3,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2
);
impl ::core::clone::Clone for ICoreWebView2_3 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_3 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_3 {}
impl ::core::fmt::Debug for ICoreWebView2_3 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_3").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_3 {
type Vtable = ICoreWebView2_3_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_3 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xa0d6df20_3b92_416d_aa0c_437a9c727857);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_3_Vtbl {
pub base__: ICoreWebView2_2_Vtbl,
pub TrySuspend: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
pub Resume:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub IsSuspended: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetVirtualHostNameToFolderMapping: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hostname: ::windows::core::PCWSTR,
folderpath: ::windows::core::PCWSTR,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
)
-> ::windows::core::HRESULT,
pub ClearVirtualHostNameToFolderMapping: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hostname: ::windows::core::PCWSTR,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_4(::windows::core::IUnknown);
impl ICoreWebView2_4 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).base__.TrySuspend)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsSuspended)(
::windows::core::Vtable::as_raw(self),
issuspended,
)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_4,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3
);
impl ::core::clone::Clone for ICoreWebView2_4 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_4 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_4 {}
impl ::core::fmt::Debug for ICoreWebView2_4 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_4").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_4 {
type Vtable = ICoreWebView2_4_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_4 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x20d02d59_6df2_42dc_bd06_f98a694b1302);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_4_Vtbl {
pub base__: ICoreWebView2_3_Vtbl,
pub add_FrameCreated: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_FrameCreated: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub add_DownloadStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_DownloadStarting: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_5(::windows::core::IUnknown);
impl ICoreWebView2_5 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.base__.Resume)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_5,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4
);
impl ::core::clone::Clone for ICoreWebView2_5 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_5 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_5 {}
impl ::core::fmt::Debug for ICoreWebView2_5 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_5").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_5 {
type Vtable = ICoreWebView2_5_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_5 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xbedb11b8_d63c_11eb_b8bc_0242ac130003);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_5_Vtbl {
pub base__: ICoreWebView2_4_Vtbl,
pub add_ClientCertificateRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_ClientCertificateRequested: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_6(::windows::core::IUnknown);
impl ICoreWebView2_6 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).OpenTaskManagerWindow)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_6,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5
);
impl ::core::clone::Clone for ICoreWebView2_6 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_6 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_6 {}
impl ::core::fmt::Debug for ICoreWebView2_6 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_6").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_6 {
type Vtable = ICoreWebView2_6_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_6 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x499aadac_d92c_4589_8a75_111bfc167795);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_6_Vtbl {
pub base__: ICoreWebView2_5_Vtbl,
pub OpenTaskManagerWindow:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_7(::windows::core::IUnknown);
impl ICoreWebView2_7 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_7,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6
);
impl ::core::clone::Clone for ICoreWebView2_7 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_7 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_7 {}
impl ::core::fmt::Debug for ICoreWebView2_7 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_7").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_7 {
type Vtable = ICoreWebView2_7_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_7 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x79c24d83_09a3_45ae_9418_487f32a58740);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_7_Vtbl {
pub base__: ICoreWebView2_6_Vtbl,
pub PrintToPdf: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
resultfilepath: ::windows::core::PCWSTR,
printsettings: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_8(::windows::core::IUnknown);
impl ICoreWebView2_8 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self).base__.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self).add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsMuted)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).SetIsMuted)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsDocumentPlayingAudio)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_8,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7
);
impl ::core::clone::Clone for ICoreWebView2_8 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_8 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_8 {}
impl ::core::fmt::Debug for ICoreWebView2_8 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_8").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_8 {
type Vtable = ICoreWebView2_8_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_8 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0xe9632730_6e1e_43ab_b7b8_7b2c9e62e094);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_8_Vtbl {
pub base__: ICoreWebView2_7_Vtbl,
pub add_IsMutedChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_IsMutedChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub IsMuted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub SetIsMuted: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub add_IsDocumentPlayingAudioChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub remove_IsDocumentPlayingAudioChanged: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
)
-> ::windows::core::HRESULT,
pub IsDocumentPlayingAudio: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
}
#[repr(transparent)]
pub struct ICoreWebView2_9(::windows::core::IUnknown);
impl ICoreWebView2_9 {
pub unsafe fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Settings)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Source)(::windows::core::Vtable::as_raw(self), uri)
.ok()
}
pub unsafe fn Navigate<P0>(&self, uri: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Navigate)(::windows::core::Vtable::as_raw(self), uri.into().abi())
.ok()
}
pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateToString)(
::windows::core::Vtable::as_raw(self),
htmlcontent.into().abi(),
)
.ok()
}
pub unsafe fn add_NavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ContentLoading<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ContentLoadingEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContentLoading)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContentLoading(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContentLoading)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_SourceChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2SourceChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_SourceChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_SourceChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_SourceChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_HistoryChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2HistoryChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_HistoryChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_HistoryChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_NavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_FrameNavigationCompleted<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NavigationCompletedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameNavigationCompleted(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_FrameNavigationCompleted)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ScriptDialogOpening<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ScriptDialogOpeningEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ScriptDialogOpening(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ScriptDialogOpening)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_PermissionRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2PermissionRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_PermissionRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_PermissionRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ProcessFailed<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2ProcessFailedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ProcessFailed(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ProcessFailed)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
&self,
id: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveScriptToExecuteOnDocumentCreated)(
::windows::core::Vtable::as_raw(self),
id.into().abi(),
)
.ok()
}
pub unsafe fn ExecuteScript<P0, P1>(
&self,
javascript: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ExecuteScriptCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ExecuteScript)(
::windows::core::Vtable::as_raw(self),
javascript.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn CapturePreview<P0, P1>(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: P0,
handler: P1,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::Win32::System::Com::IStream>>,
P1: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CapturePreviewCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CapturePreview)(
::windows::core::Vtable::as_raw(self),
imageformat,
imagestream.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn Reload(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Reload)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PostWebMessageAsJson<P0>(
&self,
webmessageasjson: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsJson)(
::windows::core::Vtable::as_raw(self),
webmessageasjson.into().abi(),
)
.ok()
}
pub unsafe fn PostWebMessageAsString<P0>(
&self,
webmessageasstring: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.PostWebMessageAsString)(
::windows::core::Vtable::as_raw(self),
webmessageasstring.into().abi(),
)
.ok()
}
pub unsafe fn add_WebMessageReceived<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebMessageReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebMessageReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebMessageReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
&self,
methodname: P0,
parametersasjson: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P2: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CallDevToolsProtocolMethod)(
::windows::core::Vtable::as_raw(self),
methodname.into().abi(),
parametersasjson.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.BrowserProcessId)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoBack)(::windows::core::Vtable::as_raw(self), cangoback)
.ok()
}
pub unsafe fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CanGoForward)(::windows::core::Vtable::as_raw(self), cangoforward)
.ok()
}
pub unsafe fn GoBack(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoBack)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GoForward(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GoForward)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
&self,
eventname: P0,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.GetDevToolsProtocolEventReceiver)(
::windows::core::Vtable::as_raw(self),
eventname.into().abi(),
result__.as_mut_ptr(),
)
.from_abi(result__)
}
pub unsafe fn Stop(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Stop)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_NewWindowRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2NewWindowRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_NewWindowRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_NewWindowRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DocumentTitleChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DocumentTitleChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DocumentTitleChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DocumentTitleChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn DocumentTitle(
&self,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.DocumentTitle)(::windows::core::Vtable::as_raw(self), title)
.ok()
}
pub unsafe fn AddHostObjectToScript<P0>(
&self,
name: P0,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddHostObjectToScript)(
::windows::core::Vtable::as_raw(self),
name.into().abi(),
object,
)
.ok()
}
pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveHostObjectFromScript)(
::windows::core::Vtable::as_raw(self), name.into().abi()
)
.ok()
}
pub unsafe fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.OpenDevToolsWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ContainsFullScreenElementChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_ContainsFullScreenElementChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.ContainsFullScreenElement)(
::windows::core::Vtable::as_raw(self),
containsfullscreenelement,
)
.ok()
}
pub unsafe fn add_WebResourceRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn AddWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.AddWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
&self,
uri: P0,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.RemoveWebResourceRequestedFilter)(
::windows::core::Vtable::as_raw(self),
uri.into().abi(),
resourcecontext,
)
.ok()
}
pub unsafe fn add_WindowCloseRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WindowCloseRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WindowCloseRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WindowCloseRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_WebResourceResponseReceived<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2WebResourceResponseReceivedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_WebResourceResponseReceived(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_WebResourceResponseReceived)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn NavigateWithWebResourceRequest<P0>(
&self,
request: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2WebResourceRequest>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.NavigateWithWebResourceRequest)(
::windows::core::Vtable::as_raw(self),
request.into().abi(),
)
.ok()
}
pub unsafe fn add_DOMContentLoaded<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DOMContentLoadedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.add_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DOMContentLoaded(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.remove_DOMContentLoaded)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.CookieManager)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.base__
.Environment)(::windows::core::Vtable::as_raw(self), result__.as_mut_ptr())
.from_abi(result__)
}
pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2TrySuspendCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.TrySuspend)(::windows::core::Vtable::as_raw(self), handler.into().abi())
.ok()
}
pub unsafe fn Resume(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.Resume)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.IsSuspended)(::windows::core::Vtable::as_raw(self), issuspended)
.ok()
}
pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
&self,
hostname: P0,
folderpath: P1,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.SetVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
folderpath.into().abi(),
accesskind,
)
.ok()
}
pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
&self,
hostname: P0,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.base__
.ClearVirtualHostNameToFolderMapping)(
::windows::core::Vtable::as_raw(self),
hostname.into().abi(),
)
.ok()
}
pub unsafe fn add_FrameCreated<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2FrameCreatedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_FrameCreated)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_FrameCreated(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_FrameCreated)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_DownloadStarting<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2DownloadStartingEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.add_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_DownloadStarting(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.base__
.remove_DownloadStarting)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn add_ClientCertificateRequested<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2ClientCertificateRequestedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.add_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_ClientCertificateRequested(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.base__
.remove_ClientCertificateRequested)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.base__
.base__
.OpenTaskManagerWindow)(::windows::core::Vtable::as_raw(self))
.ok()
}
pub unsafe fn PrintToPdf<P0, P1, P2>(
&self,
resultfilepath: P0,
printsettings: P1,
handler: P2,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<::windows::core::PCWSTR>>,
P1: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintSettings>>,
P2: ::std::convert::Into<::windows::core::InParam<ICoreWebView2PrintToPdfCompletedHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.base__
.PrintToPdf)(
::windows::core::Vtable::as_raw(self),
resultfilepath.into().abi(),
printsettings.into().abi(),
handler.into().abi(),
)
.ok()
}
pub unsafe fn add_IsMutedChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<ICoreWebView2IsMutedChangedEventHandler>>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsMutedChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_IsMutedChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).base__.IsMuted)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetIsMuted<P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::Win32::Foundation::BOOL>,
{
(::windows::core::Vtable::vtable(self).base__.SetIsMuted)(
::windows::core::Vtable::as_raw(self),
value.into(),
)
.ok()
}
pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
&self,
eventhandler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self)
.base__
.add_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
eventhandler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDocumentPlayingAudioChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.remove_IsDocumentPlayingAudioChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self)
.base__
.IsDocumentPlayingAudio)(::windows::core::Vtable::as_raw(self), value)
.ok()
}
pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
&self,
handler: P0,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<
::windows::core::InParam<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
>,
{
(::windows::core::Vtable::vtable(self).add_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
handler.into().abi(),
token,
)
.ok()
}
pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).remove_IsDefaultDownloadDialogOpenChanged)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(token),
)
.ok()
}
pub unsafe fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).IsDefaultDownloadDialogOpen)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).OpenDefaultDownloadDialog)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
pub unsafe fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).CloseDefaultDownloadDialog)(
::windows::core::Vtable::as_raw(self),
)
.ok()
}
pub unsafe fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetDefaultDownloadDialogCornerAlignment)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).DefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
value,
)
.ok()
}
pub unsafe fn SetDefaultDownloadDialogMargin(
&self,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()> {
(::windows::core::Vtable::vtable(self).SetDefaultDownloadDialogMargin)(
::windows::core::Vtable::as_raw(self),
::core::mem::transmute(value),
)
.ok()
}
}
::windows::core::interface_hierarchy!(
ICoreWebView2_9,
::windows::core::IUnknown,
ICoreWebView2,
ICoreWebView2_2,
ICoreWebView2_3,
ICoreWebView2_4,
ICoreWebView2_5,
ICoreWebView2_6,
ICoreWebView2_7,
ICoreWebView2_8
);
impl ::core::clone::Clone for ICoreWebView2_9 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ICoreWebView2_9 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ICoreWebView2_9 {}
impl ::core::fmt::Debug for ICoreWebView2_9 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ICoreWebView2_9").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Vtable for ICoreWebView2_9 {
type Vtable = ICoreWebView2_9_Vtbl;
}
unsafe impl ::windows::core::Interface for ICoreWebView2_9 {
const IID: ::windows::core::GUID =
::windows::core::GUID::from_u128(0x4d7b2eab_9fdc_468d_b998_a9260b5ed651);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreWebView2_9_Vtbl {
pub base__: ICoreWebView2_8_Vtbl,
pub add_IsDefaultDownloadDialogOpenChanged:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub remove_IsDefaultDownloadDialogOpenChanged:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT,
pub IsDefaultDownloadDialogOpen: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT,
pub OpenDefaultDownloadDialog:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub CloseDefaultDownloadDialog:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub DefaultDownloadDialogCornerAlignment: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
)
-> ::windows::core::HRESULT,
pub SetDefaultDownloadDialogCornerAlignment:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::HRESULT,
pub DefaultDownloadDialogMargin: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
pub SetDefaultDownloadDialogMargin: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT,
}
pub const CORE_WEBVIEW_TARGET_PRODUCT_VERSION: ::windows::core::PCWSTR =
::windows::w!("109.0.1518.46");
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_BOUNDS_MODE(pub i32);
pub const COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS: COREWEBVIEW2_BOUNDS_MODE =
COREWEBVIEW2_BOUNDS_MODE(0i32);
pub const COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE: COREWEBVIEW2_BOUNDS_MODE =
COREWEBVIEW2_BOUNDS_MODE(1i32);
impl ::core::marker::Copy for COREWEBVIEW2_BOUNDS_MODE {}
impl ::core::clone::Clone for COREWEBVIEW2_BOUNDS_MODE {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_BOUNDS_MODE {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_BOUNDS_MODE {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_BOUNDS_MODE {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_BOUNDS_MODE")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(pub i32);
pub const COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_NORMAL: COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND =
COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(0i32);
pub const COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_FAILED: COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND =
COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(1i32);
impl ::core::marker::Copy for COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_BROWSING_DATA_KINDS(pub i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(1i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(2i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(4i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(8i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(16i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(32i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(64i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(128i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(256i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(512i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(1024i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(2048i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(4096i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(8192i32);
pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_PROFILE: COREWEBVIEW2_BROWSING_DATA_KINDS =
COREWEBVIEW2_BROWSING_DATA_KINDS(16384i32);
impl ::core::marker::Copy for COREWEBVIEW2_BROWSING_DATA_KINDS {}
impl ::core::clone::Clone for COREWEBVIEW2_BROWSING_DATA_KINDS {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_BROWSING_DATA_KINDS {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_BROWSING_DATA_KINDS {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_BROWSING_DATA_KINDS {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_BROWSING_DATA_KINDS")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(pub i32);
pub const COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT =
COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(0i32);
pub const COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG:
COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT = COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(1i32);
impl ::core::marker::Copy for COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT {}
impl ::core::clone::Clone for COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(pub i32);
pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_SMART_CARD: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(0i32);
pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_PIN: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(1i32);
pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_OTHER: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_CLIENT_CERTIFICATE_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_CLIENT_CERTIFICATE_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_CLIENT_CERTIFICATE_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_CLIENT_CERTIFICATE_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_CLIENT_CERTIFICATE_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_CLIENT_CERTIFICATE_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(pub i32);
pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_COMMAND: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(0i32);
pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_CHECK_BOX: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(1i32);
pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_RADIO: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(2i32);
pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SEPARATOR: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(3i32);
pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SUBMENU: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(4i32);
impl ::core::marker::Copy for COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(pub i32);
pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_PAGE: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(0i32);
pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_IMAGE: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(1i32);
pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_SELECTED_TEXT:
COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND = COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(2i32);
pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_AUDIO: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(3i32);
pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_VIDEO: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(4i32);
impl ::core::marker::Copy for COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_COOKIE_SAME_SITE_KIND(pub i32);
pub const COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
COREWEBVIEW2_COOKIE_SAME_SITE_KIND(0i32);
pub const COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
COREWEBVIEW2_COOKIE_SAME_SITE_KIND(1i32);
pub const COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
COREWEBVIEW2_COOKIE_SAME_SITE_KIND(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_COOKIE_SAME_SITE_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_COOKIE_SAME_SITE_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_COOKIE_SAME_SITE_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_COOKIE_SAME_SITE_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_COOKIE_SAME_SITE_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_COOKIE_SAME_SITE_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(pub i32);
pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_LEFT:
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(0i32);
pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_RIGHT:
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(1i32);
pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_LEFT:
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(2i32);
pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_RIGHT:
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(3i32);
impl ::core::marker::Copy for COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT {}
impl ::core::clone::Clone for COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(pub i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE: COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON =
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(0i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(1i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(2i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(3i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(4i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(5i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(6i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(7i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED_BY_POLICY:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(8i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(9i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(10i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(11i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(12i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(13i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(14i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(15i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(16i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(17i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(18i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(19i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(20i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CERTIFICATE_PROBLEM:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(21i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(22i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(23i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(24i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(25i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(26i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(27i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(28i32);
pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED:
COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(29i32);
impl ::core::marker::Copy for COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON {}
impl ::core::clone::Clone for COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_DOWNLOAD_STATE(pub i32);
pub const COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS: COREWEBVIEW2_DOWNLOAD_STATE =
COREWEBVIEW2_DOWNLOAD_STATE(0i32);
pub const COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED: COREWEBVIEW2_DOWNLOAD_STATE =
COREWEBVIEW2_DOWNLOAD_STATE(1i32);
pub const COREWEBVIEW2_DOWNLOAD_STATE_COMPLETED: COREWEBVIEW2_DOWNLOAD_STATE =
COREWEBVIEW2_DOWNLOAD_STATE(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_DOWNLOAD_STATE {}
impl ::core::clone::Clone for COREWEBVIEW2_DOWNLOAD_STATE {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_DOWNLOAD_STATE {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_DOWNLOAD_STATE {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_DOWNLOAD_STATE {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_DOWNLOAD_STATE")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_FAVICON_IMAGE_FORMAT(pub i32);
pub const COREWEBVIEW2_FAVICON_IMAGE_FORMAT_PNG: COREWEBVIEW2_FAVICON_IMAGE_FORMAT =
COREWEBVIEW2_FAVICON_IMAGE_FORMAT(0i32);
pub const COREWEBVIEW2_FAVICON_IMAGE_FORMAT_JPEG: COREWEBVIEW2_FAVICON_IMAGE_FORMAT =
COREWEBVIEW2_FAVICON_IMAGE_FORMAT(1i32);
impl ::core::marker::Copy for COREWEBVIEW2_FAVICON_IMAGE_FORMAT {}
impl ::core::clone::Clone for COREWEBVIEW2_FAVICON_IMAGE_FORMAT {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_FAVICON_IMAGE_FORMAT {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_FAVICON_IMAGE_FORMAT {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_FAVICON_IMAGE_FORMAT {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_FAVICON_IMAGE_FORMAT")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(pub i32);
pub const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(0i32);
pub const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(1i32);
pub const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_KEY_EVENT_KIND(pub i32);
pub const COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN: COREWEBVIEW2_KEY_EVENT_KIND =
COREWEBVIEW2_KEY_EVENT_KIND(0i32);
pub const COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP: COREWEBVIEW2_KEY_EVENT_KIND =
COREWEBVIEW2_KEY_EVENT_KIND(1i32);
pub const COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN: COREWEBVIEW2_KEY_EVENT_KIND =
COREWEBVIEW2_KEY_EVENT_KIND(2i32);
pub const COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP: COREWEBVIEW2_KEY_EVENT_KIND =
COREWEBVIEW2_KEY_EVENT_KIND(3i32);
impl ::core::marker::Copy for COREWEBVIEW2_KEY_EVENT_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_KEY_EVENT_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_KEY_EVENT_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_KEY_EVENT_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_KEY_EVENT_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_KEY_EVENT_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_MOUSE_EVENT_KIND(pub i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(526i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(515i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(513i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(514i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(675i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(521i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(519i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(520i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(512i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(518i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(516i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(517i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(522i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(525i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(523i32);
pub const COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
COREWEBVIEW2_MOUSE_EVENT_KIND(524i32);
impl ::core::marker::Copy for COREWEBVIEW2_MOUSE_EVENT_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_MOUSE_EVENT_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_MOUSE_EVENT_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_MOUSE_EVENT_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_MOUSE_EVENT_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_MOUSE_EVENT_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(pub i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_NONE: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(0i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_LEFT_BUTTON: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(1i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_RIGHT_BUTTON:
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS = COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(2i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_SHIFT: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(4i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_CONTROL: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(8i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_MIDDLE_BUTTON:
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS = COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(16i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON1: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(32i32);
pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON2: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(64i32);
impl ::core::marker::Copy for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {}
impl ::core::clone::Clone for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_MOVE_FOCUS_REASON(pub i32);
pub const COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC: COREWEBVIEW2_MOVE_FOCUS_REASON =
COREWEBVIEW2_MOVE_FOCUS_REASON(0i32);
pub const COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT: COREWEBVIEW2_MOVE_FOCUS_REASON =
COREWEBVIEW2_MOVE_FOCUS_REASON(1i32);
pub const COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS: COREWEBVIEW2_MOVE_FOCUS_REASON =
COREWEBVIEW2_MOVE_FOCUS_REASON(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_MOVE_FOCUS_REASON {}
impl ::core::clone::Clone for COREWEBVIEW2_MOVE_FOCUS_REASON {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_MOVE_FOCUS_REASON {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_MOVE_FOCUS_REASON {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_MOVE_FOCUS_REASON {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_MOVE_FOCUS_REASON")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PDF_TOOLBAR_ITEMS(pub i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(0i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(1i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PRINT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(2i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE_AS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(4i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_IN: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(8i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_OUT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(16i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ROTATE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(32i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FIT_PAGE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(64i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_LAYOUT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(128i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_BOOKMARKS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(256i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_SELECTOR: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(512i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SEARCH: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(1024i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FULL_SCREEN: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(2048i32);
pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_MORE_SETTINGS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
COREWEBVIEW2_PDF_TOOLBAR_ITEMS(4096i32);
impl ::core::marker::Copy for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {}
impl ::core::clone::Clone for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PDF_TOOLBAR_ITEMS")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PERMISSION_KIND(pub i32);
pub const COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION: COREWEBVIEW2_PERMISSION_KIND =
COREWEBVIEW2_PERMISSION_KIND(0i32);
pub const COREWEBVIEW2_PERMISSION_KIND_MICROPHONE: COREWEBVIEW2_PERMISSION_KIND =
COREWEBVIEW2_PERMISSION_KIND(1i32);
pub const COREWEBVIEW2_PERMISSION_KIND_CAMERA: COREWEBVIEW2_PERMISSION_KIND =
COREWEBVIEW2_PERMISSION_KIND(2i32);
pub const COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION: COREWEBVIEW2_PERMISSION_KIND =
COREWEBVIEW2_PERMISSION_KIND(3i32);
pub const COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS: COREWEBVIEW2_PERMISSION_KIND =
COREWEBVIEW2_PERMISSION_KIND(4i32);
pub const COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS: COREWEBVIEW2_PERMISSION_KIND =
COREWEBVIEW2_PERMISSION_KIND(5i32);
pub const COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ: COREWEBVIEW2_PERMISSION_KIND =
COREWEBVIEW2_PERMISSION_KIND(6i32);
impl ::core::marker::Copy for COREWEBVIEW2_PERMISSION_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_PERMISSION_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PERMISSION_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PERMISSION_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PERMISSION_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PERMISSION_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PERMISSION_STATE(pub i32);
pub const COREWEBVIEW2_PERMISSION_STATE_DEFAULT: COREWEBVIEW2_PERMISSION_STATE =
COREWEBVIEW2_PERMISSION_STATE(0i32);
pub const COREWEBVIEW2_PERMISSION_STATE_ALLOW: COREWEBVIEW2_PERMISSION_STATE =
COREWEBVIEW2_PERMISSION_STATE(1i32);
pub const COREWEBVIEW2_PERMISSION_STATE_DENY: COREWEBVIEW2_PERMISSION_STATE =
COREWEBVIEW2_PERMISSION_STATE(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_PERMISSION_STATE {}
impl ::core::clone::Clone for COREWEBVIEW2_PERMISSION_STATE {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PERMISSION_STATE {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PERMISSION_STATE {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PERMISSION_STATE {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PERMISSION_STATE")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_POINTER_EVENT_KIND(pub i32);
pub const COREWEBVIEW2_POINTER_EVENT_KIND_ACTIVATE: COREWEBVIEW2_POINTER_EVENT_KIND =
COREWEBVIEW2_POINTER_EVENT_KIND(587i32);
pub const COREWEBVIEW2_POINTER_EVENT_KIND_DOWN: COREWEBVIEW2_POINTER_EVENT_KIND =
COREWEBVIEW2_POINTER_EVENT_KIND(582i32);
pub const COREWEBVIEW2_POINTER_EVENT_KIND_ENTER: COREWEBVIEW2_POINTER_EVENT_KIND =
COREWEBVIEW2_POINTER_EVENT_KIND(585i32);
pub const COREWEBVIEW2_POINTER_EVENT_KIND_LEAVE: COREWEBVIEW2_POINTER_EVENT_KIND =
COREWEBVIEW2_POINTER_EVENT_KIND(586i32);
pub const COREWEBVIEW2_POINTER_EVENT_KIND_UP: COREWEBVIEW2_POINTER_EVENT_KIND =
COREWEBVIEW2_POINTER_EVENT_KIND(583i32);
pub const COREWEBVIEW2_POINTER_EVENT_KIND_UPDATE: COREWEBVIEW2_POINTER_EVENT_KIND =
COREWEBVIEW2_POINTER_EVENT_KIND(581i32);
impl ::core::marker::Copy for COREWEBVIEW2_POINTER_EVENT_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_POINTER_EVENT_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_POINTER_EVENT_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_POINTER_EVENT_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_POINTER_EVENT_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_POINTER_EVENT_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PREFERRED_COLOR_SCHEME(pub i32);
pub const COREWEBVIEW2_PREFERRED_COLOR_SCHEME_AUTO: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
COREWEBVIEW2_PREFERRED_COLOR_SCHEME(0i32);
pub const COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
COREWEBVIEW2_PREFERRED_COLOR_SCHEME(1i32);
pub const COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
COREWEBVIEW2_PREFERRED_COLOR_SCHEME(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_PREFERRED_COLOR_SCHEME {}
impl ::core::clone::Clone for COREWEBVIEW2_PREFERRED_COLOR_SCHEME {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PREFERRED_COLOR_SCHEME {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PREFERRED_COLOR_SCHEME {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PREFERRED_COLOR_SCHEME {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PREFERRED_COLOR_SCHEME")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PRINT_COLLATION(pub i32);
pub const COREWEBVIEW2_PRINT_COLLATION_DEFAULT: COREWEBVIEW2_PRINT_COLLATION =
COREWEBVIEW2_PRINT_COLLATION(0i32);
pub const COREWEBVIEW2_PRINT_COLLATION_COLLATED: COREWEBVIEW2_PRINT_COLLATION =
COREWEBVIEW2_PRINT_COLLATION(1i32);
pub const COREWEBVIEW2_PRINT_COLLATION_UNCOLLATED: COREWEBVIEW2_PRINT_COLLATION =
COREWEBVIEW2_PRINT_COLLATION(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_PRINT_COLLATION {}
impl ::core::clone::Clone for COREWEBVIEW2_PRINT_COLLATION {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PRINT_COLLATION {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PRINT_COLLATION {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PRINT_COLLATION {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PRINT_COLLATION")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PRINT_COLOR_MODE(pub i32);
pub const COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT: COREWEBVIEW2_PRINT_COLOR_MODE =
COREWEBVIEW2_PRINT_COLOR_MODE(0i32);
pub const COREWEBVIEW2_PRINT_COLOR_MODE_COLOR: COREWEBVIEW2_PRINT_COLOR_MODE =
COREWEBVIEW2_PRINT_COLOR_MODE(1i32);
pub const COREWEBVIEW2_PRINT_COLOR_MODE_GRAYSCALE: COREWEBVIEW2_PRINT_COLOR_MODE =
COREWEBVIEW2_PRINT_COLOR_MODE(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_PRINT_COLOR_MODE {}
impl ::core::clone::Clone for COREWEBVIEW2_PRINT_COLOR_MODE {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PRINT_COLOR_MODE {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PRINT_COLOR_MODE {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PRINT_COLOR_MODE {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PRINT_COLOR_MODE")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PRINT_DIALOG_KIND(pub i32);
pub const COREWEBVIEW2_PRINT_DIALOG_KIND_BROWSER: COREWEBVIEW2_PRINT_DIALOG_KIND =
COREWEBVIEW2_PRINT_DIALOG_KIND(0i32);
pub const COREWEBVIEW2_PRINT_DIALOG_KIND_SYSTEM: COREWEBVIEW2_PRINT_DIALOG_KIND =
COREWEBVIEW2_PRINT_DIALOG_KIND(1i32);
impl ::core::marker::Copy for COREWEBVIEW2_PRINT_DIALOG_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_PRINT_DIALOG_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PRINT_DIALOG_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PRINT_DIALOG_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PRINT_DIALOG_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PRINT_DIALOG_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PRINT_DUPLEX(pub i32);
pub const COREWEBVIEW2_PRINT_DUPLEX_DEFAULT: COREWEBVIEW2_PRINT_DUPLEX =
COREWEBVIEW2_PRINT_DUPLEX(0i32);
pub const COREWEBVIEW2_PRINT_DUPLEX_ONE_SIDED: COREWEBVIEW2_PRINT_DUPLEX =
COREWEBVIEW2_PRINT_DUPLEX(1i32);
pub const COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_LONG_EDGE: COREWEBVIEW2_PRINT_DUPLEX =
COREWEBVIEW2_PRINT_DUPLEX(2i32);
pub const COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_SHORT_EDGE: COREWEBVIEW2_PRINT_DUPLEX =
COREWEBVIEW2_PRINT_DUPLEX(3i32);
impl ::core::marker::Copy for COREWEBVIEW2_PRINT_DUPLEX {}
impl ::core::clone::Clone for COREWEBVIEW2_PRINT_DUPLEX {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PRINT_DUPLEX {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PRINT_DUPLEX {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PRINT_DUPLEX {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PRINT_DUPLEX")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PRINT_MEDIA_SIZE(pub i32);
pub const COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT: COREWEBVIEW2_PRINT_MEDIA_SIZE =
COREWEBVIEW2_PRINT_MEDIA_SIZE(0i32);
pub const COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM: COREWEBVIEW2_PRINT_MEDIA_SIZE =
COREWEBVIEW2_PRINT_MEDIA_SIZE(1i32);
impl ::core::marker::Copy for COREWEBVIEW2_PRINT_MEDIA_SIZE {}
impl ::core::clone::Clone for COREWEBVIEW2_PRINT_MEDIA_SIZE {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PRINT_MEDIA_SIZE {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PRINT_MEDIA_SIZE {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PRINT_MEDIA_SIZE {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PRINT_MEDIA_SIZE")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PRINT_ORIENTATION(pub i32);
pub const COREWEBVIEW2_PRINT_ORIENTATION_PORTRAIT: COREWEBVIEW2_PRINT_ORIENTATION =
COREWEBVIEW2_PRINT_ORIENTATION(0i32);
pub const COREWEBVIEW2_PRINT_ORIENTATION_LANDSCAPE: COREWEBVIEW2_PRINT_ORIENTATION =
COREWEBVIEW2_PRINT_ORIENTATION(1i32);
impl ::core::marker::Copy for COREWEBVIEW2_PRINT_ORIENTATION {}
impl ::core::clone::Clone for COREWEBVIEW2_PRINT_ORIENTATION {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PRINT_ORIENTATION {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PRINT_ORIENTATION {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PRINT_ORIENTATION {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PRINT_ORIENTATION")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PRINT_STATUS(pub i32);
pub const COREWEBVIEW2_PRINT_STATUS_SUCCEEDED: COREWEBVIEW2_PRINT_STATUS =
COREWEBVIEW2_PRINT_STATUS(0i32);
pub const COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE: COREWEBVIEW2_PRINT_STATUS =
COREWEBVIEW2_PRINT_STATUS(1i32);
pub const COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR: COREWEBVIEW2_PRINT_STATUS =
COREWEBVIEW2_PRINT_STATUS(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_PRINT_STATUS {}
impl ::core::clone::Clone for COREWEBVIEW2_PRINT_STATUS {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PRINT_STATUS {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PRINT_STATUS {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PRINT_STATUS {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PRINT_STATUS")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PROCESS_FAILED_KIND(pub i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(0i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED: COREWEBVIEW2_PROCESS_FAILED_KIND =
COREWEBVIEW2_PROCESS_FAILED_KIND(1i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(2i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(3i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(4i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(5i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED: COREWEBVIEW2_PROCESS_FAILED_KIND =
COREWEBVIEW2_PROCESS_FAILED_KIND(6i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(7i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(8i32);
pub const COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED:
COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(9i32);
impl ::core::marker::Copy for COREWEBVIEW2_PROCESS_FAILED_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_PROCESS_FAILED_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PROCESS_FAILED_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PROCESS_FAILED_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PROCESS_FAILED_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PROCESS_FAILED_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PROCESS_FAILED_REASON(pub i32);
pub const COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED: COREWEBVIEW2_PROCESS_FAILED_REASON =
COREWEBVIEW2_PROCESS_FAILED_REASON(0i32);
pub const COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE: COREWEBVIEW2_PROCESS_FAILED_REASON =
COREWEBVIEW2_PROCESS_FAILED_REASON(1i32);
pub const COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED: COREWEBVIEW2_PROCESS_FAILED_REASON =
COREWEBVIEW2_PROCESS_FAILED_REASON(2i32);
pub const COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED: COREWEBVIEW2_PROCESS_FAILED_REASON =
COREWEBVIEW2_PROCESS_FAILED_REASON(3i32);
pub const COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED: COREWEBVIEW2_PROCESS_FAILED_REASON =
COREWEBVIEW2_PROCESS_FAILED_REASON(4i32);
pub const COREWEBVIEW2_PROCESS_FAILED_REASON_OUT_OF_MEMORY: COREWEBVIEW2_PROCESS_FAILED_REASON =
COREWEBVIEW2_PROCESS_FAILED_REASON(5i32);
pub const COREWEBVIEW2_PROCESS_FAILED_REASON_PROFILE_DELETED: COREWEBVIEW2_PROCESS_FAILED_REASON =
COREWEBVIEW2_PROCESS_FAILED_REASON(6i32);
impl ::core::marker::Copy for COREWEBVIEW2_PROCESS_FAILED_REASON {}
impl ::core::clone::Clone for COREWEBVIEW2_PROCESS_FAILED_REASON {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PROCESS_FAILED_REASON {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PROCESS_FAILED_REASON {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PROCESS_FAILED_REASON {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PROCESS_FAILED_REASON")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_PROCESS_KIND(pub i32);
pub const COREWEBVIEW2_PROCESS_KIND_BROWSER: COREWEBVIEW2_PROCESS_KIND =
COREWEBVIEW2_PROCESS_KIND(0i32);
pub const COREWEBVIEW2_PROCESS_KIND_RENDERER: COREWEBVIEW2_PROCESS_KIND =
COREWEBVIEW2_PROCESS_KIND(1i32);
pub const COREWEBVIEW2_PROCESS_KIND_UTILITY: COREWEBVIEW2_PROCESS_KIND =
COREWEBVIEW2_PROCESS_KIND(2i32);
pub const COREWEBVIEW2_PROCESS_KIND_SANDBOX_HELPER: COREWEBVIEW2_PROCESS_KIND =
COREWEBVIEW2_PROCESS_KIND(3i32);
pub const COREWEBVIEW2_PROCESS_KIND_GPU: COREWEBVIEW2_PROCESS_KIND =
COREWEBVIEW2_PROCESS_KIND(4i32);
pub const COREWEBVIEW2_PROCESS_KIND_PPAPI_PLUGIN: COREWEBVIEW2_PROCESS_KIND =
COREWEBVIEW2_PROCESS_KIND(5i32);
pub const COREWEBVIEW2_PROCESS_KIND_PPAPI_BROKER: COREWEBVIEW2_PROCESS_KIND =
COREWEBVIEW2_PROCESS_KIND(6i32);
impl ::core::marker::Copy for COREWEBVIEW2_PROCESS_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_PROCESS_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_PROCESS_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PROCESS_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_PROCESS_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_PROCESS_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_SCRIPT_DIALOG_KIND(pub i32);
pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
COREWEBVIEW2_SCRIPT_DIALOG_KIND(0i32);
pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
COREWEBVIEW2_SCRIPT_DIALOG_KIND(1i32);
pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
COREWEBVIEW2_SCRIPT_DIALOG_KIND(2i32);
pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
COREWEBVIEW2_SCRIPT_DIALOG_KIND(3i32);
impl ::core::marker::Copy for COREWEBVIEW2_SCRIPT_DIALOG_KIND {}
impl ::core::clone::Clone for COREWEBVIEW2_SCRIPT_DIALOG_KIND {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_SCRIPT_DIALOG_KIND {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_SCRIPT_DIALOG_KIND {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_SCRIPT_DIALOG_KIND {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_SCRIPT_DIALOG_KIND")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(pub i32);
pub const COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW:
COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION =
COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(0i32);
pub const COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_CANCEL:
COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION =
COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(1i32);
pub const COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT:
COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION =
COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(2i32);
impl ::core::marker::Copy for COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION {}
impl ::core::clone::Clone for COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_WEB_ERROR_STATUS(pub i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(0i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT:
COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(1i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(2i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS:
COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(3i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(4i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(5i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(6i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(7i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE:
COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(8i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(9i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(10i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(11i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(12i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(13i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(14i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(15i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR: COREWEBVIEW2_WEB_ERROR_STATUS =
COREWEBVIEW2_WEB_ERROR_STATUS(16i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED:
COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(17i32);
pub const COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED:
COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(18i32);
impl ::core::marker::Copy for COREWEBVIEW2_WEB_ERROR_STATUS {}
impl ::core::clone::Clone for COREWEBVIEW2_WEB_ERROR_STATUS {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_WEB_ERROR_STATUS {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_WEB_ERROR_STATUS {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_WEB_ERROR_STATUS {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_WEB_ERROR_STATUS")
.field(&self.0)
.finish()
}
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct COREWEBVIEW2_WEB_RESOURCE_CONTEXT(pub i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(0i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(1i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(2i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(3i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(4i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(5i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(6i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(7i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(8i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(9i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(10i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(11i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(12i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(13i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(14i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT:
COREWEBVIEW2_WEB_RESOURCE_CONTEXT = COREWEBVIEW2_WEB_RESOURCE_CONTEXT(15i32);
pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
COREWEBVIEW2_WEB_RESOURCE_CONTEXT(16i32);
impl ::core::marker::Copy for COREWEBVIEW2_WEB_RESOURCE_CONTEXT {}
impl ::core::clone::Clone for COREWEBVIEW2_WEB_RESOURCE_CONTEXT {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for COREWEBVIEW2_WEB_RESOURCE_CONTEXT {
fn default() -> Self {
Self(0)
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_WEB_RESOURCE_CONTEXT {
type Abi = Self;
}
impl ::core::fmt::Debug for COREWEBVIEW2_WEB_RESOURCE_CONTEXT {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("COREWEBVIEW2_WEB_RESOURCE_CONTEXT")
.field(&self.0)
.finish()
}
}
#[repr(C)]
pub struct COREWEBVIEW2_COLOR {
pub A: u8,
pub R: u8,
pub G: u8,
pub B: u8,
}
impl ::core::marker::Copy for COREWEBVIEW2_COLOR {}
impl ::core::clone::Clone for COREWEBVIEW2_COLOR {
fn clone(&self) -> Self {
*self
}
}
impl ::core::fmt::Debug for COREWEBVIEW2_COLOR {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("COREWEBVIEW2_COLOR")
.field("A", &self.A)
.field("R", &self.R)
.field("G", &self.G)
.field("B", &self.B)
.finish()
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_COLOR {
type Abi = Self;
}
impl ::core::cmp::PartialEq for COREWEBVIEW2_COLOR {
fn eq(&self, other: &Self) -> bool {
self.A == other.A && self.R == other.R && self.G == other.G && self.B == other.B
}
}
impl ::core::cmp::Eq for COREWEBVIEW2_COLOR {}
impl ::core::default::Default for COREWEBVIEW2_COLOR {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
pub struct COREWEBVIEW2_PHYSICAL_KEY_STATUS {
pub RepeatCount: u32,
pub ScanCode: u32,
pub IsExtendedKey: ::windows::Win32::Foundation::BOOL,
pub IsMenuKeyDown: ::windows::Win32::Foundation::BOOL,
pub WasKeyDown: ::windows::Win32::Foundation::BOOL,
pub IsKeyReleased: ::windows::Win32::Foundation::BOOL,
}
impl ::core::marker::Copy for COREWEBVIEW2_PHYSICAL_KEY_STATUS {}
impl ::core::clone::Clone for COREWEBVIEW2_PHYSICAL_KEY_STATUS {
fn clone(&self) -> Self {
*self
}
}
impl ::core::fmt::Debug for COREWEBVIEW2_PHYSICAL_KEY_STATUS {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("COREWEBVIEW2_PHYSICAL_KEY_STATUS")
.field("RepeatCount", &self.RepeatCount)
.field("ScanCode", &self.ScanCode)
.field("IsExtendedKey", &self.IsExtendedKey)
.field("IsMenuKeyDown", &self.IsMenuKeyDown)
.field("WasKeyDown", &self.WasKeyDown)
.field("IsKeyReleased", &self.IsKeyReleased)
.finish()
}
}
unsafe impl ::windows::core::Abi for COREWEBVIEW2_PHYSICAL_KEY_STATUS {
type Abi = Self;
}
impl ::core::cmp::PartialEq for COREWEBVIEW2_PHYSICAL_KEY_STATUS {
fn eq(&self, other: &Self) -> bool {
self.RepeatCount == other.RepeatCount
&& self.ScanCode == other.ScanCode
&& self.IsExtendedKey == other.IsExtendedKey
&& self.IsMenuKeyDown == other.IsMenuKeyDown
&& self.WasKeyDown == other.WasKeyDown
&& self.IsKeyReleased == other.IsKeyReleased
}
}
impl ::core::cmp::Eq for COREWEBVIEW2_PHYSICAL_KEY_STATUS {}
impl ::core::default::Default for COREWEBVIEW2_PHYSICAL_KEY_STATUS {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub trait ICoreWebView2_Impl: Sized {
fn Settings(&self) -> ::windows::core::Result<ICoreWebView2Settings>;
fn Source(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Navigate(&self, uri: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn NavigateToString(
&self,
htmlcontent: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn add_NavigationStarting(
&self,
eventhandler: &::core::option::Option<ICoreWebView2NavigationStartingEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_NavigationStarting(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_ContentLoading(
&self,
eventhandler: &::core::option::Option<ICoreWebView2ContentLoadingEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ContentLoading(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_SourceChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2SourceChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_SourceChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_HistoryChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2HistoryChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_HistoryChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_NavigationCompleted(
&self,
eventhandler: &::core::option::Option<ICoreWebView2NavigationCompletedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_NavigationCompleted(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_FrameNavigationStarting(
&self,
eventhandler: &::core::option::Option<ICoreWebView2NavigationStartingEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_FrameNavigationStarting(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_FrameNavigationCompleted(
&self,
eventhandler: &::core::option::Option<ICoreWebView2NavigationCompletedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_FrameNavigationCompleted(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_ScriptDialogOpening(
&self,
eventhandler: &::core::option::Option<ICoreWebView2ScriptDialogOpeningEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ScriptDialogOpening(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_PermissionRequested(
&self,
eventhandler: &::core::option::Option<ICoreWebView2PermissionRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_PermissionRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_ProcessFailed(
&self,
eventhandler: &::core::option::Option<ICoreWebView2ProcessFailedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ProcessFailed(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn AddScriptToExecuteOnDocumentCreated(
&self,
javascript: &::windows::core::PCWSTR,
handler: &::core::option::Option<
ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
>,
) -> ::windows::core::Result<()>;
fn RemoveScriptToExecuteOnDocumentCreated(
&self,
id: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn ExecuteScript(
&self,
javascript: &::windows::core::PCWSTR,
handler: &::core::option::Option<ICoreWebView2ExecuteScriptCompletedHandler>,
) -> ::windows::core::Result<()>;
fn CapturePreview(
&self,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: &::core::option::Option<::windows::Win32::System::Com::IStream>,
handler: &::core::option::Option<ICoreWebView2CapturePreviewCompletedHandler>,
) -> ::windows::core::Result<()>;
fn Reload(&self) -> ::windows::core::Result<()>;
fn PostWebMessageAsJson(
&self,
webmessageasjson: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn PostWebMessageAsString(
&self,
webmessageasstring: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn add_WebMessageReceived(
&self,
handler: &::core::option::Option<ICoreWebView2WebMessageReceivedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_WebMessageReceived(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn CallDevToolsProtocolMethod(
&self,
methodname: &::windows::core::PCWSTR,
parametersasjson: &::windows::core::PCWSTR,
handler: &::core::option::Option<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
) -> ::windows::core::Result<()>;
fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn CanGoBack(
&self,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn CanGoForward(
&self,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn GoBack(&self) -> ::windows::core::Result<()>;
fn GoForward(&self) -> ::windows::core::Result<()>;
fn GetDevToolsProtocolEventReceiver(
&self,
eventname: &::windows::core::PCWSTR,
) -> ::windows::core::Result<ICoreWebView2DevToolsProtocolEventReceiver>;
fn Stop(&self) -> ::windows::core::Result<()>;
fn add_NewWindowRequested(
&self,
eventhandler: &::core::option::Option<ICoreWebView2NewWindowRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_NewWindowRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_DocumentTitleChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2DocumentTitleChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_DocumentTitleChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn DocumentTitle(&self, title: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn AddHostObjectToScript(
&self,
name: &::windows::core::PCWSTR,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::Result<()>;
fn RemoveHostObjectFromScript(
&self,
name: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn OpenDevToolsWindow(&self) -> ::windows::core::Result<()>;
fn add_ContainsFullScreenElementChanged(
&self,
eventhandler: &::core::option::Option<
ICoreWebView2ContainsFullScreenElementChangedEventHandler,
>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ContainsFullScreenElementChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn ContainsFullScreenElement(
&self,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn add_WebResourceRequested(
&self,
eventhandler: &::core::option::Option<ICoreWebView2WebResourceRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_WebResourceRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn AddWebResourceRequestedFilter(
&self,
uri: &::windows::core::PCWSTR,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>;
fn RemoveWebResourceRequestedFilter(
&self,
uri: &::windows::core::PCWSTR,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>;
fn add_WindowCloseRequested(
&self,
eventhandler: &::core::option::Option<ICoreWebView2WindowCloseRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_WindowCloseRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2 {}
impl ICoreWebView2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_Vtbl {
unsafe extern "system" fn Settings<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
settings: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Settings() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(settings, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Source<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Source(::core::mem::transmute_copy(&uri)).into()
}
unsafe extern "system" fn Navigate<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Navigate(::core::mem::transmute(&uri)).into()
}
unsafe extern "system" fn NavigateToString<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
htmlcontent: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NavigateToString(::core::mem::transmute(&htmlcontent))
.into()
}
unsafe extern "system" fn add_NavigationStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_NavigationStarting(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_NavigationStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_NavigationStarting(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_ContentLoading<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ContentLoading(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ContentLoading<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ContentLoading(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_SourceChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_SourceChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_SourceChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_SourceChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_HistoryChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_HistoryChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_HistoryChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_HistoryChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_NavigationCompleted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_NavigationCompleted(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_NavigationCompleted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_NavigationCompleted(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_FrameNavigationStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_FrameNavigationStarting(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_FrameNavigationStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_FrameNavigationStarting(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_FrameNavigationCompleted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_FrameNavigationCompleted(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_FrameNavigationCompleted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_FrameNavigationCompleted(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_ScriptDialogOpening<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ScriptDialogOpening(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ScriptDialogOpening<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ScriptDialogOpening(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_PermissionRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_PermissionRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_PermissionRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_PermissionRequested(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_ProcessFailed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ProcessFailed(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ProcessFailed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ProcessFailed(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn AddScriptToExecuteOnDocumentCreated<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
javascript: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddScriptToExecuteOnDocumentCreated(
::core::mem::transmute(&javascript),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn RemoveScriptToExecuteOnDocumentCreated<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
id: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveScriptToExecuteOnDocumentCreated(::core::mem::transmute(&id))
.into()
}
unsafe extern "system" fn ExecuteScript<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
javascript: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExecuteScript(
::core::mem::transmute(&javascript),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn CapturePreview<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
imagestream: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CapturePreview(
::core::mem::transmute_copy(&imageformat),
::core::mem::transmute(&imagestream),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn Reload<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reload().into()
}
unsafe extern "system" fn PostWebMessageAsJson<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
webmessageasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PostWebMessageAsJson(::core::mem::transmute(&webmessageasjson))
.into()
}
unsafe extern "system" fn PostWebMessageAsString<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
webmessageasstring: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PostWebMessageAsString(::core::mem::transmute(&webmessageasstring))
.into()
}
unsafe extern "system" fn add_WebMessageReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_WebMessageReceived(
::core::mem::transmute(&handler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_WebMessageReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_WebMessageReceived(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn CallDevToolsProtocolMethod<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
methodname: ::windows::core::PCWSTR,
parametersasjson: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CallDevToolsProtocolMethod(
::core::mem::transmute(&methodname),
::core::mem::transmute(¶metersasjson),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn BrowserProcessId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BrowserProcessId(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn CanGoBack<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cangoback: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CanGoBack(::core::mem::transmute_copy(&cangoback))
.into()
}
unsafe extern "system" fn CanGoForward<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cangoforward: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CanGoForward(::core::mem::transmute_copy(&cangoforward))
.into()
}
unsafe extern "system" fn GoBack<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GoBack().into()
}
unsafe extern "system" fn GoForward<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GoForward().into()
}
unsafe extern "system" fn GetDevToolsProtocolEventReceiver<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventname: ::windows::core::PCWSTR,
receiver: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDevToolsProtocolEventReceiver(::core::mem::transmute(&eventname)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(receiver, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Stop<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Stop().into()
}
unsafe extern "system" fn add_NewWindowRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_NewWindowRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_NewWindowRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_NewWindowRequested(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_DocumentTitleChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_DocumentTitleChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_DocumentTitleChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_DocumentTitleChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn DocumentTitle<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
title: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DocumentTitle(::core::mem::transmute_copy(&title))
.into()
}
unsafe extern "system" fn AddHostObjectToScript<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
object: *mut ::windows::Win32::System::Com::VARIANT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddHostObjectToScript(
::core::mem::transmute(&name),
::core::mem::transmute_copy(&object),
)
.into()
}
unsafe extern "system" fn RemoveHostObjectFromScript<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveHostObjectFromScript(::core::mem::transmute(&name))
.into()
}
unsafe extern "system" fn OpenDevToolsWindow<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OpenDevToolsWindow().into()
}
unsafe extern "system" fn add_ContainsFullScreenElementChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ContainsFullScreenElementChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ContainsFullScreenElementChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ContainsFullScreenElementChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn ContainsFullScreenElement<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
containsfullscreenelement: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ContainsFullScreenElement(::core::mem::transmute_copy(&containsfullscreenelement))
.into()
}
unsafe extern "system" fn add_WebResourceRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_WebResourceRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_WebResourceRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_WebResourceRequested(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn AddWebResourceRequestedFilter<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddWebResourceRequestedFilter(
::core::mem::transmute(&uri),
::core::mem::transmute_copy(&resourcecontext),
)
.into()
}
unsafe extern "system" fn RemoveWebResourceRequestedFilter<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveWebResourceRequestedFilter(
::core::mem::transmute(&uri),
::core::mem::transmute_copy(&resourcecontext),
)
.into()
}
unsafe extern "system" fn add_WindowCloseRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_WindowCloseRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_WindowCloseRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_WindowCloseRequested(::core::mem::transmute(&token))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Settings: Settings::<Identity, Impl, OFFSET>,
Source: Source::<Identity, Impl, OFFSET>,
Navigate: Navigate::<Identity, Impl, OFFSET>,
NavigateToString: NavigateToString::<Identity, Impl, OFFSET>,
add_NavigationStarting: add_NavigationStarting::<Identity, Impl, OFFSET>,
remove_NavigationStarting: remove_NavigationStarting::<Identity, Impl, OFFSET>,
add_ContentLoading: add_ContentLoading::<Identity, Impl, OFFSET>,
remove_ContentLoading: remove_ContentLoading::<Identity, Impl, OFFSET>,
add_SourceChanged: add_SourceChanged::<Identity, Impl, OFFSET>,
remove_SourceChanged: remove_SourceChanged::<Identity, Impl, OFFSET>,
add_HistoryChanged: add_HistoryChanged::<Identity, Impl, OFFSET>,
remove_HistoryChanged: remove_HistoryChanged::<Identity, Impl, OFFSET>,
add_NavigationCompleted: add_NavigationCompleted::<Identity, Impl, OFFSET>,
remove_NavigationCompleted: remove_NavigationCompleted::<Identity, Impl, OFFSET>,
add_FrameNavigationStarting: add_FrameNavigationStarting::<Identity, Impl, OFFSET>,
remove_FrameNavigationStarting: remove_FrameNavigationStarting::<Identity, Impl, OFFSET>,
add_FrameNavigationCompleted: add_FrameNavigationCompleted::<Identity, Impl, OFFSET>,
remove_FrameNavigationCompleted: remove_FrameNavigationCompleted::<
Identity,
Impl,
OFFSET,
>,
add_ScriptDialogOpening: add_ScriptDialogOpening::<Identity, Impl, OFFSET>,
remove_ScriptDialogOpening: remove_ScriptDialogOpening::<Identity, Impl, OFFSET>,
add_PermissionRequested: add_PermissionRequested::<Identity, Impl, OFFSET>,
remove_PermissionRequested: remove_PermissionRequested::<Identity, Impl, OFFSET>,
add_ProcessFailed: add_ProcessFailed::<Identity, Impl, OFFSET>,
remove_ProcessFailed: remove_ProcessFailed::<Identity, Impl, OFFSET>,
AddScriptToExecuteOnDocumentCreated: AddScriptToExecuteOnDocumentCreated::<
Identity,
Impl,
OFFSET,
>,
RemoveScriptToExecuteOnDocumentCreated: RemoveScriptToExecuteOnDocumentCreated::<
Identity,
Impl,
OFFSET,
>,
ExecuteScript: ExecuteScript::<Identity, Impl, OFFSET>,
CapturePreview: CapturePreview::<Identity, Impl, OFFSET>,
Reload: Reload::<Identity, Impl, OFFSET>,
PostWebMessageAsJson: PostWebMessageAsJson::<Identity, Impl, OFFSET>,
PostWebMessageAsString: PostWebMessageAsString::<Identity, Impl, OFFSET>,
add_WebMessageReceived: add_WebMessageReceived::<Identity, Impl, OFFSET>,
remove_WebMessageReceived: remove_WebMessageReceived::<Identity, Impl, OFFSET>,
CallDevToolsProtocolMethod: CallDevToolsProtocolMethod::<Identity, Impl, OFFSET>,
BrowserProcessId: BrowserProcessId::<Identity, Impl, OFFSET>,
CanGoBack: CanGoBack::<Identity, Impl, OFFSET>,
CanGoForward: CanGoForward::<Identity, Impl, OFFSET>,
GoBack: GoBack::<Identity, Impl, OFFSET>,
GoForward: GoForward::<Identity, Impl, OFFSET>,
GetDevToolsProtocolEventReceiver: GetDevToolsProtocolEventReceiver::<
Identity,
Impl,
OFFSET,
>,
Stop: Stop::<Identity, Impl, OFFSET>,
add_NewWindowRequested: add_NewWindowRequested::<Identity, Impl, OFFSET>,
remove_NewWindowRequested: remove_NewWindowRequested::<Identity, Impl, OFFSET>,
add_DocumentTitleChanged: add_DocumentTitleChanged::<Identity, Impl, OFFSET>,
remove_DocumentTitleChanged: remove_DocumentTitleChanged::<Identity, Impl, OFFSET>,
DocumentTitle: DocumentTitle::<Identity, Impl, OFFSET>,
AddHostObjectToScript: AddHostObjectToScript::<Identity, Impl, OFFSET>,
RemoveHostObjectFromScript: RemoveHostObjectFromScript::<Identity, Impl, OFFSET>,
OpenDevToolsWindow: OpenDevToolsWindow::<Identity, Impl, OFFSET>,
add_ContainsFullScreenElementChanged: add_ContainsFullScreenElementChanged::<
Identity,
Impl,
OFFSET,
>,
remove_ContainsFullScreenElementChanged: remove_ContainsFullScreenElementChanged::<
Identity,
Impl,
OFFSET,
>,
ContainsFullScreenElement: ContainsFullScreenElement::<Identity, Impl, OFFSET>,
add_WebResourceRequested: add_WebResourceRequested::<Identity, Impl, OFFSET>,
remove_WebResourceRequested: remove_WebResourceRequested::<Identity, Impl, OFFSET>,
AddWebResourceRequestedFilter: AddWebResourceRequestedFilter::<Identity, Impl, OFFSET>,
RemoveWebResourceRequestedFilter: RemoveWebResourceRequestedFilter::<
Identity,
Impl,
OFFSET,
>,
add_WindowCloseRequested: add_WindowCloseRequested::<Identity, Impl, OFFSET>,
remove_WindowCloseRequested: remove_WindowCloseRequested::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2AcceleratorKeyPressedEventArgs_Impl: Sized {
fn KeyEventKind(
&self,
keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
) -> ::windows::core::Result<()>;
fn VirtualKey(&self, virtualkey: *mut u32) -> ::windows::core::Result<()>;
fn KeyEventLParam(&self, lparam: *mut i32) -> ::windows::core::Result<()>;
fn PhysicalKeyStatus(
&self,
physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
) -> ::windows::core::Result<()>;
fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetHandled(
&self,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventArgs {}
impl ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl {
unsafe extern "system" fn KeyEventKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyEventKind(::core::mem::transmute_copy(&keyeventkind))
.into()
}
unsafe extern "system" fn VirtualKey<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
virtualkey: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.VirtualKey(::core::mem::transmute_copy(&virtualkey))
.into()
}
unsafe extern "system" fn KeyEventLParam<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
lparam: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyEventLParam(::core::mem::transmute_copy(&lparam))
.into()
}
unsafe extern "system" fn PhysicalKeyStatus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PhysicalKeyStatus(::core::mem::transmute_copy(&physicalkeystatus))
.into()
}
unsafe extern "system" fn Handled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Handled(::core::mem::transmute_copy(&handled)).into()
}
unsafe extern "system" fn SetHandled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHandled(::core::mem::transmute_copy(&handled))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
KeyEventKind: KeyEventKind::<Identity, Impl, OFFSET>,
VirtualKey: VirtualKey::<Identity, Impl, OFFSET>,
KeyEventLParam: KeyEventLParam::<Identity, Impl, OFFSET>,
PhysicalKeyStatus: PhysicalKeyStatus::<Identity, Impl, OFFSET>,
Handled: Handled::<Identity, Impl, OFFSET>,
SetHandled: SetHandled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2AcceleratorKeyPressedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2AcceleratorKeyPressedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Controller>,
args: &::core::option::Option<ICoreWebView2AcceleratorKeyPressedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventHandler {}
impl ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AcceleratorKeyPressedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2AcceleratorKeyPressedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
id: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName
for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler
{
}
impl ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
id: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&id),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl: Sized {
fn Uri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Challenge(&self, challenge: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Response(&self) -> ::windows::core::Result<ICoreWebView2BasicAuthenticationResponse>;
fn Cancel(
&self,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetCancel(&self, cancel: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
}
impl ::windows::core::RuntimeName for ICoreWebView2BasicAuthenticationRequestedEventArgs {}
impl ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl {
unsafe extern "system" fn Uri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Uri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Challenge<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
challenge: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Challenge(::core::mem::transmute_copy(&challenge))
.into()
}
unsafe extern "system" fn Response<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Response() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(response, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Cancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cancel(::core::mem::transmute_copy(&cancel)).into()
}
unsafe extern "system" fn SetCancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cancel: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCancel(::core::mem::transmute_copy(&cancel)).into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Uri: Uri::<Identity, Impl, OFFSET>,
Challenge: Challenge::<Identity, Impl, OFFSET>,
Response: Response::<Identity, Impl, OFFSET>,
Cancel: Cancel::<Identity, Impl, OFFSET>,
SetCancel: SetCancel::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2BasicAuthenticationRequestedEventArgs < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2BasicAuthenticationRequestedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2BasicAuthenticationRequestedEventHandler {}
impl ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2BasicAuthenticationRequestedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2BasicAuthenticationResponse_Impl: Sized {
fn UserName(&self, username: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetUserName(&self, username: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn Password(&self, password: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetPassword(&self, password: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2BasicAuthenticationResponse {}
impl ICoreWebView2BasicAuthenticationResponse_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationResponse_Impl,
const OFFSET: isize,
>() -> ICoreWebView2BasicAuthenticationResponse_Vtbl {
unsafe extern "system" fn UserName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
username: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UserName(::core::mem::transmute_copy(&username)).into()
}
unsafe extern "system" fn SetUserName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
username: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUserName(::core::mem::transmute(&username)).into()
}
unsafe extern "system" fn Password<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
password: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Password(::core::mem::transmute_copy(&password)).into()
}
unsafe extern "system" fn SetPassword<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BasicAuthenticationResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
password: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPassword(::core::mem::transmute(&password)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
UserName: UserName::<Identity, Impl, OFFSET>,
SetUserName: SetUserName::<Identity, Impl, OFFSET>,
Password: Password::<Identity, Impl, OFFSET>,
SetPassword: SetPassword::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2BasicAuthenticationResponse as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2BrowserProcessExitedEventArgs_Impl: Sized {
fn BrowserProcessExitKind(
&self,
browserprocessexitkind: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
) -> ::windows::core::Result<()>;
fn BrowserProcessId(&self, value: *mut u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2BrowserProcessExitedEventArgs {}
impl ICoreWebView2BrowserProcessExitedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2BrowserProcessExitedEventArgs_Vtbl {
unsafe extern "system" fn BrowserProcessExitKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
browserprocessexitkind: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BrowserProcessExitKind(::core::mem::transmute_copy(&browserprocessexitkind))
.into()
}
unsafe extern "system" fn BrowserProcessId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BrowserProcessId(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BrowserProcessExitKind: BrowserProcessExitKind::<Identity, Impl, OFFSET>,
BrowserProcessId: BrowserProcessId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2BrowserProcessExitedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2BrowserProcessExitedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Environment>,
args: &::core::option::Option<ICoreWebView2BrowserProcessExitedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2BrowserProcessExitedEventHandler {}
impl ICoreWebView2BrowserProcessExitedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BrowserProcessExitedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2BrowserProcessExitedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BrowserProcessExitedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2BrowserProcessExitedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2BytesReceivedChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2DownloadOperation>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2BytesReceivedChangedEventHandler {}
impl ICoreWebView2BytesReceivedChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BytesReceivedChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2BytesReceivedChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2BytesReceivedChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2BytesReceivedChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
returnobjectasjson: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {}
impl ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
returnobjectasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&returnobjectasjson),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2CallDevToolsProtocolMethodCompletedHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2CapturePreviewCompletedHandler_Impl: Sized {
fn Invoke(&self, errorcode: ::windows::core::HRESULT) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CapturePreviewCompletedHandler {}
impl ICoreWebView2CapturePreviewCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CapturePreviewCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CapturePreviewCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CapturePreviewCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(::core::mem::transmute_copy(&errorcode)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CapturePreviewCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Certificate_Impl: Sized {
fn Subject(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Issuer(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn ValidFrom(&self, value: *mut f64) -> ::windows::core::Result<()>;
fn ValidTo(&self, value: *mut f64) -> ::windows::core::Result<()>;
fn DerEncodedSerialNumber(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn DisplayName(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn ToPemEncoding(
&self,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn PemEncodedIssuerCertificateChain(
&self,
) -> ::windows::core::Result<ICoreWebView2StringCollection>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Certificate {}
impl ICoreWebView2Certificate_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Certificate_Vtbl {
unsafe extern "system" fn Subject<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Subject(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Issuer<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Issuer(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ValidFrom<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ValidFrom(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ValidTo<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ValidTo(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn DerEncodedSerialNumber<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DerEncodedSerialNumber(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn DisplayName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisplayName(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ToPemEncoding<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ToPemEncoding(::core::mem::transmute_copy(&pemencodeddata))
.into()
}
unsafe extern "system" fn PemEncodedIssuerCertificateChain<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Certificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.PemEncodedIssuerCertificateChain() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Subject: Subject::<Identity, Impl, OFFSET>,
Issuer: Issuer::<Identity, Impl, OFFSET>,
ValidFrom: ValidFrom::<Identity, Impl, OFFSET>,
ValidTo: ValidTo::<Identity, Impl, OFFSET>,
DerEncodedSerialNumber: DerEncodedSerialNumber::<Identity, Impl, OFFSET>,
DisplayName: DisplayName::<Identity, Impl, OFFSET>,
ToPemEncoding: ToPemEncoding::<Identity, Impl, OFFSET>,
PemEncodedIssuerCertificateChain: PemEncodedIssuerCertificateChain::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Certificate as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ClearBrowsingDataCompletedHandler_Impl: Sized {
fn Invoke(&self, errorcode: ::windows::core::HRESULT) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ClearBrowsingDataCompletedHandler {}
impl ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClearBrowsingDataCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClearBrowsingDataCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(::core::mem::transmute_copy(&errorcode)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ClearBrowsingDataCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl: Sized {
fn Invoke(&self, errorcode: ::windows::core::HRESULT) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName
for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler
{
}
impl ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(::core::mem::transmute_copy(&errorcode)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2ClientCertificate_Impl: Sized {
fn Subject(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Issuer(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn ValidFrom(&self, value: *mut f64) -> ::windows::core::Result<()>;
fn ValidTo(&self, value: *mut f64) -> ::windows::core::Result<()>;
fn DerEncodedSerialNumber(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn DisplayName(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn ToPemEncoding(
&self,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn PemEncodedIssuerCertificateChain(
&self,
) -> ::windows::core::Result<ICoreWebView2StringCollection>;
fn Kind(&self, value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND)
-> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ClientCertificate {}
impl ICoreWebView2ClientCertificate_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ClientCertificate_Vtbl {
unsafe extern "system" fn Subject<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Subject(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Issuer<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Issuer(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ValidFrom<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ValidFrom(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ValidTo<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ValidTo(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn DerEncodedSerialNumber<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DerEncodedSerialNumber(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn DisplayName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisplayName(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ToPemEncoding<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pemencodeddata: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ToPemEncoding(::core::mem::transmute_copy(&pemencodeddata))
.into()
}
unsafe extern "system" fn PemEncodedIssuerCertificateChain<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.PemEncodedIssuerCertificateChain() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Kind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificate_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Kind(::core::mem::transmute_copy(&value)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Subject: Subject::<Identity, Impl, OFFSET>,
Issuer: Issuer::<Identity, Impl, OFFSET>,
ValidFrom: ValidFrom::<Identity, Impl, OFFSET>,
ValidTo: ValidTo::<Identity, Impl, OFFSET>,
DerEncodedSerialNumber: DerEncodedSerialNumber::<Identity, Impl, OFFSET>,
DisplayName: DisplayName::<Identity, Impl, OFFSET>,
ToPemEncoding: ToPemEncoding::<Identity, Impl, OFFSET>,
PemEncodedIssuerCertificateChain: PemEncodedIssuerCertificateChain::<
Identity,
Impl,
OFFSET,
>,
Kind: Kind::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ClientCertificate as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ClientCertificateCollection_Impl: Sized {
fn Count(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn GetValueAtIndex(
&self,
index: u32,
) -> ::windows::core::Result<ICoreWebView2ClientCertificate>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ClientCertificateCollection {}
impl ICoreWebView2ClientCertificateCollection_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateCollection_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ClientCertificateCollection_Vtbl {
unsafe extern "system" fn Count<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Count(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetValueAtIndex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
index: u32,
certificate: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetValueAtIndex(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(certificate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
GetValueAtIndex: GetValueAtIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ClientCertificateCollection as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ClientCertificateRequestedEventArgs_Impl: Sized {
fn Host(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Port(&self, value: *mut i32) -> ::windows::core::Result<()>;
fn IsProxy(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn AllowedCertificateAuthorities(
&self,
) -> ::windows::core::Result<ICoreWebView2StringCollection>;
fn MutuallyTrustedCertificates(
&self,
) -> ::windows::core::Result<ICoreWebView2ClientCertificateCollection>;
fn SelectedCertificate(&self) -> ::windows::core::Result<ICoreWebView2ClientCertificate>;
fn SetSelectedCertificate(
&self,
value: &::core::option::Option<ICoreWebView2ClientCertificate>,
) -> ::windows::core::Result<()>;
fn Cancel(&self, value: *mut ::windows::Win32::Foundation::BOOL)
-> ::windows::core::Result<()>;
fn SetCancel(&self, value: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
fn Handled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetHandled(&self, value: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ClientCertificateRequestedEventArgs {}
impl ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl {
unsafe extern "system" fn Host<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Host(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Port<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Port(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn IsProxy<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsProxy(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn AllowedCertificateAuthorities<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowedCertificateAuthorities() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn MutuallyTrustedCertificates<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.MutuallyTrustedCertificates() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SelectedCertificate<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SelectedCertificate() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSelectedCertificate<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSelectedCertificate(::core::mem::transmute(&value))
.into()
}
unsafe extern "system" fn Cancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cancel(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetCancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCancel(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Handled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Handled(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetHandled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHandled(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Host: Host::<Identity, Impl, OFFSET>,
Port: Port::<Identity, Impl, OFFSET>,
IsProxy: IsProxy::<Identity, Impl, OFFSET>,
AllowedCertificateAuthorities: AllowedCertificateAuthorities::<Identity, Impl, OFFSET>,
MutuallyTrustedCertificates: MutuallyTrustedCertificates::<Identity, Impl, OFFSET>,
SelectedCertificate: SelectedCertificate::<Identity, Impl, OFFSET>,
SetSelectedCertificate: SetSelectedCertificate::<Identity, Impl, OFFSET>,
Cancel: Cancel::<Identity, Impl, OFFSET>,
SetCancel: SetCancel::<Identity, Impl, OFFSET>,
Handled: Handled::<Identity, Impl, OFFSET>,
SetHandled: SetHandled::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2ClientCertificateRequestedEventArgs < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2ClientCertificateRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2ClientCertificateRequestedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ClientCertificateRequestedEventHandler {}
impl ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ClientCertificateRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2ClientCertificateRequestedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2CompositionController_Impl: Sized {
fn RootVisualTarget(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
fn SetRootVisualTarget(
&self,
target: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
fn SendMouseInput(
&self,
eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
mousedata: u32,
point: &::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn SendPointerInput(
&self,
eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
pointerinfo: &::core::option::Option<ICoreWebView2PointerInfo>,
) -> ::windows::core::Result<()>;
fn Cursor(
&self,
cursor: *mut ::windows::Win32::UI::WindowsAndMessaging::HCURSOR,
) -> ::windows::core::Result<()>;
fn SystemCursorId(&self, systemcursorid: *mut u32) -> ::windows::core::Result<()>;
fn add_CursorChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2CursorChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_CursorChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CompositionController {}
impl ICoreWebView2CompositionController_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CompositionController_Vtbl {
unsafe extern "system" fn RootVisualTarget<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
target: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RootVisualTarget() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(target, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRootVisualTarget<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
target: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRootVisualTarget(::core::mem::transmute(&target))
.into()
}
unsafe extern "system" fn SendMouseInput<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
mousedata: u32,
point: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SendMouseInput(
::core::mem::transmute_copy(&eventkind),
::core::mem::transmute_copy(&virtualkeys),
::core::mem::transmute_copy(&mousedata),
::core::mem::transmute(&point),
)
.into()
}
unsafe extern "system" fn SendPointerInput<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
pointerinfo: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SendPointerInput(
::core::mem::transmute_copy(&eventkind),
::core::mem::transmute(&pointerinfo),
)
.into()
}
unsafe extern "system" fn Cursor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cursor: *mut ::windows::Win32::UI::WindowsAndMessaging::HCURSOR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cursor(::core::mem::transmute_copy(&cursor)).into()
}
unsafe extern "system" fn SystemCursorId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
systemcursorid: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SystemCursorId(::core::mem::transmute_copy(&systemcursorid))
.into()
}
unsafe extern "system" fn add_CursorChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_CursorChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_CursorChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_CursorChanged(::core::mem::transmute(&token))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
RootVisualTarget: RootVisualTarget::<Identity, Impl, OFFSET>,
SetRootVisualTarget: SetRootVisualTarget::<Identity, Impl, OFFSET>,
SendMouseInput: SendMouseInput::<Identity, Impl, OFFSET>,
SendPointerInput: SendPointerInput::<Identity, Impl, OFFSET>,
Cursor: Cursor::<Identity, Impl, OFFSET>,
SystemCursorId: SystemCursorId::<Identity, Impl, OFFSET>,
add_CursorChanged: add_CursorChanged::<Identity, Impl, OFFSET>,
remove_CursorChanged: remove_CursorChanged::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CompositionController as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2CompositionController2_Impl:
Sized + ICoreWebView2CompositionController_Impl
{
fn AutomationProvider(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CompositionController2 {}
impl ICoreWebView2CompositionController2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CompositionController2_Vtbl {
unsafe extern "system" fn AutomationProvider<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
provider: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AutomationProvider() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(provider, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2CompositionController_Vtbl::new::<Identity, Impl, OFFSET>(),
AutomationProvider: AutomationProvider::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CompositionController2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2CompositionController as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2CompositionController3_Impl:
Sized + ICoreWebView2CompositionController2_Impl
{
fn DragEnter(
&self,
dataobject: &::core::option::Option<::windows::Win32::System::Com::IDataObject>,
keystate: u32,
point: &::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::Result<()>;
fn DragLeave(&self) -> ::windows::core::Result<()>;
fn DragOver(
&self,
keystate: u32,
point: &::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::Result<()>;
fn Drop(
&self,
dataobject: &::core::option::Option<::windows::Win32::System::Com::IDataObject>,
keystate: u32,
point: &::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CompositionController3 {}
impl ICoreWebView2CompositionController3_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController3_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CompositionController3_Vtbl {
unsafe extern "system" fn DragEnter<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
dataobject: *mut ::core::ffi::c_void,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DragEnter(
::core::mem::transmute(&dataobject),
::core::mem::transmute_copy(&keystate),
::core::mem::transmute(&point),
::core::mem::transmute_copy(&effect),
)
.into()
}
unsafe extern "system" fn DragLeave<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DragLeave().into()
}
unsafe extern "system" fn DragOver<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DragOver(
::core::mem::transmute_copy(&keystate),
::core::mem::transmute(&point),
::core::mem::transmute_copy(&effect),
)
.into()
}
unsafe extern "system" fn Drop<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CompositionController3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
dataobject: *mut ::core::ffi::c_void,
keystate: u32,
point: ::windows::Win32::Foundation::POINT,
effect: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Drop(
::core::mem::transmute(&dataobject),
::core::mem::transmute_copy(&keystate),
::core::mem::transmute(&point),
::core::mem::transmute_copy(&effect),
)
.into()
}
Self {
base__: ICoreWebView2CompositionController2_Vtbl::new::<Identity, Impl, OFFSET>(),
DragEnter: DragEnter::<Identity, Impl, OFFSET>,
DragLeave: DragLeave::<Identity, Impl, OFFSET>,
DragOver: DragOver::<Identity, Impl, OFFSET>,
Drop: Drop::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CompositionController3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2CompositionController as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2CompositionController2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContainsFullScreenElementChangedEventHandler {}
impl ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2ContainsFullScreenElementChangedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2ContentLoadingEventArgs_Impl: Sized {
fn IsErrorPage(
&self,
iserrorpage: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContentLoadingEventArgs {}
impl ICoreWebView2ContentLoadingEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContentLoadingEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContentLoadingEventArgs_Vtbl {
unsafe extern "system" fn IsErrorPage<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContentLoadingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
iserrorpage: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsErrorPage(::core::mem::transmute_copy(&iserrorpage))
.into()
}
unsafe extern "system" fn NavigationId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContentLoadingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NavigationId(::core::mem::transmute_copy(&navigationid))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsErrorPage: IsErrorPage::<Identity, Impl, OFFSET>,
NavigationId: NavigationId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ContentLoadingEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ContentLoadingEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2ContentLoadingEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContentLoadingEventHandler {}
impl ICoreWebView2ContentLoadingEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContentLoadingEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContentLoadingEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContentLoadingEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ContentLoadingEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ContextMenuItem_Impl: Sized {
fn Name(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Label(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn CommandId(&self, value: *mut i32) -> ::windows::core::Result<()>;
fn ShortcutKeyDescription(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn Icon(&self) -> ::windows::core::Result<::windows::Win32::System::Com::IStream>;
fn Kind(&self, value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND) -> ::windows::core::Result<()>;
fn SetIsEnabled(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsChecked(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsChecked(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn Children(&self) -> ::windows::core::Result<ICoreWebView2ContextMenuItemCollection>;
fn add_CustomItemSelected(
&self,
eventhandler: &::core::option::Option<ICoreWebView2CustomItemSelectedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_CustomItemSelected(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContextMenuItem {}
impl ICoreWebView2ContextMenuItem_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContextMenuItem_Vtbl {
unsafe extern "system" fn Name<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Name(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Label<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Label(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn CommandId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CommandId(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ShortcutKeyDescription<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShortcutKeyDescription(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn Icon<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Icon() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Kind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Kind(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetIsEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsEnabled(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn IsEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsEnabled(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetIsChecked<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsChecked(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn IsChecked<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsChecked(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Children<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Children() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn add_CustomItemSelected<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_CustomItemSelected(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_CustomItemSelected<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItem_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_CustomItemSelected(::core::mem::transmute(&token))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
Label: Label::<Identity, Impl, OFFSET>,
CommandId: CommandId::<Identity, Impl, OFFSET>,
ShortcutKeyDescription: ShortcutKeyDescription::<Identity, Impl, OFFSET>,
Icon: Icon::<Identity, Impl, OFFSET>,
Kind: Kind::<Identity, Impl, OFFSET>,
SetIsEnabled: SetIsEnabled::<Identity, Impl, OFFSET>,
IsEnabled: IsEnabled::<Identity, Impl, OFFSET>,
SetIsChecked: SetIsChecked::<Identity, Impl, OFFSET>,
IsChecked: IsChecked::<Identity, Impl, OFFSET>,
Children: Children::<Identity, Impl, OFFSET>,
add_CustomItemSelected: add_CustomItemSelected::<Identity, Impl, OFFSET>,
remove_CustomItemSelected: remove_CustomItemSelected::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ContextMenuItem as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ContextMenuItemCollection_Impl: Sized {
fn Count(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn GetValueAtIndex(&self, index: u32) -> ::windows::core::Result<ICoreWebView2ContextMenuItem>;
fn RemoveValueAtIndex(&self, index: u32) -> ::windows::core::Result<()>;
fn InsertValueAtIndex(
&self,
index: u32,
value: &::core::option::Option<ICoreWebView2ContextMenuItem>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContextMenuItemCollection {}
impl ICoreWebView2ContextMenuItemCollection_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItemCollection_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContextMenuItemCollection_Vtbl {
unsafe extern "system" fn Count<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItemCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Count(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetValueAtIndex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItemCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
index: u32,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetValueAtIndex(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoveValueAtIndex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItemCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
index: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveValueAtIndex(::core::mem::transmute_copy(&index))
.into()
}
unsafe extern "system" fn InsertValueAtIndex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuItemCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
index: u32,
value: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InsertValueAtIndex(
::core::mem::transmute_copy(&index),
::core::mem::transmute(&value),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
GetValueAtIndex: GetValueAtIndex::<Identity, Impl, OFFSET>,
RemoveValueAtIndex: RemoveValueAtIndex::<Identity, Impl, OFFSET>,
InsertValueAtIndex: InsertValueAtIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ContextMenuItemCollection as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ContextMenuRequestedEventArgs_Impl: Sized {
fn MenuItems(&self) -> ::windows::core::Result<ICoreWebView2ContextMenuItemCollection>;
fn ContextMenuTarget(&self) -> ::windows::core::Result<ICoreWebView2ContextMenuTarget>;
fn Location(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn SetSelectedCommandId(&self, value: i32) -> ::windows::core::Result<()>;
fn SelectedCommandId(&self, value: *mut i32) -> ::windows::core::Result<()>;
fn SetHandled(&self, value: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
fn Handled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContextMenuRequestedEventArgs {}
impl ICoreWebView2ContextMenuRequestedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContextMenuRequestedEventArgs_Vtbl {
unsafe extern "system" fn MenuItems<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.MenuItems() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ContextMenuTarget<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ContextMenuTarget() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Location<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Location(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetSelectedCommandId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSelectedCommandId(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SelectedCommandId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SelectedCommandId(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetHandled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHandled(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Handled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Handled(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
MenuItems: MenuItems::<Identity, Impl, OFFSET>,
ContextMenuTarget: ContextMenuTarget::<Identity, Impl, OFFSET>,
Location: Location::<Identity, Impl, OFFSET>,
SetSelectedCommandId: SetSelectedCommandId::<Identity, Impl, OFFSET>,
SelectedCommandId: SelectedCommandId::<Identity, Impl, OFFSET>,
SetHandled: SetHandled::<Identity, Impl, OFFSET>,
Handled: Handled::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ContextMenuRequestedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ContextMenuRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2ContextMenuRequestedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContextMenuRequestedEventHandler {}
impl ICoreWebView2ContextMenuRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContextMenuRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ContextMenuRequestedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ContextMenuTarget_Impl: Sized {
fn Kind(
&self,
value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
) -> ::windows::core::Result<()>;
fn IsEditable(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsRequestedForMainFrame(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn PageUri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn FrameUri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn HasLinkUri(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn LinkUri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn HasLinkText(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn LinkText(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn HasSourceUri(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SourceUri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn HasSelection(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SelectionText(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ContextMenuTarget {}
impl ICoreWebView2ContextMenuTarget_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ContextMenuTarget_Vtbl {
unsafe extern "system" fn Kind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Kind(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn IsEditable<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsEditable(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn IsRequestedForMainFrame<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsRequestedForMainFrame(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn PageUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PageUri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn FrameUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FrameUri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn HasLinkUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasLinkUri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn LinkUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LinkUri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn HasLinkText<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasLinkText(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn LinkText<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.LinkText(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn HasSourceUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasSourceUri(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SourceUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SourceUri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn HasSelection<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasSelection(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SelectionText<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ContextMenuTarget_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SelectionText(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Kind: Kind::<Identity, Impl, OFFSET>,
IsEditable: IsEditable::<Identity, Impl, OFFSET>,
IsRequestedForMainFrame: IsRequestedForMainFrame::<Identity, Impl, OFFSET>,
PageUri: PageUri::<Identity, Impl, OFFSET>,
FrameUri: FrameUri::<Identity, Impl, OFFSET>,
HasLinkUri: HasLinkUri::<Identity, Impl, OFFSET>,
LinkUri: LinkUri::<Identity, Impl, OFFSET>,
HasLinkText: HasLinkText::<Identity, Impl, OFFSET>,
LinkText: LinkText::<Identity, Impl, OFFSET>,
HasSourceUri: HasSourceUri::<Identity, Impl, OFFSET>,
SourceUri: SourceUri::<Identity, Impl, OFFSET>,
HasSelection: HasSelection::<Identity, Impl, OFFSET>,
SelectionText: SelectionText::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ContextMenuTarget as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Controller_Impl: Sized {
fn IsVisible(
&self,
isvisible: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsVisible(
&self,
isvisible: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn Bounds(
&self,
bounds: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn SetBounds(&self, bounds: &::windows::Win32::Foundation::RECT)
-> ::windows::core::Result<()>;
fn ZoomFactor(&self, zoomfactor: *mut f64) -> ::windows::core::Result<()>;
fn SetZoomFactor(&self, zoomfactor: f64) -> ::windows::core::Result<()>;
fn add_ZoomFactorChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2ZoomFactorChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ZoomFactorChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn SetBoundsAndZoomFactor(
&self,
bounds: &::windows::Win32::Foundation::RECT,
zoomfactor: f64,
) -> ::windows::core::Result<()>;
fn MoveFocus(&self, reason: COREWEBVIEW2_MOVE_FOCUS_REASON) -> ::windows::core::Result<()>;
fn add_MoveFocusRequested(
&self,
eventhandler: &::core::option::Option<ICoreWebView2MoveFocusRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_MoveFocusRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_GotFocus(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FocusChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_GotFocus(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_LostFocus(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FocusChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_LostFocus(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_AcceleratorKeyPressed(
&self,
eventhandler: &::core::option::Option<ICoreWebView2AcceleratorKeyPressedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_AcceleratorKeyPressed(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn ParentWindow(
&self,
parentwindow: *mut ::windows::Win32::Foundation::HWND,
) -> ::windows::core::Result<()>;
fn SetParentWindow(
&self,
parentwindow: ::windows::Win32::Foundation::HWND,
) -> ::windows::core::Result<()>;
fn NotifyParentWindowPositionChanged(&self) -> ::windows::core::Result<()>;
fn Close(&self) -> ::windows::core::Result<()>;
fn CoreWebView2(&self) -> ::windows::core::Result<ICoreWebView2>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Controller {}
impl ICoreWebView2Controller_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Controller_Vtbl {
unsafe extern "system" fn IsVisible<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isvisible: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsVisible(::core::mem::transmute_copy(&isvisible))
.into()
}
unsafe extern "system" fn SetIsVisible<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isvisible: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsVisible(::core::mem::transmute_copy(&isvisible))
.into()
}
unsafe extern "system" fn Bounds<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
bounds: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Bounds(::core::mem::transmute_copy(&bounds)).into()
}
unsafe extern "system" fn SetBounds<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
bounds: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBounds(::core::mem::transmute(&bounds)).into()
}
unsafe extern "system" fn ZoomFactor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
zoomfactor: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ZoomFactor(::core::mem::transmute_copy(&zoomfactor))
.into()
}
unsafe extern "system" fn SetZoomFactor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
zoomfactor: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetZoomFactor(::core::mem::transmute_copy(&zoomfactor))
.into()
}
unsafe extern "system" fn add_ZoomFactorChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ZoomFactorChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ZoomFactorChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ZoomFactorChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn SetBoundsAndZoomFactor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
bounds: ::windows::Win32::Foundation::RECT,
zoomfactor: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBoundsAndZoomFactor(
::core::mem::transmute(&bounds),
::core::mem::transmute_copy(&zoomfactor),
)
.into()
}
unsafe extern "system" fn MoveFocus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MoveFocus(::core::mem::transmute_copy(&reason)).into()
}
unsafe extern "system" fn add_MoveFocusRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_MoveFocusRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_MoveFocusRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_MoveFocusRequested(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_GotFocus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_GotFocus(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_GotFocus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_GotFocus(::core::mem::transmute(&token)).into()
}
unsafe extern "system" fn add_LostFocus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_LostFocus(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_LostFocus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_LostFocus(::core::mem::transmute(&token)).into()
}
unsafe extern "system" fn add_AcceleratorKeyPressed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_AcceleratorKeyPressed(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_AcceleratorKeyPressed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_AcceleratorKeyPressed(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn ParentWindow<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
parentwindow: *mut ::windows::Win32::Foundation::HWND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ParentWindow(::core::mem::transmute_copy(&parentwindow))
.into()
}
unsafe extern "system" fn SetParentWindow<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetParentWindow(::core::mem::transmute_copy(&parentwindow))
.into()
}
unsafe extern "system" fn NotifyParentWindowPositionChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NotifyParentWindowPositionChanged().into()
}
unsafe extern "system" fn Close<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Close().into()
}
unsafe extern "system" fn CoreWebView2<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
corewebview2: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CoreWebView2() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(corewebview2, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsVisible: IsVisible::<Identity, Impl, OFFSET>,
SetIsVisible: SetIsVisible::<Identity, Impl, OFFSET>,
Bounds: Bounds::<Identity, Impl, OFFSET>,
SetBounds: SetBounds::<Identity, Impl, OFFSET>,
ZoomFactor: ZoomFactor::<Identity, Impl, OFFSET>,
SetZoomFactor: SetZoomFactor::<Identity, Impl, OFFSET>,
add_ZoomFactorChanged: add_ZoomFactorChanged::<Identity, Impl, OFFSET>,
remove_ZoomFactorChanged: remove_ZoomFactorChanged::<Identity, Impl, OFFSET>,
SetBoundsAndZoomFactor: SetBoundsAndZoomFactor::<Identity, Impl, OFFSET>,
MoveFocus: MoveFocus::<Identity, Impl, OFFSET>,
add_MoveFocusRequested: add_MoveFocusRequested::<Identity, Impl, OFFSET>,
remove_MoveFocusRequested: remove_MoveFocusRequested::<Identity, Impl, OFFSET>,
add_GotFocus: add_GotFocus::<Identity, Impl, OFFSET>,
remove_GotFocus: remove_GotFocus::<Identity, Impl, OFFSET>,
add_LostFocus: add_LostFocus::<Identity, Impl, OFFSET>,
remove_LostFocus: remove_LostFocus::<Identity, Impl, OFFSET>,
add_AcceleratorKeyPressed: add_AcceleratorKeyPressed::<Identity, Impl, OFFSET>,
remove_AcceleratorKeyPressed: remove_AcceleratorKeyPressed::<Identity, Impl, OFFSET>,
ParentWindow: ParentWindow::<Identity, Impl, OFFSET>,
SetParentWindow: SetParentWindow::<Identity, Impl, OFFSET>,
NotifyParentWindowPositionChanged: NotifyParentWindowPositionChanged::<
Identity,
Impl,
OFFSET,
>,
Close: Close::<Identity, Impl, OFFSET>,
CoreWebView2: CoreWebView2::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Controller as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Controller2_Impl: Sized + ICoreWebView2Controller_Impl {
fn DefaultBackgroundColor(
&self,
backgroundcolor: *mut COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()>;
fn SetDefaultBackgroundColor(
&self,
backgroundcolor: &COREWEBVIEW2_COLOR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Controller2 {}
impl ICoreWebView2Controller2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Controller2_Vtbl {
unsafe extern "system" fn DefaultBackgroundColor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
backgroundcolor: *mut COREWEBVIEW2_COLOR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DefaultBackgroundColor(::core::mem::transmute_copy(&backgroundcolor))
.into()
}
unsafe extern "system" fn SetDefaultBackgroundColor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
backgroundcolor: COREWEBVIEW2_COLOR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDefaultBackgroundColor(::core::mem::transmute(&backgroundcolor))
.into()
}
Self {
base__: ICoreWebView2Controller_Vtbl::new::<Identity, Impl, OFFSET>(),
DefaultBackgroundColor: DefaultBackgroundColor::<Identity, Impl, OFFSET>,
SetDefaultBackgroundColor: SetDefaultBackgroundColor::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Controller2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Controller as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Controller3_Impl: Sized + ICoreWebView2Controller2_Impl {
fn RasterizationScale(&self, scale: *mut f64) -> ::windows::core::Result<()>;
fn SetRasterizationScale(&self, scale: f64) -> ::windows::core::Result<()>;
fn ShouldDetectMonitorScaleChanges(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetShouldDetectMonitorScaleChanges(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn add_RasterizationScaleChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2RasterizationScaleChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_RasterizationScaleChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn BoundsMode(&self, boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE) -> ::windows::core::Result<()>;
fn SetBoundsMode(&self, boundsmode: COREWEBVIEW2_BOUNDS_MODE) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Controller3 {}
impl ICoreWebView2Controller3_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Controller3_Vtbl {
unsafe extern "system" fn RasterizationScale<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
scale: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RasterizationScale(::core::mem::transmute_copy(&scale))
.into()
}
unsafe extern "system" fn SetRasterizationScale<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
scale: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRasterizationScale(::core::mem::transmute_copy(&scale))
.into()
}
unsafe extern "system" fn ShouldDetectMonitorScaleChanges<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldDetectMonitorScaleChanges(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetShouldDetectMonitorScaleChanges<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetShouldDetectMonitorScaleChanges(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn add_RasterizationScaleChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_RasterizationScaleChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_RasterizationScaleChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_RasterizationScaleChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn BoundsMode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BoundsMode(::core::mem::transmute_copy(&boundsmode))
.into()
}
unsafe extern "system" fn SetBoundsMode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
boundsmode: COREWEBVIEW2_BOUNDS_MODE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetBoundsMode(::core::mem::transmute_copy(&boundsmode))
.into()
}
Self {
base__: ICoreWebView2Controller2_Vtbl::new::<Identity, Impl, OFFSET>(),
RasterizationScale: RasterizationScale::<Identity, Impl, OFFSET>,
SetRasterizationScale: SetRasterizationScale::<Identity, Impl, OFFSET>,
ShouldDetectMonitorScaleChanges: ShouldDetectMonitorScaleChanges::<
Identity,
Impl,
OFFSET,
>,
SetShouldDetectMonitorScaleChanges: SetShouldDetectMonitorScaleChanges::<
Identity,
Impl,
OFFSET,
>,
add_RasterizationScaleChanged: add_RasterizationScaleChanged::<Identity, Impl, OFFSET>,
remove_RasterizationScaleChanged: remove_RasterizationScaleChanged::<
Identity,
Impl,
OFFSET,
>,
BoundsMode: BoundsMode::<Identity, Impl, OFFSET>,
SetBoundsMode: SetBoundsMode::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Controller3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Controller as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Controller2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Controller4_Impl: Sized + ICoreWebView2Controller3_Impl {
fn AllowExternalDrop(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetAllowExternalDrop(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Controller4 {}
impl ICoreWebView2Controller4_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller4_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Controller4_Vtbl {
unsafe extern "system" fn AllowExternalDrop<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AllowExternalDrop(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetAllowExternalDrop<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Controller4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowExternalDrop(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ICoreWebView2Controller3_Vtbl::new::<Identity, Impl, OFFSET>(),
AllowExternalDrop: AllowExternalDrop::<Identity, Impl, OFFSET>,
SetAllowExternalDrop: SetAllowExternalDrop::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Controller4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Controller as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Controller2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Controller3 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ControllerOptions_Impl: Sized {
fn ProfileName(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetProfileName(&self, value: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn IsInPrivateModeEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsInPrivateModeEnabled(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ControllerOptions {}
impl ICoreWebView2ControllerOptions_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ControllerOptions_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ControllerOptions_Vtbl {
unsafe extern "system" fn ProfileName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ControllerOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProfileName(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetProfileName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ControllerOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProfileName(::core::mem::transmute(&value)).into()
}
unsafe extern "system" fn IsInPrivateModeEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ControllerOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsInPrivateModeEnabled(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetIsInPrivateModeEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ControllerOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsInPrivateModeEnabled(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ProfileName: ProfileName::<Identity, Impl, OFFSET>,
SetProfileName: SetProfileName::<Identity, Impl, OFFSET>,
IsInPrivateModeEnabled: IsInPrivateModeEnabled::<Identity, Impl, OFFSET>,
SetIsInPrivateModeEnabled: SetIsInPrivateModeEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ControllerOptions as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Cookie_Impl: Sized {
fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Value(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetValue(&self, value: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn Domain(&self, domain: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Path(&self, path: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Expires(&self, expires: *mut f64) -> ::windows::core::Result<()>;
fn SetExpires(&self, expires: f64) -> ::windows::core::Result<()>;
fn IsHttpOnly(
&self,
ishttponly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsHttpOnly(
&self,
ishttponly: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SameSite(
&self,
samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::Result<()>;
fn SetSameSite(
&self,
samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::Result<()>;
fn IsSecure(
&self,
issecure: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsSecure(
&self,
issecure: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsSession(
&self,
issession: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Cookie {}
impl ICoreWebView2Cookie_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Cookie_Vtbl {
unsafe extern "system" fn Name<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Name(::core::mem::transmute_copy(&name)).into()
}
unsafe extern "system" fn Value<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Value(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetValue<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetValue(::core::mem::transmute(&value)).into()
}
unsafe extern "system" fn Domain<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
domain: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Domain(::core::mem::transmute_copy(&domain)).into()
}
unsafe extern "system" fn Path<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
path: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Path(::core::mem::transmute_copy(&path)).into()
}
unsafe extern "system" fn Expires<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
expires: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Expires(::core::mem::transmute_copy(&expires)).into()
}
unsafe extern "system" fn SetExpires<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
expires: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetExpires(::core::mem::transmute_copy(&expires))
.into()
}
unsafe extern "system" fn IsHttpOnly<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
ishttponly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsHttpOnly(::core::mem::transmute_copy(&ishttponly))
.into()
}
unsafe extern "system" fn SetIsHttpOnly<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
ishttponly: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsHttpOnly(::core::mem::transmute_copy(&ishttponly))
.into()
}
unsafe extern "system" fn SameSite<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SameSite(::core::mem::transmute_copy(&samesite)).into()
}
unsafe extern "system" fn SetSameSite<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSameSite(::core::mem::transmute_copy(&samesite))
.into()
}
unsafe extern "system" fn IsSecure<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
issecure: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsSecure(::core::mem::transmute_copy(&issecure)).into()
}
unsafe extern "system" fn SetIsSecure<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
issecure: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsSecure(::core::mem::transmute_copy(&issecure))
.into()
}
unsafe extern "system" fn IsSession<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Cookie_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
issession: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsSession(::core::mem::transmute_copy(&issession))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
Value: Value::<Identity, Impl, OFFSET>,
SetValue: SetValue::<Identity, Impl, OFFSET>,
Domain: Domain::<Identity, Impl, OFFSET>,
Path: Path::<Identity, Impl, OFFSET>,
Expires: Expires::<Identity, Impl, OFFSET>,
SetExpires: SetExpires::<Identity, Impl, OFFSET>,
IsHttpOnly: IsHttpOnly::<Identity, Impl, OFFSET>,
SetIsHttpOnly: SetIsHttpOnly::<Identity, Impl, OFFSET>,
SameSite: SameSite::<Identity, Impl, OFFSET>,
SetSameSite: SetSameSite::<Identity, Impl, OFFSET>,
IsSecure: IsSecure::<Identity, Impl, OFFSET>,
SetIsSecure: SetIsSecure::<Identity, Impl, OFFSET>,
IsSession: IsSession::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Cookie as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2CookieList_Impl: Sized {
fn Count(&self, count: *mut u32) -> ::windows::core::Result<()>;
fn GetValueAtIndex(&self, index: u32) -> ::windows::core::Result<ICoreWebView2Cookie>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CookieList {}
impl ICoreWebView2CookieList_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieList_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CookieList_Vtbl {
unsafe extern "system" fn Count<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieList_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
count: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Count(::core::mem::transmute_copy(&count)).into()
}
unsafe extern "system" fn GetValueAtIndex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieList_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
index: u32,
cookie: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetValueAtIndex(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cookie, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
GetValueAtIndex: GetValueAtIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CookieList as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2CookieManager_Impl: Sized {
fn CreateCookie(
&self,
name: &::windows::core::PCWSTR,
value: &::windows::core::PCWSTR,
domain: &::windows::core::PCWSTR,
path: &::windows::core::PCWSTR,
) -> ::windows::core::Result<ICoreWebView2Cookie>;
fn CopyCookie(
&self,
cookieparam: &::core::option::Option<ICoreWebView2Cookie>,
) -> ::windows::core::Result<ICoreWebView2Cookie>;
fn GetCookies(
&self,
uri: &::windows::core::PCWSTR,
handler: &::core::option::Option<ICoreWebView2GetCookiesCompletedHandler>,
) -> ::windows::core::Result<()>;
fn AddOrUpdateCookie(
&self,
cookie: &::core::option::Option<ICoreWebView2Cookie>,
) -> ::windows::core::Result<()>;
fn DeleteCookie(
&self,
cookie: &::core::option::Option<ICoreWebView2Cookie>,
) -> ::windows::core::Result<()>;
fn DeleteCookies(
&self,
name: &::windows::core::PCWSTR,
uri: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn DeleteCookiesWithDomainAndPath(
&self,
name: &::windows::core::PCWSTR,
domain: &::windows::core::PCWSTR,
path: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn DeleteAllCookies(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CookieManager {}
impl ICoreWebView2CookieManager_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CookieManager_Vtbl {
unsafe extern "system" fn CreateCookie<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: ::windows::core::PCWSTR,
domain: ::windows::core::PCWSTR,
path: ::windows::core::PCWSTR,
cookie: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateCookie(
::core::mem::transmute(&name),
::core::mem::transmute(&value),
::core::mem::transmute(&domain),
::core::mem::transmute(&path),
) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cookie, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CopyCookie<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cookieparam: *mut ::core::ffi::c_void,
cookie: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CopyCookie(::core::mem::transmute(&cookieparam)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cookie, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetCookies<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCookies(
::core::mem::transmute(&uri),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn AddOrUpdateCookie<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cookie: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddOrUpdateCookie(::core::mem::transmute(&cookie))
.into()
}
unsafe extern "system" fn DeleteCookie<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cookie: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteCookie(::core::mem::transmute(&cookie)).into()
}
unsafe extern "system" fn DeleteCookies<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
uri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteCookies(::core::mem::transmute(&name), ::core::mem::transmute(&uri))
.into()
}
unsafe extern "system" fn DeleteCookiesWithDomainAndPath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
domain: ::windows::core::PCWSTR,
path: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteCookiesWithDomainAndPath(
::core::mem::transmute(&name),
::core::mem::transmute(&domain),
::core::mem::transmute(&path),
)
.into()
}
unsafe extern "system" fn DeleteAllCookies<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CookieManager_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DeleteAllCookies().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateCookie: CreateCookie::<Identity, Impl, OFFSET>,
CopyCookie: CopyCookie::<Identity, Impl, OFFSET>,
GetCookies: GetCookies::<Identity, Impl, OFFSET>,
AddOrUpdateCookie: AddOrUpdateCookie::<Identity, Impl, OFFSET>,
DeleteCookie: DeleteCookie::<Identity, Impl, OFFSET>,
DeleteCookies: DeleteCookies::<Identity, Impl, OFFSET>,
DeleteCookiesWithDomainAndPath: DeleteCookiesWithDomainAndPath::<Identity, Impl, OFFSET>,
DeleteAllCookies: DeleteAllCookies::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CookieManager as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
webview: &::core::option::Option<ICoreWebView2CompositionController>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName
for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler
{
}
impl ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
webview: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&webview),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
createdcontroller: &::core::option::Option<ICoreWebView2Controller>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {}
impl ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
createdcontroller: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&createdcontroller),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2CreateCoreWebView2ControllerCompletedHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
createdenvironment: &::core::option::Option<ICoreWebView2Environment>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {}
impl ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
createdenvironment: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&createdenvironment),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2CursorChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2CompositionController>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CursorChangedEventHandler {}
impl ICoreWebView2CursorChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CursorChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CursorChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CursorChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CursorChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2CustomItemSelectedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2ContextMenuItem>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2CustomItemSelectedEventHandler {}
impl ICoreWebView2CustomItemSelectedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CustomItemSelectedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2CustomItemSelectedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2CustomItemSelectedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2CustomItemSelectedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2DOMContentLoadedEventArgs_Impl: Sized {
fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DOMContentLoadedEventArgs {}
impl ICoreWebView2DOMContentLoadedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DOMContentLoadedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DOMContentLoadedEventArgs_Vtbl {
unsafe extern "system" fn NavigationId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DOMContentLoadedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NavigationId(::core::mem::transmute_copy(&navigationid))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
NavigationId: NavigationId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2DOMContentLoadedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2DOMContentLoadedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2DOMContentLoadedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DOMContentLoadedEventHandler {}
impl ICoreWebView2DOMContentLoadedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DOMContentLoadedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DOMContentLoadedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DOMContentLoadedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2DOMContentLoadedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Deferral_Impl: Sized {
fn Complete(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Deferral {}
impl ICoreWebView2Deferral_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Deferral_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Deferral_Vtbl {
unsafe extern "system" fn Complete<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Deferral_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Complete().into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Complete: Complete::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Deferral as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl: Sized {
fn ParameterObjectAsJson(
&self,
parameterobjectasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {}
impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl {
unsafe extern "system" fn ParameterObjectAsJson<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
parameterobjectasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ParameterObjectAsJson(::core::mem::transmute_copy(¶meterobjectasjson))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ParameterObjectAsJson: ParameterObjectAsJson::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl:
Sized + ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl
{
fn SessionId(&self, sessionid: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {}
impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl {
unsafe extern "system" fn SessionId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sessionid: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SessionId(::core::mem::transmute_copy(&sessionid))
.into()
}
Self {
base__: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl::new::<
Identity,
Impl,
OFFSET,
>(),
SessionId: SessionId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 < > as::windows::core::Interface >::IID || iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2DevToolsProtocolEventReceivedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {}
impl ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2DevToolsProtocolEventReceiver_Impl: Sized {
fn add_DevToolsProtocolEventReceived(
&self,
handler: &::core::option::Option<ICoreWebView2DevToolsProtocolEventReceivedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_DevToolsProtocolEventReceived(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceiver {}
impl ICoreWebView2DevToolsProtocolEventReceiver_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DevToolsProtocolEventReceiver_Vtbl {
unsafe extern "system" fn add_DevToolsProtocolEventReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_DevToolsProtocolEventReceived(
::core::mem::transmute(&handler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_DevToolsProtocolEventReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_DevToolsProtocolEventReceived(::core::mem::transmute(&token))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
add_DevToolsProtocolEventReceived: add_DevToolsProtocolEventReceived::<
Identity,
Impl,
OFFSET,
>,
remove_DevToolsProtocolEventReceived: remove_DevToolsProtocolEventReceived::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2DevToolsProtocolEventReceiver as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2DocumentTitleChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DocumentTitleChangedEventHandler {}
impl ICoreWebView2DocumentTitleChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DocumentTitleChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DocumentTitleChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DocumentTitleChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2DocumentTitleChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2DownloadOperation_Impl: Sized {
fn add_BytesReceivedChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2BytesReceivedChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_BytesReceivedChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_EstimatedEndTimeChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2EstimatedEndTimeChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_EstimatedEndTimeChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_StateChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2StateChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_StateChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn ContentDisposition(
&self,
contentdisposition: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn MimeType(&self, mimetype: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn TotalBytesToReceive(&self, totalbytestoreceive: *mut i64) -> ::windows::core::Result<()>;
fn BytesReceived(&self, bytesreceived: *mut i64) -> ::windows::core::Result<()>;
fn EstimatedEndTime(
&self,
estimatedendtime: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn ResultFilePath(
&self,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn State(&self, downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE)
-> ::windows::core::Result<()>;
fn InterruptReason(
&self,
interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
) -> ::windows::core::Result<()>;
fn Cancel(&self) -> ::windows::core::Result<()>;
fn Pause(&self) -> ::windows::core::Result<()>;
fn Resume(&self) -> ::windows::core::Result<()>;
fn CanResume(
&self,
canresume: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DownloadOperation {}
impl ICoreWebView2DownloadOperation_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DownloadOperation_Vtbl {
unsafe extern "system" fn add_BytesReceivedChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_BytesReceivedChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_BytesReceivedChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_BytesReceivedChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_EstimatedEndTimeChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_EstimatedEndTimeChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_EstimatedEndTimeChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_EstimatedEndTimeChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_StateChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_StateChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_StateChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_StateChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn Uri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Uri(::core::mem::transmute_copy(&uri)).into()
}
unsafe extern "system" fn ContentDisposition<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
contentdisposition: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ContentDisposition(::core::mem::transmute_copy(&contentdisposition))
.into()
}
unsafe extern "system" fn MimeType<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
mimetype: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MimeType(::core::mem::transmute_copy(&mimetype)).into()
}
unsafe extern "system" fn TotalBytesToReceive<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
totalbytestoreceive: *mut i64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TotalBytesToReceive(::core::mem::transmute_copy(&totalbytestoreceive))
.into()
}
unsafe extern "system" fn BytesReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
bytesreceived: *mut i64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BytesReceived(::core::mem::transmute_copy(&bytesreceived))
.into()
}
unsafe extern "system" fn EstimatedEndTime<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
estimatedendtime: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EstimatedEndTime(::core::mem::transmute_copy(&estimatedendtime))
.into()
}
unsafe extern "system" fn ResultFilePath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResultFilePath(::core::mem::transmute_copy(&resultfilepath))
.into()
}
unsafe extern "system" fn State<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.State(::core::mem::transmute_copy(&downloadstate))
.into()
}
unsafe extern "system" fn InterruptReason<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InterruptReason(::core::mem::transmute_copy(&interruptreason))
.into()
}
unsafe extern "system" fn Cancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cancel().into()
}
unsafe extern "system" fn Pause<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Pause().into()
}
unsafe extern "system" fn Resume<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Resume().into()
}
unsafe extern "system" fn CanResume<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadOperation_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
canresume: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CanResume(::core::mem::transmute_copy(&canresume))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
add_BytesReceivedChanged: add_BytesReceivedChanged::<Identity, Impl, OFFSET>,
remove_BytesReceivedChanged: remove_BytesReceivedChanged::<Identity, Impl, OFFSET>,
add_EstimatedEndTimeChanged: add_EstimatedEndTimeChanged::<Identity, Impl, OFFSET>,
remove_EstimatedEndTimeChanged: remove_EstimatedEndTimeChanged::<Identity, Impl, OFFSET>,
add_StateChanged: add_StateChanged::<Identity, Impl, OFFSET>,
remove_StateChanged: remove_StateChanged::<Identity, Impl, OFFSET>,
Uri: Uri::<Identity, Impl, OFFSET>,
ContentDisposition: ContentDisposition::<Identity, Impl, OFFSET>,
MimeType: MimeType::<Identity, Impl, OFFSET>,
TotalBytesToReceive: TotalBytesToReceive::<Identity, Impl, OFFSET>,
BytesReceived: BytesReceived::<Identity, Impl, OFFSET>,
EstimatedEndTime: EstimatedEndTime::<Identity, Impl, OFFSET>,
ResultFilePath: ResultFilePath::<Identity, Impl, OFFSET>,
State: State::<Identity, Impl, OFFSET>,
InterruptReason: InterruptReason::<Identity, Impl, OFFSET>,
Cancel: Cancel::<Identity, Impl, OFFSET>,
Pause: Pause::<Identity, Impl, OFFSET>,
Resume: Resume::<Identity, Impl, OFFSET>,
CanResume: CanResume::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2DownloadOperation as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2DownloadStartingEventArgs_Impl: Sized {
fn DownloadOperation(&self) -> ::windows::core::Result<ICoreWebView2DownloadOperation>;
fn Cancel(
&self,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetCancel(&self, cancel: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
fn ResultFilePath(
&self,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn SetResultFilePath(
&self,
resultfilepath: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetHandled(
&self,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DownloadStartingEventArgs {}
impl ICoreWebView2DownloadStartingEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DownloadStartingEventArgs_Vtbl {
unsafe extern "system" fn DownloadOperation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
downloadoperation: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.DownloadOperation() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(downloadoperation, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Cancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cancel(::core::mem::transmute_copy(&cancel)).into()
}
unsafe extern "system" fn SetCancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cancel: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCancel(::core::mem::transmute_copy(&cancel)).into()
}
unsafe extern "system" fn ResultFilePath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
resultfilepath: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResultFilePath(::core::mem::transmute_copy(&resultfilepath))
.into()
}
unsafe extern "system" fn SetResultFilePath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
resultfilepath: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetResultFilePath(::core::mem::transmute(&resultfilepath))
.into()
}
unsafe extern "system" fn Handled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Handled(::core::mem::transmute_copy(&handled)).into()
}
unsafe extern "system" fn SetHandled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHandled(::core::mem::transmute_copy(&handled))
.into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
DownloadOperation: DownloadOperation::<Identity, Impl, OFFSET>,
Cancel: Cancel::<Identity, Impl, OFFSET>,
SetCancel: SetCancel::<Identity, Impl, OFFSET>,
ResultFilePath: ResultFilePath::<Identity, Impl, OFFSET>,
SetResultFilePath: SetResultFilePath::<Identity, Impl, OFFSET>,
Handled: Handled::<Identity, Impl, OFFSET>,
SetHandled: SetHandled::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2DownloadStartingEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2DownloadStartingEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2DownloadStartingEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2DownloadStartingEventHandler {}
impl ICoreWebView2DownloadStartingEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2DownloadStartingEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2DownloadStartingEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2DownloadStartingEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment_Impl: Sized {
fn CreateCoreWebView2Controller(
&self,
parentwindow: ::windows::Win32::Foundation::HWND,
handler: &::core::option::Option<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
) -> ::windows::core::Result<()>;
fn CreateWebResourceResponse(
&self,
content: &::core::option::Option<::windows::Win32::System::Com::IStream>,
statuscode: i32,
reasonphrase: &::windows::core::PCWSTR,
headers: &::windows::core::PCWSTR,
) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>;
fn BrowserVersionString(
&self,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn add_NewBrowserVersionAvailable(
&self,
eventhandler: &::core::option::Option<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_NewBrowserVersionAvailable(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment {}
impl ICoreWebView2Environment_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment_Vtbl {
unsafe extern "system" fn CreateCoreWebView2Controller<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateCoreWebView2Controller(
::core::mem::transmute_copy(&parentwindow),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn CreateWebResourceResponse<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
content: *mut ::core::ffi::c_void,
statuscode: i32,
reasonphrase: ::windows::core::PCWSTR,
headers: ::windows::core::PCWSTR,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateWebResourceResponse(
::core::mem::transmute(&content),
::core::mem::transmute_copy(&statuscode),
::core::mem::transmute(&reasonphrase),
::core::mem::transmute(&headers),
) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(response, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn BrowserVersionString<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
versioninfo: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.BrowserVersionString(::core::mem::transmute_copy(&versioninfo))
.into()
}
unsafe extern "system" fn add_NewBrowserVersionAvailable<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_NewBrowserVersionAvailable(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_NewBrowserVersionAvailable<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_NewBrowserVersionAvailable(::core::mem::transmute(&token))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateCoreWebView2Controller: CreateCoreWebView2Controller::<Identity, Impl, OFFSET>,
CreateWebResourceResponse: CreateWebResourceResponse::<Identity, Impl, OFFSET>,
BrowserVersionString: BrowserVersionString::<Identity, Impl, OFFSET>,
add_NewBrowserVersionAvailable: add_NewBrowserVersionAvailable::<Identity, Impl, OFFSET>,
remove_NewBrowserVersionAvailable: remove_NewBrowserVersionAvailable::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment10_Impl: Sized + ICoreWebView2Environment9_Impl {
fn CreateCoreWebView2ControllerOptions(
&self,
) -> ::windows::core::Result<ICoreWebView2ControllerOptions>;
fn CreateCoreWebView2ControllerWithOptions(
&self,
parentwindow: ::windows::Win32::Foundation::HWND,
options: &::core::option::Option<ICoreWebView2ControllerOptions>,
handler: &::core::option::Option<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
) -> ::windows::core::Result<()>;
fn CreateCoreWebView2CompositionControllerWithOptions(
&self,
parentwindow: ::windows::Win32::Foundation::HWND,
options: &::core::option::Option<ICoreWebView2ControllerOptions>,
handler: &::core::option::Option<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment10 {}
impl ICoreWebView2Environment10_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment10_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment10_Vtbl {
unsafe extern "system" fn CreateCoreWebView2ControllerOptions<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment10_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
options: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateCoreWebView2ControllerOptions() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(options, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CreateCoreWebView2ControllerWithOptions<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment10_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
options: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateCoreWebView2ControllerWithOptions(
::core::mem::transmute_copy(&parentwindow),
::core::mem::transmute(&options),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn CreateCoreWebView2CompositionControllerWithOptions<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment10_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
options: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateCoreWebView2CompositionControllerWithOptions(
::core::mem::transmute_copy(&parentwindow),
::core::mem::transmute(&options),
::core::mem::transmute(&handler),
)
.into()
}
Self {
base__: ICoreWebView2Environment9_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateCoreWebView2ControllerOptions: CreateCoreWebView2ControllerOptions::<
Identity,
Impl,
OFFSET,
>,
CreateCoreWebView2ControllerWithOptions: CreateCoreWebView2ControllerWithOptions::<
Identity,
Impl,
OFFSET,
>,
CreateCoreWebView2CompositionControllerWithOptions:
CreateCoreWebView2CompositionControllerWithOptions::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment10 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment9 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment11_Impl: Sized + ICoreWebView2Environment10_Impl {
fn FailureReportFolderPath(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment11 {}
impl ICoreWebView2Environment11_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment11_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment11_Vtbl {
unsafe extern "system" fn FailureReportFolderPath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment11_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FailureReportFolderPath(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ICoreWebView2Environment10_Vtbl::new::<Identity, Impl, OFFSET>(),
FailureReportFolderPath: FailureReportFolderPath::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment11 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment10 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment2_Impl: Sized + ICoreWebView2Environment_Impl {
fn CreateWebResourceRequest(
&self,
uri: &::windows::core::PCWSTR,
method: &::windows::core::PCWSTR,
postdata: &::core::option::Option<::windows::Win32::System::Com::IStream>,
headers: &::windows::core::PCWSTR,
) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment2 {}
impl ICoreWebView2Environment2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment2_Vtbl {
unsafe extern "system" fn CreateWebResourceRequest<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
method: ::windows::core::PCWSTR,
postdata: *mut ::core::ffi::c_void,
headers: ::windows::core::PCWSTR,
request: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateWebResourceRequest(
::core::mem::transmute(&uri),
::core::mem::transmute(&method),
::core::mem::transmute(&postdata),
::core::mem::transmute(&headers),
) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(request, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2Environment_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateWebResourceRequest: CreateWebResourceRequest::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment3_Impl: Sized + ICoreWebView2Environment2_Impl {
fn CreateCoreWebView2CompositionController(
&self,
parentwindow: ::windows::Win32::Foundation::HWND,
handler: &::core::option::Option<
ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
>,
) -> ::windows::core::Result<()>;
fn CreateCoreWebView2PointerInfo(&self) -> ::windows::core::Result<ICoreWebView2PointerInfo>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment3 {}
impl ICoreWebView2Environment3_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment3_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment3_Vtbl {
unsafe extern "system" fn CreateCoreWebView2CompositionController<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
parentwindow: ::windows::Win32::Foundation::HWND,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CreateCoreWebView2CompositionController(
::core::mem::transmute_copy(&parentwindow),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn CreateCoreWebView2PointerInfo<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerinfo: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateCoreWebView2PointerInfo() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pointerinfo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2Environment2_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateCoreWebView2CompositionController: CreateCoreWebView2CompositionController::<
Identity,
Impl,
OFFSET,
>,
CreateCoreWebView2PointerInfo: CreateCoreWebView2PointerInfo::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment4_Impl: Sized + ICoreWebView2Environment3_Impl {
fn GetAutomationProviderForWindow(
&self,
hwnd: ::windows::Win32::Foundation::HWND,
) -> ::windows::core::Result<::windows::core::IUnknown>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment4 {}
impl ICoreWebView2Environment4_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment4_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment4_Vtbl {
unsafe extern "system" fn GetAutomationProviderForWindow<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hwnd: ::windows::Win32::Foundation::HWND,
provider: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetAutomationProviderForWindow(::core::mem::transmute_copy(&hwnd)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(provider, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2Environment3_Vtbl::new::<Identity, Impl, OFFSET>(),
GetAutomationProviderForWindow: GetAutomationProviderForWindow::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment5_Impl: Sized + ICoreWebView2Environment4_Impl {
fn add_BrowserProcessExited(
&self,
eventhandler: &::core::option::Option<ICoreWebView2BrowserProcessExitedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_BrowserProcessExited(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment5 {}
impl ICoreWebView2Environment5_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment5_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment5_Vtbl {
unsafe extern "system" fn add_BrowserProcessExited<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment5_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_BrowserProcessExited(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_BrowserProcessExited<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment5_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_BrowserProcessExited(::core::mem::transmute(&token))
.into()
}
Self {
base__: ICoreWebView2Environment4_Vtbl::new::<Identity, Impl, OFFSET>(),
add_BrowserProcessExited: add_BrowserProcessExited::<Identity, Impl, OFFSET>,
remove_BrowserProcessExited: remove_BrowserProcessExited::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment6_Impl: Sized + ICoreWebView2Environment5_Impl {
fn CreatePrintSettings(&self) -> ::windows::core::Result<ICoreWebView2PrintSettings>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment6 {}
impl ICoreWebView2Environment6_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment6_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment6_Vtbl {
unsafe extern "system" fn CreatePrintSettings<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment6_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
printsettings: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreatePrintSettings() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(printsettings, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2Environment5_Vtbl::new::<Identity, Impl, OFFSET>(),
CreatePrintSettings: CreatePrintSettings::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment5 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment7_Impl: Sized + ICoreWebView2Environment6_Impl {
fn UserDataFolder(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment7 {}
impl ICoreWebView2Environment7_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment7_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment7_Vtbl {
unsafe extern "system" fn UserDataFolder<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment7_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UserDataFolder(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ICoreWebView2Environment6_Vtbl::new::<Identity, Impl, OFFSET>(),
UserDataFolder: UserDataFolder::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment6 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment8_Impl: Sized + ICoreWebView2Environment7_Impl {
fn add_ProcessInfosChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2ProcessInfosChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ProcessInfosChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn GetProcessInfos(&self) -> ::windows::core::Result<ICoreWebView2ProcessInfoCollection>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment8 {}
impl ICoreWebView2Environment8_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment8_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment8_Vtbl {
unsafe extern "system" fn add_ProcessInfosChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ProcessInfosChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ProcessInfosChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ProcessInfosChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn GetProcessInfos<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProcessInfos() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2Environment7_Vtbl::new::<Identity, Impl, OFFSET>(),
add_ProcessInfosChanged: add_ProcessInfosChanged::<Identity, Impl, OFFSET>,
remove_ProcessInfosChanged: remove_ProcessInfosChanged::<Identity, Impl, OFFSET>,
GetProcessInfos: GetProcessInfos::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment7 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Environment9_Impl: Sized + ICoreWebView2Environment8_Impl {
fn CreateContextMenuItem(
&self,
label: &::windows::core::PCWSTR,
iconstream: &::core::option::Option<::windows::Win32::System::Com::IStream>,
kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
) -> ::windows::core::Result<ICoreWebView2ContextMenuItem>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Environment9 {}
impl ICoreWebView2Environment9_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment9_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Environment9_Vtbl {
unsafe extern "system" fn CreateContextMenuItem<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Environment9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
label: ::windows::core::PCWSTR,
iconstream: *mut ::core::ffi::c_void,
kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
item: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CreateContextMenuItem(
::core::mem::transmute(&label),
::core::mem::transmute(&iconstream),
::core::mem::transmute_copy(&kind),
) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(item, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2Environment8_Vtbl::new::<Identity, Impl, OFFSET>(),
CreateContextMenuItem: CreateContextMenuItem::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Environment9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Environment8 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2EnvironmentOptions_Impl: Sized {
fn AdditionalBrowserArguments(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn SetAdditionalBrowserArguments(
&self,
value: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn Language(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetLanguage(&self, value: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn TargetCompatibleBrowserVersion(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn SetTargetCompatibleBrowserVersion(
&self,
value: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn AllowSingleSignOnUsingOSPrimaryAccount(
&self,
allow: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetAllowSingleSignOnUsingOSPrimaryAccount(
&self,
allow: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2EnvironmentOptions {}
impl ICoreWebView2EnvironmentOptions_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>() -> ICoreWebView2EnvironmentOptions_Vtbl {
unsafe extern "system" fn AdditionalBrowserArguments<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AdditionalBrowserArguments(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetAdditionalBrowserArguments<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAdditionalBrowserArguments(::core::mem::transmute(&value))
.into()
}
unsafe extern "system" fn Language<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Language(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetLanguage<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLanguage(::core::mem::transmute(&value)).into()
}
unsafe extern "system" fn TargetCompatibleBrowserVersion<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TargetCompatibleBrowserVersion(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetTargetCompatibleBrowserVersion<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTargetCompatibleBrowserVersion(::core::mem::transmute(&value))
.into()
}
unsafe extern "system" fn AllowSingleSignOnUsingOSPrimaryAccount<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
allow: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AllowSingleSignOnUsingOSPrimaryAccount(::core::mem::transmute_copy(&allow))
.into()
}
unsafe extern "system" fn SetAllowSingleSignOnUsingOSPrimaryAccount<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
allow: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowSingleSignOnUsingOSPrimaryAccount(::core::mem::transmute_copy(&allow))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AdditionalBrowserArguments: AdditionalBrowserArguments::<Identity, Impl, OFFSET>,
SetAdditionalBrowserArguments: SetAdditionalBrowserArguments::<Identity, Impl, OFFSET>,
Language: Language::<Identity, Impl, OFFSET>,
SetLanguage: SetLanguage::<Identity, Impl, OFFSET>,
TargetCompatibleBrowserVersion: TargetCompatibleBrowserVersion::<Identity, Impl, OFFSET>,
SetTargetCompatibleBrowserVersion: SetTargetCompatibleBrowserVersion::<
Identity,
Impl,
OFFSET,
>,
AllowSingleSignOnUsingOSPrimaryAccount: AllowSingleSignOnUsingOSPrimaryAccount::<
Identity,
Impl,
OFFSET,
>,
SetAllowSingleSignOnUsingOSPrimaryAccount: SetAllowSingleSignOnUsingOSPrimaryAccount::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2EnvironmentOptions as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2EnvironmentOptions2_Impl: Sized {
fn ExclusiveUserDataFolderAccess(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetExclusiveUserDataFolderAccess(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2EnvironmentOptions2 {}
impl ICoreWebView2EnvironmentOptions2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2EnvironmentOptions2_Vtbl {
unsafe extern "system" fn ExclusiveUserDataFolderAccess<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExclusiveUserDataFolderAccess(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetExclusiveUserDataFolderAccess<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetExclusiveUserDataFolderAccess(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ExclusiveUserDataFolderAccess: ExclusiveUserDataFolderAccess::<Identity, Impl, OFFSET>,
SetExclusiveUserDataFolderAccess: SetExclusiveUserDataFolderAccess::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2EnvironmentOptions2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2EnvironmentOptions3_Impl: Sized {
fn IsCustomCrashReportingEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsCustomCrashReportingEnabled(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2EnvironmentOptions3 {}
impl ICoreWebView2EnvironmentOptions3_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions3_Impl,
const OFFSET: isize,
>() -> ICoreWebView2EnvironmentOptions3_Vtbl {
unsafe extern "system" fn IsCustomCrashReportingEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsCustomCrashReportingEnabled(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetIsCustomCrashReportingEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EnvironmentOptions3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsCustomCrashReportingEnabled(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsCustomCrashReportingEnabled: IsCustomCrashReportingEnabled::<Identity, Impl, OFFSET>,
SetIsCustomCrashReportingEnabled: SetIsCustomCrashReportingEnabled::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2EnvironmentOptions3 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2DownloadOperation>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2EstimatedEndTimeChangedEventHandler {}
impl ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2EstimatedEndTimeChangedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2ExecuteScriptCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
resultobjectasjson: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ExecuteScriptCompletedHandler {}
impl ICoreWebView2ExecuteScriptCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ExecuteScriptCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ExecuteScriptCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ExecuteScriptCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
resultobjectasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&resultobjectasjson),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ExecuteScriptCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FaviconChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FaviconChangedEventHandler {}
impl ICoreWebView2FaviconChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FaviconChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FaviconChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FaviconChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FaviconChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FocusChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Controller>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FocusChangedEventHandler {}
impl ICoreWebView2FocusChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FocusChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FocusChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FocusChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FocusChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Frame_Impl: Sized {
fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn add_NameChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FrameNameChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_NameChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn AddHostObjectToScriptWithOrigins(
&self,
name: &::windows::core::PCWSTR,
object: *mut ::windows::Win32::System::Com::VARIANT,
originscount: u32,
origins: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn RemoveHostObjectFromScript(
&self,
name: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn add_Destroyed(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FrameDestroyedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_Destroyed(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn IsDestroyed(
&self,
destroyed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Frame {}
impl ICoreWebView2Frame_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Frame_Vtbl {
unsafe extern "system" fn Name<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Name(::core::mem::transmute_copy(&name)).into()
}
unsafe extern "system" fn add_NameChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_NameChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_NameChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_NameChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn AddHostObjectToScriptWithOrigins<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
object: *mut ::windows::Win32::System::Com::VARIANT,
originscount: u32,
origins: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AddHostObjectToScriptWithOrigins(
::core::mem::transmute(&name),
::core::mem::transmute_copy(&object),
::core::mem::transmute_copy(&originscount),
::core::mem::transmute_copy(&origins),
)
.into()
}
unsafe extern "system" fn RemoveHostObjectFromScript<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveHostObjectFromScript(::core::mem::transmute(&name))
.into()
}
unsafe extern "system" fn add_Destroyed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_Destroyed(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_Destroyed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_Destroyed(::core::mem::transmute(&token)).into()
}
unsafe extern "system" fn IsDestroyed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
destroyed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsDestroyed(::core::mem::transmute_copy(&destroyed))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
add_NameChanged: add_NameChanged::<Identity, Impl, OFFSET>,
remove_NameChanged: remove_NameChanged::<Identity, Impl, OFFSET>,
AddHostObjectToScriptWithOrigins: AddHostObjectToScriptWithOrigins::<
Identity,
Impl,
OFFSET,
>,
RemoveHostObjectFromScript: RemoveHostObjectFromScript::<Identity, Impl, OFFSET>,
add_Destroyed: add_Destroyed::<Identity, Impl, OFFSET>,
remove_Destroyed: remove_Destroyed::<Identity, Impl, OFFSET>,
IsDestroyed: IsDestroyed::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Frame as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Frame2_Impl: Sized + ICoreWebView2Frame_Impl {
fn add_NavigationStarting(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FrameNavigationStartingEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_NavigationStarting(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_ContentLoading(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FrameContentLoadingEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ContentLoading(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_NavigationCompleted(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FrameNavigationCompletedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_NavigationCompleted(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_DOMContentLoaded(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FrameDOMContentLoadedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_DOMContentLoaded(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn ExecuteScript(
&self,
javascript: &::windows::core::PCWSTR,
handler: &::core::option::Option<ICoreWebView2ExecuteScriptCompletedHandler>,
) -> ::windows::core::Result<()>;
fn PostWebMessageAsJson(
&self,
webmessageasjson: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn PostWebMessageAsString(
&self,
webmessageasstring: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn add_WebMessageReceived(
&self,
handler: &::core::option::Option<ICoreWebView2FrameWebMessageReceivedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_WebMessageReceived(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Frame2 {}
impl ICoreWebView2Frame2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Frame2_Vtbl {
unsafe extern "system" fn add_NavigationStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_NavigationStarting(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_NavigationStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_NavigationStarting(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_ContentLoading<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ContentLoading(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ContentLoading<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ContentLoading(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_NavigationCompleted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_NavigationCompleted(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_NavigationCompleted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_NavigationCompleted(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_DOMContentLoaded<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_DOMContentLoaded(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_DOMContentLoaded<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_DOMContentLoaded(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn ExecuteScript<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
javascript: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExecuteScript(
::core::mem::transmute(&javascript),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn PostWebMessageAsJson<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
webmessageasjson: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PostWebMessageAsJson(::core::mem::transmute(&webmessageasjson))
.into()
}
unsafe extern "system" fn PostWebMessageAsString<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
webmessageasstring: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PostWebMessageAsString(::core::mem::transmute(&webmessageasstring))
.into()
}
unsafe extern "system" fn add_WebMessageReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_WebMessageReceived(
::core::mem::transmute(&handler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_WebMessageReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_WebMessageReceived(::core::mem::transmute(&token))
.into()
}
Self {
base__: ICoreWebView2Frame_Vtbl::new::<Identity, Impl, OFFSET>(),
add_NavigationStarting: add_NavigationStarting::<Identity, Impl, OFFSET>,
remove_NavigationStarting: remove_NavigationStarting::<Identity, Impl, OFFSET>,
add_ContentLoading: add_ContentLoading::<Identity, Impl, OFFSET>,
remove_ContentLoading: remove_ContentLoading::<Identity, Impl, OFFSET>,
add_NavigationCompleted: add_NavigationCompleted::<Identity, Impl, OFFSET>,
remove_NavigationCompleted: remove_NavigationCompleted::<Identity, Impl, OFFSET>,
add_DOMContentLoaded: add_DOMContentLoaded::<Identity, Impl, OFFSET>,
remove_DOMContentLoaded: remove_DOMContentLoaded::<Identity, Impl, OFFSET>,
ExecuteScript: ExecuteScript::<Identity, Impl, OFFSET>,
PostWebMessageAsJson: PostWebMessageAsJson::<Identity, Impl, OFFSET>,
PostWebMessageAsString: PostWebMessageAsString::<Identity, Impl, OFFSET>,
add_WebMessageReceived: add_WebMessageReceived::<Identity, Impl, OFFSET>,
remove_WebMessageReceived: remove_WebMessageReceived::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Frame2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Frame as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Frame3_Impl: Sized + ICoreWebView2Frame2_Impl {
fn add_PermissionRequested(
&self,
handler: &::core::option::Option<ICoreWebView2FramePermissionRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_PermissionRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Frame3 {}
impl ICoreWebView2Frame3_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame3_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Frame3_Vtbl {
unsafe extern "system" fn add_PermissionRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_PermissionRequested(
::core::mem::transmute(&handler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_PermissionRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Frame3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_PermissionRequested(::core::mem::transmute(&token))
.into()
}
Self {
base__: ICoreWebView2Frame2_Vtbl::new::<Identity, Impl, OFFSET>(),
add_PermissionRequested: add_PermissionRequested::<Identity, Impl, OFFSET>,
remove_PermissionRequested: remove_PermissionRequested::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Frame3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Frame as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Frame2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameContentLoadingEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<ICoreWebView2ContentLoadingEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameContentLoadingEventHandler {}
impl ICoreWebView2FrameContentLoadingEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameContentLoadingEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameContentLoadingEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameContentLoadingEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameContentLoadingEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameCreatedEventArgs_Impl: Sized {
fn Frame(&self) -> ::windows::core::Result<ICoreWebView2Frame>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameCreatedEventArgs {}
impl ICoreWebView2FrameCreatedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameCreatedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameCreatedEventArgs_Vtbl {
unsafe extern "system" fn Frame<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameCreatedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
frame: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Frame() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(frame, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Frame: Frame::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameCreatedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameCreatedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2FrameCreatedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameCreatedEventHandler {}
impl ICoreWebView2FrameCreatedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameCreatedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameCreatedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameCreatedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameCreatedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameDOMContentLoadedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<ICoreWebView2DOMContentLoadedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameDOMContentLoadedEventHandler {}
impl ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameDOMContentLoadedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameDOMContentLoadedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameDOMContentLoadedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameDestroyedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameDestroyedEventHandler {}
impl ICoreWebView2FrameDestroyedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameDestroyedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameDestroyedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameDestroyedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameDestroyedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameInfo_Impl: Sized {
fn Name(&self, name: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Source(&self, source: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameInfo {}
impl ICoreWebView2FrameInfo_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfo_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameInfo_Vtbl {
unsafe extern "system" fn Name<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Name(::core::mem::transmute_copy(&name)).into()
}
unsafe extern "system" fn Source<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
source: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Source(::core::mem::transmute_copy(&source)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
Source: Source::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameInfo as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameInfoCollection_Impl: Sized {
fn GetIterator(&self) -> ::windows::core::Result<ICoreWebView2FrameInfoCollectionIterator>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameInfoCollection {}
impl ICoreWebView2FrameInfoCollection_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfoCollection_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameInfoCollection_Vtbl {
unsafe extern "system" fn GetIterator<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfoCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIterator() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(iterator, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetIterator: GetIterator::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameInfoCollection as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameInfoCollectionIterator_Impl: Sized {
fn HasCurrent(
&self,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn GetCurrent(&self) -> ::windows::core::Result<ICoreWebView2FrameInfo>;
fn MoveNext(
&self,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameInfoCollectionIterator {}
impl ICoreWebView2FrameInfoCollectionIterator_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfoCollectionIterator_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameInfoCollectionIterator_Vtbl {
unsafe extern "system" fn HasCurrent<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfoCollectionIterator_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasCurrent(::core::mem::transmute_copy(&hascurrent))
.into()
}
unsafe extern "system" fn GetCurrent<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfoCollectionIterator_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
frameinfo: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetCurrent() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(frameinfo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn MoveNext<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameInfoCollectionIterator_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MoveNext(::core::mem::transmute_copy(&hasnext)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
HasCurrent: HasCurrent::<Identity, Impl, OFFSET>,
GetCurrent: GetCurrent::<Identity, Impl, OFFSET>,
MoveNext: MoveNext::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameInfoCollectionIterator as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameNameChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameNameChangedEventHandler {}
impl ICoreWebView2FrameNameChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameNameChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameNameChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameNameChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2FrameNameChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2FrameNavigationCompletedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<ICoreWebView2NavigationCompletedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameNavigationCompletedEventHandler {}
impl ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameNavigationCompletedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameNavigationCompletedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2FrameNavigationCompletedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2FrameNavigationStartingEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<ICoreWebView2NavigationStartingEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameNavigationStartingEventHandler {}
impl ICoreWebView2FrameNavigationStartingEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameNavigationStartingEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameNavigationStartingEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameNavigationStartingEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2FrameNavigationStartingEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2FramePermissionRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<ICoreWebView2PermissionRequestedEventArgs2>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FramePermissionRequestedEventHandler {}
impl ICoreWebView2FramePermissionRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FramePermissionRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FramePermissionRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FramePermissionRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2FramePermissionRequestedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2FrameWebMessageReceivedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Frame>,
args: &::core::option::Option<ICoreWebView2WebMessageReceivedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2FrameWebMessageReceivedEventHandler {}
impl ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameWebMessageReceivedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2FrameWebMessageReceivedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2FrameWebMessageReceivedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2GetCookiesCompletedHandler_Impl: Sized {
fn Invoke(
&self,
result: ::windows::core::HRESULT,
cookielist: &::core::option::Option<ICoreWebView2CookieList>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2GetCookiesCompletedHandler {}
impl ICoreWebView2GetCookiesCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2GetCookiesCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2GetCookiesCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2GetCookiesCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
result: ::windows::core::HRESULT,
cookielist: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&result),
::core::mem::transmute(&cookielist),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2GetCookiesCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2GetFaviconCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
faviconstream: &::core::option::Option<::windows::Win32::System::Com::IStream>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2GetFaviconCompletedHandler {}
impl ICoreWebView2GetFaviconCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2GetFaviconCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2GetFaviconCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2GetFaviconCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
faviconstream: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&faviconstream),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2GetFaviconCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2HistoryChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2HistoryChangedEventHandler {}
impl ICoreWebView2HistoryChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HistoryChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2HistoryChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HistoryChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2HistoryChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2HttpHeadersCollectionIterator_Impl: Sized {
fn GetCurrentHeader(
&self,
name: *mut ::windows::core::PWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn HasCurrentHeader(
&self,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn MoveNext(
&self,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2HttpHeadersCollectionIterator {}
impl ICoreWebView2HttpHeadersCollectionIterator_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpHeadersCollectionIterator_Impl,
const OFFSET: isize,
>() -> ICoreWebView2HttpHeadersCollectionIterator_Vtbl {
unsafe extern "system" fn GetCurrentHeader<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpHeadersCollectionIterator_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: *mut ::windows::core::PWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetCurrentHeader(
::core::mem::transmute_copy(&name),
::core::mem::transmute_copy(&value),
)
.into()
}
unsafe extern "system" fn HasCurrentHeader<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpHeadersCollectionIterator_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hascurrent: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasCurrentHeader(::core::mem::transmute_copy(&hascurrent))
.into()
}
unsafe extern "system" fn MoveNext<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpHeadersCollectionIterator_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hasnext: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MoveNext(::core::mem::transmute_copy(&hasnext)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCurrentHeader: GetCurrentHeader::<Identity, Impl, OFFSET>,
HasCurrentHeader: HasCurrentHeader::<Identity, Impl, OFFSET>,
MoveNext: MoveNext::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2HttpHeadersCollectionIterator as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2HttpRequestHeaders_Impl: Sized {
fn GetHeader(
&self,
name: &::windows::core::PCWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn GetHeaders(
&self,
name: &::windows::core::PCWSTR,
) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
fn Contains(
&self,
name: &::windows::core::PCWSTR,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetHeader(
&self,
name: &::windows::core::PCWSTR,
value: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn RemoveHeader(&self, name: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn GetIterator(&self) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
}
impl ::windows::core::RuntimeName for ICoreWebView2HttpRequestHeaders {}
impl ICoreWebView2HttpRequestHeaders_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpRequestHeaders_Impl,
const OFFSET: isize,
>() -> ICoreWebView2HttpRequestHeaders_Vtbl {
unsafe extern "system" fn GetHeader<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpRequestHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetHeader(
::core::mem::transmute(&name),
::core::mem::transmute_copy(&value),
)
.into()
}
unsafe extern "system" fn GetHeaders<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpRequestHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetHeaders(::core::mem::transmute(&name)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(iterator, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Contains<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpRequestHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Contains(
::core::mem::transmute(&name),
::core::mem::transmute_copy(&contains),
)
.into()
}
unsafe extern "system" fn SetHeader<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpRequestHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHeader(
::core::mem::transmute(&name),
::core::mem::transmute(&value),
)
.into()
}
unsafe extern "system" fn RemoveHeader<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpRequestHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemoveHeader(::core::mem::transmute(&name)).into()
}
unsafe extern "system" fn GetIterator<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpRequestHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIterator() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(iterator, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetHeader: GetHeader::<Identity, Impl, OFFSET>,
GetHeaders: GetHeaders::<Identity, Impl, OFFSET>,
Contains: Contains::<Identity, Impl, OFFSET>,
SetHeader: SetHeader::<Identity, Impl, OFFSET>,
RemoveHeader: RemoveHeader::<Identity, Impl, OFFSET>,
GetIterator: GetIterator::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2HttpRequestHeaders as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2HttpResponseHeaders_Impl: Sized {
fn AppendHeader(
&self,
name: &::windows::core::PCWSTR,
value: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn Contains(
&self,
name: &::windows::core::PCWSTR,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn GetHeader(
&self,
name: &::windows::core::PCWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn GetHeaders(
&self,
name: &::windows::core::PCWSTR,
) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
fn GetIterator(&self) -> ::windows::core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
}
impl ::windows::core::RuntimeName for ICoreWebView2HttpResponseHeaders {}
impl ICoreWebView2HttpResponseHeaders_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpResponseHeaders_Impl,
const OFFSET: isize,
>() -> ICoreWebView2HttpResponseHeaders_Vtbl {
unsafe extern "system" fn AppendHeader<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpResponseHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AppendHeader(
::core::mem::transmute(&name),
::core::mem::transmute(&value),
)
.into()
}
unsafe extern "system" fn Contains<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpResponseHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
contains: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Contains(
::core::mem::transmute(&name),
::core::mem::transmute_copy(&contains),
)
.into()
}
unsafe extern "system" fn GetHeader<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpResponseHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetHeader(
::core::mem::transmute(&name),
::core::mem::transmute_copy(&value),
)
.into()
}
unsafe extern "system" fn GetHeaders<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpResponseHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
name: ::windows::core::PCWSTR,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetHeaders(::core::mem::transmute(&name)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(iterator, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetIterator<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2HttpResponseHeaders_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
iterator: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetIterator() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(iterator, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AppendHeader: AppendHeader::<Identity, Impl, OFFSET>,
Contains: Contains::<Identity, Impl, OFFSET>,
GetHeader: GetHeader::<Identity, Impl, OFFSET>,
GetHeaders: GetHeaders::<Identity, Impl, OFFSET>,
GetIterator: GetIterator::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2HttpResponseHeaders as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {}
impl ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {}
impl ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2IsDocumentPlayingAudioChangedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2IsMutedChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2IsMutedChangedEventHandler {}
impl ICoreWebView2IsMutedChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2IsMutedChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2IsMutedChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2IsMutedChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2IsMutedChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2MoveFocusRequestedEventArgs_Impl: Sized {
fn Reason(&self, reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON) -> ::windows::core::Result<()>;
fn Handled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetHandled(&self, value: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2MoveFocusRequestedEventArgs {}
impl ICoreWebView2MoveFocusRequestedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2MoveFocusRequestedEventArgs_Vtbl {
unsafe extern "system" fn Reason<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reason(::core::mem::transmute_copy(&reason)).into()
}
unsafe extern "system" fn Handled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Handled(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetHandled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHandled(::core::mem::transmute_copy(&value)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Reason: Reason::<Identity, Impl, OFFSET>,
Handled: Handled::<Identity, Impl, OFFSET>,
SetHandled: SetHandled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2MoveFocusRequestedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2MoveFocusRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Controller>,
args: &::core::option::Option<ICoreWebView2MoveFocusRequestedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2MoveFocusRequestedEventHandler {}
impl ICoreWebView2MoveFocusRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2MoveFocusRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2MoveFocusRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2MoveFocusRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2MoveFocusRequestedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NavigationCompletedEventArgs_Impl: Sized {
fn IsSuccess(
&self,
issuccess: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn WebErrorStatus(
&self,
weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::Result<()>;
fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NavigationCompletedEventArgs {}
impl ICoreWebView2NavigationCompletedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NavigationCompletedEventArgs_Vtbl {
unsafe extern "system" fn IsSuccess<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
issuccess: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsSuccess(::core::mem::transmute_copy(&issuccess))
.into()
}
unsafe extern "system" fn WebErrorStatus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WebErrorStatus(::core::mem::transmute_copy(&weberrorstatus))
.into()
}
unsafe extern "system" fn NavigationId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NavigationId(::core::mem::transmute_copy(&navigationid))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsSuccess: IsSuccess::<Identity, Impl, OFFSET>,
WebErrorStatus: WebErrorStatus::<Identity, Impl, OFFSET>,
NavigationId: NavigationId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NavigationCompletedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NavigationCompletedEventArgs2_Impl:
Sized + ICoreWebView2NavigationCompletedEventArgs_Impl
{
fn HttpStatusCode(&self, http_status_code: *mut i32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NavigationCompletedEventArgs2 {}
impl ICoreWebView2NavigationCompletedEventArgs2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventArgs2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NavigationCompletedEventArgs2_Vtbl {
unsafe extern "system" fn HttpStatusCode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
http_status_code: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HttpStatusCode(::core::mem::transmute_copy(&http_status_code))
.into()
}
Self {
base__: ICoreWebView2NavigationCompletedEventArgs_Vtbl::new::<Identity, Impl, OFFSET>(),
HttpStatusCode: HttpStatusCode::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NavigationCompletedEventArgs2 as ::windows::core::Interface>::IID
|| iid
== &<ICoreWebView2NavigationCompletedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NavigationCompletedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2NavigationCompletedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NavigationCompletedEventHandler {}
impl ICoreWebView2NavigationCompletedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NavigationCompletedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationCompletedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NavigationCompletedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NavigationStartingEventArgs_Impl: Sized {
fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsRedirected(
&self,
isredirected: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn RequestHeaders(&self) -> ::windows::core::Result<ICoreWebView2HttpRequestHeaders>;
fn Cancel(
&self,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetCancel(&self, cancel: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
fn NavigationId(&self, navigationid: *mut u64) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NavigationStartingEventArgs {}
impl ICoreWebView2NavigationStartingEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NavigationStartingEventArgs_Vtbl {
unsafe extern "system" fn Uri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Uri(::core::mem::transmute_copy(&uri)).into()
}
unsafe extern "system" fn IsUserInitiated<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsUserInitiated(::core::mem::transmute_copy(&isuserinitiated))
.into()
}
unsafe extern "system" fn IsRedirected<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isredirected: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsRedirected(::core::mem::transmute_copy(&isredirected))
.into()
}
unsafe extern "system" fn RequestHeaders<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
requestheaders: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RequestHeaders() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(requestheaders, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Cancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cancel: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Cancel(::core::mem::transmute_copy(&cancel)).into()
}
unsafe extern "system" fn SetCancel<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cancel: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCancel(::core::mem::transmute_copy(&cancel)).into()
}
unsafe extern "system" fn NavigationId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
navigationid: *mut u64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NavigationId(::core::mem::transmute_copy(&navigationid))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Uri: Uri::<Identity, Impl, OFFSET>,
IsUserInitiated: IsUserInitiated::<Identity, Impl, OFFSET>,
IsRedirected: IsRedirected::<Identity, Impl, OFFSET>,
RequestHeaders: RequestHeaders::<Identity, Impl, OFFSET>,
Cancel: Cancel::<Identity, Impl, OFFSET>,
SetCancel: SetCancel::<Identity, Impl, OFFSET>,
NavigationId: NavigationId::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NavigationStartingEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NavigationStartingEventArgs2_Impl:
Sized + ICoreWebView2NavigationStartingEventArgs_Impl
{
fn AdditionalAllowedFrameAncestors(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn SetAdditionalAllowedFrameAncestors(
&self,
value: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NavigationStartingEventArgs2 {}
impl ICoreWebView2NavigationStartingEventArgs2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NavigationStartingEventArgs2_Vtbl {
unsafe extern "system" fn AdditionalAllowedFrameAncestors<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AdditionalAllowedFrameAncestors(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetAdditionalAllowedFrameAncestors<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAdditionalAllowedFrameAncestors(::core::mem::transmute(&value))
.into()
}
Self {
base__: ICoreWebView2NavigationStartingEventArgs_Vtbl::new::<Identity, Impl, OFFSET>(),
AdditionalAllowedFrameAncestors: AdditionalAllowedFrameAncestors::<
Identity,
Impl,
OFFSET,
>,
SetAdditionalAllowedFrameAncestors: SetAdditionalAllowedFrameAncestors::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NavigationStartingEventArgs2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2NavigationStartingEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NavigationStartingEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2NavigationStartingEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NavigationStartingEventHandler {}
impl ICoreWebView2NavigationStartingEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NavigationStartingEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NavigationStartingEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NavigationStartingEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Environment>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NewBrowserVersionAvailableEventHandler {}
impl ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2NewBrowserVersionAvailableEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2NewWindowRequestedEventArgs_Impl: Sized {
fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetNewWindow(
&self,
newwindow: &::core::option::Option<ICoreWebView2>,
) -> ::windows::core::Result<()>;
fn NewWindow(&self) -> ::windows::core::Result<ICoreWebView2>;
fn SetHandled(
&self,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
fn WindowFeatures(&self) -> ::windows::core::Result<ICoreWebView2WindowFeatures>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs {}
impl ICoreWebView2NewWindowRequestedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NewWindowRequestedEventArgs_Vtbl {
unsafe extern "system" fn Uri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Uri(::core::mem::transmute_copy(&uri)).into()
}
unsafe extern "system" fn SetNewWindow<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
newwindow: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetNewWindow(::core::mem::transmute(&newwindow)).into()
}
unsafe extern "system" fn NewWindow<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
newwindow: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.NewWindow() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(newwindow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetHandled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHandled(::core::mem::transmute_copy(&handled))
.into()
}
unsafe extern "system" fn Handled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Handled(::core::mem::transmute_copy(&handled)).into()
}
unsafe extern "system" fn IsUserInitiated<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsUserInitiated(::core::mem::transmute_copy(&isuserinitiated))
.into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn WindowFeatures<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.WindowFeatures() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Uri: Uri::<Identity, Impl, OFFSET>,
SetNewWindow: SetNewWindow::<Identity, Impl, OFFSET>,
NewWindow: NewWindow::<Identity, Impl, OFFSET>,
SetHandled: SetHandled::<Identity, Impl, OFFSET>,
Handled: Handled::<Identity, Impl, OFFSET>,
IsUserInitiated: IsUserInitiated::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
WindowFeatures: WindowFeatures::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NewWindowRequestedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NewWindowRequestedEventArgs2_Impl:
Sized + ICoreWebView2NewWindowRequestedEventArgs_Impl
{
fn Name(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs2 {}
impl ICoreWebView2NewWindowRequestedEventArgs2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NewWindowRequestedEventArgs2_Vtbl {
unsafe extern "system" fn Name<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Name(::core::mem::transmute_copy(&value)).into()
}
Self {
base__: ICoreWebView2NewWindowRequestedEventArgs_Vtbl::new::<Identity, Impl, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NewWindowRequestedEventArgs2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2NewWindowRequestedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2NewWindowRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2NewWindowRequestedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2NewWindowRequestedEventHandler {}
impl ICoreWebView2NewWindowRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2NewWindowRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2NewWindowRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2NewWindowRequestedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PermissionRequestedEventArgs_Impl: Sized {
fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn PermissionKind(
&self,
permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
) -> ::windows::core::Result<()>;
fn IsUserInitiated(
&self,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn State(&self, state: *mut COREWEBVIEW2_PERMISSION_STATE) -> ::windows::core::Result<()>;
fn SetState(&self, state: COREWEBVIEW2_PERMISSION_STATE) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs {}
impl ICoreWebView2PermissionRequestedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PermissionRequestedEventArgs_Vtbl {
unsafe extern "system" fn Uri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Uri(::core::mem::transmute_copy(&uri)).into()
}
unsafe extern "system" fn PermissionKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PermissionKind(::core::mem::transmute_copy(&permissionkind))
.into()
}
unsafe extern "system" fn IsUserInitiated<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isuserinitiated: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsUserInitiated(::core::mem::transmute_copy(&isuserinitiated))
.into()
}
unsafe extern "system" fn State<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
state: *mut COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.State(::core::mem::transmute_copy(&state)).into()
}
unsafe extern "system" fn SetState<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
state: COREWEBVIEW2_PERMISSION_STATE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetState(::core::mem::transmute_copy(&state)).into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Uri: Uri::<Identity, Impl, OFFSET>,
PermissionKind: PermissionKind::<Identity, Impl, OFFSET>,
IsUserInitiated: IsUserInitiated::<Identity, Impl, OFFSET>,
State: State::<Identity, Impl, OFFSET>,
SetState: SetState::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PermissionRequestedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PermissionRequestedEventArgs2_Impl:
Sized + ICoreWebView2PermissionRequestedEventArgs_Impl
{
fn Handled(
&self,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetHandled(
&self,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs2 {}
impl ICoreWebView2PermissionRequestedEventArgs2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PermissionRequestedEventArgs2_Vtbl {
unsafe extern "system" fn Handled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Handled(::core::mem::transmute_copy(&handled)).into()
}
unsafe extern "system" fn SetHandled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHandled(::core::mem::transmute_copy(&handled))
.into()
}
Self {
base__: ICoreWebView2PermissionRequestedEventArgs_Vtbl::new::<Identity, Impl, OFFSET>(),
Handled: Handled::<Identity, Impl, OFFSET>,
SetHandled: SetHandled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PermissionRequestedEventArgs2 as ::windows::core::Interface>::IID
|| iid
== &<ICoreWebView2PermissionRequestedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PermissionRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2PermissionRequestedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PermissionRequestedEventHandler {}
impl ICoreWebView2PermissionRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PermissionRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PermissionRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PermissionRequestedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PointerInfo_Impl: Sized {
fn PointerKind(&self, pointerkind: *mut u32) -> ::windows::core::Result<()>;
fn SetPointerKind(&self, pointerkind: u32) -> ::windows::core::Result<()>;
fn PointerId(&self, pointerid: *mut u32) -> ::windows::core::Result<()>;
fn SetPointerId(&self, pointerid: u32) -> ::windows::core::Result<()>;
fn FrameId(&self, frameid: *mut u32) -> ::windows::core::Result<()>;
fn SetFrameId(&self, frameid: u32) -> ::windows::core::Result<()>;
fn PointerFlags(&self, pointerflags: *mut u32) -> ::windows::core::Result<()>;
fn SetPointerFlags(&self, pointerflags: u32) -> ::windows::core::Result<()>;
fn PointerDeviceRect(
&self,
pointerdevicerect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn SetPointerDeviceRect(
&self,
pointerdevicerect: &::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn DisplayRect(
&self,
displayrect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn SetDisplayRect(
&self,
displayrect: &::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn PixelLocation(
&self,
pixellocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn SetPixelLocation(
&self,
pixellocation: &::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn HimetricLocation(
&self,
himetriclocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn SetHimetricLocation(
&self,
himetriclocation: &::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn PixelLocationRaw(
&self,
pixellocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn SetPixelLocationRaw(
&self,
pixellocationraw: &::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn HimetricLocationRaw(
&self,
himetriclocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn SetHimetricLocationRaw(
&self,
himetriclocationraw: &::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn Time(&self, time: *mut u32) -> ::windows::core::Result<()>;
fn SetTime(&self, time: u32) -> ::windows::core::Result<()>;
fn HistoryCount(&self, historycount: *mut u32) -> ::windows::core::Result<()>;
fn SetHistoryCount(&self, historycount: u32) -> ::windows::core::Result<()>;
fn InputData(&self, inputdata: *mut i32) -> ::windows::core::Result<()>;
fn SetInputData(&self, inputdata: i32) -> ::windows::core::Result<()>;
fn KeyStates(&self, keystates: *mut u32) -> ::windows::core::Result<()>;
fn SetKeyStates(&self, keystates: u32) -> ::windows::core::Result<()>;
fn PerformanceCount(&self, performancecount: *mut u64) -> ::windows::core::Result<()>;
fn SetPerformanceCount(&self, performancecount: u64) -> ::windows::core::Result<()>;
fn ButtonChangeKind(&self, buttonchangekind: *mut i32) -> ::windows::core::Result<()>;
fn SetButtonChangeKind(&self, buttonchangekind: i32) -> ::windows::core::Result<()>;
fn PenFlags(&self, penflags: *mut u32) -> ::windows::core::Result<()>;
fn SetPenFlags(&self, penflags: u32) -> ::windows::core::Result<()>;
fn PenMask(&self, penmask: *mut u32) -> ::windows::core::Result<()>;
fn SetPenMask(&self, penmask: u32) -> ::windows::core::Result<()>;
fn PenPressure(&self, penpressure: *mut u32) -> ::windows::core::Result<()>;
fn SetPenPressure(&self, penpressure: u32) -> ::windows::core::Result<()>;
fn PenRotation(&self, penrotation: *mut u32) -> ::windows::core::Result<()>;
fn SetPenRotation(&self, penrotation: u32) -> ::windows::core::Result<()>;
fn PenTiltX(&self, pentiltx: *mut i32) -> ::windows::core::Result<()>;
fn SetPenTiltX(&self, pentiltx: i32) -> ::windows::core::Result<()>;
fn PenTiltY(&self, pentilty: *mut i32) -> ::windows::core::Result<()>;
fn SetPenTiltY(&self, pentilty: i32) -> ::windows::core::Result<()>;
fn TouchFlags(&self, touchflags: *mut u32) -> ::windows::core::Result<()>;
fn SetTouchFlags(&self, touchflags: u32) -> ::windows::core::Result<()>;
fn TouchMask(&self, touchmask: *mut u32) -> ::windows::core::Result<()>;
fn SetTouchMask(&self, touchmask: u32) -> ::windows::core::Result<()>;
fn TouchContact(
&self,
touchcontact: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn SetTouchContact(
&self,
touchcontact: &::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn TouchContactRaw(
&self,
touchcontactraw: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn SetTouchContactRaw(
&self,
touchcontactraw: &::windows::Win32::Foundation::RECT,
) -> ::windows::core::Result<()>;
fn TouchOrientation(&self, touchorientation: *mut u32) -> ::windows::core::Result<()>;
fn SetTouchOrientation(&self, touchorientation: u32) -> ::windows::core::Result<()>;
fn TouchPressure(&self, touchpressure: *mut u32) -> ::windows::core::Result<()>;
fn SetTouchPressure(&self, touchpressure: u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PointerInfo {}
impl ICoreWebView2PointerInfo_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PointerInfo_Vtbl {
unsafe extern "system" fn PointerKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerkind: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PointerKind(::core::mem::transmute_copy(&pointerkind))
.into()
}
unsafe extern "system" fn SetPointerKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerkind: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPointerKind(::core::mem::transmute_copy(&pointerkind))
.into()
}
unsafe extern "system" fn PointerId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerid: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PointerId(::core::mem::transmute_copy(&pointerid))
.into()
}
unsafe extern "system" fn SetPointerId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerid: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPointerId(::core::mem::transmute_copy(&pointerid))
.into()
}
unsafe extern "system" fn FrameId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
frameid: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FrameId(::core::mem::transmute_copy(&frameid)).into()
}
unsafe extern "system" fn SetFrameId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
frameid: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFrameId(::core::mem::transmute_copy(&frameid))
.into()
}
unsafe extern "system" fn PointerFlags<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerflags: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PointerFlags(::core::mem::transmute_copy(&pointerflags))
.into()
}
unsafe extern "system" fn SetPointerFlags<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerflags: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPointerFlags(::core::mem::transmute_copy(&pointerflags))
.into()
}
unsafe extern "system" fn PointerDeviceRect<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerdevicerect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PointerDeviceRect(::core::mem::transmute_copy(&pointerdevicerect))
.into()
}
unsafe extern "system" fn SetPointerDeviceRect<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pointerdevicerect: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPointerDeviceRect(::core::mem::transmute(&pointerdevicerect))
.into()
}
unsafe extern "system" fn DisplayRect<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
displayrect: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisplayRect(::core::mem::transmute_copy(&displayrect))
.into()
}
unsafe extern "system" fn SetDisplayRect<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
displayrect: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDisplayRect(::core::mem::transmute(&displayrect))
.into()
}
unsafe extern "system" fn PixelLocation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pixellocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PixelLocation(::core::mem::transmute_copy(&pixellocation))
.into()
}
unsafe extern "system" fn SetPixelLocation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pixellocation: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPixelLocation(::core::mem::transmute(&pixellocation))
.into()
}
unsafe extern "system" fn HimetricLocation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
himetriclocation: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HimetricLocation(::core::mem::transmute_copy(&himetriclocation))
.into()
}
unsafe extern "system" fn SetHimetricLocation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
himetriclocation: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHimetricLocation(::core::mem::transmute(&himetriclocation))
.into()
}
unsafe extern "system" fn PixelLocationRaw<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pixellocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PixelLocationRaw(::core::mem::transmute_copy(&pixellocationraw))
.into()
}
unsafe extern "system" fn SetPixelLocationRaw<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pixellocationraw: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPixelLocationRaw(::core::mem::transmute(&pixellocationraw))
.into()
}
unsafe extern "system" fn HimetricLocationRaw<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
himetriclocationraw: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HimetricLocationRaw(::core::mem::transmute_copy(&himetriclocationraw))
.into()
}
unsafe extern "system" fn SetHimetricLocationRaw<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
himetriclocationraw: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHimetricLocationRaw(::core::mem::transmute(&himetriclocationraw))
.into()
}
unsafe extern "system" fn Time<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
time: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Time(::core::mem::transmute_copy(&time)).into()
}
unsafe extern "system" fn SetTime<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
time: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTime(::core::mem::transmute_copy(&time)).into()
}
unsafe extern "system" fn HistoryCount<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
historycount: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HistoryCount(::core::mem::transmute_copy(&historycount))
.into()
}
unsafe extern "system" fn SetHistoryCount<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
historycount: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHistoryCount(::core::mem::transmute_copy(&historycount))
.into()
}
unsafe extern "system" fn InputData<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
inputdata: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.InputData(::core::mem::transmute_copy(&inputdata))
.into()
}
unsafe extern "system" fn SetInputData<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
inputdata: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInputData(::core::mem::transmute_copy(&inputdata))
.into()
}
unsafe extern "system" fn KeyStates<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
keystates: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.KeyStates(::core::mem::transmute_copy(&keystates))
.into()
}
unsafe extern "system" fn SetKeyStates<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
keystates: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetKeyStates(::core::mem::transmute_copy(&keystates))
.into()
}
unsafe extern "system" fn PerformanceCount<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
performancecount: *mut u64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PerformanceCount(::core::mem::transmute_copy(&performancecount))
.into()
}
unsafe extern "system" fn SetPerformanceCount<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
performancecount: u64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPerformanceCount(::core::mem::transmute_copy(&performancecount))
.into()
}
unsafe extern "system" fn ButtonChangeKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
buttonchangekind: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ButtonChangeKind(::core::mem::transmute_copy(&buttonchangekind))
.into()
}
unsafe extern "system" fn SetButtonChangeKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
buttonchangekind: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetButtonChangeKind(::core::mem::transmute_copy(&buttonchangekind))
.into()
}
unsafe extern "system" fn PenFlags<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penflags: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PenFlags(::core::mem::transmute_copy(&penflags)).into()
}
unsafe extern "system" fn SetPenFlags<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penflags: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPenFlags(::core::mem::transmute_copy(&penflags))
.into()
}
unsafe extern "system" fn PenMask<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penmask: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PenMask(::core::mem::transmute_copy(&penmask)).into()
}
unsafe extern "system" fn SetPenMask<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penmask: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPenMask(::core::mem::transmute_copy(&penmask))
.into()
}
unsafe extern "system" fn PenPressure<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penpressure: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PenPressure(::core::mem::transmute_copy(&penpressure))
.into()
}
unsafe extern "system" fn SetPenPressure<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penpressure: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPenPressure(::core::mem::transmute_copy(&penpressure))
.into()
}
unsafe extern "system" fn PenRotation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penrotation: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PenRotation(::core::mem::transmute_copy(&penrotation))
.into()
}
unsafe extern "system" fn SetPenRotation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
penrotation: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPenRotation(::core::mem::transmute_copy(&penrotation))
.into()
}
unsafe extern "system" fn PenTiltX<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pentiltx: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PenTiltX(::core::mem::transmute_copy(&pentiltx)).into()
}
unsafe extern "system" fn SetPenTiltX<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pentiltx: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPenTiltX(::core::mem::transmute_copy(&pentiltx))
.into()
}
unsafe extern "system" fn PenTiltY<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pentilty: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PenTiltY(::core::mem::transmute_copy(&pentilty)).into()
}
unsafe extern "system" fn SetPenTiltY<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pentilty: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPenTiltY(::core::mem::transmute_copy(&pentilty))
.into()
}
unsafe extern "system" fn TouchFlags<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchflags: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TouchFlags(::core::mem::transmute_copy(&touchflags))
.into()
}
unsafe extern "system" fn SetTouchFlags<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchflags: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTouchFlags(::core::mem::transmute_copy(&touchflags))
.into()
}
unsafe extern "system" fn TouchMask<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchmask: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TouchMask(::core::mem::transmute_copy(&touchmask))
.into()
}
unsafe extern "system" fn SetTouchMask<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchmask: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTouchMask(::core::mem::transmute_copy(&touchmask))
.into()
}
unsafe extern "system" fn TouchContact<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchcontact: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TouchContact(::core::mem::transmute_copy(&touchcontact))
.into()
}
unsafe extern "system" fn SetTouchContact<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchcontact: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTouchContact(::core::mem::transmute(&touchcontact))
.into()
}
unsafe extern "system" fn TouchContactRaw<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchcontactraw: *mut ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TouchContactRaw(::core::mem::transmute_copy(&touchcontactraw))
.into()
}
unsafe extern "system" fn SetTouchContactRaw<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchcontactraw: ::windows::Win32::Foundation::RECT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTouchContactRaw(::core::mem::transmute(&touchcontactraw))
.into()
}
unsafe extern "system" fn TouchOrientation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchorientation: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TouchOrientation(::core::mem::transmute_copy(&touchorientation))
.into()
}
unsafe extern "system" fn SetTouchOrientation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchorientation: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTouchOrientation(::core::mem::transmute_copy(&touchorientation))
.into()
}
unsafe extern "system" fn TouchPressure<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchpressure: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TouchPressure(::core::mem::transmute_copy(&touchpressure))
.into()
}
unsafe extern "system" fn SetTouchPressure<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PointerInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
touchpressure: u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetTouchPressure(::core::mem::transmute_copy(&touchpressure))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
PointerKind: PointerKind::<Identity, Impl, OFFSET>,
SetPointerKind: SetPointerKind::<Identity, Impl, OFFSET>,
PointerId: PointerId::<Identity, Impl, OFFSET>,
SetPointerId: SetPointerId::<Identity, Impl, OFFSET>,
FrameId: FrameId::<Identity, Impl, OFFSET>,
SetFrameId: SetFrameId::<Identity, Impl, OFFSET>,
PointerFlags: PointerFlags::<Identity, Impl, OFFSET>,
SetPointerFlags: SetPointerFlags::<Identity, Impl, OFFSET>,
PointerDeviceRect: PointerDeviceRect::<Identity, Impl, OFFSET>,
SetPointerDeviceRect: SetPointerDeviceRect::<Identity, Impl, OFFSET>,
DisplayRect: DisplayRect::<Identity, Impl, OFFSET>,
SetDisplayRect: SetDisplayRect::<Identity, Impl, OFFSET>,
PixelLocation: PixelLocation::<Identity, Impl, OFFSET>,
SetPixelLocation: SetPixelLocation::<Identity, Impl, OFFSET>,
HimetricLocation: HimetricLocation::<Identity, Impl, OFFSET>,
SetHimetricLocation: SetHimetricLocation::<Identity, Impl, OFFSET>,
PixelLocationRaw: PixelLocationRaw::<Identity, Impl, OFFSET>,
SetPixelLocationRaw: SetPixelLocationRaw::<Identity, Impl, OFFSET>,
HimetricLocationRaw: HimetricLocationRaw::<Identity, Impl, OFFSET>,
SetHimetricLocationRaw: SetHimetricLocationRaw::<Identity, Impl, OFFSET>,
Time: Time::<Identity, Impl, OFFSET>,
SetTime: SetTime::<Identity, Impl, OFFSET>,
HistoryCount: HistoryCount::<Identity, Impl, OFFSET>,
SetHistoryCount: SetHistoryCount::<Identity, Impl, OFFSET>,
InputData: InputData::<Identity, Impl, OFFSET>,
SetInputData: SetInputData::<Identity, Impl, OFFSET>,
KeyStates: KeyStates::<Identity, Impl, OFFSET>,
SetKeyStates: SetKeyStates::<Identity, Impl, OFFSET>,
PerformanceCount: PerformanceCount::<Identity, Impl, OFFSET>,
SetPerformanceCount: SetPerformanceCount::<Identity, Impl, OFFSET>,
ButtonChangeKind: ButtonChangeKind::<Identity, Impl, OFFSET>,
SetButtonChangeKind: SetButtonChangeKind::<Identity, Impl, OFFSET>,
PenFlags: PenFlags::<Identity, Impl, OFFSET>,
SetPenFlags: SetPenFlags::<Identity, Impl, OFFSET>,
PenMask: PenMask::<Identity, Impl, OFFSET>,
SetPenMask: SetPenMask::<Identity, Impl, OFFSET>,
PenPressure: PenPressure::<Identity, Impl, OFFSET>,
SetPenPressure: SetPenPressure::<Identity, Impl, OFFSET>,
PenRotation: PenRotation::<Identity, Impl, OFFSET>,
SetPenRotation: SetPenRotation::<Identity, Impl, OFFSET>,
PenTiltX: PenTiltX::<Identity, Impl, OFFSET>,
SetPenTiltX: SetPenTiltX::<Identity, Impl, OFFSET>,
PenTiltY: PenTiltY::<Identity, Impl, OFFSET>,
SetPenTiltY: SetPenTiltY::<Identity, Impl, OFFSET>,
TouchFlags: TouchFlags::<Identity, Impl, OFFSET>,
SetTouchFlags: SetTouchFlags::<Identity, Impl, OFFSET>,
TouchMask: TouchMask::<Identity, Impl, OFFSET>,
SetTouchMask: SetTouchMask::<Identity, Impl, OFFSET>,
TouchContact: TouchContact::<Identity, Impl, OFFSET>,
SetTouchContact: SetTouchContact::<Identity, Impl, OFFSET>,
TouchContactRaw: TouchContactRaw::<Identity, Impl, OFFSET>,
SetTouchContactRaw: SetTouchContactRaw::<Identity, Impl, OFFSET>,
TouchOrientation: TouchOrientation::<Identity, Impl, OFFSET>,
SetTouchOrientation: SetTouchOrientation::<Identity, Impl, OFFSET>,
TouchPressure: TouchPressure::<Identity, Impl, OFFSET>,
SetTouchPressure: SetTouchPressure::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PointerInfo as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PrintCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
printstatus: COREWEBVIEW2_PRINT_STATUS,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PrintCompletedHandler {}
impl ICoreWebView2PrintCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PrintCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
printstatus: COREWEBVIEW2_PRINT_STATUS,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute_copy(&printstatus),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PrintCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PrintSettings_Impl: Sized {
fn Orientation(
&self,
orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::Result<()>;
fn SetOrientation(
&self,
orientation: COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::Result<()>;
fn ScaleFactor(&self, scalefactor: *mut f64) -> ::windows::core::Result<()>;
fn SetScaleFactor(&self, scalefactor: f64) -> ::windows::core::Result<()>;
fn PageWidth(&self, pagewidth: *mut f64) -> ::windows::core::Result<()>;
fn SetPageWidth(&self, pagewidth: f64) -> ::windows::core::Result<()>;
fn PageHeight(&self, pageheight: *mut f64) -> ::windows::core::Result<()>;
fn SetPageHeight(&self, pageheight: f64) -> ::windows::core::Result<()>;
fn MarginTop(&self, margintop: *mut f64) -> ::windows::core::Result<()>;
fn SetMarginTop(&self, margintop: f64) -> ::windows::core::Result<()>;
fn MarginBottom(&self, marginbottom: *mut f64) -> ::windows::core::Result<()>;
fn SetMarginBottom(&self, marginbottom: f64) -> ::windows::core::Result<()>;
fn MarginLeft(&self, marginleft: *mut f64) -> ::windows::core::Result<()>;
fn SetMarginLeft(&self, marginleft: f64) -> ::windows::core::Result<()>;
fn MarginRight(&self, marginright: *mut f64) -> ::windows::core::Result<()>;
fn SetMarginRight(&self, marginright: f64) -> ::windows::core::Result<()>;
fn ShouldPrintBackgrounds(
&self,
shouldprintbackgrounds: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetShouldPrintBackgrounds(
&self,
shouldprintbackgrounds: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn ShouldPrintSelectionOnly(
&self,
shouldprintselectiononly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetShouldPrintSelectionOnly(
&self,
shouldprintselectiononly: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn ShouldPrintHeaderAndFooter(
&self,
shouldprintheaderandfooter: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetShouldPrintHeaderAndFooter(
&self,
shouldprintheaderandfooter: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn HeaderTitle(&self, headertitle: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetHeaderTitle(&self, headertitle: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn FooterUri(&self, footeruri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetFooterUri(&self, footeruri: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PrintSettings {}
impl ICoreWebView2PrintSettings_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PrintSettings_Vtbl {
unsafe extern "system" fn Orientation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Orientation(::core::mem::transmute_copy(&orientation))
.into()
}
unsafe extern "system" fn SetOrientation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
orientation: COREWEBVIEW2_PRINT_ORIENTATION,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetOrientation(::core::mem::transmute_copy(&orientation))
.into()
}
unsafe extern "system" fn ScaleFactor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
scalefactor: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ScaleFactor(::core::mem::transmute_copy(&scalefactor))
.into()
}
unsafe extern "system" fn SetScaleFactor<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
scalefactor: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetScaleFactor(::core::mem::transmute_copy(&scalefactor))
.into()
}
unsafe extern "system" fn PageWidth<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pagewidth: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PageWidth(::core::mem::transmute_copy(&pagewidth))
.into()
}
unsafe extern "system" fn SetPageWidth<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pagewidth: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPageWidth(::core::mem::transmute_copy(&pagewidth))
.into()
}
unsafe extern "system" fn PageHeight<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pageheight: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PageHeight(::core::mem::transmute_copy(&pageheight))
.into()
}
unsafe extern "system" fn SetPageHeight<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
pageheight: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPageHeight(::core::mem::transmute_copy(&pageheight))
.into()
}
unsafe extern "system" fn MarginTop<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
margintop: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MarginTop(::core::mem::transmute_copy(&margintop))
.into()
}
unsafe extern "system" fn SetMarginTop<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
margintop: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMarginTop(::core::mem::transmute_copy(&margintop))
.into()
}
unsafe extern "system" fn MarginBottom<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
marginbottom: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MarginBottom(::core::mem::transmute_copy(&marginbottom))
.into()
}
unsafe extern "system" fn SetMarginBottom<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
marginbottom: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMarginBottom(::core::mem::transmute_copy(&marginbottom))
.into()
}
unsafe extern "system" fn MarginLeft<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
marginleft: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MarginLeft(::core::mem::transmute_copy(&marginleft))
.into()
}
unsafe extern "system" fn SetMarginLeft<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
marginleft: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMarginLeft(::core::mem::transmute_copy(&marginleft))
.into()
}
unsafe extern "system" fn MarginRight<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
marginright: *mut f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MarginRight(::core::mem::transmute_copy(&marginright))
.into()
}
unsafe extern "system" fn SetMarginRight<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
marginright: f64,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMarginRight(::core::mem::transmute_copy(&marginright))
.into()
}
unsafe extern "system" fn ShouldPrintBackgrounds<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
shouldprintbackgrounds: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldPrintBackgrounds(::core::mem::transmute_copy(&shouldprintbackgrounds))
.into()
}
unsafe extern "system" fn SetShouldPrintBackgrounds<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
shouldprintbackgrounds: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetShouldPrintBackgrounds(::core::mem::transmute_copy(&shouldprintbackgrounds))
.into()
}
unsafe extern "system" fn ShouldPrintSelectionOnly<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
shouldprintselectiononly: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldPrintSelectionOnly(::core::mem::transmute_copy(&shouldprintselectiononly))
.into()
}
unsafe extern "system" fn SetShouldPrintSelectionOnly<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
shouldprintselectiononly: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetShouldPrintSelectionOnly(::core::mem::transmute_copy(&shouldprintselectiononly))
.into()
}
unsafe extern "system" fn ShouldPrintHeaderAndFooter<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
shouldprintheaderandfooter: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldPrintHeaderAndFooter(::core::mem::transmute_copy(
&shouldprintheaderandfooter,
))
.into()
}
unsafe extern "system" fn SetShouldPrintHeaderAndFooter<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
shouldprintheaderandfooter: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetShouldPrintHeaderAndFooter(::core::mem::transmute_copy(
&shouldprintheaderandfooter,
))
.into()
}
unsafe extern "system" fn HeaderTitle<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
headertitle: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HeaderTitle(::core::mem::transmute_copy(&headertitle))
.into()
}
unsafe extern "system" fn SetHeaderTitle<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
headertitle: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHeaderTitle(::core::mem::transmute(&headertitle))
.into()
}
unsafe extern "system" fn FooterUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
footeruri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FooterUri(::core::mem::transmute_copy(&footeruri))
.into()
}
unsafe extern "system" fn SetFooterUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
footeruri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFooterUri(::core::mem::transmute(&footeruri)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Orientation: Orientation::<Identity, Impl, OFFSET>,
SetOrientation: SetOrientation::<Identity, Impl, OFFSET>,
ScaleFactor: ScaleFactor::<Identity, Impl, OFFSET>,
SetScaleFactor: SetScaleFactor::<Identity, Impl, OFFSET>,
PageWidth: PageWidth::<Identity, Impl, OFFSET>,
SetPageWidth: SetPageWidth::<Identity, Impl, OFFSET>,
PageHeight: PageHeight::<Identity, Impl, OFFSET>,
SetPageHeight: SetPageHeight::<Identity, Impl, OFFSET>,
MarginTop: MarginTop::<Identity, Impl, OFFSET>,
SetMarginTop: SetMarginTop::<Identity, Impl, OFFSET>,
MarginBottom: MarginBottom::<Identity, Impl, OFFSET>,
SetMarginBottom: SetMarginBottom::<Identity, Impl, OFFSET>,
MarginLeft: MarginLeft::<Identity, Impl, OFFSET>,
SetMarginLeft: SetMarginLeft::<Identity, Impl, OFFSET>,
MarginRight: MarginRight::<Identity, Impl, OFFSET>,
SetMarginRight: SetMarginRight::<Identity, Impl, OFFSET>,
ShouldPrintBackgrounds: ShouldPrintBackgrounds::<Identity, Impl, OFFSET>,
SetShouldPrintBackgrounds: SetShouldPrintBackgrounds::<Identity, Impl, OFFSET>,
ShouldPrintSelectionOnly: ShouldPrintSelectionOnly::<Identity, Impl, OFFSET>,
SetShouldPrintSelectionOnly: SetShouldPrintSelectionOnly::<Identity, Impl, OFFSET>,
ShouldPrintHeaderAndFooter: ShouldPrintHeaderAndFooter::<Identity, Impl, OFFSET>,
SetShouldPrintHeaderAndFooter: SetShouldPrintHeaderAndFooter::<Identity, Impl, OFFSET>,
HeaderTitle: HeaderTitle::<Identity, Impl, OFFSET>,
SetHeaderTitle: SetHeaderTitle::<Identity, Impl, OFFSET>,
FooterUri: FooterUri::<Identity, Impl, OFFSET>,
SetFooterUri: SetFooterUri::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PrintSettings as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PrintSettings2_Impl: Sized + ICoreWebView2PrintSettings_Impl {
fn PageRanges(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetPageRanges(&self, value: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn PagesPerSide(&self, value: *mut i32) -> ::windows::core::Result<()>;
fn SetPagesPerSide(&self, value: i32) -> ::windows::core::Result<()>;
fn Copies(&self, value: *mut i32) -> ::windows::core::Result<()>;
fn SetCopies(&self, value: i32) -> ::windows::core::Result<()>;
fn Collation(&self, value: *mut COREWEBVIEW2_PRINT_COLLATION) -> ::windows::core::Result<()>;
fn SetCollation(&self, value: COREWEBVIEW2_PRINT_COLLATION) -> ::windows::core::Result<()>;
fn ColorMode(&self, value: *mut COREWEBVIEW2_PRINT_COLOR_MODE) -> ::windows::core::Result<()>;
fn SetColorMode(&self, value: COREWEBVIEW2_PRINT_COLOR_MODE) -> ::windows::core::Result<()>;
fn Duplex(&self, value: *mut COREWEBVIEW2_PRINT_DUPLEX) -> ::windows::core::Result<()>;
fn SetDuplex(&self, value: COREWEBVIEW2_PRINT_DUPLEX) -> ::windows::core::Result<()>;
fn MediaSize(&self, value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE) -> ::windows::core::Result<()>;
fn SetMediaSize(&self, value: COREWEBVIEW2_PRINT_MEDIA_SIZE) -> ::windows::core::Result<()>;
fn PrinterName(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetPrinterName(&self, value: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PrintSettings2 {}
impl ICoreWebView2PrintSettings2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PrintSettings2_Vtbl {
unsafe extern "system" fn PageRanges<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PageRanges(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetPageRanges<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPageRanges(::core::mem::transmute(&value)).into()
}
unsafe extern "system" fn PagesPerSide<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PagesPerSide(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetPagesPerSide<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPagesPerSide(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn Copies<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Copies(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetCopies<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCopies(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Collation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_COLLATION,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Collation(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetCollation<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_COLLATION,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetCollation(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn ColorMode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_COLOR_MODE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ColorMode(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetColorMode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_COLOR_MODE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetColorMode(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn Duplex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_DUPLEX,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Duplex(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetDuplex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_DUPLEX,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDuplex(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn MediaSize<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.MediaSize(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetMediaSize<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PRINT_MEDIA_SIZE,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMediaSize(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn PrinterName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PrinterName(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetPrinterName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintSettings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPrinterName(::core::mem::transmute(&value)).into()
}
Self {
base__: ICoreWebView2PrintSettings_Vtbl::new::<Identity, Impl, OFFSET>(),
PageRanges: PageRanges::<Identity, Impl, OFFSET>,
SetPageRanges: SetPageRanges::<Identity, Impl, OFFSET>,
PagesPerSide: PagesPerSide::<Identity, Impl, OFFSET>,
SetPagesPerSide: SetPagesPerSide::<Identity, Impl, OFFSET>,
Copies: Copies::<Identity, Impl, OFFSET>,
SetCopies: SetCopies::<Identity, Impl, OFFSET>,
Collation: Collation::<Identity, Impl, OFFSET>,
SetCollation: SetCollation::<Identity, Impl, OFFSET>,
ColorMode: ColorMode::<Identity, Impl, OFFSET>,
SetColorMode: SetColorMode::<Identity, Impl, OFFSET>,
Duplex: Duplex::<Identity, Impl, OFFSET>,
SetDuplex: SetDuplex::<Identity, Impl, OFFSET>,
MediaSize: MediaSize::<Identity, Impl, OFFSET>,
SetMediaSize: SetMediaSize::<Identity, Impl, OFFSET>,
PrinterName: PrinterName::<Identity, Impl, OFFSET>,
SetPrinterName: SetPrinterName::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PrintSettings2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2PrintSettings as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PrintToPdfCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
issuccessful: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PrintToPdfCompletedHandler {}
impl ICoreWebView2PrintToPdfCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintToPdfCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PrintToPdfCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintToPdfCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
issuccessful: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute_copy(&issuccessful),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PrintToPdfCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2PrintToPdfStreamCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
pdfstream: &::core::option::Option<::windows::Win32::System::Com::IStream>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2PrintToPdfStreamCompletedHandler {}
impl ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintToPdfStreamCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2PrintToPdfStreamCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
pdfstream: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&pdfstream),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2PrintToPdfStreamCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ProcessFailedEventArgs_Impl: Sized {
fn ProcessFailedKind(
&self,
processfailedkind: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ProcessFailedEventArgs {}
impl ICoreWebView2ProcessFailedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ProcessFailedEventArgs_Vtbl {
unsafe extern "system" fn ProcessFailedKind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
processfailedkind: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessFailedKind(::core::mem::transmute_copy(&processfailedkind))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ProcessFailedKind: ProcessFailedKind::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ProcessFailedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ProcessFailedEventArgs2_Impl:
Sized + ICoreWebView2ProcessFailedEventArgs_Impl
{
fn Reason(
&self,
reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
) -> ::windows::core::Result<()>;
fn ExitCode(&self, exitcode: *mut i32) -> ::windows::core::Result<()>;
fn ProcessDescription(
&self,
processdescription: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn FrameInfosForFailedProcess(
&self,
) -> ::windows::core::Result<ICoreWebView2FrameInfoCollection>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ProcessFailedEventArgs2 {}
impl ICoreWebView2ProcessFailedEventArgs2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventArgs2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ProcessFailedEventArgs2_Vtbl {
unsafe extern "system" fn Reason<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reason(::core::mem::transmute_copy(&reason)).into()
}
unsafe extern "system" fn ExitCode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
exitcode: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ExitCode(::core::mem::transmute_copy(&exitcode)).into()
}
unsafe extern "system" fn ProcessDescription<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
processdescription: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessDescription(::core::mem::transmute_copy(&processdescription))
.into()
}
unsafe extern "system" fn FrameInfosForFailedProcess<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventArgs2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
frames: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.FrameInfosForFailedProcess() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(frames, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2ProcessFailedEventArgs_Vtbl::new::<Identity, Impl, OFFSET>(),
Reason: Reason::<Identity, Impl, OFFSET>,
ExitCode: ExitCode::<Identity, Impl, OFFSET>,
ProcessDescription: ProcessDescription::<Identity, Impl, OFFSET>,
FrameInfosForFailedProcess: FrameInfosForFailedProcess::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ProcessFailedEventArgs2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2ProcessFailedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ProcessFailedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2ProcessFailedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ProcessFailedEventHandler {}
impl ICoreWebView2ProcessFailedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ProcessFailedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessFailedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ProcessFailedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ProcessInfo_Impl: Sized {
fn ProcessId(&self, value: *mut i32) -> ::windows::core::Result<()>;
fn Kind(&self, kind: *mut COREWEBVIEW2_PROCESS_KIND) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ProcessInfo {}
impl ICoreWebView2ProcessInfo_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfo_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ProcessInfo_Vtbl {
unsafe extern "system" fn ProcessId<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProcessId(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Kind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfo_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
kind: *mut COREWEBVIEW2_PROCESS_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Kind(::core::mem::transmute_copy(&kind)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ProcessId: ProcessId::<Identity, Impl, OFFSET>,
Kind: Kind::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ProcessInfo as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ProcessInfoCollection_Impl: Sized {
fn Count(&self, count: *mut u32) -> ::windows::core::Result<()>;
fn GetValueAtIndex(&self, index: u32) -> ::windows::core::Result<ICoreWebView2ProcessInfo>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ProcessInfoCollection {}
impl ICoreWebView2ProcessInfoCollection_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfoCollection_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ProcessInfoCollection_Vtbl {
unsafe extern "system" fn Count<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfoCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
count: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Count(::core::mem::transmute_copy(&count)).into()
}
unsafe extern "system" fn GetValueAtIndex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfoCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
index: u32,
processinfo: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetValueAtIndex(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(processinfo, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
GetValueAtIndex: GetValueAtIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ProcessInfoCollection as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ProcessInfosChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Environment>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ProcessInfosChangedEventHandler {}
impl ICoreWebView2ProcessInfosChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfosChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ProcessInfosChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ProcessInfosChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ProcessInfosChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Profile_Impl: Sized {
fn ProfileName(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn IsInPrivateModeEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn ProfilePath(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn DefaultDownloadFolderPath(
&self,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn SetDefaultDownloadFolderPath(
&self,
value: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
fn PreferredColorScheme(
&self,
value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::Result<()>;
fn SetPreferredColorScheme(
&self,
value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Profile {}
impl ICoreWebView2Profile_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Profile_Vtbl {
unsafe extern "system" fn ProfileName<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProfileName(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn IsInPrivateModeEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsInPrivateModeEnabled(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn ProfilePath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ProfilePath(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn DefaultDownloadFolderPath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DefaultDownloadFolderPath(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetDefaultDownloadFolderPath<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDefaultDownloadFolderPath(::core::mem::transmute(&value))
.into()
}
unsafe extern "system" fn PreferredColorScheme<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PreferredColorScheme(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetPreferredColorScheme<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPreferredColorScheme(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ProfileName: ProfileName::<Identity, Impl, OFFSET>,
IsInPrivateModeEnabled: IsInPrivateModeEnabled::<Identity, Impl, OFFSET>,
ProfilePath: ProfilePath::<Identity, Impl, OFFSET>,
DefaultDownloadFolderPath: DefaultDownloadFolderPath::<Identity, Impl, OFFSET>,
SetDefaultDownloadFolderPath: SetDefaultDownloadFolderPath::<Identity, Impl, OFFSET>,
PreferredColorScheme: PreferredColorScheme::<Identity, Impl, OFFSET>,
SetPreferredColorScheme: SetPreferredColorScheme::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Profile as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Profile2_Impl: Sized + ICoreWebView2Profile_Impl {
fn ClearBrowsingData(
&self,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
handler: &::core::option::Option<ICoreWebView2ClearBrowsingDataCompletedHandler>,
) -> ::windows::core::Result<()>;
fn ClearBrowsingDataInTimeRange(
&self,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
starttime: f64,
endtime: f64,
handler: &::core::option::Option<ICoreWebView2ClearBrowsingDataCompletedHandler>,
) -> ::windows::core::Result<()>;
fn ClearBrowsingDataAll(
&self,
handler: &::core::option::Option<ICoreWebView2ClearBrowsingDataCompletedHandler>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Profile2 {}
impl ICoreWebView2Profile2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Profile2_Vtbl {
unsafe extern "system" fn ClearBrowsingData<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearBrowsingData(
::core::mem::transmute_copy(&datakinds),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn ClearBrowsingDataInTimeRange<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
starttime: f64,
endtime: f64,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearBrowsingDataInTimeRange(
::core::mem::transmute_copy(&datakinds),
::core::mem::transmute_copy(&starttime),
::core::mem::transmute_copy(&endtime),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn ClearBrowsingDataAll<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Profile2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearBrowsingDataAll(::core::mem::transmute(&handler))
.into()
}
Self {
base__: ICoreWebView2Profile_Vtbl::new::<Identity, Impl, OFFSET>(),
ClearBrowsingData: ClearBrowsingData::<Identity, Impl, OFFSET>,
ClearBrowsingDataInTimeRange: ClearBrowsingDataInTimeRange::<Identity, Impl, OFFSET>,
ClearBrowsingDataAll: ClearBrowsingDataAll::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Profile2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Profile as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2RasterizationScaleChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Controller>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2RasterizationScaleChangedEventHandler {}
impl ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2RasterizationScaleChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2RasterizationScaleChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2RasterizationScaleChangedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2ScriptDialogOpeningEventArgs_Impl: Sized {
fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Kind(&self, kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND) -> ::windows::core::Result<()>;
fn Message(&self, message: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn Accept(&self) -> ::windows::core::Result<()>;
fn DefaultText(&self, defaulttext: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn ResultText(&self, resulttext: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetResultText(&self, resulttext: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ScriptDialogOpeningEventArgs {}
impl ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl {
unsafe extern "system" fn Uri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Uri(::core::mem::transmute_copy(&uri)).into()
}
unsafe extern "system" fn Kind<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Kind(::core::mem::transmute_copy(&kind)).into()
}
unsafe extern "system" fn Message<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
message: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Message(::core::mem::transmute_copy(&message)).into()
}
unsafe extern "system" fn Accept<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Accept().into()
}
unsafe extern "system" fn DefaultText<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
defaulttext: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DefaultText(::core::mem::transmute_copy(&defaulttext))
.into()
}
unsafe extern "system" fn ResultText<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
resulttext: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResultText(::core::mem::transmute_copy(&resulttext))
.into()
}
unsafe extern "system" fn SetResultText<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
resulttext: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetResultText(::core::mem::transmute(&resulttext))
.into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Uri: Uri::<Identity, Impl, OFFSET>,
Kind: Kind::<Identity, Impl, OFFSET>,
Message: Message::<Identity, Impl, OFFSET>,
Accept: Accept::<Identity, Impl, OFFSET>,
DefaultText: DefaultText::<Identity, Impl, OFFSET>,
ResultText: ResultText::<Identity, Impl, OFFSET>,
SetResultText: SetResultText::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ScriptDialogOpeningEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ScriptDialogOpeningEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2ScriptDialogOpeningEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ScriptDialogOpeningEventHandler {}
impl ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ScriptDialogOpeningEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ScriptDialogOpeningEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl: Sized {
fn ErrorStatus(&self, value: *mut COREWEBVIEW2_WEB_ERROR_STATUS)
-> ::windows::core::Result<()>;
fn RequestUri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn ServerCertificate(&self) -> ::windows::core::Result<ICoreWebView2Certificate>;
fn Action(
&self,
value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::Result<()>;
fn SetAction(
&self,
value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ServerCertificateErrorDetectedEventArgs {}
impl ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl {
unsafe extern "system" fn ErrorStatus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ErrorStatus(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn RequestUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RequestUri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ServerCertificate<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ServerCertificate() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Action<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Action(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetAction<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAction(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ErrorStatus: ErrorStatus::<Identity, Impl, OFFSET>,
RequestUri: RequestUri::<Identity, Impl, OFFSET>,
ServerCertificate: ServerCertificate::<Identity, Impl, OFFSET>,
Action: Action::<Identity, Impl, OFFSET>,
SetAction: SetAction::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2ServerCertificateErrorDetectedEventArgs < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2ServerCertificateErrorDetectedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ServerCertificateErrorDetectedEventHandler {}
impl ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2ServerCertificateErrorDetectedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2Settings_Impl: Sized {
fn IsScriptEnabled(
&self,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsScriptEnabled(
&self,
isscriptenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsWebMessageEnabled(
&self,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsWebMessageEnabled(
&self,
iswebmessageenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn AreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetAreDefaultScriptDialogsEnabled(
&self,
aredefaultscriptdialogsenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsStatusBarEnabled(
&self,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsStatusBarEnabled(
&self,
isstatusbarenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn AreDevToolsEnabled(
&self,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetAreDevToolsEnabled(
&self,
aredevtoolsenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn AreDefaultContextMenusEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetAreDefaultContextMenusEnabled(
&self,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn AreHostObjectsAllowed(
&self,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetAreHostObjectsAllowed(
&self,
allowed: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsZoomControlEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsZoomControlEnabled(
&self,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsBuiltInErrorPageEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsBuiltInErrorPageEnabled(
&self,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Settings {}
impl ICoreWebView2Settings_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Settings_Vtbl {
unsafe extern "system" fn IsScriptEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isscriptenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsScriptEnabled(::core::mem::transmute_copy(&isscriptenabled))
.into()
}
unsafe extern "system" fn SetIsScriptEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isscriptenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsScriptEnabled(::core::mem::transmute_copy(&isscriptenabled))
.into()
}
unsafe extern "system" fn IsWebMessageEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
iswebmessageenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsWebMessageEnabled(::core::mem::transmute_copy(&iswebmessageenabled))
.into()
}
unsafe extern "system" fn SetIsWebMessageEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
iswebmessageenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsWebMessageEnabled(::core::mem::transmute_copy(&iswebmessageenabled))
.into()
}
unsafe extern "system" fn AreDefaultScriptDialogsEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
aredefaultscriptdialogsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AreDefaultScriptDialogsEnabled(::core::mem::transmute_copy(
&aredefaultscriptdialogsenabled,
))
.into()
}
unsafe extern "system" fn SetAreDefaultScriptDialogsEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
aredefaultscriptdialogsenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAreDefaultScriptDialogsEnabled(::core::mem::transmute_copy(
&aredefaultscriptdialogsenabled,
))
.into()
}
unsafe extern "system" fn IsStatusBarEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isstatusbarenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsStatusBarEnabled(::core::mem::transmute_copy(&isstatusbarenabled))
.into()
}
unsafe extern "system" fn SetIsStatusBarEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isstatusbarenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsStatusBarEnabled(::core::mem::transmute_copy(&isstatusbarenabled))
.into()
}
unsafe extern "system" fn AreDevToolsEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
aredevtoolsenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AreDevToolsEnabled(::core::mem::transmute_copy(&aredevtoolsenabled))
.into()
}
unsafe extern "system" fn SetAreDevToolsEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
aredevtoolsenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAreDevToolsEnabled(::core::mem::transmute_copy(&aredevtoolsenabled))
.into()
}
unsafe extern "system" fn AreDefaultContextMenusEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AreDefaultContextMenusEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
unsafe extern "system" fn SetAreDefaultContextMenusEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAreDefaultContextMenusEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
unsafe extern "system" fn AreHostObjectsAllowed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
allowed: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AreHostObjectsAllowed(::core::mem::transmute_copy(&allowed))
.into()
}
unsafe extern "system" fn SetAreHostObjectsAllowed<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
allowed: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAreHostObjectsAllowed(::core::mem::transmute_copy(&allowed))
.into()
}
unsafe extern "system" fn IsZoomControlEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsZoomControlEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
unsafe extern "system" fn SetIsZoomControlEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsZoomControlEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
unsafe extern "system" fn IsBuiltInErrorPageEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsBuiltInErrorPageEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
unsafe extern "system" fn SetIsBuiltInErrorPageEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsBuiltInErrorPageEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsScriptEnabled: IsScriptEnabled::<Identity, Impl, OFFSET>,
SetIsScriptEnabled: SetIsScriptEnabled::<Identity, Impl, OFFSET>,
IsWebMessageEnabled: IsWebMessageEnabled::<Identity, Impl, OFFSET>,
SetIsWebMessageEnabled: SetIsWebMessageEnabled::<Identity, Impl, OFFSET>,
AreDefaultScriptDialogsEnabled: AreDefaultScriptDialogsEnabled::<Identity, Impl, OFFSET>,
SetAreDefaultScriptDialogsEnabled: SetAreDefaultScriptDialogsEnabled::<
Identity,
Impl,
OFFSET,
>,
IsStatusBarEnabled: IsStatusBarEnabled::<Identity, Impl, OFFSET>,
SetIsStatusBarEnabled: SetIsStatusBarEnabled::<Identity, Impl, OFFSET>,
AreDevToolsEnabled: AreDevToolsEnabled::<Identity, Impl, OFFSET>,
SetAreDevToolsEnabled: SetAreDevToolsEnabled::<Identity, Impl, OFFSET>,
AreDefaultContextMenusEnabled: AreDefaultContextMenusEnabled::<Identity, Impl, OFFSET>,
SetAreDefaultContextMenusEnabled: SetAreDefaultContextMenusEnabled::<
Identity,
Impl,
OFFSET,
>,
AreHostObjectsAllowed: AreHostObjectsAllowed::<Identity, Impl, OFFSET>,
SetAreHostObjectsAllowed: SetAreHostObjectsAllowed::<Identity, Impl, OFFSET>,
IsZoomControlEnabled: IsZoomControlEnabled::<Identity, Impl, OFFSET>,
SetIsZoomControlEnabled: SetIsZoomControlEnabled::<Identity, Impl, OFFSET>,
IsBuiltInErrorPageEnabled: IsBuiltInErrorPageEnabled::<Identity, Impl, OFFSET>,
SetIsBuiltInErrorPageEnabled: SetIsBuiltInErrorPageEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Settings as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Settings2_Impl: Sized + ICoreWebView2Settings_Impl {
fn UserAgent(&self, useragent: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetUserAgent(&self, useragent: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Settings2 {}
impl ICoreWebView2Settings2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Settings2_Vtbl {
unsafe extern "system" fn UserAgent<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
useragent: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.UserAgent(::core::mem::transmute_copy(&useragent))
.into()
}
unsafe extern "system" fn SetUserAgent<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
useragent: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUserAgent(::core::mem::transmute(&useragent)).into()
}
Self {
base__: ICoreWebView2Settings_Vtbl::new::<Identity, Impl, OFFSET>(),
UserAgent: UserAgent::<Identity, Impl, OFFSET>,
SetUserAgent: SetUserAgent::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Settings2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Settings3_Impl: Sized + ICoreWebView2Settings2_Impl {
fn AreBrowserAcceleratorKeysEnabled(
&self,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetAreBrowserAcceleratorKeysEnabled(
&self,
arebrowseracceleratorkeysenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Settings3 {}
impl ICoreWebView2Settings3_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings3_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Settings3_Vtbl {
unsafe extern "system" fn AreBrowserAcceleratorKeysEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
arebrowseracceleratorkeysenabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.AreBrowserAcceleratorKeysEnabled(::core::mem::transmute_copy(
&arebrowseracceleratorkeysenabled,
))
.into()
}
unsafe extern "system" fn SetAreBrowserAcceleratorKeysEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
arebrowseracceleratorkeysenabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAreBrowserAcceleratorKeysEnabled(::core::mem::transmute_copy(
&arebrowseracceleratorkeysenabled,
))
.into()
}
Self {
base__: ICoreWebView2Settings2_Vtbl::new::<Identity, Impl, OFFSET>(),
AreBrowserAcceleratorKeysEnabled: AreBrowserAcceleratorKeysEnabled::<
Identity,
Impl,
OFFSET,
>,
SetAreBrowserAcceleratorKeysEnabled: SetAreBrowserAcceleratorKeysEnabled::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Settings3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Settings4_Impl: Sized + ICoreWebView2Settings3_Impl {
fn IsPasswordAutosaveEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsPasswordAutosaveEnabled(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn IsGeneralAutofillEnabled(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsGeneralAutofillEnabled(
&self,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Settings4 {}
impl ICoreWebView2Settings4_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings4_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Settings4_Vtbl {
unsafe extern "system" fn IsPasswordAutosaveEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsPasswordAutosaveEnabled(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetIsPasswordAutosaveEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsPasswordAutosaveEnabled(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn IsGeneralAutofillEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsGeneralAutofillEnabled(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetIsGeneralAutofillEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsGeneralAutofillEnabled(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ICoreWebView2Settings3_Vtbl::new::<Identity, Impl, OFFSET>(),
IsPasswordAutosaveEnabled: IsPasswordAutosaveEnabled::<Identity, Impl, OFFSET>,
SetIsPasswordAutosaveEnabled: SetIsPasswordAutosaveEnabled::<Identity, Impl, OFFSET>,
IsGeneralAutofillEnabled: IsGeneralAutofillEnabled::<Identity, Impl, OFFSET>,
SetIsGeneralAutofillEnabled: SetIsGeneralAutofillEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Settings4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings3 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Settings5_Impl: Sized + ICoreWebView2Settings4_Impl {
fn IsPinchZoomEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsPinchZoomEnabled(
&self,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Settings5 {}
impl ICoreWebView2Settings5_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings5_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Settings5_Vtbl {
unsafe extern "system" fn IsPinchZoomEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings5_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsPinchZoomEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
unsafe extern "system" fn SetIsPinchZoomEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings5_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsPinchZoomEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
Self {
base__: ICoreWebView2Settings4_Vtbl::new::<Identity, Impl, OFFSET>(),
IsPinchZoomEnabled: IsPinchZoomEnabled::<Identity, Impl, OFFSET>,
SetIsPinchZoomEnabled: SetIsPinchZoomEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Settings5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings4 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Settings6_Impl: Sized + ICoreWebView2Settings5_Impl {
fn IsSwipeNavigationEnabled(
&self,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsSwipeNavigationEnabled(
&self,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Settings6 {}
impl ICoreWebView2Settings6_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings6_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Settings6_Vtbl {
unsafe extern "system" fn IsSwipeNavigationEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings6_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsSwipeNavigationEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
unsafe extern "system" fn SetIsSwipeNavigationEnabled<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings6_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
enabled: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsSwipeNavigationEnabled(::core::mem::transmute_copy(&enabled))
.into()
}
Self {
base__: ICoreWebView2Settings5_Vtbl::new::<Identity, Impl, OFFSET>(),
IsSwipeNavigationEnabled: IsSwipeNavigationEnabled::<Identity, Impl, OFFSET>,
SetIsSwipeNavigationEnabled: SetIsSwipeNavigationEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Settings6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings5 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2Settings7_Impl: Sized + ICoreWebView2Settings6_Impl {
fn HiddenPdfToolbarItems(
&self,
hidden_pdf_toolbar_items: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::Result<()>;
fn SetHiddenPdfToolbarItems(
&self,
hidden_pdf_toolbar_items: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2Settings7 {}
impl ICoreWebView2Settings7_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings7_Impl,
const OFFSET: isize,
>() -> ICoreWebView2Settings7_Vtbl {
unsafe extern "system" fn HiddenPdfToolbarItems<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings7_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hidden_pdf_toolbar_items: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HiddenPdfToolbarItems(::core::mem::transmute_copy(&hidden_pdf_toolbar_items))
.into()
}
unsafe extern "system" fn SetHiddenPdfToolbarItems<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2Settings7_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hidden_pdf_toolbar_items: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetHiddenPdfToolbarItems(::core::mem::transmute_copy(&hidden_pdf_toolbar_items))
.into()
}
Self {
base__: ICoreWebView2Settings6_Vtbl::new::<Identity, Impl, OFFSET>(),
HiddenPdfToolbarItems: HiddenPdfToolbarItems::<Identity, Impl, OFFSET>,
SetHiddenPdfToolbarItems: SetHiddenPdfToolbarItems::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2Settings7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2Settings6 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2SourceChangedEventArgs_Impl: Sized {
fn IsNewDocument(
&self,
isnewdocument: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2SourceChangedEventArgs {}
impl ICoreWebView2SourceChangedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2SourceChangedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2SourceChangedEventArgs_Vtbl {
unsafe extern "system" fn IsNewDocument<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2SourceChangedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
isnewdocument: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsNewDocument(::core::mem::transmute_copy(&isnewdocument))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsNewDocument: IsNewDocument::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2SourceChangedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2SourceChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2SourceChangedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2SourceChangedEventHandler {}
impl ICoreWebView2SourceChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2SourceChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2SourceChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2SourceChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2SourceChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2StateChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2DownloadOperation>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2StateChangedEventHandler {}
impl ICoreWebView2StateChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2StateChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2StateChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2StateChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2StateChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2StatusBarTextChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2StatusBarTextChangedEventHandler {}
impl ICoreWebView2StatusBarTextChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2StatusBarTextChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2StatusBarTextChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2StatusBarTextChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2StatusBarTextChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2StringCollection_Impl: Sized {
fn Count(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn GetValueAtIndex(
&self,
index: u32,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2StringCollection {}
impl ICoreWebView2StringCollection_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2StringCollection_Impl,
const OFFSET: isize,
>() -> ICoreWebView2StringCollection_Vtbl {
unsafe extern "system" fn Count<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2StringCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Count(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetValueAtIndex<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2StringCollection_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
index: u32,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetValueAtIndex(
::core::mem::transmute_copy(&index),
::core::mem::transmute_copy(&value),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
GetValueAtIndex: GetValueAtIndex::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2StringCollection as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2TrySuspendCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
issuccessful: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2TrySuspendCompletedHandler {}
impl ICoreWebView2TrySuspendCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2TrySuspendCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2TrySuspendCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2TrySuspendCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
issuccessful: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute_copy(&issuccessful),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2TrySuspendCompletedHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebMessageReceivedEventArgs_Impl: Sized {
fn Source(&self, source: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn WebMessageAsJson(
&self,
webmessageasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn TryGetWebMessageAsString(
&self,
webmessageasstring: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebMessageReceivedEventArgs {}
impl ICoreWebView2WebMessageReceivedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebMessageReceivedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebMessageReceivedEventArgs_Vtbl {
unsafe extern "system" fn Source<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebMessageReceivedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
source: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Source(::core::mem::transmute_copy(&source)).into()
}
unsafe extern "system" fn WebMessageAsJson<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebMessageReceivedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
webmessageasjson: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.WebMessageAsJson(::core::mem::transmute_copy(&webmessageasjson))
.into()
}
unsafe extern "system" fn TryGetWebMessageAsString<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebMessageReceivedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
webmessageasstring: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TryGetWebMessageAsString(::core::mem::transmute_copy(&webmessageasstring))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Source: Source::<Identity, Impl, OFFSET>,
WebMessageAsJson: WebMessageAsJson::<Identity, Impl, OFFSET>,
TryGetWebMessageAsString: TryGetWebMessageAsString::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WebMessageReceivedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebMessageReceivedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2WebMessageReceivedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebMessageReceivedEventHandler {}
impl ICoreWebView2WebMessageReceivedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebMessageReceivedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebMessageReceivedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebMessageReceivedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WebMessageReceivedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebResourceRequest_Impl: Sized {
fn Uri(&self, uri: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetUri(&self, uri: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn Method(&self, method: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn SetMethod(&self, method: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
fn Content(&self) -> ::windows::core::Result<::windows::Win32::System::Com::IStream>;
fn SetContent(
&self,
content: &::core::option::Option<::windows::Win32::System::Com::IStream>,
) -> ::windows::core::Result<()>;
fn Headers(&self) -> ::windows::core::Result<ICoreWebView2HttpRequestHeaders>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebResourceRequest {}
impl ICoreWebView2WebResourceRequest_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceRequest_Vtbl {
unsafe extern "system" fn Uri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Uri(::core::mem::transmute_copy(&uri)).into()
}
unsafe extern "system" fn SetUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
uri: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUri(::core::mem::transmute(&uri)).into()
}
unsafe extern "system" fn Method<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
method: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Method(::core::mem::transmute_copy(&method)).into()
}
unsafe extern "system" fn SetMethod<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
method: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetMethod(::core::mem::transmute(&method)).into()
}
unsafe extern "system" fn Content<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
content: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Content() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(content, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetContent<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
content: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetContent(::core::mem::transmute(&content)).into()
}
unsafe extern "system" fn Headers<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequest_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
headers: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Headers() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(headers, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Uri: Uri::<Identity, Impl, OFFSET>,
SetUri: SetUri::<Identity, Impl, OFFSET>,
Method: Method::<Identity, Impl, OFFSET>,
SetMethod: SetMethod::<Identity, Impl, OFFSET>,
Content: Content::<Identity, Impl, OFFSET>,
SetContent: SetContent::<Identity, Impl, OFFSET>,
Headers: Headers::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WebResourceRequest as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebResourceRequestedEventArgs_Impl: Sized {
fn Request(&self) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>;
fn Response(&self) -> ::windows::core::Result<ICoreWebView2WebResourceResponse>;
fn SetResponse(
&self,
response: &::core::option::Option<ICoreWebView2WebResourceResponse>,
) -> ::windows::core::Result<()>;
fn GetDeferral(&self) -> ::windows::core::Result<ICoreWebView2Deferral>;
fn ResourceContext(
&self,
context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebResourceRequestedEventArgs {}
impl ICoreWebView2WebResourceRequestedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceRequestedEventArgs_Vtbl {
unsafe extern "system" fn Request<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
request: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Request() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(request, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Response<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Response() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(response, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetResponse<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
response: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetResponse(::core::mem::transmute(&response)).into()
}
unsafe extern "system" fn GetDeferral<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
deferral: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetDeferral() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(deferral, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ResourceContext<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ResourceContext(::core::mem::transmute_copy(&context))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Request: Request::<Identity, Impl, OFFSET>,
Response: Response::<Identity, Impl, OFFSET>,
SetResponse: SetResponse::<Identity, Impl, OFFSET>,
GetDeferral: GetDeferral::<Identity, Impl, OFFSET>,
ResourceContext: ResourceContext::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WebResourceRequestedEventArgs as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebResourceRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2WebResourceRequestedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebResourceRequestedEventHandler {}
impl ICoreWebView2WebResourceRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WebResourceRequestedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebResourceResponse_Impl: Sized {
fn Content(&self) -> ::windows::core::Result<::windows::Win32::System::Com::IStream>;
fn SetContent(
&self,
content: &::core::option::Option<::windows::Win32::System::Com::IStream>,
) -> ::windows::core::Result<()>;
fn Headers(&self) -> ::windows::core::Result<ICoreWebView2HttpResponseHeaders>;
fn StatusCode(&self, statuscode: *mut i32) -> ::windows::core::Result<()>;
fn SetStatusCode(&self, statuscode: i32) -> ::windows::core::Result<()>;
fn ReasonPhrase(
&self,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn SetReasonPhrase(
&self,
reasonphrase: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebResourceResponse {}
impl ICoreWebView2WebResourceResponse_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceResponse_Vtbl {
unsafe extern "system" fn Content<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
content: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Content() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(content, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetContent<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
content: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetContent(::core::mem::transmute(&content)).into()
}
unsafe extern "system" fn Headers<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
headers: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Headers() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(headers, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn StatusCode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
statuscode: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StatusCode(::core::mem::transmute_copy(&statuscode))
.into()
}
unsafe extern "system" fn SetStatusCode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
statuscode: i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetStatusCode(::core::mem::transmute_copy(&statuscode))
.into()
}
unsafe extern "system" fn ReasonPhrase<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ReasonPhrase(::core::mem::transmute_copy(&reasonphrase))
.into()
}
unsafe extern "system" fn SetReasonPhrase<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponse_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
reasonphrase: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetReasonPhrase(::core::mem::transmute(&reasonphrase))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Content: Content::<Identity, Impl, OFFSET>,
SetContent: SetContent::<Identity, Impl, OFFSET>,
Headers: Headers::<Identity, Impl, OFFSET>,
StatusCode: StatusCode::<Identity, Impl, OFFSET>,
SetStatusCode: SetStatusCode::<Identity, Impl, OFFSET>,
ReasonPhrase: ReasonPhrase::<Identity, Impl, OFFSET>,
SetReasonPhrase: SetReasonPhrase::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WebResourceResponse as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebResourceResponseReceivedEventArgs_Impl: Sized {
fn Request(&self) -> ::windows::core::Result<ICoreWebView2WebResourceRequest>;
fn Response(&self) -> ::windows::core::Result<ICoreWebView2WebResourceResponseView>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebResourceResponseReceivedEventArgs {}
impl ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl {
unsafe extern "system" fn Request<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
request: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Request() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(request, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Response<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
response: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Response() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(response, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Request: Request::<Identity, Impl, OFFSET>,
Response: Response::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2WebResourceResponseReceivedEventArgs < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2WebResourceResponseReceivedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<ICoreWebView2WebResourceResponseReceivedEventArgs>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebResourceResponseReceivedEventHandler {}
impl ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseReceivedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseReceivedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2WebResourceResponseReceivedEventHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2WebResourceResponseView_Impl: Sized {
fn Headers(&self) -> ::windows::core::Result<ICoreWebView2HttpResponseHeaders>;
fn StatusCode(&self, statuscode: *mut i32) -> ::windows::core::Result<()>;
fn ReasonPhrase(
&self,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::Result<()>;
fn GetContent(
&self,
handler: &::core::option::Option<
ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WebResourceResponseView {}
impl ICoreWebView2WebResourceResponseView_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseView_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceResponseView_Vtbl {
unsafe extern "system" fn Headers<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseView_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
headers: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Headers() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(headers, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn StatusCode<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseView_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
statuscode: *mut i32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StatusCode(::core::mem::transmute_copy(&statuscode))
.into()
}
unsafe extern "system" fn ReasonPhrase<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseView_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
reasonphrase: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ReasonPhrase(::core::mem::transmute_copy(&reasonphrase))
.into()
}
unsafe extern "system" fn GetContent<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseView_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetContent(::core::mem::transmute(&handler)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Headers: Headers::<Identity, Impl, OFFSET>,
StatusCode: StatusCode::<Identity, Impl, OFFSET>,
ReasonPhrase: ReasonPhrase::<Identity, Impl, OFFSET>,
GetContent: GetContent::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WebResourceResponseView as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl: Sized {
fn Invoke(
&self,
errorcode: ::windows::core::HRESULT,
content: &::core::option::Option<::windows::Win32::System::Com::IStream>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName
for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler
{
}
impl ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
errorcode: ::windows::core::HRESULT,
content: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute_copy(&errorcode),
::core::mem::transmute(&content),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == & < ICoreWebView2WebResourceResponseViewGetContentCompletedHandler < > as::windows::core::Interface >::IID
}
}
pub trait ICoreWebView2WindowCloseRequestedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WindowCloseRequestedEventHandler {}
impl ICoreWebView2WindowCloseRequestedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowCloseRequestedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WindowCloseRequestedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowCloseRequestedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WindowCloseRequestedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2WindowFeatures_Impl: Sized {
fn HasPosition(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn HasSize(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn Left(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn Top(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn Height(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn Width(&self, value: *mut u32) -> ::windows::core::Result<()>;
fn ShouldDisplayMenuBar(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn ShouldDisplayStatus(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn ShouldDisplayToolbar(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn ShouldDisplayScrollBars(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2WindowFeatures {}
impl ICoreWebView2WindowFeatures_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>() -> ICoreWebView2WindowFeatures_Vtbl {
unsafe extern "system" fn HasPosition<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasPosition(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn HasSize<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.HasSize(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Left<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Left(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Top<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Top(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Height<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Height(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn Width<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut u32,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Width(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn ShouldDisplayMenuBar<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldDisplayMenuBar(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn ShouldDisplayStatus<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldDisplayStatus(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn ShouldDisplayToolbar<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldDisplayToolbar(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn ShouldDisplayScrollBars<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2WindowFeatures_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShouldDisplayScrollBars(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
HasPosition: HasPosition::<Identity, Impl, OFFSET>,
HasSize: HasSize::<Identity, Impl, OFFSET>,
Left: Left::<Identity, Impl, OFFSET>,
Top: Top::<Identity, Impl, OFFSET>,
Height: Height::<Identity, Impl, OFFSET>,
Width: Width::<Identity, Impl, OFFSET>,
ShouldDisplayMenuBar: ShouldDisplayMenuBar::<Identity, Impl, OFFSET>,
ShouldDisplayStatus: ShouldDisplayStatus::<Identity, Impl, OFFSET>,
ShouldDisplayToolbar: ShouldDisplayToolbar::<Identity, Impl, OFFSET>,
ShouldDisplayScrollBars: ShouldDisplayScrollBars::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2WindowFeatures as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2ZoomFactorChangedEventHandler_Impl: Sized {
fn Invoke(
&self,
sender: &::core::option::Option<ICoreWebView2Controller>,
args: &::core::option::Option<::windows::core::IUnknown>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2ZoomFactorChangedEventHandler {}
impl ICoreWebView2ZoomFactorChangedEventHandler_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ZoomFactorChangedEventHandler_Impl,
const OFFSET: isize,
>() -> ICoreWebView2ZoomFactorChangedEventHandler_Vtbl {
unsafe extern "system" fn Invoke<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2ZoomFactorChangedEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sender: *mut ::core::ffi::c_void,
args: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Invoke(
::core::mem::transmute(&sender),
::core::mem::transmute(&args),
)
.into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2ZoomFactorChangedEventHandler as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_10_Impl: Sized + ICoreWebView2_9_Impl {
fn add_BasicAuthenticationRequested(
&self,
eventhandler: &::core::option::Option<
ICoreWebView2BasicAuthenticationRequestedEventHandler,
>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_BasicAuthenticationRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_10 {}
impl ICoreWebView2_10_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_10_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_10_Vtbl {
unsafe extern "system" fn add_BasicAuthenticationRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_10_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_BasicAuthenticationRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_BasicAuthenticationRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_10_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_BasicAuthenticationRequested(::core::mem::transmute(&token))
.into()
}
Self {
base__: ICoreWebView2_9_Vtbl::new::<Identity, Impl, OFFSET>(),
add_BasicAuthenticationRequested: add_BasicAuthenticationRequested::<
Identity,
Impl,
OFFSET,
>,
remove_BasicAuthenticationRequested: remove_BasicAuthenticationRequested::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_10 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_11_Impl: Sized + ICoreWebView2_10_Impl {
fn CallDevToolsProtocolMethodForSession(
&self,
sessionid: &::windows::core::PCWSTR,
methodname: &::windows::core::PCWSTR,
parametersasjson: &::windows::core::PCWSTR,
handler: &::core::option::Option<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
) -> ::windows::core::Result<()>;
fn add_ContextMenuRequested(
&self,
eventhandler: &::core::option::Option<ICoreWebView2ContextMenuRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ContextMenuRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_11 {}
impl ICoreWebView2_11_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_11_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_11_Vtbl {
unsafe extern "system" fn CallDevToolsProtocolMethodForSession<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_11_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
sessionid: ::windows::core::PCWSTR,
methodname: ::windows::core::PCWSTR,
parametersasjson: ::windows::core::PCWSTR,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CallDevToolsProtocolMethodForSession(
::core::mem::transmute(&sessionid),
::core::mem::transmute(&methodname),
::core::mem::transmute(¶metersasjson),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn add_ContextMenuRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_11_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ContextMenuRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ContextMenuRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_11_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ContextMenuRequested(::core::mem::transmute(&token))
.into()
}
Self {
base__: ICoreWebView2_10_Vtbl::new::<Identity, Impl, OFFSET>(),
CallDevToolsProtocolMethodForSession: CallDevToolsProtocolMethodForSession::<
Identity,
Impl,
OFFSET,
>,
add_ContextMenuRequested: add_ContextMenuRequested::<Identity, Impl, OFFSET>,
remove_ContextMenuRequested: remove_ContextMenuRequested::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_11 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_10 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_12_Impl: Sized + ICoreWebView2_11_Impl {
fn add_StatusBarTextChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2StatusBarTextChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_StatusBarTextChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn StatusBarText(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_12 {}
impl ICoreWebView2_12_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_12_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_12_Vtbl {
unsafe extern "system" fn add_StatusBarTextChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_12_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_StatusBarTextChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_StatusBarTextChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_12_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_StatusBarTextChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn StatusBarText<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_12_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.StatusBarText(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ICoreWebView2_11_Vtbl::new::<Identity, Impl, OFFSET>(),
add_StatusBarTextChanged: add_StatusBarTextChanged::<Identity, Impl, OFFSET>,
remove_StatusBarTextChanged: remove_StatusBarTextChanged::<Identity, Impl, OFFSET>,
StatusBarText: StatusBarText::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_12 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_10 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_11 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_13_Impl: Sized + ICoreWebView2_12_Impl {
fn Profile(&self) -> ::windows::core::Result<ICoreWebView2Profile>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_13 {}
impl ICoreWebView2_13_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_13_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_13_Vtbl {
unsafe extern "system" fn Profile<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_13_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Profile() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(value, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2_12_Vtbl::new::<Identity, Impl, OFFSET>(),
Profile: Profile::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_13 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_10 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_11 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_12 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_14_Impl: Sized + ICoreWebView2_13_Impl {
fn add_ServerCertificateErrorDetected(
&self,
eventhandler: &::core::option::Option<
ICoreWebView2ServerCertificateErrorDetectedEventHandler,
>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ServerCertificateErrorDetected(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn ClearServerCertificateErrorActions(
&self,
handler: &::core::option::Option<
ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_14 {}
impl ICoreWebView2_14_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_14_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_14_Vtbl {
unsafe extern "system" fn add_ServerCertificateErrorDetected<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_14_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ServerCertificateErrorDetected(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ServerCertificateErrorDetected<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_14_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ServerCertificateErrorDetected(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn ClearServerCertificateErrorActions<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_14_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearServerCertificateErrorActions(::core::mem::transmute(&handler))
.into()
}
Self {
base__: ICoreWebView2_13_Vtbl::new::<Identity, Impl, OFFSET>(),
add_ServerCertificateErrorDetected: add_ServerCertificateErrorDetected::<
Identity,
Impl,
OFFSET,
>,
remove_ServerCertificateErrorDetected: remove_ServerCertificateErrorDetected::<
Identity,
Impl,
OFFSET,
>,
ClearServerCertificateErrorActions: ClearServerCertificateErrorActions::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_14 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_10 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_11 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_12 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_13 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_15_Impl: Sized + ICoreWebView2_14_Impl {
fn add_FaviconChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FaviconChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_FaviconChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn FaviconUri(&self, value: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
fn GetFavicon(
&self,
format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
completedhandler: &::core::option::Option<ICoreWebView2GetFaviconCompletedHandler>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_15 {}
impl ICoreWebView2_15_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_15_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_15_Vtbl {
unsafe extern "system" fn add_FaviconChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_15_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_FaviconChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_FaviconChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_15_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_FaviconChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn FaviconUri<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_15_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::core::PWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.FaviconUri(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn GetFavicon<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_15_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
completedhandler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.GetFavicon(
::core::mem::transmute_copy(&format),
::core::mem::transmute(&completedhandler),
)
.into()
}
Self {
base__: ICoreWebView2_14_Vtbl::new::<Identity, Impl, OFFSET>(),
add_FaviconChanged: add_FaviconChanged::<Identity, Impl, OFFSET>,
remove_FaviconChanged: remove_FaviconChanged::<Identity, Impl, OFFSET>,
FaviconUri: FaviconUri::<Identity, Impl, OFFSET>,
GetFavicon: GetFavicon::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_15 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_10 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_11 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_12 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_13 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_14 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_16_Impl: Sized + ICoreWebView2_15_Impl {
fn Print(
&self,
printsettings: &::core::option::Option<ICoreWebView2PrintSettings>,
handler: &::core::option::Option<ICoreWebView2PrintCompletedHandler>,
) -> ::windows::core::Result<()>;
fn ShowPrintUI(
&self,
printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
) -> ::windows::core::Result<()>;
fn PrintToPdfStream(
&self,
printsettings: &::core::option::Option<ICoreWebView2PrintSettings>,
handler: &::core::option::Option<ICoreWebView2PrintToPdfStreamCompletedHandler>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_16 {}
impl ICoreWebView2_16_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_16_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_16_Vtbl {
unsafe extern "system" fn Print<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_16_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
printsettings: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Print(
::core::mem::transmute(&printsettings),
::core::mem::transmute(&handler),
)
.into()
}
unsafe extern "system" fn ShowPrintUI<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_16_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ShowPrintUI(::core::mem::transmute_copy(&printdialogkind))
.into()
}
unsafe extern "system" fn PrintToPdfStream<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_16_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
printsettings: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PrintToPdfStream(
::core::mem::transmute(&printsettings),
::core::mem::transmute(&handler),
)
.into()
}
Self {
base__: ICoreWebView2_15_Vtbl::new::<Identity, Impl, OFFSET>(),
Print: Print::<Identity, Impl, OFFSET>,
ShowPrintUI: ShowPrintUI::<Identity, Impl, OFFSET>,
PrintToPdfStream: PrintToPdfStream::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_16 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_10 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_11 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_12 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_13 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_14 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_15 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_2_Impl: Sized + ICoreWebView2_Impl {
fn add_WebResourceResponseReceived(
&self,
eventhandler: &::core::option::Option<ICoreWebView2WebResourceResponseReceivedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_WebResourceResponseReceived(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn NavigateWithWebResourceRequest(
&self,
request: &::core::option::Option<ICoreWebView2WebResourceRequest>,
) -> ::windows::core::Result<()>;
fn add_DOMContentLoaded(
&self,
eventhandler: &::core::option::Option<ICoreWebView2DOMContentLoadedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_DOMContentLoaded(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn CookieManager(&self) -> ::windows::core::Result<ICoreWebView2CookieManager>;
fn Environment(&self) -> ::windows::core::Result<ICoreWebView2Environment>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_2 {}
impl ICoreWebView2_2_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_2_Vtbl {
unsafe extern "system" fn add_WebResourceResponseReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_WebResourceResponseReceived(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_WebResourceResponseReceived<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_WebResourceResponseReceived(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn NavigateWithWebResourceRequest<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
request: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NavigateWithWebResourceRequest(::core::mem::transmute(&request))
.into()
}
unsafe extern "system" fn add_DOMContentLoaded<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_DOMContentLoaded(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_DOMContentLoaded<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_DOMContentLoaded(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn CookieManager<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
cookiemanager: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CookieManager() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(cookiemanager, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Environment<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_2_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
environment: *mut *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Environment() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(environment, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ICoreWebView2_Vtbl::new::<Identity, Impl, OFFSET>(),
add_WebResourceResponseReceived: add_WebResourceResponseReceived::<
Identity,
Impl,
OFFSET,
>,
remove_WebResourceResponseReceived: remove_WebResourceResponseReceived::<
Identity,
Impl,
OFFSET,
>,
NavigateWithWebResourceRequest: NavigateWithWebResourceRequest::<Identity, Impl, OFFSET>,
add_DOMContentLoaded: add_DOMContentLoaded::<Identity, Impl, OFFSET>,
remove_DOMContentLoaded: remove_DOMContentLoaded::<Identity, Impl, OFFSET>,
CookieManager: CookieManager::<Identity, Impl, OFFSET>,
Environment: Environment::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_3_Impl: Sized + ICoreWebView2_2_Impl {
fn TrySuspend(
&self,
handler: &::core::option::Option<ICoreWebView2TrySuspendCompletedHandler>,
) -> ::windows::core::Result<()>;
fn Resume(&self) -> ::windows::core::Result<()>;
fn IsSuspended(
&self,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetVirtualHostNameToFolderMapping(
&self,
hostname: &::windows::core::PCWSTR,
folderpath: &::windows::core::PCWSTR,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::Result<()>;
fn ClearVirtualHostNameToFolderMapping(
&self,
hostname: &::windows::core::PCWSTR,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_3 {}
impl ICoreWebView2_3_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_3_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_3_Vtbl {
unsafe extern "system" fn TrySuspend<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.TrySuspend(::core::mem::transmute(&handler)).into()
}
unsafe extern "system" fn Resume<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Resume().into()
}
unsafe extern "system" fn IsSuspended<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
issuspended: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsSuspended(::core::mem::transmute_copy(&issuspended))
.into()
}
unsafe extern "system" fn SetVirtualHostNameToFolderMapping<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hostname: ::windows::core::PCWSTR,
folderpath: ::windows::core::PCWSTR,
accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetVirtualHostNameToFolderMapping(
::core::mem::transmute(&hostname),
::core::mem::transmute(&folderpath),
::core::mem::transmute_copy(&accesskind),
)
.into()
}
unsafe extern "system" fn ClearVirtualHostNameToFolderMapping<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_3_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
hostname: ::windows::core::PCWSTR,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.ClearVirtualHostNameToFolderMapping(::core::mem::transmute(&hostname))
.into()
}
Self {
base__: ICoreWebView2_2_Vtbl::new::<Identity, Impl, OFFSET>(),
TrySuspend: TrySuspend::<Identity, Impl, OFFSET>,
Resume: Resume::<Identity, Impl, OFFSET>,
IsSuspended: IsSuspended::<Identity, Impl, OFFSET>,
SetVirtualHostNameToFolderMapping: SetVirtualHostNameToFolderMapping::<
Identity,
Impl,
OFFSET,
>,
ClearVirtualHostNameToFolderMapping: ClearVirtualHostNameToFolderMapping::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_4_Impl: Sized + ICoreWebView2_3_Impl {
fn add_FrameCreated(
&self,
eventhandler: &::core::option::Option<ICoreWebView2FrameCreatedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_FrameCreated(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn add_DownloadStarting(
&self,
eventhandler: &::core::option::Option<ICoreWebView2DownloadStartingEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_DownloadStarting(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_4 {}
impl ICoreWebView2_4_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_4_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_4_Vtbl {
unsafe extern "system" fn add_FrameCreated<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_FrameCreated(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_FrameCreated<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_FrameCreated(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn add_DownloadStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_DownloadStarting(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_DownloadStarting<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_4_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_DownloadStarting(::core::mem::transmute(&token))
.into()
}
Self {
base__: ICoreWebView2_3_Vtbl::new::<Identity, Impl, OFFSET>(),
add_FrameCreated: add_FrameCreated::<Identity, Impl, OFFSET>,
remove_FrameCreated: remove_FrameCreated::<Identity, Impl, OFFSET>,
add_DownloadStarting: add_DownloadStarting::<Identity, Impl, OFFSET>,
remove_DownloadStarting: remove_DownloadStarting::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_5_Impl: Sized + ICoreWebView2_4_Impl {
fn add_ClientCertificateRequested(
&self,
eventhandler: &::core::option::Option<ICoreWebView2ClientCertificateRequestedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_ClientCertificateRequested(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_5 {}
impl ICoreWebView2_5_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_5_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_5_Vtbl {
unsafe extern "system" fn add_ClientCertificateRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_5_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_ClientCertificateRequested(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_ClientCertificateRequested<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_5_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_ClientCertificateRequested(::core::mem::transmute(&token))
.into()
}
Self {
base__: ICoreWebView2_4_Vtbl::new::<Identity, Impl, OFFSET>(),
add_ClientCertificateRequested: add_ClientCertificateRequested::<Identity, Impl, OFFSET>,
remove_ClientCertificateRequested: remove_ClientCertificateRequested::<
Identity,
Impl,
OFFSET,
>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_6_Impl: Sized + ICoreWebView2_5_Impl {
fn OpenTaskManagerWindow(&self) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_6 {}
impl ICoreWebView2_6_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_6_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_6_Vtbl {
unsafe extern "system" fn OpenTaskManagerWindow<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_6_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OpenTaskManagerWindow().into()
}
Self {
base__: ICoreWebView2_5_Vtbl::new::<Identity, Impl, OFFSET>(),
OpenTaskManagerWindow: OpenTaskManagerWindow::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_7_Impl: Sized + ICoreWebView2_6_Impl {
fn PrintToPdf(
&self,
resultfilepath: &::windows::core::PCWSTR,
printsettings: &::core::option::Option<ICoreWebView2PrintSettings>,
handler: &::core::option::Option<ICoreWebView2PrintToPdfCompletedHandler>,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_7 {}
impl ICoreWebView2_7_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_7_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_7_Vtbl {
unsafe extern "system" fn PrintToPdf<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_7_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
resultfilepath: ::windows::core::PCWSTR,
printsettings: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.PrintToPdf(
::core::mem::transmute(&resultfilepath),
::core::mem::transmute(&printsettings),
::core::mem::transmute(&handler),
)
.into()
}
Self {
base__: ICoreWebView2_6_Vtbl::new::<Identity, Impl, OFFSET>(),
PrintToPdf: PrintToPdf::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_8_Impl: Sized + ICoreWebView2_7_Impl {
fn add_IsMutedChanged(
&self,
eventhandler: &::core::option::Option<ICoreWebView2IsMutedChangedEventHandler>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_IsMutedChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn IsMuted(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn SetIsMuted(&self, value: ::windows::Win32::Foundation::BOOL) -> ::windows::core::Result<()>;
fn add_IsDocumentPlayingAudioChanged(
&self,
eventhandler: &::core::option::Option<
ICoreWebView2IsDocumentPlayingAudioChangedEventHandler,
>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_IsDocumentPlayingAudioChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn IsDocumentPlayingAudio(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_8 {}
impl ICoreWebView2_8_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_8_Vtbl {
unsafe extern "system" fn add_IsMutedChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_IsMutedChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_IsMutedChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_IsMutedChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn IsMuted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsMuted(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn SetIsMuted<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIsMuted(::core::mem::transmute_copy(&value)).into()
}
unsafe extern "system" fn add_IsDocumentPlayingAudioChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
eventhandler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_IsDocumentPlayingAudioChanged(
::core::mem::transmute(&eventhandler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_IsDocumentPlayingAudioChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_IsDocumentPlayingAudioChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn IsDocumentPlayingAudio<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_8_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsDocumentPlayingAudio(::core::mem::transmute_copy(&value))
.into()
}
Self {
base__: ICoreWebView2_7_Vtbl::new::<Identity, Impl, OFFSET>(),
add_IsMutedChanged: add_IsMutedChanged::<Identity, Impl, OFFSET>,
remove_IsMutedChanged: remove_IsMutedChanged::<Identity, Impl, OFFSET>,
IsMuted: IsMuted::<Identity, Impl, OFFSET>,
SetIsMuted: SetIsMuted::<Identity, Impl, OFFSET>,
add_IsDocumentPlayingAudioChanged: add_IsDocumentPlayingAudioChanged::<
Identity,
Impl,
OFFSET,
>,
remove_IsDocumentPlayingAudioChanged: remove_IsDocumentPlayingAudioChanged::<
Identity,
Impl,
OFFSET,
>,
IsDocumentPlayingAudio: IsDocumentPlayingAudio::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
}
}
pub trait ICoreWebView2_9_Impl: Sized + ICoreWebView2_8_Impl {
fn add_IsDefaultDownloadDialogOpenChanged(
&self,
handler: &::core::option::Option<
ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler,
>,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn remove_IsDefaultDownloadDialogOpenChanged(
&self,
token: &::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::Result<()>;
fn IsDefaultDownloadDialogOpen(
&self,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::Result<()>;
fn OpenDefaultDownloadDialog(&self) -> ::windows::core::Result<()>;
fn CloseDefaultDownloadDialog(&self) -> ::windows::core::Result<()>;
fn DefaultDownloadDialogCornerAlignment(
&self,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()>;
fn SetDefaultDownloadDialogCornerAlignment(
&self,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::Result<()>;
fn DefaultDownloadDialogMargin(
&self,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
fn SetDefaultDownloadDialogMargin(
&self,
value: &::windows::Win32::Foundation::POINT,
) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for ICoreWebView2_9 {}
impl ICoreWebView2_9_Vtbl {
pub const fn new<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>() -> ICoreWebView2_9_Vtbl {
unsafe extern "system" fn add_IsDefaultDownloadDialogOpenChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
handler: *mut ::core::ffi::c_void,
token: *mut ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.add_IsDefaultDownloadDialogOpenChanged(
::core::mem::transmute(&handler),
::core::mem::transmute_copy(&token),
)
.into()
}
unsafe extern "system" fn remove_IsDefaultDownloadDialogOpenChanged<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
token: ::windows::Win32::System::WinRT::EventRegistrationToken,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.remove_IsDefaultDownloadDialogOpenChanged(::core::mem::transmute(&token))
.into()
}
unsafe extern "system" fn IsDefaultDownloadDialogOpen<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::BOOL,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsDefaultDownloadDialogOpen(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn OpenDefaultDownloadDialog<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.OpenDefaultDownloadDialog().into()
}
unsafe extern "system" fn CloseDefaultDownloadDialog<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.CloseDefaultDownloadDialog().into()
}
unsafe extern "system" fn DefaultDownloadDialogCornerAlignment<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DefaultDownloadDialogCornerAlignment(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetDefaultDownloadDialogCornerAlignment<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDefaultDownloadDialogCornerAlignment(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn DefaultDownloadDialogMargin<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: *mut ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DefaultDownloadDialogMargin(::core::mem::transmute_copy(&value))
.into()
}
unsafe extern "system" fn SetDefaultDownloadDialogMargin<
Identity: ::windows::core::IUnknownImpl<Impl = Impl>,
Impl: ICoreWebView2_9_Impl,
const OFFSET: isize,
>(
this: *mut ::core::ffi::c_void,
value: ::windows::Win32::Foundation::POINT,
) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDefaultDownloadDialogMargin(::core::mem::transmute(&value))
.into()
}
Self {
base__: ICoreWebView2_8_Vtbl::new::<Identity, Impl, OFFSET>(),
add_IsDefaultDownloadDialogOpenChanged: add_IsDefaultDownloadDialogOpenChanged::<
Identity,
Impl,
OFFSET,
>,
remove_IsDefaultDownloadDialogOpenChanged: remove_IsDefaultDownloadDialogOpenChanged::<
Identity,
Impl,
OFFSET,
>,
IsDefaultDownloadDialogOpen: IsDefaultDownloadDialogOpen::<Identity, Impl, OFFSET>,
OpenDefaultDownloadDialog: OpenDefaultDownloadDialog::<Identity, Impl, OFFSET>,
CloseDefaultDownloadDialog: CloseDefaultDownloadDialog::<Identity, Impl, OFFSET>,
DefaultDownloadDialogCornerAlignment: DefaultDownloadDialogCornerAlignment::<
Identity,
Impl,
OFFSET,
>,
SetDefaultDownloadDialogCornerAlignment: SetDefaultDownloadDialogCornerAlignment::<
Identity,
Impl,
OFFSET,
>,
DefaultDownloadDialogMargin: DefaultDownloadDialogMargin::<Identity, Impl, OFFSET>,
SetDefaultDownloadDialogMargin: SetDefaultDownloadDialogMargin::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<ICoreWebView2_9 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_2 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_3 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_4 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_5 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_6 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_7 as ::windows::core::Interface>::IID
|| iid == &<ICoreWebView2_8 as ::windows::core::Interface>::IID
}
}