Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

build(win7): make the WebView2 loader build reproducible

luo jiyinead307dba0e0
diff --git a/.gitattributes b/.gitattributes
index 9992a8f3dc..ab7db14286 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -14,6 +14,11 @@ src-tauri/windows/nsis/**/*.nsi text eol=lf
# Keep plugin dev-host formatting checks consistent on Windows checkouts.
plugins/sdk/dev-host/** text=auto eol=lf
+# The vendored WebView2 loaders are hash-pinned build inputs. `-text` disables
+# any eol conversion on checkout, because build.rs verifies their raw SHA256.
+vendor/webview2-com-sys/**/*.lib -text -diff
+vendor/webview2-com-sys/**/*.dll -text -diff
+
# Keep tests available for review and CI without counting them as shipped code
# in GitHub's repository language breakdown.
packages/app-tests/** linguist-vendored
diff --git a/.github/scripts/assert-webview2-win7-loader.ps1 b/.github/scripts/assert-webview2-win7-loader.ps1
index d24fddecd0..3b932e717d 100644
--- a/.github/scripts/assert-webview2-win7-loader.ps1
+++ b/.github/scripts/assert-webview2-win7-loader.ps1
@@ -46,7 +46,7 @@ $summary
A loader >= 1.0.1054.31 was linked instead of the prepared one and will fail on
Server 2012 R2 with ERROR_NOT_SUPPORTED. Do not ship this binary: rebuild the
-win7 target and investigate how the registry loader patch was bypassed.
+win7 target and investigate why Cargo did not select the vendored loader.
"@
}
diff --git a/.github/scripts/ci-workflow.test.mjs b/.github/scripts/ci-workflow.test.mjs
index 0b6d4747ac..f30cc84268 100644
--- a/.github/scripts/ci-workflow.test.mjs
+++ b/.github/scripts/ci-workflow.test.mjs
@@ -89,6 +89,7 @@ test("DuckDB Windows builds persist Rust and C++ compiler results", () => {
});
test("standard Windows compatibility checks run separately with sccache", () => {
+ assert.ok(job("changes").includes("'vendor/webview2-com-sys/**'"));
const standard = job("windows-standard-check");
assert.ok(standard.includes("needs.changes.outputs.windows_win7_bundle == 'true'"));
assert.ok(standard.includes("RUSTC_WRAPPER: sccache"));
diff --git a/.github/scripts/prepare-webview2-win7-loader.ps1 b/.github/scripts/prepare-webview2-win7-loader.ps1
index 4c7df3cefb..d1342aa40a 100644
--- a/.github/scripts/prepare-webview2-win7-loader.ps1
+++ b/.github/scripts/prepare-webview2-win7-loader.ps1
@@ -4,114 +4,43 @@ param()
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
-# WebView2 static loaders newer than SDK 1.0.1054 import EventSetInformation, which does
-# not exist on Windows 7, while 1.0.1054.31 itself fails on Server 2012 R2 with
-# ERROR_NOT_SUPPORTED (0x80070032, MicrosoftEdge/WebView2Feedback#2025). SDK 1.0.902.49 is
-# the loader verified on both Windows 7 SP1 and Server 2012 R2 real machines, so the single
-# win7 + server 2012 r2 offline bundle links it instead of the webview2-com-sys default.
+# The Windows 7 / Server 2012 R2 bundle links the static loader from WebView2 SDK
+# 1.0.902.49. Loaders >= 1.0.1054.31 import EventSetInformation, which Win7 and
+# Server 2012 R2 do not provide, and fail with "Could not find the WebView2
+# Runtime". The loader lives in vendor/webview2-com-sys/win7/x64/ and Cargo links
+# it through the [patch.crates-io] entry. This script verifies the committed
+# loader and stages the loader DLL for the runtime probe. It does not modify the
+# Cargo registry, so compile caches stay correct.
$sdkVersion = "1.0.902.49"
-$sdkPackageSha256 = "b483c906b03690267108f4304d456eac0e718131ef994e69aaa5a21532b512c6"
$loaderSha256 = "aa5c26670f1b18d0fa2a56ac3f1ae30110c332a8bfbd555a7be3e548d1b0da3d"
$loaderDllSha256 = "fdf978ba706578b05967d7f0181f462147864a5aa74f36016a62cb3d3dbe6909"
-$legacy1054LoaderSha256 = "76314119685bbf4c2b2423a44e81b57beadc914c943d0e772fd6bc78c8e6b0e8"
-$webView2ComSysVersion = "0.38.2"
-$upstreamLoaderSha256 = "0659b741bde6348d4c4a6ec4ceb9af50e3d0048ed9cd3c8659bccbb61fde55ee"
$repositoryRoot = (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
-$temporaryRoot = Join-Path ([System.IO.Path]::GetTempPath()) "dbx-win7-webview2-loader-$([Guid]::NewGuid())"
-$packagePath = Join-Path $temporaryRoot "Microsoft.Web.WebView2.$sdkVersion.nupkg"
-$extractedPath = Join-Path $temporaryRoot "extracted"
-
-try {
- New-Item -ItemType Directory -Path $extractedPath -Force | Out-Null
- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
-
- $packageUrl = "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/$sdkVersion"
- Write-Host "Downloading WebView2 SDK $sdkVersion for the Windows 7 / Server 2012 R2 loader..."
- Invoke-WebRequest -Uri $packageUrl -OutFile $packagePath -UseBasicParsing
-
- $actualPackageSha256 = (Get-FileHash -LiteralPath $packagePath -Algorithm SHA256).Hash.ToLowerInvariant()
- if ($actualPackageSha256 -ne $sdkPackageSha256) {
- throw "Unexpected WebView2 SDK package SHA256: $actualPackageSha256"
- }
-
- Add-Type -AssemblyName System.IO.Compression.FileSystem
- [System.IO.Compression.ZipFile]::ExtractToDirectory($packagePath, $extractedPath)
-
- $legacyLoader = Join-Path $extractedPath "build/native/x64/WebView2LoaderStatic.lib"
- if (!(Test-Path -LiteralPath $legacyLoader -PathType Leaf)) {
- throw "WebView2 SDK $sdkVersion does not contain the x64 static loader."
- }
-
- $legacyLoaderDll = Join-Path $extractedPath "build/native/x64/WebView2Loader.dll"
- if (!(Test-Path -LiteralPath $legacyLoaderDll -PathType Leaf)) {
- throw "WebView2 SDK $sdkVersion does not contain the x64 loader DLL."
- }
-
- $actualLoaderSha256 = (Get-FileHash -LiteralPath $legacyLoader -Algorithm SHA256).Hash.ToLowerInvariant()
- if ($actualLoaderSha256 -ne $loaderSha256) {
- throw "Unexpected Windows 7 / Server 2012 R2 WebView2 loader SHA256: $actualLoaderSha256"
- }
-
- $actualLoaderDllSha256 = (Get-FileHash -LiteralPath $legacyLoaderDll -Algorithm SHA256).Hash.ToLowerInvariant()
- if ($actualLoaderDllSha256 -ne $loaderDllSha256) {
- throw "Unexpected Windows 7 / Server 2012 R2 WebView2 loader DLL SHA256: $actualLoaderDllSha256"
- }
-
- Push-Location $repositoryRoot
- try {
- & cargo fetch --locked --target x86_64-win7-windows-msvc
- if ($LASTEXITCODE -ne 0) {
- throw "cargo fetch failed while preparing the Windows 7 WebView2 loader."
- }
-
- $metadataJson = & cargo metadata --locked --format-version 1
- if ($LASTEXITCODE -ne 0) {
- throw "cargo metadata failed while locating webview2-com-sys."
- }
- }
- finally {
- Pop-Location
- }
-
- $metadata = $metadataJson | ConvertFrom-Json
- $webView2Packages = @($metadata.packages | Where-Object {
- $_.name -eq "webview2-com-sys" -and $_.version -eq $webView2ComSysVersion
- })
- if ($webView2Packages.Count -ne 1) {
- throw "Expected exactly one webview2-com-sys $webView2ComSysVersion package, found $($webView2Packages.Count)."
- }
-
- $crateRoot = Split-Path -Parent $webView2Packages[0].manifest_path
- $loaderDestination = Join-Path $crateRoot "x64/WebView2LoaderStatic.lib"
- if (!(Test-Path -LiteralPath $loaderDestination -PathType Leaf)) {
- throw "webview2-com-sys static loader does not exist: $loaderDestination"
- }
-
- $existingLoaderSha256 = (Get-FileHash -LiteralPath $loaderDestination -Algorithm SHA256).Hash.ToLowerInvariant()
- $knownLoaderHashes = @($upstreamLoaderSha256, $legacy1054LoaderSha256, $loaderSha256)
- if ($existingLoaderSha256 -notin $knownLoaderHashes) {
- throw "Refusing to replace an unknown webview2-com-sys loader SHA256: $existingLoaderSha256"
+$loaderDirectory = Join-Path $repositoryRoot "vendor/webview2-com-sys/win7/x64"
+$loaderPath = Join-Path $loaderDirectory "WebView2LoaderStatic.lib"
+$loaderDllPath = Join-Path $loaderDirectory "WebView2Loader.dll"
+
+function Assert-FileHash {
+ param(
+ [Parameter(Mandatory = $true)][string]$Path,
+ [Parameter(Mandatory = $true)][string]$Expected
+ )
+ if (!(Test-Path -LiteralPath $Path -PathType Leaf)) {
+ throw "Vendored Windows 7 WebView2 loader is missing: $Path"
+ }
+ $actual = (Get-FileHash -LiteralPath $Path -Algorithm SHA256).Hash.ToLowerInvariant()
+ if ($actual -ne $Expected) {
+ throw "Unexpected Windows 7 WebView2 loader SHA256 for ${Path}: $actual"
}
+}
- Set-ItemProperty -LiteralPath $loaderDestination -Name IsReadOnly -Value $false
- Copy-Item -LiteralPath $legacyLoader -Destination $loaderDestination -Force
-
- $installedLoaderSha256 = (Get-FileHash -LiteralPath $loaderDestination -Algorithm SHA256).Hash.ToLowerInvariant()
- if ($installedLoaderSha256 -ne $loaderSha256) {
- throw "Windows 7 WebView2 loader replacement failed: $installedLoaderSha256"
- }
+Assert-FileHash -Path $loaderPath -Expected $loaderSha256
+Assert-FileHash -Path $loaderDllPath -Expected $loaderDllSha256
- $probeDirectory = Join-Path ([System.IO.Path]::GetTempPath()) "dbx-win7-webview2-loader-probe"
- New-Item -ItemType Directory -Path $probeDirectory -Force | Out-Null
- $probeLoader = Join-Path $probeDirectory "WebView2Loader.dll"
- Copy-Item -LiteralPath $legacyLoaderDll -Destination $probeLoader -Force
+$probeDirectory = Join-Path ([System.IO.Path]::GetTempPath()) "dbx-win7-webview2-loader-probe"
+New-Item -ItemType Directory -Path $probeDirectory -Force | Out-Null
+$probeLoader = Join-Path $probeDirectory "WebView2Loader.dll"
+Copy-Item -LiteralPath $loaderDllPath -Destination $probeLoader -Force
- Write-Host "Prepared WebView2 SDK $sdkVersion static loader for Windows 7 / Server 2012 R2: $loaderDestination"
- Write-Host "Prepared WebView2 SDK $sdkVersion loader probe DLL: $probeLoader"
-}
-finally {
- if (Test-Path -LiteralPath $temporaryRoot) {
- Remove-Item -LiteralPath $temporaryRoot -Recurse -Force
- }
-}
+Write-Host "Verified vendored WebView2 SDK $sdkVersion static loader: $loaderPath"
+Write-Host "Staged WebView2 SDK $sdkVersion loader probe DLL: $probeLoader"
diff --git a/.github/scripts/webview2-win7-loader.test.mjs b/.github/scripts/webview2-win7-loader.test.mjs
new file mode 100644
index 0000000000..33b1a02657
--- /dev/null
+++ b/.github/scripts/webview2-win7-loader.test.mjs
@@ -0,0 +1,50 @@
+import assert from "node:assert/strict";
+import { createHash } from "node:crypto";
+import { readFileSync } from "node:fs";
+import test from "node:test";
+
+const root = new URL("../../", import.meta.url);
+const win7StaticPath = new URL("vendor/webview2-com-sys/win7/x64/WebView2LoaderStatic.lib", root);
+const win7DllPath = new URL("vendor/webview2-com-sys/win7/x64/WebView2Loader.dll", root);
+const win7StaticSha256 = "aa5c26670f1b18d0fa2a56ac3f1ae30110c332a8bfbd555a7be3e548d1b0da3d";
+const win7DllSha256 = "fdf978ba706578b05967d7f0181f462147864a5aa74f36016a62cb3d3dbe6909";
+
+function text(path) {
+ return readFileSync(new URL(path, root), "utf8");
+}
+
+function sha256(url) {
+ return createHash("sha256").update(readFileSync(url)).digest("hex");
+}
+
+// A replaced loader once shipped a binary that failed on Server 2012 R2. Pin the
+// committed bytes so a PR cannot swap them without an explicit hash update.
+test("the vendored Windows 7 WebView2 loader matches the pinned SHA256", () => {
+ assert.equal(sha256(win7StaticPath), win7StaticSha256);
+ assert.equal(sha256(win7DllPath), win7DllSha256);
+});
+
+test("build.rs pins the same Windows 7 loader SHA256", () => {
+ const build = text("vendor/webview2-com-sys/build.rs");
+ assert.ok(build.includes(win7StaticSha256));
+ assert.ok(build.includes(win7DllSha256));
+ assert.ok(build.includes('target == "x86_64-win7-windows-msvc"'));
+ assert.ok(build.includes("cargo:rerun-if-changed="));
+});
+
+test("upstream WebView2 loaders are vendored for standard Windows builds", () => {
+ for (const arch of ["x86", "x64", "arm64"]) {
+ const staticLib = readFileSync(new URL(`vendor/webview2-com-sys/${arch}/WebView2LoaderStatic.lib`, root));
+ assert.ok(staticLib.length > 0, arch);
+ }
+});
+
+test("Cargo uses the vendored webview2-com-sys crate", () => {
+ assert.ok(text("Cargo.toml").includes('webview2-com-sys = { path = "vendor/webview2-com-sys" }'));
+});
+
+test("the preparation script does not modify the Cargo registry", () => {
+ const script = text(".github/scripts/prepare-webview2-win7-loader.ps1");
+ assert.ok(script.includes("vendor/webview2-com-sys/win7/x64"));
+ assert.doesNotMatch(script, /cargo metadata|cargo fetch|registry\\src|Invoke-WebRequest/);
+});
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4704617ec6..90b6912e29 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -854,6 +854,7 @@ jobs:
- 'vendor/ctor/**'
- 'vendor/dirs-sys/**'
- 'vendor/pageant/**'
+ - 'vendor/webview2-com-sys/**'
- 'vendor/wry/**'
github_scripts:
- '.github/scripts/**'
diff --git a/Cargo.lock b/Cargo.lock
index 4eb624ca3f..22d5bdb7ba 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10653,9 +10653,8 @@ dependencies = [
[[package]]
name = "webview2-com-sys"
version = "0.38.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c"
dependencies = [
+ "sha2 0.10.9",
"thiserror 2.0.19",
"windows 0.61.3",
"windows-core 0.61.2",
diff --git a/Cargo.toml b/Cargo.toml
index d48456cda9..9a740f8bb9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,9 +1,15 @@
[workspace]
resolver = "2"
members = ["src-tauri", "crates/dbx-core", "crates/dbx-drivers", "crates/dbx-sql", "crates/dbx-plugin-runtime", "crates/dbx-formats", "crates/dbx-types", "crates/dbx-platform", "crates/dbx-ai-provider", "crates/dbx-web", "crates/dbx-mcp", "crates/dbx-cli", "crates/dbx-sqlite-worker"]
-exclude = ["vendor/tauri-plugin-updater", "vendor/ctor", "vendor/dirs-sys", "vendor/pageant", "vendor/rumqttc", "vendor/tiberius", "vendor/wry"]
+exclude = ["vendor/tauri-plugin-updater", "vendor/ctor", "vendor/dirs-sys", "vendor/pageant", "vendor/rumqttc", "vendor/tiberius", "vendor/webview2-com-sys", "vendor/wry"]
[patch.crates-io]
+# The offline Win7 / Server 2012 R2 bundle links the WebView2 SDK 1.0.902.49
+# loader. Loaders >= 1.0.1054.31 import EventSetInformation, which Win7 and
+# Server 2012 R2 do not provide. Keep that loader in the source tree instead of
+# swapping a file inside the cargo registry, because a registry swap bypasses
+# compile caches and once shipped a binary linked against the wrong loader.
+webview2-com-sys = { path = "vendor/webview2-com-sys" }
# Offline signed update restoration and checked Windows installer launch.
tauri-plugin-updater = { path = "vendor/tauri-plugin-updater" }
# Tauri 2.11 uses ctor 0.8, which excludes Rust's win7 vendor. This vendors
diff --git a/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts b/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts
index 26a31254d2..4a847ad38d 100644
--- a/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts
+++ b/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts
@@ -140,14 +140,12 @@ describe("Windows 7 fixed WebView2 runtime bundle", () => {
expect(releaseWorkflow).toContain("./.github/scripts/assert-webview2-win7-loader.ps1");
});
- it("keeps compile caching away from the Win7 WebView2 loader patch", () => {
+ it("keeps the existing Win7 compile-cache policy unchanged", () => {
const releaseWin7Job = releaseWorkflow.slice(releaseWorkflow.indexOf(" build-windows-7-offline:"), releaseWorkflow.indexOf(" static-browser:"));
const ciWin7Job = ciWorkflow.slice(ciWorkflow.indexOf(" windows-win7-bundle:"), ciWorkflow.indexOf(" duckdb-windows-driver:"));
- // The loader patch rewrites a file inside the cargo registry, which no
- // compile cache can see. v0.6.0 linked a >= 1.0.1054.31 loader despite the
- // patched 1.0.902.49 one being verified on disk, so neither Win7 job may
- // route rustc through sccache until the loader is vendored into the tree.
+ // The vendored loader makes compile caching safe. This change does not alter
+ // cache policy. A separate CI change can enable caching for these jobs.
expect(releaseWin7Job).not.toContain("RUSTC_WRAPPER");
expect(releaseWin7Job).not.toContain("sccache-action");
expect(ciWin7Job).not.toContain("RUSTC_WRAPPER");
diff --git a/vendor/webview2-com-sys/CHANGELOG.md b/vendor/webview2-com-sys/CHANGELOG.md
new file mode 100644
index 0000000000..8cc1983860
--- /dev/null
+++ b/vendor/webview2-com-sys/CHANGELOG.md
@@ -0,0 +1,20 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [0.38.2](https://github.com/wravery/webview2-rs/compare/webview2-com-sys-v0.38.1...webview2-com-sys-v0.38.2) - 2026-01-07
+
+### Other
+
+- update WebView2 SDK to 1.0.3650.58
+
+## [0.38.1](https://github.com/wravery/webview2-rs/compare/webview2-com-sys-v0.38.0...webview2-com-sys-v0.38.1) - 2026-01-07
+
+### Added
+
+- update bindings to 1.0.3351.48
diff --git a/vendor/webview2-com-sys/Cargo.toml b/vendor/webview2-com-sys/Cargo.toml
new file mode 100644
index 0000000000..bb5f67504c
--- /dev/null
+++ b/vendor/webview2-com-sys/Cargo.toml
@@ -0,0 +1,63 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2021"
+rust-version = "1.74"
+name = "webview2-com-sys"
+version = "0.38.2"
+build = "build.rs"
+autolib = false
+autobins = false
+autoexamples = false
+autotests = false
+autobenches = false
+description = "Bindings generated with the windows crate for the WebView2 COM APIs"
+readme = "README.md"
+keywords = [
+ "win32",
+ "webview2",
+]
+categories = ["os::windows-apis"]
+license = "MIT"
+repository = "https://github.com/wravery/webview2-rs"
+
+[package.metadata.docs.rs]
+default-target = "x86_64-pc-windows-msvc"
+targets = [
+ "i686-pc-windows-msvc",
+ "aarch64-pc-windows-msvc",
+ "x86_64-pc-windows-gnu",
+ "i686-pc-windows-gnu",
+]
+
+[lib]
+name = "webview2_com_sys"
+path = "src/lib.rs"
+
+[dependencies.windows]
+version = "0.61"
+features = [
+ "Win32_Foundation",
+ "Win32_Globalization",
+ "Win32_System_Com",
+ "Win32_System_Ole",
+ "Win32_System_Variant",
+ "Win32_System_WinRT",
+ "Win32_UI_WindowsAndMessaging",
+]
+
+[dependencies.windows-core]
+version = "0.61"
+
+[build-dependencies]
+sha2 = "0.10"
+thiserror = "2"
diff --git a/vendor/webview2-com-sys/LICENSE b/vendor/webview2-com-sys/LICENSE
new file mode 100644
index 0000000000..de9a7e660e
--- /dev/null
+++ b/vendor/webview2-com-sys/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Bill Avery
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/webview2-com-sys/README.md b/vendor/webview2-com-sys/README.md
new file mode 100644
index 0000000000..6b8a6ca818
--- /dev/null
+++ b/vendor/webview2-com-sys/README.md
@@ -0,0 +1,40 @@
+# webview2-com-sys
+
+This crate implements unsafe Rust bindings for the [WebView2](https://aka.ms/webview2) COM APIs using the [Windows](https://github.com/microsoft/windows-rs) crate.
+
+## Getting Started
+
+This crate has a friendlier wrapper in [webview2-com](https://crates.io/crates/webview2-com).
+
+## DBX vendoring
+
+DBX vendors this crate to make the Windows 7 WebView2 loader an explicit build input.
+The crate source matches upstream `webview2-com-sys` 0.38.2.
+
+`build.rs` selects the loader directory by target:
+
+- The custom `x86_64-win7-windows-msvc` target uses `win7/x64/`.
+- Every other Windows target uses the upstream `x86/`, `x64/`, or `arm64/` directory.
+
+The old loader preparation scripts replaced a file inside the cargo registry.
+That replacement was invisible to compile caches.
+A release once shipped a binary linked against the wrong loader (see the comment in `.github/workflows/release.yml`).
+The vendored copy removes that failure mode.
+
+### Loader provenance
+
+| Directory | Source | WebView2 SDK | SHA256 |
+| --- | --- | --- | --- |
+| `x86/` | crates.io `webview2-com-sys` 0.38.2 | 1.0.3650.58 | `6649ce9ca24e7a5693ee54178f42e0378004ce537d82d15354e6c9adb467bc16` (static) |
+| `x64/` | crates.io `webview2-com-sys` 0.38.2 | 1.0.3650.58 | `0659b741bde6348d4c4a6ec4ceb9af50e3d0048ed9cd3c8659bccbb61fde55ee` (static) |
+| `arm64/` | crates.io `webview2-com-sys` 0.38.2 | 1.0.3650.58 | `506ffde430bee7f91f2ce1a078effb5289b7cec3b0c7283647f0842def524ab4` (static) |
+| `win7/x64/` | NuGet `Microsoft.Web.WebView2` 1.0.902.49 | 1.0.902.49 | `aa5c26670f1b18d0fa2a56ac3f1ae30110c332a8bfbd555a7be3e548d1b0da3d` (static), `fdf978ba706578b05967d7f0181f462147864a5aa74f36016a62cb3d3dbe6909` (`WebView2Loader.dll`) |
+
+`build.rs` verifies the two pinned `win7/x64/` hashes at build time.
+`.github/scripts/prepare-webview2-win7-loader.ps1` verifies the same hashes and stages the loader DLL for the runtime probe.
+
+### License
+
+The Rust source keeps the upstream MIT license.
+The Microsoft WebView2 loader files keep the Microsoft WebView2 SDK license.
+The repository commits them to build the offline Windows 7 / Server 2012 R2 installer.
diff --git a/vendor/webview2-com-sys/arm64/WebView2Loader.dll b/vendor/webview2-com-sys/arm64/WebView2Loader.dll
new file mode 100644
index 0000000000..de13158d76
Binary files /dev/null and b/vendor/webview2-com-sys/arm64/WebView2Loader.dll differ
diff --git a/vendor/webview2-com-sys/arm64/WebView2Loader.dll.lib b/vendor/webview2-com-sys/arm64/WebView2Loader.dll.lib
new file mode 100644
index 0000000000..15b5a0ae49
Binary files /dev/null and b/vendor/webview2-com-sys/arm64/WebView2Loader.dll.lib differ
diff --git a/vendor/webview2-com-sys/arm64/WebView2LoaderStatic.lib b/vendor/webview2-com-sys/arm64/WebView2LoaderStatic.lib
new file mode 100644
index 0000000000..ca112571e7
Binary files /dev/null and b/vendor/webview2-com-sys/arm64/WebView2LoaderStatic.lib differ
diff --git a/vendor/webview2-com-sys/build.rs b/vendor/webview2-com-sys/build.rs
new file mode 100644
index 0000000000..e214f3b045
--- /dev/null
+++ b/vendor/webview2-com-sys/build.rs
@@ -0,0 +1,117 @@
+use sha2::{Digest, Sha256};
+use std::env;
+use std::fs;
+use std::path::{Path, PathBuf};
+
+// WebView2 SDK 1.0.902.49 is the last static loader verified on Windows 7 SP1
+// and Server 2012 R2. Loaders >= 1.0.1054.31 import EventSetInformation, which
+// those systems do not provide. The win7/x64/ copy is the pinned loader. Verify
+// its SHA256 before the link, because a wrong loader produces a binary that
+// fails only at runtime. See .github/scripts/prepare-webview2-win7-loader.ps1.
+const WIN7_LOADER_SHA256: &str = "aa5c26670f1b18d0fa2a56ac3f1ae30110c332a8bfbd555a7be3e548d1b0da3d";
+const WIN7_LOADER_DLL_SHA256: &str = "fdf978ba706578b05967d7f0181f462147864a5aa74f36016a62cb3d3dbe6909";
+
+fn main() -> Result<()> {
+ let arch = target_arch()?;
+ let (source, pinned) = loader_source(&arch)?;
+ let out_dir = PathBuf::from(env::var("OUT_DIR")?);
+
+ copy_loaders(&source, &out_dir, &arch, pinned)?;
+ update_rustc_flags(&out_dir, &arch)?;
+
+ println!("cargo:rustc-link-lib=advapi32");
+ Ok(())
+}
+
+#[derive(Debug, Error)]
+pub enum Error {
+ #[error(transparent)]
+ Io(#[from] std::io::Error),
+ #[error(transparent)]
+ Var(#[from] std::env::VarError),
+ #[error("{0}")]
+ Message(String),
+}
+
+pub type Result<T> = std::result::Result<T, Error>;
+
+#[macro_use]
+extern crate thiserror;
+
+fn target_arch() -> Result<String> {
+ Ok(match env::var("CARGO_CFG_TARGET_ARCH")?.as_str() {
+ "x86_64" => "x64".into(),
+ "x86" => "x86".into(),
+ "aarch64" => "arm64".into(),
+ other => return Err(Error::Message(format!("`{other}` is not supported by WebView2"))),
+ })
+}
+
+// The custom x86_64-win7-windows-msvc target links the pinned legacy loader.
+// Every other Windows target keeps the upstream loader installed by cargo.
+fn loader_source(arch: &str) -> Result<(PathBuf, bool)> {
+ let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR")?);
+ let target = env::var("TARGET")?;
+ if target == "x86_64-win7-windows-msvc" {
+ let source = manifest_dir.join("win7").join(arch);
+ if !source.is_dir() {
+ return Err(Error::Message(format!(
+ "the Windows 7 WebView2 loader is only vendored for x64, not `{arch}`"
+ )));
+ }
+ return Ok((source, true));
+ }
+ let source = manifest_dir.join(arch);
+ if !source.is_dir() {
+ return Err(Error::Message(format!("missing WebView2 loaders for `{arch}`: {source:?}")));
+ }
+ Ok((source, false))
+}
+
+fn copy_loaders(source: &Path, out_dir: &Path, arch: &str, pinned: bool) -> Result<()> {
+ const LOADER_LIBS: &[&str] = &["WebView2Loader.dll", "WebView2Loader.dll.lib", "WebView2LoaderStatic.lib"];
+
+ let destination = out_dir.join(arch);
+ fs::create_dir_all(&destination)?;
+ for lib in LOADER_LIBS {
+ let from = source.join(lib);
+ let to = destination.join(lib);
+ if pinned {
+ verify_pinned_loader(&from, lib)?;
+ }
+ fs::copy(&from, &to)?;
+ // Cargo rebuilds the crate when a loader changes, so a stale compile
+ // cache cannot serve a binary linked against a different loader.
+ println!("cargo:rerun-if-changed={}", from.display());
+ }
+ Ok(())
+}
+
+// Pin only the Windows 7 loader. The upstream loaders belong to the crate and
+// change with the WebView2 SDK version.
+fn verify_pinned_loader(path: &Path, lib: &str) -> Result<()> {
+ let expected = match lib {
+ "WebView2LoaderStatic.lib" => WIN7_LOADER_SHA256,
+ "WebView2Loader.dll" => WIN7_LOADER_DLL_SHA256,
+ _ => return Ok(()),
+ };
+
+ let mut hasher = Sha256::new();
+ hasher.update(fs::read(path)?);
+ let actual = format!("{:x}", hasher.finalize());
+ if actual != expected {
+ return Err(Error::Message(format!(
+ "Windows 7 WebView2 loader SHA256 mismatch for {path:?}: expected {expected}, got {actual}"
+ )));
+ }
+ Ok(())
+}
+
+fn update_rustc_flags(out_dir: &Path, arch: &str) -> Result<()> {
+ let lib_path = out_dir.join(arch);
+ if !lib_path.is_dir() {
+ return Err(Error::Message(format!("`{arch}` is not supported by WebView2")));
+ }
+ println!("cargo:rustc-link-search=native={}", lib_path.display());
+ Ok(())
+}
diff --git a/vendor/webview2-com-sys/src/bindings.rs b/vendor/webview2-com-sys/src/bindings.rs
new file mode 100644
index 0000000000..bc0b3e74c8
--- /dev/null
+++ b/vendor/webview2-com-sys/src/bindings.rs
@@ -0,0 +1,43991 @@
+// Bindings generated by `windows-bindgen` 0.62.1
+
+#[inline]
+pub unsafe fn CompareBrowserVersions<P0, P1>(
+ version1: P0,
+ version2: P1,
+ result: *mut i32,
+) -> windows_core::Result<()>
+where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+{
+ windows_link::link!("webview2loader" "system" fn CompareBrowserVersions(version1 : windows_core::PCWSTR, version2 : windows_core::PCWSTR, result : *mut i32) -> windows_core::HRESULT);
+ unsafe {
+ CompareBrowserVersions(version1.param().abi(), version2.param().abi(), result as _).ok()
+ }
+}
+#[inline]
+pub unsafe fn CreateCoreWebView2Environment<P0>(
+ environmentcreatedhandler: P0,
+) -> windows_core::Result<()>
+where
+ P0: windows_core::Param<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>,
+{
+ windows_link::link!("webview2loader" "system" fn CreateCoreWebView2Environment(environmentcreatedhandler : * mut core::ffi::c_void) -> windows_core::HRESULT);
+ unsafe { CreateCoreWebView2Environment(environmentcreatedhandler.param().abi()).ok() }
+}
+#[inline]
+pub unsafe fn CreateCoreWebView2EnvironmentWithOptions<P0, P1, P2, P3>(
+ browserexecutablefolder: P0,
+ userdatafolder: P1,
+ environmentoptions: P2,
+ environmentcreatedhandler: P3,
+) -> windows_core::Result<()>
+where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ P2: windows_core::Param<ICoreWebView2EnvironmentOptions>,
+ P3: windows_core::Param<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>,
+{
+ windows_link::link!("webview2loader" "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);
+ unsafe {
+ CreateCoreWebView2EnvironmentWithOptions(
+ browserexecutablefolder.param().abi(),
+ userdatafolder.param().abi(),
+ environmentoptions.param().abi(),
+ environmentcreatedhandler.param().abi(),
+ )
+ .ok()
+ }
+}
+#[inline]
+pub unsafe fn GetAvailableCoreWebView2BrowserVersionString<P0>(
+ browserexecutablefolder: P0,
+ versioninfo: *mut windows_core::PWSTR,
+) -> windows_core::Result<()>
+where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+{
+ windows_link::link!("webview2loader" "system" fn GetAvailableCoreWebView2BrowserVersionString(browserexecutablefolder : windows_core::PCWSTR, versioninfo : *mut windows_core::PWSTR) -> windows_core::HRESULT);
+ unsafe {
+ GetAvailableCoreWebView2BrowserVersionString(
+ browserexecutablefolder.param().abi(),
+ versioninfo as _,
+ )
+ .ok()
+ }
+}
+#[inline]
+pub unsafe fn GetAvailableCoreWebView2BrowserVersionStringWithOptions<P0, P1>(
+ browserexecutablefolder: P0,
+ environmentoptions: P1,
+ versioninfo: *mut windows_core::PWSTR,
+) -> windows_core::Result<()>
+where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2EnvironmentOptions>,
+{
+ windows_link::link!("webview2loader" "system" fn GetAvailableCoreWebView2BrowserVersionStringWithOptions(browserexecutablefolder : windows_core::PCWSTR, environmentoptions : * mut core::ffi::c_void, versioninfo : *mut windows_core::PWSTR) -> windows_core::HRESULT);
+ unsafe {
+ GetAvailableCoreWebView2BrowserVersionStringWithOptions(
+ browserexecutablefolder.param().abi(),
+ environmentoptions.param().abi(),
+ versioninfo as _,
+ )
+ .ok()
+ }
+}
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_BOUNDS_MODE(pub i32);
+pub const COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE: COREWEBVIEW2_BOUNDS_MODE =
+ COREWEBVIEW2_BOUNDS_MODE(1i32);
+pub const COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS: COREWEBVIEW2_BOUNDS_MODE =
+ COREWEBVIEW2_BOUNDS_MODE(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(pub i32);
+pub const COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_FAILED: COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND =
+ COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(1i32);
+pub const COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_NORMAL: COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND =
+ COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_BROWSING_DATA_KINDS(pub i32);
+impl COREWEBVIEW2_BROWSING_DATA_KINDS {
+ pub const fn contains(&self, other: Self) -> bool {
+ self.0 & other.0 == other.0
+ }
+}
+impl core::ops::BitOr for COREWEBVIEW2_BROWSING_DATA_KINDS {
+ type Output = Self;
+ fn bitor(self, other: Self) -> Self {
+ Self(self.0 | other.0)
+ }
+}
+impl core::ops::BitAnd for COREWEBVIEW2_BROWSING_DATA_KINDS {
+ type Output = Self;
+ fn bitand(self, other: Self) -> Self {
+ Self(self.0 & other.0)
+ }
+}
+impl core::ops::BitOrAssign for COREWEBVIEW2_BROWSING_DATA_KINDS {
+ fn bitor_assign(&mut self, other: Self) {
+ self.0.bitor_assign(other.0)
+ }
+}
+impl core::ops::BitAndAssign for COREWEBVIEW2_BROWSING_DATA_KINDS {
+ fn bitand_assign(&mut self, other: Self) {
+ self.0.bitand_assign(other.0)
+ }
+}
+impl core::ops::Not for COREWEBVIEW2_BROWSING_DATA_KINDS {
+ type Output = Self;
+ fn not(self) -> Self {
+ Self(self.0.not())
+ }
+}
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(32i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_PROFILE: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(16384i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(128i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(4096i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(16i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(64i32);
+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_FILE_SYSTEMS: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(1i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(1024i32);
+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_PASSWORD_AUTOSAVE: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(2048i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(32768i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(8192i32);
+pub const COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL: COREWEBVIEW2_BROWSING_DATA_KINDS =
+ COREWEBVIEW2_BROWSING_DATA_KINDS(8i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(pub i32);
+pub const COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG:
+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT = COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(1i32);
+pub const COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT =
+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_CHANNEL_SEARCH_KIND(pub i32);
+pub const COREWEBVIEW2_CHANNEL_SEARCH_KIND_LEAST_STABLE: COREWEBVIEW2_CHANNEL_SEARCH_KIND =
+ COREWEBVIEW2_CHANNEL_SEARCH_KIND(1i32);
+pub const COREWEBVIEW2_CHANNEL_SEARCH_KIND_MOST_STABLE: COREWEBVIEW2_CHANNEL_SEARCH_KIND =
+ COREWEBVIEW2_CHANNEL_SEARCH_KIND(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(pub i32);
+pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_OTHER: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
+ COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(2i32);
+pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_PIN: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
+ COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(1i32);
+pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_SMART_CARD: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
+ COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(0i32);
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, PartialEq)]
+pub struct COREWEBVIEW2_COLOR {
+ pub A: u8,
+ pub R: u8,
+ pub G: u8,
+ pub B: u8,
+}
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(pub i32);
+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_COMMAND: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
+ COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(0i32);
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(pub i32);
+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_IMAGE: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
+ COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(1i32);
+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_SELECTED_TEXT:
+ COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND = COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(2i32);
+pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_VIDEO: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
+ COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(4i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_COOKIE_SAME_SITE_KIND(pub i32);
+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_NONE: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
+ COREWEBVIEW2_COOKIE_SAME_SITE_KIND(0i32);
+pub const COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
+ COREWEBVIEW2_COOKIE_SAME_SITE_KIND(2i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(pub i32);
+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);
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(pub i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(29i32);
+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_BLOCKED_BY_POLICY:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(8i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(1i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(11i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(6i32);
+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_NO_SPACE:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(3i32);
+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_LARGE:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(5i32);
+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_TRANSIENT_ERROR:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(7i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(14i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(12i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(16i32);
+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_TIMEOUT:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(13i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE: COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON =
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(0i32);
+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_CERTIFICATE_PROBLEM:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(21i32);
+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_SERVER_FAILED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(17i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(22i32);
+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_UNAUTHORIZED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(20i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(23i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(26i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(28i32);
+pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN:
+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(27i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_DOWNLOAD_STATE(pub i32);
+pub const COREWEBVIEW2_DOWNLOAD_STATE_COMPLETED: COREWEBVIEW2_DOWNLOAD_STATE =
+ COREWEBVIEW2_DOWNLOAD_STATE(2i32);
+pub const COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED: COREWEBVIEW2_DOWNLOAD_STATE =
+ COREWEBVIEW2_DOWNLOAD_STATE(1i32);
+pub const COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS: COREWEBVIEW2_DOWNLOAD_STATE =
+ COREWEBVIEW2_DOWNLOAD_STATE(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_FAVICON_IMAGE_FORMAT(pub i32);
+pub const COREWEBVIEW2_FAVICON_IMAGE_FORMAT_JPEG: COREWEBVIEW2_FAVICON_IMAGE_FORMAT =
+ COREWEBVIEW2_FAVICON_IMAGE_FORMAT(1i32);
+pub const COREWEBVIEW2_FAVICON_IMAGE_FORMAT_PNG: COREWEBVIEW2_FAVICON_IMAGE_FORMAT =
+ COREWEBVIEW2_FAVICON_IMAGE_FORMAT(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND(pub i32);
+pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND_DIRECTORY: COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND =
+ COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND(1i32);
+pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND_FILE: COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND =
+ COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION(pub i32);
+pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION_READ_ONLY:
+ COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION = COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION(0i32);
+pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION_READ_WRITE:
+ COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION = COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION(1i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_FRAME_KIND(pub i32);
+pub const COREWEBVIEW2_FRAME_KIND_EMBED: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(3i32);
+pub const COREWEBVIEW2_FRAME_KIND_IFRAME: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(2i32);
+pub const COREWEBVIEW2_FRAME_KIND_MAIN_FRAME: COREWEBVIEW2_FRAME_KIND =
+ COREWEBVIEW2_FRAME_KIND(1i32);
+pub const COREWEBVIEW2_FRAME_KIND_OBJECT: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(4i32);
+pub const COREWEBVIEW2_FRAME_KIND_UNKNOWN: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(pub i32);
+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: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
+ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(0i32);
+pub const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
+ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(2i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL(pub i32);
+pub const COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL =
+ COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL(1i32);
+pub const COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL =
+ COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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_LEAVE: COREWEBVIEW2_MOUSE_EVENT_KIND =
+ COREWEBVIEW2_MOUSE_EVENT_KIND(675i32);
+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_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_NON_CLIENT_RIGHT_BUTTON_DOWN:
+ COREWEBVIEW2_MOUSE_EVENT_KIND = COREWEBVIEW2_MOUSE_EVENT_KIND(164i32);
+pub const COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
+ COREWEBVIEW2_MOUSE_EVENT_KIND(165i32);
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(pub i32);
+impl COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
+ pub const fn contains(&self, other: Self) -> bool {
+ self.0 & other.0 == other.0
+ }
+}
+impl core::ops::BitOr for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
+ type Output = Self;
+ fn bitor(self, other: Self) -> Self {
+ Self(self.0 | other.0)
+ }
+}
+impl core::ops::BitAnd for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
+ type Output = Self;
+ fn bitand(self, other: Self) -> Self {
+ Self(self.0 & other.0)
+ }
+}
+impl core::ops::BitOrAssign for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
+ fn bitor_assign(&mut self, other: Self) {
+ self.0.bitor_assign(other.0)
+ }
+}
+impl core::ops::BitAndAssign for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
+ fn bitand_assign(&mut self, other: Self) {
+ self.0.bitand_assign(other.0)
+ }
+}
+impl core::ops::Not for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
+ type Output = Self;
+ fn not(self) -> Self {
+ Self(self.0.not())
+ }
+}
+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_LEFT_BUTTON: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
+ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(1i32);
+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_NONE: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
+ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(0i32);
+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_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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_MOVE_FOCUS_REASON(pub i32);
+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);
+pub const COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC: COREWEBVIEW2_MOVE_FOCUS_REASON =
+ COREWEBVIEW2_MOVE_FOCUS_REASON(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_NAVIGATION_KIND(pub i32);
+pub const COREWEBVIEW2_NAVIGATION_KIND_BACK_OR_FORWARD: COREWEBVIEW2_NAVIGATION_KIND =
+ COREWEBVIEW2_NAVIGATION_KIND(1i32);
+pub const COREWEBVIEW2_NAVIGATION_KIND_NEW_DOCUMENT: COREWEBVIEW2_NAVIGATION_KIND =
+ COREWEBVIEW2_NAVIGATION_KIND(2i32);
+pub const COREWEBVIEW2_NAVIGATION_KIND_RELOAD: COREWEBVIEW2_NAVIGATION_KIND =
+ COREWEBVIEW2_NAVIGATION_KIND(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_NON_CLIENT_REGION_KIND(pub i32);
+pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_CAPTION: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
+ COREWEBVIEW2_NON_CLIENT_REGION_KIND(2i32);
+pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_CLIENT: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
+ COREWEBVIEW2_NON_CLIENT_REGION_KIND(1i32);
+pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_CLOSE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
+ COREWEBVIEW2_NON_CLIENT_REGION_KIND(20i32);
+pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_MAXIMIZE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
+ COREWEBVIEW2_NON_CLIENT_REGION_KIND(9i32);
+pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_MINIMIZE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
+ COREWEBVIEW2_NON_CLIENT_REGION_KIND(8i32);
+pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_NOWHERE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
+ COREWEBVIEW2_NON_CLIENT_REGION_KIND(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PDF_TOOLBAR_ITEMS(pub i32);
+impl COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
+ pub const fn contains(&self, other: Self) -> bool {
+ self.0 & other.0 == other.0
+ }
+}
+impl core::ops::BitOr for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
+ type Output = Self;
+ fn bitor(self, other: Self) -> Self {
+ Self(self.0 | other.0)
+ }
+}
+impl core::ops::BitAnd for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
+ type Output = Self;
+ fn bitand(self, other: Self) -> Self {
+ Self(self.0 & other.0)
+ }
+}
+impl core::ops::BitOrAssign for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
+ fn bitor_assign(&mut self, other: Self) {
+ self.0.bitor_assign(other.0)
+ }
+}
+impl core::ops::BitAndAssign for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
+ fn bitand_assign(&mut self, other: Self) {
+ self.0.bitand_assign(other.0)
+ }
+}
+impl core::ops::Not for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
+ type Output = Self;
+ fn not(self) -> Self {
+ Self(self.0.not())
+ }
+}
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_BOOKMARKS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(256i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FIT_PAGE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(64i32);
+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);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(0i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_LAYOUT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(128i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_SELECTOR: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(512i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PRINT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(2i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ROTATE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(32i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(1i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE_AS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(4i32);
+pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SEARCH: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS(1024i32);
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PERMISSION_KIND(pub i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_AUTOPLAY: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(9i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_CAMERA: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(2i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(6i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_FILE_READ_WRITE: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(8i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(3i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_LOCAL_FONTS: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(10i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_MICROPHONE: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(1i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_MIDI_SYSTEM_EXCLUSIVE_MESSAGES:
+ COREWEBVIEW2_PERMISSION_KIND = COREWEBVIEW2_PERMISSION_KIND(11i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_MULTIPLE_AUTOMATIC_DOWNLOADS: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(7i32);
+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_UNKNOWN_PERMISSION: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(0i32);
+pub const COREWEBVIEW2_PERMISSION_KIND_WINDOW_MANAGEMENT: COREWEBVIEW2_PERMISSION_KIND =
+ COREWEBVIEW2_PERMISSION_KIND(12i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PERMISSION_STATE(pub i32);
+pub const COREWEBVIEW2_PERMISSION_STATE_ALLOW: COREWEBVIEW2_PERMISSION_STATE =
+ COREWEBVIEW2_PERMISSION_STATE(1i32);
+pub const COREWEBVIEW2_PERMISSION_STATE_DEFAULT: COREWEBVIEW2_PERMISSION_STATE =
+ COREWEBVIEW2_PERMISSION_STATE(0i32);
+pub const COREWEBVIEW2_PERMISSION_STATE_DENY: COREWEBVIEW2_PERMISSION_STATE =
+ COREWEBVIEW2_PERMISSION_STATE(2i32);
+#[repr(C)]
+#[derive(Clone, Copy, Debug, Default, PartialEq)]
+pub struct COREWEBVIEW2_PHYSICAL_KEY_STATUS {
+ pub RepeatCount: u32,
+ pub ScanCode: u32,
+ pub IsExtendedKey: windows_core::BOOL,
+ pub IsMenuKeyDown: windows_core::BOOL,
+ pub WasKeyDown: windows_core::BOOL,
+ pub IsKeyReleased: windows_core::BOOL,
+}
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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_DARK: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
+ COREWEBVIEW2_PREFERRED_COLOR_SCHEME(2i32);
+pub const COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
+ COREWEBVIEW2_PREFERRED_COLOR_SCHEME(1i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PRINT_COLLATION(pub i32);
+pub const COREWEBVIEW2_PRINT_COLLATION_COLLATED: COREWEBVIEW2_PRINT_COLLATION =
+ COREWEBVIEW2_PRINT_COLLATION(1i32);
+pub const COREWEBVIEW2_PRINT_COLLATION_DEFAULT: COREWEBVIEW2_PRINT_COLLATION =
+ COREWEBVIEW2_PRINT_COLLATION(0i32);
+pub const COREWEBVIEW2_PRINT_COLLATION_UNCOLLATED: COREWEBVIEW2_PRINT_COLLATION =
+ COREWEBVIEW2_PRINT_COLLATION(2i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PRINT_COLOR_MODE(pub i32);
+pub const COREWEBVIEW2_PRINT_COLOR_MODE_COLOR: COREWEBVIEW2_PRINT_COLOR_MODE =
+ COREWEBVIEW2_PRINT_COLOR_MODE(1i32);
+pub const COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT: COREWEBVIEW2_PRINT_COLOR_MODE =
+ COREWEBVIEW2_PRINT_COLOR_MODE(0i32);
+pub const COREWEBVIEW2_PRINT_COLOR_MODE_GRAYSCALE: COREWEBVIEW2_PRINT_COLOR_MODE =
+ COREWEBVIEW2_PRINT_COLOR_MODE(2i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PRINT_MEDIA_SIZE(pub i32);
+pub const COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM: COREWEBVIEW2_PRINT_MEDIA_SIZE =
+ COREWEBVIEW2_PRINT_MEDIA_SIZE(1i32);
+pub const COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT: COREWEBVIEW2_PRINT_MEDIA_SIZE =
+ COREWEBVIEW2_PRINT_MEDIA_SIZE(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PRINT_ORIENTATION(pub i32);
+pub const COREWEBVIEW2_PRINT_ORIENTATION_LANDSCAPE: COREWEBVIEW2_PRINT_ORIENTATION =
+ COREWEBVIEW2_PRINT_ORIENTATION(1i32);
+pub const COREWEBVIEW2_PRINT_ORIENTATION_PORTRAIT: COREWEBVIEW2_PRINT_ORIENTATION =
+ COREWEBVIEW2_PRINT_ORIENTATION(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PRINT_STATUS(pub i32);
+pub const COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR: COREWEBVIEW2_PRINT_STATUS =
+ COREWEBVIEW2_PRINT_STATUS(2i32);
+pub const COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE: COREWEBVIEW2_PRINT_STATUS =
+ COREWEBVIEW2_PRINT_STATUS(1i32);
+pub const COREWEBVIEW2_PRINT_STATUS_SUCCEEDED: COREWEBVIEW2_PRINT_STATUS =
+ COREWEBVIEW2_PRINT_STATUS(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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_FRAME_RENDER_PROCESS_EXITED:
+ COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(3i32);
+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_BROKER_PROCESS_EXITED:
+ COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(8i32);
+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_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_SANDBOX_HELPER_PROCESS_EXITED:
+ COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(5i32);
+pub const COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED:
+ COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(9i32);
+pub const COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED:
+ COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(4i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_PROCESS_FAILED_REASON(pub i32);
+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);
+pub const COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED: COREWEBVIEW2_PROCESS_FAILED_REASON =
+ COREWEBVIEW2_PROCESS_FAILED_REASON(2i32);
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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_GPU: COREWEBVIEW2_PROCESS_KIND =
+ COREWEBVIEW2_PROCESS_KIND(4i32);
+pub const COREWEBVIEW2_PROCESS_KIND_PPAPI_BROKER: COREWEBVIEW2_PROCESS_KIND =
+ COREWEBVIEW2_PROCESS_KIND(6i32);
+pub const COREWEBVIEW2_PROCESS_KIND_PPAPI_PLUGIN: COREWEBVIEW2_PROCESS_KIND =
+ COREWEBVIEW2_PROCESS_KIND(5i32);
+pub const COREWEBVIEW2_PROCESS_KIND_RENDERER: COREWEBVIEW2_PROCESS_KIND =
+ COREWEBVIEW2_PROCESS_KIND(1i32);
+pub const COREWEBVIEW2_PROCESS_KIND_SANDBOX_HELPER: COREWEBVIEW2_PROCESS_KIND =
+ COREWEBVIEW2_PROCESS_KIND(3i32);
+pub const COREWEBVIEW2_PROCESS_KIND_UTILITY: COREWEBVIEW2_PROCESS_KIND =
+ COREWEBVIEW2_PROCESS_KIND(2i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_RELEASE_CHANNELS(pub i32);
+impl COREWEBVIEW2_RELEASE_CHANNELS {
+ pub const fn contains(&self, other: Self) -> bool {
+ self.0 & other.0 == other.0
+ }
+}
+impl core::ops::BitOr for COREWEBVIEW2_RELEASE_CHANNELS {
+ type Output = Self;
+ fn bitor(self, other: Self) -> Self {
+ Self(self.0 | other.0)
+ }
+}
+impl core::ops::BitAnd for COREWEBVIEW2_RELEASE_CHANNELS {
+ type Output = Self;
+ fn bitand(self, other: Self) -> Self {
+ Self(self.0 & other.0)
+ }
+}
+impl core::ops::BitOrAssign for COREWEBVIEW2_RELEASE_CHANNELS {
+ fn bitor_assign(&mut self, other: Self) {
+ self.0.bitor_assign(other.0)
+ }
+}
+impl core::ops::BitAndAssign for COREWEBVIEW2_RELEASE_CHANNELS {
+ fn bitand_assign(&mut self, other: Self) {
+ self.0.bitand_assign(other.0)
+ }
+}
+impl core::ops::Not for COREWEBVIEW2_RELEASE_CHANNELS {
+ type Output = Self;
+ fn not(self) -> Self {
+ Self(self.0.not())
+ }
+}
+pub const COREWEBVIEW2_RELEASE_CHANNELS_BETA: COREWEBVIEW2_RELEASE_CHANNELS =
+ COREWEBVIEW2_RELEASE_CHANNELS(2i32);
+pub const COREWEBVIEW2_RELEASE_CHANNELS_CANARY: COREWEBVIEW2_RELEASE_CHANNELS =
+ COREWEBVIEW2_RELEASE_CHANNELS(8i32);
+pub const COREWEBVIEW2_RELEASE_CHANNELS_DEV: COREWEBVIEW2_RELEASE_CHANNELS =
+ COREWEBVIEW2_RELEASE_CHANNELS(4i32);
+pub const COREWEBVIEW2_RELEASE_CHANNELS_NONE: COREWEBVIEW2_RELEASE_CHANNELS =
+ COREWEBVIEW2_RELEASE_CHANNELS(0i32);
+pub const COREWEBVIEW2_RELEASE_CHANNELS_STABLE: COREWEBVIEW2_RELEASE_CHANNELS =
+ COREWEBVIEW2_RELEASE_CHANNELS(1i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_SAVE_AS_KIND(pub i32);
+pub const COREWEBVIEW2_SAVE_AS_KIND_COMPLETE: COREWEBVIEW2_SAVE_AS_KIND =
+ COREWEBVIEW2_SAVE_AS_KIND(3i32);
+pub const COREWEBVIEW2_SAVE_AS_KIND_DEFAULT: COREWEBVIEW2_SAVE_AS_KIND =
+ COREWEBVIEW2_SAVE_AS_KIND(0i32);
+pub const COREWEBVIEW2_SAVE_AS_KIND_HTML_ONLY: COREWEBVIEW2_SAVE_AS_KIND =
+ COREWEBVIEW2_SAVE_AS_KIND(1i32);
+pub const COREWEBVIEW2_SAVE_AS_KIND_SINGLE_FILE: COREWEBVIEW2_SAVE_AS_KIND =
+ COREWEBVIEW2_SAVE_AS_KIND(2i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_SAVE_AS_UI_RESULT(pub i32);
+pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_CANCELLED: COREWEBVIEW2_SAVE_AS_UI_RESULT =
+ COREWEBVIEW2_SAVE_AS_UI_RESULT(4i32);
+pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_FILE_ALREADY_EXISTS: COREWEBVIEW2_SAVE_AS_UI_RESULT =
+ COREWEBVIEW2_SAVE_AS_UI_RESULT(2i32);
+pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_INVALID_PATH: COREWEBVIEW2_SAVE_AS_UI_RESULT =
+ COREWEBVIEW2_SAVE_AS_UI_RESULT(1i32);
+pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_KIND_NOT_SUPPORTED: COREWEBVIEW2_SAVE_AS_UI_RESULT =
+ COREWEBVIEW2_SAVE_AS_UI_RESULT(3i32);
+pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_SUCCESS: COREWEBVIEW2_SAVE_AS_UI_RESULT =
+ COREWEBVIEW2_SAVE_AS_UI_RESULT(0i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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_BEFOREUNLOAD: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
+ COREWEBVIEW2_SCRIPT_DIALOG_KIND(3i32);
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_SCROLLBAR_STYLE(pub i32);
+pub const COREWEBVIEW2_SCROLLBAR_STYLE_DEFAULT: COREWEBVIEW2_SCROLLBAR_STYLE =
+ COREWEBVIEW2_SCROLLBAR_STYLE(0i32);
+pub const COREWEBVIEW2_SCROLLBAR_STYLE_FLUENT_OVERLAY: COREWEBVIEW2_SCROLLBAR_STYLE =
+ COREWEBVIEW2_SCROLLBAR_STYLE(1i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_SHARED_BUFFER_ACCESS(pub i32);
+pub const COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY: COREWEBVIEW2_SHARED_BUFFER_ACCESS =
+ COREWEBVIEW2_SHARED_BUFFER_ACCESS(0i32);
+pub const COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_WRITE: COREWEBVIEW2_SHARED_BUFFER_ACCESS =
+ COREWEBVIEW2_SHARED_BUFFER_ACCESS(1i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_TEXT_DIRECTION_KIND(pub i32);
+pub const COREWEBVIEW2_TEXT_DIRECTION_KIND_DEFAULT: COREWEBVIEW2_TEXT_DIRECTION_KIND =
+ COREWEBVIEW2_TEXT_DIRECTION_KIND(0i32);
+pub const COREWEBVIEW2_TEXT_DIRECTION_KIND_LEFT_TO_RIGHT: COREWEBVIEW2_TEXT_DIRECTION_KIND =
+ COREWEBVIEW2_TEXT_DIRECTION_KIND(1i32);
+pub const COREWEBVIEW2_TEXT_DIRECTION_KIND_RIGHT_TO_LEFT: COREWEBVIEW2_TEXT_DIRECTION_KIND =
+ COREWEBVIEW2_TEXT_DIRECTION_KIND(2i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(pub i32);
+pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(2i32);
+pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BASIC: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(1i32);
+pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(0i32);
+pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_STRICT: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(3i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_WEB_ERROR_STATUS(pub i32);
+pub const COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT: COREWEBVIEW2_WEB_ERROR_STATUS =
+ COREWEBVIEW2_WEB_ERROR_STATUS(12i32);
+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_CERTIFICATE_IS_INVALID: COREWEBVIEW2_WEB_ERROR_STATUS =
+ COREWEBVIEW2_WEB_ERROR_STATUS(5i32);
+pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED: COREWEBVIEW2_WEB_ERROR_STATUS =
+ COREWEBVIEW2_WEB_ERROR_STATUS(4i32);
+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_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_ERROR_HTTP_INVALID_SERVER_RESPONSE:
+ COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(8i32);
+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_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_UNEXPECTED_ERROR: COREWEBVIEW2_WEB_ERROR_STATUS =
+ COREWEBVIEW2_WEB_ERROR_STATUS(16i32);
+pub const COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN: COREWEBVIEW2_WEB_ERROR_STATUS =
+ COREWEBVIEW2_WEB_ERROR_STATUS(0i32);
+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);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+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_CSP_VIOLATION_REPORT:
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT = COREWEBVIEW2_WEB_RESOURCE_CONTEXT(15i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(1i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(10i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(8i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(5i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(3i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(12i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(4i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(16i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(14i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(6i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(13i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(2i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(9i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(11i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT(7i32);
+#[repr(transparent)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
+pub struct COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(pub i32);
+impl COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
+ pub const fn contains(&self, other: Self) -> bool {
+ self.0 & other.0 == other.0
+ }
+}
+impl core::ops::BitOr for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
+ type Output = Self;
+ fn bitor(self, other: Self) -> Self {
+ Self(self.0 | other.0)
+ }
+}
+impl core::ops::BitAnd for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
+ type Output = Self;
+ fn bitand(self, other: Self) -> Self {
+ Self(self.0 & other.0)
+ }
+}
+impl core::ops::BitOrAssign for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
+ fn bitor_assign(&mut self, other: Self) {
+ self.0.bitor_assign(other.0)
+ }
+}
+impl core::ops::BitAndAssign for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
+ fn bitand_assign(&mut self, other: Self) {
+ self.0.bitand_assign(other.0)
+ }
+}
+impl core::ops::Not for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
+ type Output = Self;
+ fn not(self) -> Self {
+ Self(self.0.not())
+ }
+}
+pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_ALL:
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(-1i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_DOCUMENT:
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(1i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_NONE:
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(0i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_SERVICE_WORKER:
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(4i32);
+pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_SHARED_WORKER:
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(2i32);
+pub const CORE_WEBVIEW_TARGET_PRODUCT_VERSION: windows_core::PCWSTR =
+ windows_core::w!("143.0.3650.58");
+windows_core::imp::define_interface!(
+ ICoreWebView2,
+ ICoreWebView2_Vtbl,
+ 0x76eceacb_0462_4d94_ac83_423a6793775e
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2, windows_core::IUnknown);
+impl ICoreWebView2 {
+ pub unsafe fn Settings(&self) -> windows_core::Result<ICoreWebView2Settings> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Settings)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Source(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Source)(
+ windows_core::Interface::as_raw(self),
+ uri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Navigate<P0>(&self, uri: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Navigate)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).NavigateToString)(
+ windows_core::Interface::as_raw(self),
+ htmlcontent.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_NavigationStarting<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NavigationStartingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NavigationStarting)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NavigationStarting)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ContentLoading<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ContentLoadingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ContentLoading)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ContentLoading)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_SourceChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2SourceChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_SourceChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_SourceChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_SourceChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_HistoryChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2HistoryChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_HistoryChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_HistoryChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_HistoryChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_NavigationCompleted<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NavigationCompletedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NavigationCompleted)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NavigationCompleted)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_FrameNavigationStarting<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NavigationStartingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_FrameNavigationStarting)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_FrameNavigationStarting(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_FrameNavigationStarting)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_FrameNavigationCompleted<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NavigationCompletedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_FrameNavigationCompleted)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_FrameNavigationCompleted(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_FrameNavigationCompleted)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ScriptDialogOpening<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ScriptDialogOpeningEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ScriptDialogOpening)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ScriptDialogOpening(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ScriptDialogOpening)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_PermissionRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2PermissionRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_PermissionRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_PermissionRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ProcessFailed<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ProcessFailedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ProcessFailed)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ProcessFailed(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ProcessFailed)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
+ &self,
+ javascript: P0,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).AddScriptToExecuteOnDocumentCreated)(
+ windows_core::Interface::as_raw(self),
+ javascript.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
+ &self,
+ id: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).RemoveScriptToExecuteOnDocumentCreated)(
+ windows_core::Interface::as_raw(self),
+ id.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ExecuteScript<P0, P1>(
+ &self,
+ javascript: P0,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2ExecuteScriptCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ExecuteScript)(
+ windows_core::Interface::as_raw(self),
+ javascript.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CapturePreview<P1, P2>(
+ &self,
+ imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
+ imagestream: P1,
+ handler: P2,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows::Win32::System::Com::IStream>,
+ P2: windows_core::Param<ICoreWebView2CapturePreviewCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).CapturePreview)(
+ windows_core::Interface::as_raw(self),
+ imageformat,
+ imagestream.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Reload(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Reload)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn PostWebMessageAsJson<P0>(&self, webmessageasjson: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PostWebMessageAsJson)(
+ windows_core::Interface::as_raw(self),
+ webmessageasjson.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PostWebMessageAsString<P0>(
+ &self,
+ webmessageasstring: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PostWebMessageAsString)(
+ windows_core::Interface::as_raw(self),
+ webmessageasstring.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_WebMessageReceived<P0>(
+ &self,
+ handler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2WebMessageReceivedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_WebMessageReceived)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_WebMessageReceived)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
+ &self,
+ methodname: P0,
+ parametersasjson: P1,
+ handler: P2,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ P2: windows_core::Param<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).CallDevToolsProtocolMethod)(
+ windows_core::Interface::as_raw(self),
+ methodname.param().abi(),
+ parametersasjson.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BrowserProcessId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CanGoBack(&self, cangoback: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).CanGoBack)(
+ windows_core::Interface::as_raw(self),
+ cangoback as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CanGoForward(
+ &self,
+ cangoforward: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).CanGoForward)(
+ windows_core::Interface::as_raw(self),
+ cangoforward as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GoBack(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GoBack)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn GoForward(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GoForward)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
+ &self,
+ eventname: P0,
+ ) -> windows_core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDevToolsProtocolEventReceiver)(
+ windows_core::Interface::as_raw(self),
+ eventname.param().abi(),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Stop(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok()
+ }
+ }
+ pub unsafe fn add_NewWindowRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NewWindowRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NewWindowRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NewWindowRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NewWindowRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_DocumentTitleChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2DocumentTitleChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_DocumentTitleChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_DocumentTitleChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_DocumentTitleChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DocumentTitle(
+ &self,
+ title: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DocumentTitle)(
+ windows_core::Interface::as_raw(self),
+ title as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AddHostObjectToScript<P0>(
+ &self,
+ name: P0,
+ object: *mut windows::Win32::System::Variant::VARIANT,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).AddHostObjectToScript)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ core::mem::transmute(object),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).RemoveHostObjectFromScript)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn OpenDevToolsWindow(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).OpenDevToolsWindow)(
+ windows_core::Interface::as_raw(self),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ContainsFullScreenElementChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ContainsFullScreenElementChanged(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ContainsFullScreenElementChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ContainsFullScreenElement(
+ &self,
+ containsfullscreenelement: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ContainsFullScreenElement)(
+ windows_core::Interface::as_raw(self),
+ containsfullscreenelement as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_WebResourceRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2WebResourceRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_WebResourceRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_WebResourceRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_WebResourceRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AddWebResourceRequestedFilter<P0>(
+ &self,
+ uri: P0,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).AddWebResourceRequestedFilter)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ resourcecontext,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
+ &self,
+ uri: P0,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).RemoveWebResourceRequestedFilter)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ resourcecontext,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_WindowCloseRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2WindowCloseRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_WindowCloseRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_WindowCloseRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_WindowCloseRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Settings: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Source: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Navigate: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub NavigateToString: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub add_NavigationStarting: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NavigationStarting:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_ContentLoading: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ContentLoading:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_SourceChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_SourceChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_HistoryChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_HistoryChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_NavigationCompleted: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NavigationCompleted:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_FrameNavigationStarting: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_FrameNavigationStarting:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_FrameNavigationCompleted: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_FrameNavigationCompleted:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_ScriptDialogOpening: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ScriptDialogOpening:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_PermissionRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_PermissionRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_ProcessFailed: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ProcessFailed:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub AddScriptToExecuteOnDocumentCreated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ )
+ -> windows_core::HRESULT,
+ pub RemoveScriptToExecuteOnDocumentCreated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ )
+ -> windows_core::HRESULT,
+ pub ExecuteScript: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub CapturePreview: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Reload: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub PostWebMessageAsJson: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub PostWebMessageAsString: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub add_WebMessageReceived: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_WebMessageReceived:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub CallDevToolsProtocolMethod: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub BrowserProcessId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub CanGoBack: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub CanGoForward: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GoBack: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub GoForward: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub GetDevToolsProtocolEventReceiver: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub add_NewWindowRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NewWindowRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_DocumentTitleChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_DocumentTitleChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub DocumentTitle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub AddHostObjectToScript: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut windows::Win32::System::Variant::VARIANT,
+ ) -> windows_core::HRESULT,
+ pub RemoveHostObjectFromScript: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub OpenDevToolsWindow:
+ unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub add_ContainsFullScreenElementChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ )
+ -> windows_core::HRESULT,
+ pub remove_ContainsFullScreenElementChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub ContainsFullScreenElement: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub add_WebResourceRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_WebResourceRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub AddWebResourceRequestedFilter: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::HRESULT,
+ pub RemoveWebResourceRequestedFilter: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::HRESULT,
+ pub add_WindowCloseRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_WindowCloseRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_Impl: windows_core::IUnknownImpl {
+ 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: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()>;
+ fn add_ContentLoading(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ContentLoadingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()>;
+ fn add_SourceChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2SourceChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_SourceChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn add_HistoryChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2HistoryChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_HistoryChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn add_NavigationCompleted(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()>;
+ fn add_FrameNavigationStarting(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_FrameNavigationStarting(&self, token: i64) -> windows_core::Result<()>;
+ fn add_FrameNavigationCompleted(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_FrameNavigationCompleted(&self, token: i64) -> windows_core::Result<()>;
+ fn add_ScriptDialogOpening(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ScriptDialogOpeningEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ScriptDialogOpening(&self, token: i64) -> windows_core::Result<()>;
+ fn add_PermissionRequested(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2PermissionRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()>;
+ fn add_ProcessFailed(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ProcessFailedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ProcessFailed(&self, token: i64) -> windows_core::Result<()>;
+ fn AddScriptToExecuteOnDocumentCreated(
+ &self,
+ javascript: &windows_core::PCWSTR,
+ handler: windows_core::Ref<
+ '_,
+ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
+ >,
+ ) -> windows_core::Result<()>;
+ fn RemoveScriptToExecuteOnDocumentCreated(
+ &self,
+ id: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+ fn ExecuteScript(
+ &self,
+ javascript: &windows_core::PCWSTR,
+ handler: windows_core::Ref<'_, ICoreWebView2ExecuteScriptCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn CapturePreview(
+ &self,
+ imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
+ imagestream: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
+ handler: windows_core::Ref<'_, 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: windows_core::Ref<'_, ICoreWebView2WebMessageReceivedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()>;
+ fn CallDevToolsProtocolMethod(
+ &self,
+ methodname: &windows_core::PCWSTR,
+ parametersasjson: &windows_core::PCWSTR,
+ handler: windows_core::Ref<'_, ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn CanGoBack(&self, cangoback: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn CanGoForward(&self, cangoforward: *mut windows_core::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: windows_core::Ref<'_, ICoreWebView2NewWindowRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NewWindowRequested(&self, token: i64) -> windows_core::Result<()>;
+ fn add_DocumentTitleChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2DocumentTitleChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_DocumentTitleChanged(&self, token: i64) -> 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::Variant::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: windows_core::Ref<
+ '_,
+ ICoreWebView2ContainsFullScreenElementChangedEventHandler,
+ >,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ContainsFullScreenElementChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn ContainsFullScreenElement(
+ &self,
+ containsfullscreenelement: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn add_WebResourceRequested(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2WebResourceRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_WebResourceRequested(&self, token: i64) -> 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: windows_core::Ref<'_, ICoreWebView2WindowCloseRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_WindowCloseRequested(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Settings<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ settings: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2_Impl::Settings(this) {
+ Ok(ok__) => {
+ settings.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Source<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ uri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::Source(this, core::mem::transmute_copy(&uri)).into()
+ }
+ }
+ unsafe extern "system" fn Navigate<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ uri: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::Navigate(this, core::mem::transmute(&uri)).into()
+ }
+ }
+ unsafe extern "system" fn NavigateToString<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ htmlcontent: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::NavigateToString(this, core::mem::transmute(&htmlcontent))
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_NavigationStarting<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_NavigationStarting(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NavigationStarting<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_NavigationStarting(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_ContentLoading<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_ContentLoading(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ContentLoading<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_ContentLoading(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_SourceChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_SourceChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_SourceChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_SourceChanged(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_HistoryChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_HistoryChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_HistoryChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_HistoryChanged(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_NavigationCompleted<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_NavigationCompleted(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NavigationCompleted<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_NavigationCompleted(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_FrameNavigationStarting<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_FrameNavigationStarting(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_FrameNavigationStarting<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_FrameNavigationStarting(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_FrameNavigationCompleted<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_FrameNavigationCompleted(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_FrameNavigationCompleted<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_FrameNavigationCompleted(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_ScriptDialogOpening<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_ScriptDialogOpening(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ScriptDialogOpening<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_ScriptDialogOpening(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_PermissionRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_PermissionRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_PermissionRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_PermissionRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_ProcessFailed<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_ProcessFailed(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ProcessFailed<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_ProcessFailed(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn AddScriptToExecuteOnDocumentCreated<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ javascript: windows_core::PCWSTR,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::AddScriptToExecuteOnDocumentCreated(
+ this,
+ core::mem::transmute(&javascript),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RemoveScriptToExecuteOnDocumentCreated<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ id: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::RemoveScriptToExecuteOnDocumentCreated(
+ this,
+ core::mem::transmute(&id),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ExecuteScript<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ javascript: windows_core::PCWSTR,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::ExecuteScript(
+ this,
+ core::mem::transmute(&javascript),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn CapturePreview<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::CapturePreview(
+ this,
+ core::mem::transmute_copy(&imageformat),
+ core::mem::transmute_copy(&imagestream),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Reload<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::Reload(this).into()
+ }
+ }
+ unsafe extern "system" fn PostWebMessageAsJson<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ webmessageasjson: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::PostWebMessageAsJson(
+ this,
+ core::mem::transmute(&webmessageasjson),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PostWebMessageAsString<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ webmessageasstring: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::PostWebMessageAsString(
+ this,
+ core::mem::transmute(&webmessageasstring),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_WebMessageReceived<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_WebMessageReceived(
+ this,
+ core::mem::transmute_copy(&handler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_WebMessageReceived<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_WebMessageReceived(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn CallDevToolsProtocolMethod<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::CallDevToolsProtocolMethod(
+ this,
+ core::mem::transmute(&methodname),
+ core::mem::transmute(&parametersasjson),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn BrowserProcessId<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::BrowserProcessId(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn CanGoBack<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ cangoback: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::CanGoBack(this, core::mem::transmute_copy(&cangoback)).into()
+ }
+ }
+ unsafe extern "system" fn CanGoForward<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cangoforward: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::CanGoForward(this, core::mem::transmute_copy(&cangoforward))
+ .into()
+ }
+ }
+ unsafe extern "system" fn GoBack<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::GoBack(this).into()
+ }
+ }
+ unsafe extern "system" fn GoForward<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::GoForward(this).into()
+ }
+ }
+ unsafe extern "system" fn GetDevToolsProtocolEventReceiver<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2_Impl::GetDevToolsProtocolEventReceiver(
+ this,
+ core::mem::transmute(&eventname),
+ ) {
+ Ok(ok__) => {
+ receiver.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Stop<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::Stop(this).into()
+ }
+ }
+ unsafe extern "system" fn add_NewWindowRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_NewWindowRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NewWindowRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_NewWindowRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_DocumentTitleChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_DocumentTitleChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_DocumentTitleChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_DocumentTitleChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DocumentTitle<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ title: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::DocumentTitle(this, core::mem::transmute_copy(&title)).into()
+ }
+ }
+ unsafe extern "system" fn AddHostObjectToScript<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ object: *mut windows::Win32::System::Variant::VARIANT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::AddHostObjectToScript(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute_copy(&object),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RemoveHostObjectFromScript<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::RemoveHostObjectFromScript(this, core::mem::transmute(&name))
+ .into()
+ }
+ }
+ unsafe extern "system" fn OpenDevToolsWindow<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::OpenDevToolsWindow(this).into()
+ }
+ }
+ unsafe extern "system" fn add_ContainsFullScreenElementChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_ContainsFullScreenElementChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ContainsFullScreenElementChanged<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_ContainsFullScreenElementChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ContainsFullScreenElement<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ containsfullscreenelement: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::ContainsFullScreenElement(
+ this,
+ core::mem::transmute_copy(&containsfullscreenelement),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_WebResourceRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_WebResourceRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_WebResourceRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_WebResourceRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AddWebResourceRequestedFilter<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: windows_core::PCWSTR,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::AddWebResourceRequestedFilter(
+ this,
+ core::mem::transmute(&uri),
+ core::mem::transmute_copy(&resourcecontext),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RemoveWebResourceRequestedFilter<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: windows_core::PCWSTR,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::RemoveWebResourceRequestedFilter(
+ this,
+ core::mem::transmute(&uri),
+ core::mem::transmute_copy(&resourcecontext),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_WindowCloseRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::add_WindowCloseRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_WindowCloseRequested<
+ Identity: ICoreWebView2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_Impl::remove_WindowCloseRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Settings: Settings::<Identity, OFFSET>,
+ Source: Source::<Identity, OFFSET>,
+ Navigate: Navigate::<Identity, OFFSET>,
+ NavigateToString: NavigateToString::<Identity, OFFSET>,
+ add_NavigationStarting: add_NavigationStarting::<Identity, OFFSET>,
+ remove_NavigationStarting: remove_NavigationStarting::<Identity, OFFSET>,
+ add_ContentLoading: add_ContentLoading::<Identity, OFFSET>,
+ remove_ContentLoading: remove_ContentLoading::<Identity, OFFSET>,
+ add_SourceChanged: add_SourceChanged::<Identity, OFFSET>,
+ remove_SourceChanged: remove_SourceChanged::<Identity, OFFSET>,
+ add_HistoryChanged: add_HistoryChanged::<Identity, OFFSET>,
+ remove_HistoryChanged: remove_HistoryChanged::<Identity, OFFSET>,
+ add_NavigationCompleted: add_NavigationCompleted::<Identity, OFFSET>,
+ remove_NavigationCompleted: remove_NavigationCompleted::<Identity, OFFSET>,
+ add_FrameNavigationStarting: add_FrameNavigationStarting::<Identity, OFFSET>,
+ remove_FrameNavigationStarting: remove_FrameNavigationStarting::<Identity, OFFSET>,
+ add_FrameNavigationCompleted: add_FrameNavigationCompleted::<Identity, OFFSET>,
+ remove_FrameNavigationCompleted: remove_FrameNavigationCompleted::<Identity, OFFSET>,
+ add_ScriptDialogOpening: add_ScriptDialogOpening::<Identity, OFFSET>,
+ remove_ScriptDialogOpening: remove_ScriptDialogOpening::<Identity, OFFSET>,
+ add_PermissionRequested: add_PermissionRequested::<Identity, OFFSET>,
+ remove_PermissionRequested: remove_PermissionRequested::<Identity, OFFSET>,
+ add_ProcessFailed: add_ProcessFailed::<Identity, OFFSET>,
+ remove_ProcessFailed: remove_ProcessFailed::<Identity, OFFSET>,
+ AddScriptToExecuteOnDocumentCreated: AddScriptToExecuteOnDocumentCreated::<
+ Identity,
+ OFFSET,
+ >,
+ RemoveScriptToExecuteOnDocumentCreated: RemoveScriptToExecuteOnDocumentCreated::<
+ Identity,
+ OFFSET,
+ >,
+ ExecuteScript: ExecuteScript::<Identity, OFFSET>,
+ CapturePreview: CapturePreview::<Identity, OFFSET>,
+ Reload: Reload::<Identity, OFFSET>,
+ PostWebMessageAsJson: PostWebMessageAsJson::<Identity, OFFSET>,
+ PostWebMessageAsString: PostWebMessageAsString::<Identity, OFFSET>,
+ add_WebMessageReceived: add_WebMessageReceived::<Identity, OFFSET>,
+ remove_WebMessageReceived: remove_WebMessageReceived::<Identity, OFFSET>,
+ CallDevToolsProtocolMethod: CallDevToolsProtocolMethod::<Identity, OFFSET>,
+ BrowserProcessId: BrowserProcessId::<Identity, OFFSET>,
+ CanGoBack: CanGoBack::<Identity, OFFSET>,
+ CanGoForward: CanGoForward::<Identity, OFFSET>,
+ GoBack: GoBack::<Identity, OFFSET>,
+ GoForward: GoForward::<Identity, OFFSET>,
+ GetDevToolsProtocolEventReceiver: GetDevToolsProtocolEventReceiver::<Identity, OFFSET>,
+ Stop: Stop::<Identity, OFFSET>,
+ add_NewWindowRequested: add_NewWindowRequested::<Identity, OFFSET>,
+ remove_NewWindowRequested: remove_NewWindowRequested::<Identity, OFFSET>,
+ add_DocumentTitleChanged: add_DocumentTitleChanged::<Identity, OFFSET>,
+ remove_DocumentTitleChanged: remove_DocumentTitleChanged::<Identity, OFFSET>,
+ DocumentTitle: DocumentTitle::<Identity, OFFSET>,
+ AddHostObjectToScript: AddHostObjectToScript::<Identity, OFFSET>,
+ RemoveHostObjectFromScript: RemoveHostObjectFromScript::<Identity, OFFSET>,
+ OpenDevToolsWindow: OpenDevToolsWindow::<Identity, OFFSET>,
+ add_ContainsFullScreenElementChanged: add_ContainsFullScreenElementChanged::<
+ Identity,
+ OFFSET,
+ >,
+ remove_ContainsFullScreenElementChanged: remove_ContainsFullScreenElementChanged::<
+ Identity,
+ OFFSET,
+ >,
+ ContainsFullScreenElement: ContainsFullScreenElement::<Identity, OFFSET>,
+ add_WebResourceRequested: add_WebResourceRequested::<Identity, OFFSET>,
+ remove_WebResourceRequested: remove_WebResourceRequested::<Identity, OFFSET>,
+ AddWebResourceRequestedFilter: AddWebResourceRequestedFilter::<Identity, OFFSET>,
+ RemoveWebResourceRequestedFilter: RemoveWebResourceRequestedFilter::<Identity, OFFSET>,
+ add_WindowCloseRequested: add_WindowCloseRequested::<Identity, OFFSET>,
+ remove_WindowCloseRequested: remove_WindowCloseRequested::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2AcceleratorKeyPressedEventArgs,
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl,
+ 0x9f760f8a_fb79_42be_9990_7b56900fa9c7
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2AcceleratorKeyPressedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2AcceleratorKeyPressedEventArgs {
+ pub unsafe fn KeyEventKind(
+ &self,
+ keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).KeyEventKind)(
+ windows_core::Interface::as_raw(self),
+ keyeventkind as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn VirtualKey(&self, virtualkey: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).VirtualKey)(
+ windows_core::Interface::as_raw(self),
+ virtualkey as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn KeyEventLParam(&self, lparam: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).KeyEventLParam)(
+ windows_core::Interface::as_raw(self),
+ lparam as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PhysicalKeyStatus(
+ &self,
+ physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PhysicalKeyStatus)(
+ windows_core::Interface::as_raw(self),
+ physicalkeystatus as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ handled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHandled(&self, handled: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ handled.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub KeyEventKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_KEY_EVENT_KIND,
+ ) -> windows_core::HRESULT,
+ pub VirtualKey:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub KeyEventLParam:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub PhysicalKeyStatus: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2AcceleratorKeyPressedEventArgs_Impl: windows_core::IUnknownImpl {
+ 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_core::BOOL) -> windows_core::Result<()>;
+ fn SetHandled(&self, handled: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn KeyEventKind<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::KeyEventKind(
+ this,
+ core::mem::transmute_copy(&keyeventkind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn VirtualKey<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ virtualkey: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::VirtualKey(
+ this,
+ core::mem::transmute_copy(&virtualkey),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn KeyEventLParam<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ lparam: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::KeyEventLParam(
+ this,
+ core::mem::transmute_copy(&lparam),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PhysicalKeyStatus<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::PhysicalKeyStatus(
+ this,
+ core::mem::transmute_copy(&physicalkeystatus),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&handled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&handled),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ KeyEventKind: KeyEventKind::<Identity, OFFSET>,
+ VirtualKey: VirtualKey::<Identity, OFFSET>,
+ KeyEventLParam: KeyEventLParam::<Identity, OFFSET>,
+ PhysicalKeyStatus: PhysicalKeyStatus::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2AcceleratorKeyPressedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2AcceleratorKeyPressedEventArgs2,
+ ICoreWebView2AcceleratorKeyPressedEventArgs2_Vtbl,
+ 0x03b2c8c8_7799_4e34_bd66_ed26aa85f2bf
+);
+impl core::ops::Deref for ICoreWebView2AcceleratorKeyPressedEventArgs2 {
+ type Target = ICoreWebView2AcceleratorKeyPressedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2AcceleratorKeyPressedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2AcceleratorKeyPressedEventArgs
+);
+impl ICoreWebView2AcceleratorKeyPressedEventArgs2 {
+ pub unsafe fn IsBrowserAcceleratorKeyEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsBrowserAcceleratorKeyEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsBrowserAcceleratorKeyEnabled(
+ &self,
+ value: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsBrowserAcceleratorKeyEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2AcceleratorKeyPressedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl,
+ pub IsBrowserAcceleratorKeyEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsBrowserAcceleratorKeyEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl:
+ ICoreWebView2AcceleratorKeyPressedEventArgs_Impl
+{
+ fn IsBrowserAcceleratorKeyEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetIsBrowserAcceleratorKeyEnabled(
+ &self,
+ value: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2AcceleratorKeyPressedEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn IsBrowserAcceleratorKeyEnabled<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl::IsBrowserAcceleratorKeyEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsBrowserAcceleratorKeyEnabled<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl:: SetIsBrowserAcceleratorKeyEnabled ( this , core::mem::transmute_copy ( & value ) , ) . into ( )
+ }
+ }
+ Self {
+ base__: ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ IsBrowserAcceleratorKeyEnabled: IsBrowserAcceleratorKeyEnabled::<Identity, OFFSET>,
+ SetIsBrowserAcceleratorKeyEnabled: SetIsBrowserAcceleratorKeyEnabled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2AcceleratorKeyPressedEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2AcceleratorKeyPressedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2AcceleratorKeyPressedEventHandler,
+ ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl,
+ 0xb29c7e28_fa79_41a8_8e44_65811c76dcb2
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2AcceleratorKeyPressedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2AcceleratorKeyPressedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Controller>,
+ P1: windows_core::Param<ICoreWebView2AcceleratorKeyPressedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2AcceleratorKeyPressedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Controller>,
+ args: windows_core::Ref<'_, ICoreWebView2AcceleratorKeyPressedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2AcceleratorKeyPressedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AcceleratorKeyPressedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2AcceleratorKeyPressedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
+ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl,
+ 0xb99369f3_9b11_47b5_bc6f_8e7895fcea17
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName
+ for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler
+{
+}
+windows_core::imp::define_interface!(
+ ICoreWebView2BasicAuthenticationRequestedEventArgs,
+ ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl,
+ 0xef05516f_d897_4f9e_b672_d8e2307a3fb0
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BasicAuthenticationRequestedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BasicAuthenticationRequestedEventArgs {
+ pub unsafe fn Uri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Challenge(
+ &self,
+ challenge: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Challenge)(
+ windows_core::Interface::as_raw(self),
+ challenge as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Response(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2BasicAuthenticationResponse> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Response)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(
+ windows_core::Interface::as_raw(self),
+ cancel as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancel(&self, cancel: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancel)(
+ windows_core::Interface::as_raw(self),
+ cancel.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Challenge: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Response: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Cancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetCancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl:
+ windows_core::IUnknownImpl
+{
+ 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_core::BOOL) -> windows_core::Result<()>;
+ fn SetCancel(&self, cancel: windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Uri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Challenge<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ challenge: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Challenge(
+ this,
+ core::mem::transmute_copy(&challenge),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Response<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ response: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Response(this) {
+ Ok(ok__) => {
+ response.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cancel: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Cancel(
+ this,
+ core::mem::transmute_copy(&cancel),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancel<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cancel: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::SetCancel(
+ this,
+ core::mem::transmute_copy(&cancel),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Uri: Uri::<Identity, OFFSET>,
+ Challenge: Challenge::<Identity, OFFSET>,
+ Response: Response::<Identity, OFFSET>,
+ Cancel: Cancel::<Identity, OFFSET>,
+ SetCancel: SetCancel::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2BasicAuthenticationRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BasicAuthenticationRequestedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BasicAuthenticationRequestedEventHandler,
+ ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl,
+ 0x58b4d6c2_18d4_497e_b39b_9a96533fa278
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BasicAuthenticationRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BasicAuthenticationRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2BasicAuthenticationRequestedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2BasicAuthenticationRequestedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2BasicAuthenticationRequestedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BasicAuthenticationRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BasicAuthenticationResponse,
+ ICoreWebView2BasicAuthenticationResponse_Vtbl,
+ 0x07023f7d_2d77_4d67_9040_6e7d428c6a40
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BasicAuthenticationResponse,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BasicAuthenticationResponse {
+ pub unsafe fn UserName(&self, username: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).UserName)(
+ windows_core::Interface::as_raw(self),
+ username as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetUserName<P0>(&self, username: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetUserName)(
+ windows_core::Interface::as_raw(self),
+ username.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Password(&self, password: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Password)(
+ windows_core::Interface::as_raw(self),
+ password as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPassword<P0>(&self, password: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPassword)(
+ windows_core::Interface::as_raw(self),
+ password.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BasicAuthenticationResponse_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub UserName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetUserName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub Password: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetPassword: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BasicAuthenticationResponse_Impl: windows_core::IUnknownImpl {
+ 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 ICoreWebView2BasicAuthenticationResponse_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn UserName<
+ Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ username: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationResponse_Impl::UserName(
+ this,
+ core::mem::transmute_copy(&username),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetUserName<
+ Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ username: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationResponse_Impl::SetUserName(
+ this,
+ core::mem::transmute(&username),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Password<
+ Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ password: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationResponse_Impl::Password(
+ this,
+ core::mem::transmute_copy(&password),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPassword<
+ Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ password: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BasicAuthenticationResponse_Impl::SetPassword(
+ this,
+ core::mem::transmute(&password),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ UserName: UserName::<Identity, OFFSET>,
+ SetUserName: SetUserName::<Identity, OFFSET>,
+ Password: Password::<Identity, OFFSET>,
+ SetPassword: SetPassword::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2BasicAuthenticationResponse as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BasicAuthenticationResponse {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BrowserExtension,
+ ICoreWebView2BrowserExtension_Vtbl,
+ 0x7ef7ffa0_fac5_462c_b189_3d9edbe575da
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2BrowserExtension, windows_core::IUnknown);
+impl ICoreWebView2BrowserExtension {
+ pub unsafe fn Id(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Id)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Name)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Remove<P0>(&self, handler: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2BrowserExtensionRemoveCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Remove)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Enable<P1>(&self, isenabled: bool, handler: P1) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2BrowserExtensionEnableCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Enable)(
+ windows_core::Interface::as_raw(self),
+ isenabled.into(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BrowserExtension_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Id: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Name: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Remove: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub IsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Enable: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BrowserExtension_Impl: windows_core::IUnknownImpl {
+ fn Id(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Remove(
+ &self,
+ handler: windows_core::Ref<'_, ICoreWebView2BrowserExtensionRemoveCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn Enable(
+ &self,
+ isenabled: windows_core::BOOL,
+ handler: windows_core::Ref<'_, ICoreWebView2BrowserExtensionEnableCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2BrowserExtension_Vtbl {
+ pub const fn new<Identity: ICoreWebView2BrowserExtension_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Id<
+ Identity: ICoreWebView2BrowserExtension_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtension_Impl::Id(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Name<
+ Identity: ICoreWebView2BrowserExtension_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtension_Impl::Name(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Remove<
+ Identity: ICoreWebView2BrowserExtension_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtension_Impl::Remove(
+ this,
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsEnabled<
+ Identity: ICoreWebView2BrowserExtension_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtension_Impl::IsEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Enable<
+ Identity: ICoreWebView2BrowserExtension_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isenabled: windows_core::BOOL,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtension_Impl::Enable(
+ this,
+ core::mem::transmute_copy(&isenabled),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Id: Id::<Identity, OFFSET>,
+ Name: Name::<Identity, OFFSET>,
+ Remove: Remove::<Identity, OFFSET>,
+ IsEnabled: IsEnabled::<Identity, OFFSET>,
+ Enable: Enable::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2BrowserExtension as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BrowserExtension {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BrowserExtensionEnableCompletedHandler,
+ ICoreWebView2BrowserExtensionEnableCompletedHandler_Vtbl,
+ 0x30c186ce_7fad_421f_a3bc_a8eaf071ddb8
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BrowserExtensionEnableCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BrowserExtensionEnableCompletedHandler {
+ pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BrowserExtensionEnableCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
+}
+impl ICoreWebView2BrowserExtensionEnableCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2BrowserExtensionEnableCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BrowserExtensionEnableCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BrowserExtensionList,
+ ICoreWebView2BrowserExtensionList_Vtbl,
+ 0x2ef3d2dc_bd5f_4f4d_90af_fd67798f0c2f
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2BrowserExtensionList, windows_core::IUnknown);
+impl ICoreWebView2BrowserExtensionList {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ ) -> windows_core::Result<ICoreWebView2BrowserExtension> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BrowserExtensionList_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BrowserExtensionList_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2BrowserExtension>;
+}
+impl ICoreWebView2BrowserExtensionList_Vtbl {
+ pub const fn new<Identity: ICoreWebView2BrowserExtensionList_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2BrowserExtensionList_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtensionList_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2BrowserExtensionList_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2BrowserExtensionList_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2BrowserExtensionList as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BrowserExtensionList {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BrowserExtensionRemoveCompletedHandler,
+ ICoreWebView2BrowserExtensionRemoveCompletedHandler_Vtbl,
+ 0x8e41909a_9b18_4bb1_8cdf_930f467a50be
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BrowserExtensionRemoveCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BrowserExtensionRemoveCompletedHandler {
+ pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BrowserExtensionRemoveCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
+}
+impl ICoreWebView2BrowserExtensionRemoveCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2BrowserExtensionRemoveCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BrowserExtensionRemoveCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BrowserProcessExitedEventArgs,
+ ICoreWebView2BrowserProcessExitedEventArgs_Vtbl,
+ 0x1f00663f_af8c_4782_9cdd_dd01c52e34cb
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BrowserProcessExitedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BrowserProcessExitedEventArgs {
+ pub unsafe fn BrowserProcessExitKind(
+ &self,
+ value: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BrowserProcessExitKind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BrowserProcessId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BrowserProcessExitedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub BrowserProcessExitKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
+ ) -> windows_core::HRESULT,
+ pub BrowserProcessId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BrowserProcessExitedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn BrowserProcessExitKind(
+ &self,
+ value: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
+ ) -> windows_core::Result<()>;
+ fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()>;
+}
+impl ICoreWebView2BrowserProcessExitedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn BrowserProcessExitKind<
+ Identity: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserProcessExitedEventArgs_Impl::BrowserProcessExitKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn BrowserProcessId<
+ Identity: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserProcessExitedEventArgs_Impl::BrowserProcessId(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ BrowserProcessExitKind: BrowserProcessExitKind::<Identity, OFFSET>,
+ BrowserProcessId: BrowserProcessId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2BrowserProcessExitedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BrowserProcessExitedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BrowserProcessExitedEventHandler,
+ ICoreWebView2BrowserProcessExitedEventHandler_Vtbl,
+ 0xfa504257_a216_4911_a860_fe8825712861
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BrowserProcessExitedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BrowserProcessExitedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Environment>,
+ P1: windows_core::Param<ICoreWebView2BrowserProcessExitedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BrowserProcessExitedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BrowserProcessExitedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Environment>,
+ args: windows_core::Ref<'_, ICoreWebView2BrowserProcessExitedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2BrowserProcessExitedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BrowserProcessExitedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BrowserProcessExitedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2BrowserProcessExitedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BrowserProcessExitedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2BytesReceivedChangedEventHandler,
+ ICoreWebView2BytesReceivedChangedEventHandler_Vtbl,
+ 0x828e8ab6_d94c_4264_9cef_5217170d6251
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2BytesReceivedChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2BytesReceivedChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2DownloadOperation>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2BytesReceivedChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2BytesReceivedChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2DownloadOperation>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2BytesReceivedChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2BytesReceivedChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2BytesReceivedChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2BytesReceivedChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2BytesReceivedChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler,
+ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl,
+ 0x5c4889f0_5ef6_4c5a_952c_d8f1b92d0574
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2CallDevToolsProtocolMethodCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CapturePreviewCompletedHandler,
+ ICoreWebView2CapturePreviewCompletedHandler_Vtbl,
+ 0x697e05e9_3d8f_45fa_96f4_8ffe1ededaf5
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CapturePreviewCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CapturePreviewCompletedHandler {
+ pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CapturePreviewCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CapturePreviewCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CapturePreviewCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2CapturePreviewCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2CapturePreviewCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CapturePreviewCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CapturePreviewCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CapturePreviewCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Certificate,
+ ICoreWebView2Certificate_Vtbl,
+ 0xc5fb2fce_1cac_4aee_9c79_5ed0362eaae0
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Certificate, windows_core::IUnknown);
+impl ICoreWebView2Certificate {
+ pub unsafe fn Subject(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Subject)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Issuer(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Issuer)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ValidFrom(&self, value: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ValidFrom)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ValidTo(&self, value: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ValidTo)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DerEncodedSerialNumber(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DerEncodedSerialNumber)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DisplayName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DisplayName)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ToPemEncoding(
+ &self,
+ pemencodeddata: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ToPemEncoding)(
+ windows_core::Interface::as_raw(self),
+ pemencodeddata as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PemEncodedIssuerCertificateChain(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2StringCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).PemEncodedIssuerCertificateChain)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Certificate_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Subject: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Issuer: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ValidFrom:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub ValidTo:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub DerEncodedSerialNumber: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub DisplayName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ToPemEncoding: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub PemEncodedIssuerCertificateChain: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Certificate_Impl: windows_core::IUnknownImpl {
+ 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 ICoreWebView2Certificate_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Certificate_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Subject<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Certificate_Impl::Subject(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Issuer<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Certificate_Impl::Issuer(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn ValidFrom<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Certificate_Impl::ValidFrom(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn ValidTo<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Certificate_Impl::ValidTo(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn DerEncodedSerialNumber<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Certificate_Impl::DerEncodedSerialNumber(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DisplayName<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Certificate_Impl::DisplayName(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn ToPemEncoding<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pemencodeddata: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Certificate_Impl::ToPemEncoding(
+ this,
+ core::mem::transmute_copy(&pemencodeddata),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PemEncodedIssuerCertificateChain<
+ Identity: ICoreWebView2Certificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Certificate_Impl::PemEncodedIssuerCertificateChain(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Subject: Subject::<Identity, OFFSET>,
+ Issuer: Issuer::<Identity, OFFSET>,
+ ValidFrom: ValidFrom::<Identity, OFFSET>,
+ ValidTo: ValidTo::<Identity, OFFSET>,
+ DerEncodedSerialNumber: DerEncodedSerialNumber::<Identity, OFFSET>,
+ DisplayName: DisplayName::<Identity, OFFSET>,
+ ToPemEncoding: ToPemEncoding::<Identity, OFFSET>,
+ PemEncodedIssuerCertificateChain: PemEncodedIssuerCertificateChain::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Certificate as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Certificate {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ClearBrowsingDataCompletedHandler,
+ ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl,
+ 0xe9710a06_1d1d_49b2_8234_226f35846ae5
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ClearBrowsingDataCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ClearBrowsingDataCompletedHandler {
+ pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ClearBrowsingDataCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ClearBrowsingDataCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ClearBrowsingDataCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClearBrowsingDataCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ClearBrowsingDataCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ClearBrowsingDataCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
+ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl,
+ 0x3b40aac6_acfe_4ffd_8211_f607b96e2d5b
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {
+ pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ClientCertificate,
+ ICoreWebView2ClientCertificate_Vtbl,
+ 0xe7188076_bcc3_11eb_8529_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ClientCertificate, windows_core::IUnknown);
+impl ICoreWebView2ClientCertificate {
+ pub unsafe fn Subject(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Subject)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Issuer(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Issuer)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ValidFrom(&self, value: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ValidFrom)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ValidTo(&self, value: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ValidTo)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DerEncodedSerialNumber(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DerEncodedSerialNumber)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DisplayName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DisplayName)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ToPemEncoding(
+ &self,
+ pemencodeddata: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ToPemEncoding)(
+ windows_core::Interface::as_raw(self),
+ pemencodeddata as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PemEncodedIssuerCertificateChain(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2StringCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).PemEncodedIssuerCertificateChain)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Kind(
+ &self,
+ value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Kind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ClientCertificate_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Subject: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Issuer: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ValidFrom:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub ValidTo:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub DerEncodedSerialNumber: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub DisplayName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ToPemEncoding: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub PemEncodedIssuerCertificateChain: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Kind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ClientCertificate_Impl: windows_core::IUnknownImpl {
+ 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 ICoreWebView2ClientCertificate_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ClientCertificate_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Subject<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::Subject(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Issuer<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::Issuer(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn ValidFrom<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::ValidFrom(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ValidTo<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::ValidTo(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DerEncodedSerialNumber<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::DerEncodedSerialNumber(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DisplayName<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::DisplayName(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ToPemEncoding<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pemencodeddata: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::ToPemEncoding(
+ this,
+ core::mem::transmute_copy(&pemencodeddata),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PemEncodedIssuerCertificateChain<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ClientCertificate_Impl::PemEncodedIssuerCertificateChain(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Kind<
+ Identity: ICoreWebView2ClientCertificate_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificate_Impl::Kind(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Subject: Subject::<Identity, OFFSET>,
+ Issuer: Issuer::<Identity, OFFSET>,
+ ValidFrom: ValidFrom::<Identity, OFFSET>,
+ ValidTo: ValidTo::<Identity, OFFSET>,
+ DerEncodedSerialNumber: DerEncodedSerialNumber::<Identity, OFFSET>,
+ DisplayName: DisplayName::<Identity, OFFSET>,
+ ToPemEncoding: ToPemEncoding::<Identity, OFFSET>,
+ PemEncodedIssuerCertificateChain: PemEncodedIssuerCertificateChain::<Identity, OFFSET>,
+ Kind: Kind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ClientCertificate as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ClientCertificate {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ClientCertificateCollection,
+ ICoreWebView2ClientCertificateCollection_Vtbl,
+ 0xef5674d2_bcc3_11eb_8529_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ClientCertificateCollection,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ClientCertificateCollection {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ ) -> windows_core::Result<ICoreWebView2ClientCertificate> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ClientCertificateCollection_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ClientCertificateCollection_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2ClientCertificate>;
+}
+impl ICoreWebView2ClientCertificateCollection_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ClientCertificateCollection_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2ClientCertificateCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateCollection_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2ClientCertificateCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ClientCertificateCollection_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ClientCertificateCollection as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ClientCertificateCollection {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ClientCertificateRequestedEventArgs,
+ ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl,
+ 0xbc59db28_bcc3_11eb_8529_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ClientCertificateRequestedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ClientCertificateRequestedEventArgs {
+ pub unsafe fn Host(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Host)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Port(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Port)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsProxy(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsProxy)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AllowedCertificateAuthorities(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2StringCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).AllowedCertificateAuthorities)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn MutuallyTrustedCertificates(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2ClientCertificateCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).MutuallyTrustedCertificates)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SelectedCertificate(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2ClientCertificate> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).SelectedCertificate)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetSelectedCertificate<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ClientCertificate>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSelectedCertificate)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancel)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Host: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Port: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub IsProxy: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub AllowedCertificateAuthorities: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub MutuallyTrustedCertificates: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SelectedCertificate: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetSelectedCertificate: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Cancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetCancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ClientCertificateRequestedEventArgs_Impl:
+ windows_core::IUnknownImpl
+{
+ 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_core::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: windows_core::Ref<'_, ICoreWebView2ClientCertificate>,
+ ) -> windows_core::Result<()>;
+ fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Host<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Host(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Port<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Port(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsProxy<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::IsProxy(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AllowedCertificateAuthorities<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ClientCertificateRequestedEventArgs_Impl:: AllowedCertificateAuthorities ( this , ) { Ok ( ok__ ) => { value . write ( core::mem::transmute ( ok__ ) ) ; windows_core::HRESULT ( 0 ) } Err ( err ) => err . into ( ) }
+ }
+ }
+ unsafe extern "system" fn MutuallyTrustedCertificates<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ClientCertificateRequestedEventArgs_Impl:: MutuallyTrustedCertificates ( this , ) { Ok ( ok__ ) => { value . write ( core::mem::transmute ( ok__ ) ) ; windows_core::HRESULT ( 0 ) } Err ( err ) => err . into ( ) }
+ }
+ }
+ unsafe extern "system" fn SelectedCertificate<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SelectedCertificate(
+ this,
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetSelectedCertificate<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SetSelectedCertificate(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Cancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancel<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SetCancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ClientCertificateRequestedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Host: Host::<Identity, OFFSET>,
+ Port: Port::<Identity, OFFSET>,
+ IsProxy: IsProxy::<Identity, OFFSET>,
+ AllowedCertificateAuthorities: AllowedCertificateAuthorities::<Identity, OFFSET>,
+ MutuallyTrustedCertificates: MutuallyTrustedCertificates::<Identity, OFFSET>,
+ SelectedCertificate: SelectedCertificate::<Identity, OFFSET>,
+ SetSelectedCertificate: SetSelectedCertificate::<Identity, OFFSET>,
+ Cancel: Cancel::<Identity, OFFSET>,
+ SetCancel: SetCancel::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ClientCertificateRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ClientCertificateRequestedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ClientCertificateRequestedEventHandler,
+ ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl,
+ 0xd7175ba2_bcc3_11eb_8529_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ClientCertificateRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ClientCertificateRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2ClientCertificateRequestedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ClientCertificateRequestedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2ClientCertificateRequestedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ClientCertificateRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ClientCertificateRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ClientCertificateRequestedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ClientCertificateRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CompositionController,
+ ICoreWebView2CompositionController_Vtbl,
+ 0x3df9b733_b9ae_4a15_86b4_eb9ee9826469
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2CompositionController, windows_core::IUnknown);
+impl ICoreWebView2CompositionController {
+ pub unsafe fn RootVisualTarget(&self) -> windows_core::Result<windows_core::IUnknown> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).RootVisualTarget)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetRootVisualTarget<P0>(&self, target: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetRootVisualTarget)(
+ windows_core::Interface::as_raw(self),
+ target.param().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<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SendMouseInput)(
+ windows_core::Interface::as_raw(self),
+ eventkind,
+ virtualkeys,
+ mousedata,
+ core::mem::transmute(point),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SendPointerInput<P1>(
+ &self,
+ eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
+ pointerinfo: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2PointerInfo>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SendPointerInput)(
+ windows_core::Interface::as_raw(self),
+ eventkind,
+ pointerinfo.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Cursor(
+ &self,
+ cursor: *mut windows::Win32::UI::WindowsAndMessaging::HCURSOR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cursor)(
+ windows_core::Interface::as_raw(self),
+ cursor as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SystemCursorId(&self, systemcursorid: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SystemCursorId)(
+ windows_core::Interface::as_raw(self),
+ systemcursorid as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_CursorChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2CursorChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_CursorChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_CursorChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_CursorChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CompositionController_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub RootVisualTarget: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetRootVisualTarget: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SendMouseInput: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_MOUSE_EVENT_KIND,
+ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
+ u32,
+ windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub SendPointerInput: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_POINTER_EVENT_KIND,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Cursor: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::UI::WindowsAndMessaging::HCURSOR,
+ ) -> windows_core::HRESULT,
+ pub SystemCursorId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub add_CursorChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_CursorChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CompositionController_Impl: windows_core::IUnknownImpl {
+ fn RootVisualTarget(&self) -> windows_core::Result<windows_core::IUnknown>;
+ fn SetRootVisualTarget(
+ &self,
+ target: windows_core::Ref<'_, 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: windows_core::Ref<'_, 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: windows_core::Ref<'_, ICoreWebView2CursorChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_CursorChanged(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CompositionController_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CompositionController_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn RootVisualTarget<
+ Identity: ICoreWebView2CompositionController_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ target: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2CompositionController_Impl::RootVisualTarget(this) {
+ Ok(ok__) => {
+ target.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetRootVisualTarget<
+ Identity: ICoreWebView2CompositionController_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ target: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController_Impl::SetRootVisualTarget(
+ this,
+ core::mem::transmute_copy(&target),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SendMouseInput<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController_Impl::SendMouseInput(
+ this,
+ 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: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController_Impl::SendPointerInput(
+ this,
+ core::mem::transmute_copy(&eventkind),
+ core::mem::transmute_copy(&pointerinfo),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Cursor<
+ Identity: ICoreWebView2CompositionController_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cursor: *mut windows::Win32::UI::WindowsAndMessaging::HCURSOR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController_Impl::Cursor(
+ this,
+ core::mem::transmute_copy(&cursor),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SystemCursorId<
+ Identity: ICoreWebView2CompositionController_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ systemcursorid: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController_Impl::SystemCursorId(
+ this,
+ core::mem::transmute_copy(&systemcursorid),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_CursorChanged<
+ Identity: ICoreWebView2CompositionController_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController_Impl::add_CursorChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_CursorChanged<
+ Identity: ICoreWebView2CompositionController_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController_Impl::remove_CursorChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ RootVisualTarget: RootVisualTarget::<Identity, OFFSET>,
+ SetRootVisualTarget: SetRootVisualTarget::<Identity, OFFSET>,
+ SendMouseInput: SendMouseInput::<Identity, OFFSET>,
+ SendPointerInput: SendPointerInput::<Identity, OFFSET>,
+ Cursor: Cursor::<Identity, OFFSET>,
+ SystemCursorId: SystemCursorId::<Identity, OFFSET>,
+ add_CursorChanged: add_CursorChanged::<Identity, OFFSET>,
+ remove_CursorChanged: remove_CursorChanged::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CompositionController as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CompositionController {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CompositionController2,
+ ICoreWebView2CompositionController2_Vtbl,
+ 0x0b6a3d24_49cb_4806_ba20_b5e0734a7b26
+);
+impl core::ops::Deref for ICoreWebView2CompositionController2 {
+ type Target = ICoreWebView2CompositionController;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CompositionController2,
+ windows_core::IUnknown,
+ ICoreWebView2CompositionController
+);
+impl ICoreWebView2CompositionController2 {
+ pub unsafe fn AutomationProvider(&self) -> windows_core::Result<windows_core::IUnknown> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).AutomationProvider)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CompositionController2_Vtbl {
+ pub base__: ICoreWebView2CompositionController_Vtbl,
+ pub AutomationProvider: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CompositionController2_Impl:
+ ICoreWebView2CompositionController_Impl
+{
+ fn AutomationProvider(&self) -> windows_core::Result<windows_core::IUnknown>;
+}
+impl ICoreWebView2CompositionController2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CompositionController2_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn AutomationProvider<
+ Identity: ICoreWebView2CompositionController2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2CompositionController2_Impl::AutomationProvider(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2CompositionController_Vtbl::new::<Identity, OFFSET>(),
+ AutomationProvider: AutomationProvider::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CompositionController2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2CompositionController as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CompositionController2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CompositionController3,
+ ICoreWebView2CompositionController3_Vtbl,
+ 0x9570570e_4d76_4361_9ee1_f04d0dbdfb1e
+);
+impl core::ops::Deref for ICoreWebView2CompositionController3 {
+ type Target = ICoreWebView2CompositionController2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CompositionController3,
+ windows_core::IUnknown,
+ ICoreWebView2CompositionController,
+ ICoreWebView2CompositionController2
+);
+impl ICoreWebView2CompositionController3 {
+ pub unsafe fn DragEnter<P0>(
+ &self,
+ dataobject: P0,
+ keystate: u32,
+ point: windows::Win32::Foundation::POINT,
+ effect: *mut u32,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows::Win32::System::Com::IDataObject>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).DragEnter)(
+ windows_core::Interface::as_raw(self),
+ dataobject.param().abi(),
+ keystate,
+ core::mem::transmute(point),
+ effect as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DragLeave(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn DragOver(
+ &self,
+ keystate: u32,
+ point: windows::Win32::Foundation::POINT,
+ effect: *mut u32,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DragOver)(
+ windows_core::Interface::as_raw(self),
+ keystate,
+ core::mem::transmute(point),
+ effect as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Drop<P0>(
+ &self,
+ dataobject: P0,
+ keystate: u32,
+ point: windows::Win32::Foundation::POINT,
+ effect: *mut u32,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows::Win32::System::Com::IDataObject>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Drop)(
+ windows_core::Interface::as_raw(self),
+ dataobject.param().abi(),
+ keystate,
+ core::mem::transmute(point),
+ effect as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CompositionController3_Vtbl {
+ pub base__: ICoreWebView2CompositionController2_Vtbl,
+ pub DragEnter: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ u32,
+ windows::Win32::Foundation::POINT,
+ *mut u32,
+ ) -> windows_core::HRESULT,
+ pub DragLeave: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub DragOver: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ windows::Win32::Foundation::POINT,
+ *mut u32,
+ ) -> windows_core::HRESULT,
+ pub Drop: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ u32,
+ windows::Win32::Foundation::POINT,
+ *mut u32,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CompositionController3_Impl:
+ ICoreWebView2CompositionController2_Impl
+{
+ fn DragEnter(
+ &self,
+ dataobject: windows_core::Ref<'_, 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: windows_core::Ref<'_, windows::Win32::System::Com::IDataObject>,
+ keystate: u32,
+ point: &windows::Win32::Foundation::POINT,
+ effect: *mut u32,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CompositionController3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CompositionController3_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn DragEnter<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController3_Impl::DragEnter(
+ this,
+ core::mem::transmute_copy(&dataobject),
+ core::mem::transmute_copy(&keystate),
+ core::mem::transmute(&point),
+ core::mem::transmute_copy(&effect),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DragLeave<
+ Identity: ICoreWebView2CompositionController3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController3_Impl::DragLeave(this).into()
+ }
+ }
+ unsafe extern "system" fn DragOver<
+ Identity: ICoreWebView2CompositionController3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ keystate: u32,
+ point: windows::Win32::Foundation::POINT,
+ effect: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController3_Impl::DragOver(
+ this,
+ core::mem::transmute_copy(&keystate),
+ core::mem::transmute(&point),
+ core::mem::transmute_copy(&effect),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Drop<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController3_Impl::Drop(
+ this,
+ core::mem::transmute_copy(&dataobject),
+ core::mem::transmute_copy(&keystate),
+ core::mem::transmute(&point),
+ core::mem::transmute_copy(&effect),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2CompositionController2_Vtbl::new::<Identity, OFFSET>(),
+ DragEnter: DragEnter::<Identity, OFFSET>,
+ DragLeave: DragLeave::<Identity, OFFSET>,
+ DragOver: DragOver::<Identity, OFFSET>,
+ Drop: Drop::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CompositionController3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CompositionController4,
+ ICoreWebView2CompositionController4_Vtbl,
+ 0x7c367b9b_3d2b_450f_9e58_d61a20f486aa
+);
+impl core::ops::Deref for ICoreWebView2CompositionController4 {
+ type Target = ICoreWebView2CompositionController3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CompositionController4,
+ windows_core::IUnknown,
+ ICoreWebView2CompositionController,
+ ICoreWebView2CompositionController2,
+ ICoreWebView2CompositionController3
+);
+impl ICoreWebView2CompositionController4 {
+ pub unsafe fn GetNonClientRegionAtPoint(
+ &self,
+ point: windows::Win32::Foundation::POINT,
+ value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetNonClientRegionAtPoint)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(point),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn QueryNonClientRegion(
+ &self,
+ kind: COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::Result<ICoreWebView2RegionRectCollectionView> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).QueryNonClientRegion)(
+ windows_core::Interface::as_raw(self),
+ kind,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn add_NonClientRegionChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NonClientRegionChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NonClientRegionChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NonClientRegionChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NonClientRegionChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CompositionController4_Vtbl {
+ pub base__: ICoreWebView2CompositionController3_Vtbl,
+ pub GetNonClientRegionAtPoint: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::POINT,
+ *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::HRESULT,
+ pub QueryNonClientRegion: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub add_NonClientRegionChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NonClientRegionChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CompositionController4_Impl:
+ ICoreWebView2CompositionController3_Impl
+{
+ fn GetNonClientRegionAtPoint(
+ &self,
+ point: &windows::Win32::Foundation::POINT,
+ value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::Result<()>;
+ fn QueryNonClientRegion(
+ &self,
+ kind: COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::Result<ICoreWebView2RegionRectCollectionView>;
+ fn add_NonClientRegionChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2NonClientRegionChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NonClientRegionChanged(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CompositionController4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CompositionController4_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn GetNonClientRegionAtPoint<
+ Identity: ICoreWebView2CompositionController4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ point: windows::Win32::Foundation::POINT,
+ value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController4_Impl::GetNonClientRegionAtPoint(
+ this,
+ core::mem::transmute(&point),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn QueryNonClientRegion<
+ Identity: ICoreWebView2CompositionController4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ kind: COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ rects: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2CompositionController4_Impl::QueryNonClientRegion(
+ this,
+ core::mem::transmute_copy(&kind),
+ ) {
+ Ok(ok__) => {
+ rects.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn add_NonClientRegionChanged<
+ Identity: ICoreWebView2CompositionController4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController4_Impl::add_NonClientRegionChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NonClientRegionChanged<
+ Identity: ICoreWebView2CompositionController4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CompositionController4_Impl::remove_NonClientRegionChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2CompositionController3_Vtbl::new::<Identity, OFFSET>(),
+ GetNonClientRegionAtPoint: GetNonClientRegionAtPoint::<Identity, OFFSET>,
+ QueryNonClientRegion: QueryNonClientRegion::<Identity, OFFSET>,
+ add_NonClientRegionChanged: add_NonClientRegionChanged::<Identity, OFFSET>,
+ remove_NonClientRegionChanged: remove_NonClientRegionChanged::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CompositionController4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2CompositionController as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2CompositionController2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2CompositionController3 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CompositionController4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContainsFullScreenElementChangedEventHandler,
+ ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl,
+ 0xe45d98b1_afef_45be_8baf_6c7728867f73
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ContainsFullScreenElementChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ContainsFullScreenElementChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ContainsFullScreenElementChangedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContainsFullScreenElementChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContentLoadingEventArgs,
+ ICoreWebView2ContentLoadingEventArgs_Vtbl,
+ 0x0c8a1275_9b6b_4901_87ad_70df25bafa6e
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ContentLoadingEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ContentLoadingEventArgs {
+ pub unsafe fn IsErrorPage(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsErrorPage)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).NavigationId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContentLoadingEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub IsErrorPage: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub NavigationId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContentLoadingEventArgs_Impl: windows_core::IUnknownImpl {
+ fn IsErrorPage(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ContentLoadingEventArgs_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ContentLoadingEventArgs_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn IsErrorPage<
+ Identity: ICoreWebView2ContentLoadingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContentLoadingEventArgs_Impl::IsErrorPage(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn NavigationId<
+ Identity: ICoreWebView2ContentLoadingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContentLoadingEventArgs_Impl::NavigationId(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ IsErrorPage: IsErrorPage::<Identity, OFFSET>,
+ NavigationId: NavigationId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ContentLoadingEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContentLoadingEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContentLoadingEventHandler,
+ ICoreWebView2ContentLoadingEventHandler_Vtbl,
+ 0x364471e7_f2be_4910_bdba_d72077d51c4b
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ContentLoadingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ContentLoadingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2ContentLoadingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContentLoadingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContentLoadingEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2ContentLoadingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ContentLoadingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ContentLoadingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContentLoadingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ContentLoadingEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContentLoadingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContextMenuItem,
+ ICoreWebView2ContextMenuItem_Vtbl,
+ 0x7aed49e3_a93f_497a_811c_749c6b6b6c65
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ContextMenuItem, windows_core::IUnknown);
+impl ICoreWebView2ContextMenuItem {
+ pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Name)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Label(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Label)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CommandId(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).CommandId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShortcutKeyDescription(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShortcutKeyDescription)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Icon(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Icon)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Kind(
+ &self,
+ value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Kind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsChecked(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsChecked)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsChecked(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsChecked)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Children(&self) -> windows_core::Result<ICoreWebView2ContextMenuItemCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Children)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn add_CustomItemSelected<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2CustomItemSelectedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_CustomItemSelected)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_CustomItemSelected(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_CustomItemSelected)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContextMenuItem_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Name: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Label: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub CommandId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub ShortcutKeyDescription: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Icon: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Kind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
+ ) -> windows_core::HRESULT,
+ pub SetIsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsChecked: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsChecked: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Children: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub add_CustomItemSelected: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_CustomItemSelected:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContextMenuItem_Impl: windows_core::IUnknownImpl {
+ 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_core::BOOL) -> windows_core::Result<()>;
+ fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsChecked(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsChecked(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn Children(&self) -> windows_core::Result<ICoreWebView2ContextMenuItemCollection>;
+ fn add_CustomItemSelected(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2CustomItemSelectedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_CustomItemSelected(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ContextMenuItem_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ContextMenuItem_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Name<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::Name(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Label<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::Label(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn CommandId<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::CommandId(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShortcutKeyDescription<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::ShortcutKeyDescription(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Icon<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ContextMenuItem_Impl::Icon(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Kind<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::Kind(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsEnabled<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::SetIsEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsEnabled<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::IsEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsChecked<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::SetIsChecked(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsChecked<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::IsChecked(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Children<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ContextMenuItem_Impl::Children(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn add_CustomItemSelected<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::add_CustomItemSelected(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_CustomItemSelected<
+ Identity: ICoreWebView2ContextMenuItem_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItem_Impl::remove_CustomItemSelected(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Name: Name::<Identity, OFFSET>,
+ Label: Label::<Identity, OFFSET>,
+ CommandId: CommandId::<Identity, OFFSET>,
+ ShortcutKeyDescription: ShortcutKeyDescription::<Identity, OFFSET>,
+ Icon: Icon::<Identity, OFFSET>,
+ Kind: Kind::<Identity, OFFSET>,
+ SetIsEnabled: SetIsEnabled::<Identity, OFFSET>,
+ IsEnabled: IsEnabled::<Identity, OFFSET>,
+ SetIsChecked: SetIsChecked::<Identity, OFFSET>,
+ IsChecked: IsChecked::<Identity, OFFSET>,
+ Children: Children::<Identity, OFFSET>,
+ add_CustomItemSelected: add_CustomItemSelected::<Identity, OFFSET>,
+ remove_CustomItemSelected: remove_CustomItemSelected::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ContextMenuItem as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContextMenuItem {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContextMenuItemCollection,
+ ICoreWebView2ContextMenuItemCollection_Vtbl,
+ 0xf562a2f5_c415_45cf_b909_d4b7c1e276d3
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ContextMenuItemCollection,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ContextMenuItemCollection {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ ) -> windows_core::Result<ICoreWebView2ContextMenuItem> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn RemoveValueAtIndex(&self, index: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).RemoveValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn InsertValueAtIndex<P1>(&self, index: u32, value: P1) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2ContextMenuItem>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).InsertValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContextMenuItemCollection_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub RemoveValueAtIndex:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub InsertValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContextMenuItemCollection_Impl: windows_core::IUnknownImpl {
+ 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: windows_core::Ref<'_, ICoreWebView2ContextMenuItem>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ContextMenuItemCollection_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ContextMenuItemCollection_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2ContextMenuItemCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItemCollection_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2ContextMenuItemCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ContextMenuItemCollection_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn RemoveValueAtIndex<
+ Identity: ICoreWebView2ContextMenuItemCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItemCollection_Impl::RemoveValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn InsertValueAtIndex<
+ Identity: ICoreWebView2ContextMenuItemCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuItemCollection_Impl::InsertValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ RemoveValueAtIndex: RemoveValueAtIndex::<Identity, OFFSET>,
+ InsertValueAtIndex: InsertValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ContextMenuItemCollection as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContextMenuItemCollection {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContextMenuRequestedEventArgs,
+ ICoreWebView2ContextMenuRequestedEventArgs_Vtbl,
+ 0xa1d309ee_c03f_11eb_8529_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ContextMenuRequestedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ContextMenuRequestedEventArgs {
+ pub unsafe fn MenuItems(&self) -> windows_core::Result<ICoreWebView2ContextMenuItemCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).MenuItems)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn ContextMenuTarget(&self) -> windows_core::Result<ICoreWebView2ContextMenuTarget> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).ContextMenuTarget)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Location(
+ &self,
+ value: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Location)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetSelectedCommandId(&self, value: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSelectedCommandId)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SelectedCommandId(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SelectedCommandId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContextMenuRequestedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub MenuItems: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub ContextMenuTarget: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Location: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub SetSelectedCommandId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub SelectedCommandId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContextMenuRequestedEventArgs_Impl: windows_core::IUnknownImpl {
+ 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_core::BOOL) -> windows_core::Result<()>;
+ fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2ContextMenuRequestedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn MenuItems<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ContextMenuRequestedEventArgs_Impl::MenuItems(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn ContextMenuTarget<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ContextMenuRequestedEventArgs_Impl::ContextMenuTarget(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Location<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuRequestedEventArgs_Impl::Location(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetSelectedCommandId<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuRequestedEventArgs_Impl::SetSelectedCommandId(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SelectedCommandId<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuRequestedEventArgs_Impl::SelectedCommandId(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuRequestedEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuRequestedEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ContextMenuRequestedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ MenuItems: MenuItems::<Identity, OFFSET>,
+ ContextMenuTarget: ContextMenuTarget::<Identity, OFFSET>,
+ Location: Location::<Identity, OFFSET>,
+ SetSelectedCommandId: SetSelectedCommandId::<Identity, OFFSET>,
+ SelectedCommandId: SelectedCommandId::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ContextMenuRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContextMenuRequestedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContextMenuRequestedEventHandler,
+ ICoreWebView2ContextMenuRequestedEventHandler_Vtbl,
+ 0x04d3fe1d_ab87_42fb_a898_da241d35b63c
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ContextMenuRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ContextMenuRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2ContextMenuRequestedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContextMenuRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContextMenuRequestedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2ContextMenuRequestedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ContextMenuRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ContextMenuRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ContextMenuRequestedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContextMenuRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ContextMenuTarget,
+ ICoreWebView2ContextMenuTarget_Vtbl,
+ 0xb8611d99_eed6_4f3f_902c_a198502ad472
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ContextMenuTarget, windows_core::IUnknown);
+impl ICoreWebView2ContextMenuTarget {
+ pub unsafe fn Kind(
+ &self,
+ value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Kind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsEditable(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsEditable)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsRequestedForMainFrame(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsRequestedForMainFrame)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PageUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PageUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FrameUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FrameUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HasLinkUri(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasLinkUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn LinkUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).LinkUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HasLinkText(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasLinkText)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn LinkText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).LinkText)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HasSourceUri(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasSourceUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SourceUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SourceUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HasSelection(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasSelection)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SelectionText(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SelectionText)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ContextMenuTarget_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Kind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
+ ) -> windows_core::HRESULT,
+ pub IsEditable: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsRequestedForMainFrame: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub PageUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub FrameUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub HasLinkUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub LinkUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub HasLinkText: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub LinkText: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub HasSourceUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SourceUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub HasSelection: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SelectionText: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ContextMenuTarget_Impl: windows_core::IUnknownImpl {
+ fn Kind(&self, value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND) -> windows_core::Result<()>;
+ fn IsEditable(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsRequestedForMainFrame(&self, value: *mut windows_core::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_core::BOOL) -> windows_core::Result<()>;
+ fn LinkUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn HasLinkText(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn LinkText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn HasSourceUri(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SourceUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn HasSelection(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SelectionText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ContextMenuTarget_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ContextMenuTarget_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Kind<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::Kind(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsEditable<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::IsEditable(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsRequestedForMainFrame<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::IsRequestedForMainFrame(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PageUri<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::PageUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FrameUri<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::FrameUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HasLinkUri<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::HasLinkUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn LinkUri<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::LinkUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HasLinkText<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::HasLinkText(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn LinkText<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::LinkText(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HasSourceUri<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::HasSourceUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SourceUri<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::SourceUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HasSelection<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::HasSelection(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SelectionText<
+ Identity: ICoreWebView2ContextMenuTarget_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ContextMenuTarget_Impl::SelectionText(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Kind: Kind::<Identity, OFFSET>,
+ IsEditable: IsEditable::<Identity, OFFSET>,
+ IsRequestedForMainFrame: IsRequestedForMainFrame::<Identity, OFFSET>,
+ PageUri: PageUri::<Identity, OFFSET>,
+ FrameUri: FrameUri::<Identity, OFFSET>,
+ HasLinkUri: HasLinkUri::<Identity, OFFSET>,
+ LinkUri: LinkUri::<Identity, OFFSET>,
+ HasLinkText: HasLinkText::<Identity, OFFSET>,
+ LinkText: LinkText::<Identity, OFFSET>,
+ HasSourceUri: HasSourceUri::<Identity, OFFSET>,
+ SourceUri: SourceUri::<Identity, OFFSET>,
+ HasSelection: HasSelection::<Identity, OFFSET>,
+ SelectionText: SelectionText::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ContextMenuTarget as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ContextMenuTarget {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Controller,
+ ICoreWebView2Controller_Vtbl,
+ 0x4d00c0d1_9434_4eb6_8078_8697a560334f
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Controller, windows_core::IUnknown);
+impl ICoreWebView2Controller {
+ pub unsafe fn IsVisible(&self, isvisible: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsVisible)(
+ windows_core::Interface::as_raw(self),
+ isvisible as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsVisible(&self, isvisible: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsVisible)(
+ windows_core::Interface::as_raw(self),
+ isvisible.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Bounds(
+ &self,
+ bounds: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Bounds)(
+ windows_core::Interface::as_raw(self),
+ bounds as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetBounds(
+ &self,
+ bounds: windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetBounds)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(bounds),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ZoomFactor(&self, zoomfactor: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ZoomFactor)(
+ windows_core::Interface::as_raw(self),
+ zoomfactor as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetZoomFactor(&self, zoomfactor: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetZoomFactor)(
+ windows_core::Interface::as_raw(self),
+ zoomfactor,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ZoomFactorChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ZoomFactorChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ZoomFactorChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ZoomFactorChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ZoomFactorChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetBoundsAndZoomFactor(
+ &self,
+ bounds: windows::Win32::Foundation::RECT,
+ zoomfactor: f64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetBoundsAndZoomFactor)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(bounds),
+ zoomfactor,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MoveFocus(
+ &self,
+ reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MoveFocus)(
+ windows_core::Interface::as_raw(self),
+ reason,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_MoveFocusRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2MoveFocusRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_MoveFocusRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_MoveFocusRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_MoveFocusRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_GotFocus<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FocusChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_GotFocus)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_GotFocus(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_GotFocus)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_LostFocus<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FocusChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_LostFocus)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_LostFocus(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_LostFocus)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_AcceleratorKeyPressed<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2AcceleratorKeyPressedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_AcceleratorKeyPressed)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_AcceleratorKeyPressed(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_AcceleratorKeyPressed)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ParentWindow(
+ &self,
+ parentwindow: *mut windows::Win32::Foundation::HWND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ParentWindow)(
+ windows_core::Interface::as_raw(self),
+ parentwindow as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetParentWindow(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetParentWindow)(
+ windows_core::Interface::as_raw(self),
+ parentwindow,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn NotifyParentWindowPositionChanged(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).NotifyParentWindowPositionChanged)(
+ windows_core::Interface::as_raw(self),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Close(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn CoreWebView2(&self) -> windows_core::Result<ICoreWebView2> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CoreWebView2)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Controller_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub IsVisible: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsVisible: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Bounds: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub SetBounds: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub ZoomFactor:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetZoomFactor:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub add_ZoomFactorChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ZoomFactorChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub SetBoundsAndZoomFactor: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::RECT,
+ f64,
+ ) -> windows_core::HRESULT,
+ pub MoveFocus: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_MOVE_FOCUS_REASON,
+ ) -> windows_core::HRESULT,
+ pub add_MoveFocusRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_MoveFocusRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_GotFocus: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_GotFocus:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_LostFocus: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_LostFocus:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_AcceleratorKeyPressed: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_AcceleratorKeyPressed:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub ParentWindow: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::HWND,
+ ) -> windows_core::HRESULT,
+ pub SetParentWindow: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::HWND,
+ ) -> windows_core::HRESULT,
+ pub NotifyParentWindowPositionChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub CoreWebView2: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Controller_Impl: windows_core::IUnknownImpl {
+ fn IsVisible(&self, isvisible: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsVisible(&self, isvisible: windows_core::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: windows_core::Ref<'_, ICoreWebView2ZoomFactorChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ZoomFactorChanged(&self, token: i64) -> 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: windows_core::Ref<'_, ICoreWebView2MoveFocusRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_MoveFocusRequested(&self, token: i64) -> windows_core::Result<()>;
+ fn add_GotFocus(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FocusChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_GotFocus(&self, token: i64) -> windows_core::Result<()>;
+ fn add_LostFocus(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FocusChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_LostFocus(&self, token: i64) -> windows_core::Result<()>;
+ fn add_AcceleratorKeyPressed(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2AcceleratorKeyPressedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_AcceleratorKeyPressed(&self, token: i64) -> 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 ICoreWebView2Controller_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Controller_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsVisible<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isvisible: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::IsVisible(this, core::mem::transmute_copy(&isvisible))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsVisible<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isvisible: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::SetIsVisible(
+ this,
+ core::mem::transmute_copy(&isvisible),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Bounds<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ bounds: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::Bounds(this, core::mem::transmute_copy(&bounds))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetBounds<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ bounds: windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::SetBounds(this, core::mem::transmute(&bounds)).into()
+ }
+ }
+ unsafe extern "system" fn ZoomFactor<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ zoomfactor: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::ZoomFactor(
+ this,
+ core::mem::transmute_copy(&zoomfactor),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetZoomFactor<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ zoomfactor: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::SetZoomFactor(
+ this,
+ core::mem::transmute_copy(&zoomfactor),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_ZoomFactorChanged<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::add_ZoomFactorChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ZoomFactorChanged<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::remove_ZoomFactorChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetBoundsAndZoomFactor<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ bounds: windows::Win32::Foundation::RECT,
+ zoomfactor: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::SetBoundsAndZoomFactor(
+ this,
+ core::mem::transmute(&bounds),
+ core::mem::transmute_copy(&zoomfactor),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn MoveFocus<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::MoveFocus(this, core::mem::transmute_copy(&reason))
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_MoveFocusRequested<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::add_MoveFocusRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_MoveFocusRequested<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::remove_MoveFocusRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_GotFocus<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::add_GotFocus(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_GotFocus<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::remove_GotFocus(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_LostFocus<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::add_LostFocus(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_LostFocus<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::remove_LostFocus(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_AcceleratorKeyPressed<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::add_AcceleratorKeyPressed(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_AcceleratorKeyPressed<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::remove_AcceleratorKeyPressed(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ParentWindow<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ parentwindow: *mut windows::Win32::Foundation::HWND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::ParentWindow(
+ this,
+ core::mem::transmute_copy(&parentwindow),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetParentWindow<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ parentwindow: windows::Win32::Foundation::HWND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::SetParentWindow(
+ this,
+ core::mem::transmute_copy(&parentwindow),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn NotifyParentWindowPositionChanged<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::NotifyParentWindowPositionChanged(this).into()
+ }
+ }
+ unsafe extern "system" fn Close<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller_Impl::Close(this).into()
+ }
+ }
+ unsafe extern "system" fn CoreWebView2<
+ Identity: ICoreWebView2Controller_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ corewebview2: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Controller_Impl::CoreWebView2(this) {
+ Ok(ok__) => {
+ corewebview2.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ IsVisible: IsVisible::<Identity, OFFSET>,
+ SetIsVisible: SetIsVisible::<Identity, OFFSET>,
+ Bounds: Bounds::<Identity, OFFSET>,
+ SetBounds: SetBounds::<Identity, OFFSET>,
+ ZoomFactor: ZoomFactor::<Identity, OFFSET>,
+ SetZoomFactor: SetZoomFactor::<Identity, OFFSET>,
+ add_ZoomFactorChanged: add_ZoomFactorChanged::<Identity, OFFSET>,
+ remove_ZoomFactorChanged: remove_ZoomFactorChanged::<Identity, OFFSET>,
+ SetBoundsAndZoomFactor: SetBoundsAndZoomFactor::<Identity, OFFSET>,
+ MoveFocus: MoveFocus::<Identity, OFFSET>,
+ add_MoveFocusRequested: add_MoveFocusRequested::<Identity, OFFSET>,
+ remove_MoveFocusRequested: remove_MoveFocusRequested::<Identity, OFFSET>,
+ add_GotFocus: add_GotFocus::<Identity, OFFSET>,
+ remove_GotFocus: remove_GotFocus::<Identity, OFFSET>,
+ add_LostFocus: add_LostFocus::<Identity, OFFSET>,
+ remove_LostFocus: remove_LostFocus::<Identity, OFFSET>,
+ add_AcceleratorKeyPressed: add_AcceleratorKeyPressed::<Identity, OFFSET>,
+ remove_AcceleratorKeyPressed: remove_AcceleratorKeyPressed::<Identity, OFFSET>,
+ ParentWindow: ParentWindow::<Identity, OFFSET>,
+ SetParentWindow: SetParentWindow::<Identity, OFFSET>,
+ NotifyParentWindowPositionChanged: NotifyParentWindowPositionChanged::<Identity, OFFSET>,
+ Close: Close::<Identity, OFFSET>,
+ CoreWebView2: CoreWebView2::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Controller as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Controller {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Controller2,
+ ICoreWebView2Controller2_Vtbl,
+ 0xc979903e_d4ca_4228_92eb_47ee3fa96eab
+);
+impl core::ops::Deref for ICoreWebView2Controller2 {
+ type Target = ICoreWebView2Controller;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Controller2,
+ windows_core::IUnknown,
+ ICoreWebView2Controller
+);
+impl ICoreWebView2Controller2 {
+ pub unsafe fn DefaultBackgroundColor(
+ &self,
+ value: *mut COREWEBVIEW2_COLOR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DefaultBackgroundColor)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetDefaultBackgroundColor(
+ &self,
+ value: COREWEBVIEW2_COLOR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetDefaultBackgroundColor)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(value),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Controller2_Vtbl {
+ pub base__: ICoreWebView2Controller_Vtbl,
+ pub DefaultBackgroundColor: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT,
+ pub SetDefaultBackgroundColor: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Controller2_Impl: ICoreWebView2Controller_Impl {
+ fn DefaultBackgroundColor(&self, value: *mut COREWEBVIEW2_COLOR) -> windows_core::Result<()>;
+ fn SetDefaultBackgroundColor(&self, value: &COREWEBVIEW2_COLOR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Controller2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Controller2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn DefaultBackgroundColor<
+ Identity: ICoreWebView2Controller2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller2_Impl::DefaultBackgroundColor(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetDefaultBackgroundColor<
+ Identity: ICoreWebView2Controller2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller2_Impl::SetDefaultBackgroundColor(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Controller_Vtbl::new::<Identity, OFFSET>(),
+ DefaultBackgroundColor: DefaultBackgroundColor::<Identity, OFFSET>,
+ SetDefaultBackgroundColor: SetDefaultBackgroundColor::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Controller2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Controller as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Controller2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Controller3,
+ ICoreWebView2Controller3_Vtbl,
+ 0xf9614724_5d2b_41dc_aef7_73d62b51543b
+);
+impl core::ops::Deref for ICoreWebView2Controller3 {
+ type Target = ICoreWebView2Controller2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Controller3,
+ windows_core::IUnknown,
+ ICoreWebView2Controller,
+ ICoreWebView2Controller2
+);
+impl ICoreWebView2Controller3 {
+ pub unsafe fn RasterizationScale(&self, scale: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).RasterizationScale)(
+ windows_core::Interface::as_raw(self),
+ scale as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetRasterizationScale(&self, scale: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetRasterizationScale)(
+ windows_core::Interface::as_raw(self),
+ scale,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldDetectMonitorScaleChanges(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldDetectMonitorScaleChanges)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetShouldDetectMonitorScaleChanges(
+ &self,
+ value: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetShouldDetectMonitorScaleChanges)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_RasterizationScaleChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2RasterizationScaleChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_RasterizationScaleChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_RasterizationScaleChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_RasterizationScaleChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn BoundsMode(
+ &self,
+ boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BoundsMode)(
+ windows_core::Interface::as_raw(self),
+ boundsmode as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetBoundsMode(
+ &self,
+ boundsmode: COREWEBVIEW2_BOUNDS_MODE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetBoundsMode)(
+ windows_core::Interface::as_raw(self),
+ boundsmode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Controller3_Vtbl {
+ pub base__: ICoreWebView2Controller2_Vtbl,
+ pub RasterizationScale:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetRasterizationScale:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub ShouldDetectMonitorScaleChanges: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetShouldDetectMonitorScaleChanges: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub add_RasterizationScaleChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_RasterizationScaleChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub BoundsMode: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_BOUNDS_MODE,
+ ) -> windows_core::HRESULT,
+ pub SetBoundsMode: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_BOUNDS_MODE,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Controller3_Impl: 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_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetShouldDetectMonitorScaleChanges(
+ &self,
+ value: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn add_RasterizationScaleChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2RasterizationScaleChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_RasterizationScaleChanged(&self, token: i64) -> 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 ICoreWebView2Controller3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Controller3_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn RasterizationScale<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ scale: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::RasterizationScale(
+ this,
+ core::mem::transmute_copy(&scale),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetRasterizationScale<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ scale: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::SetRasterizationScale(
+ this,
+ core::mem::transmute_copy(&scale),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldDetectMonitorScaleChanges<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::ShouldDetectMonitorScaleChanges(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetShouldDetectMonitorScaleChanges<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::SetShouldDetectMonitorScaleChanges(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_RasterizationScaleChanged<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::add_RasterizationScaleChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_RasterizationScaleChanged<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::remove_RasterizationScaleChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn BoundsMode<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::BoundsMode(
+ this,
+ core::mem::transmute_copy(&boundsmode),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetBoundsMode<
+ Identity: ICoreWebView2Controller3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ boundsmode: COREWEBVIEW2_BOUNDS_MODE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller3_Impl::SetBoundsMode(
+ this,
+ core::mem::transmute_copy(&boundsmode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Controller2_Vtbl::new::<Identity, OFFSET>(),
+ RasterizationScale: RasterizationScale::<Identity, OFFSET>,
+ SetRasterizationScale: SetRasterizationScale::<Identity, OFFSET>,
+ ShouldDetectMonitorScaleChanges: ShouldDetectMonitorScaleChanges::<Identity, OFFSET>,
+ SetShouldDetectMonitorScaleChanges: SetShouldDetectMonitorScaleChanges::<
+ Identity,
+ OFFSET,
+ >,
+ add_RasterizationScaleChanged: add_RasterizationScaleChanged::<Identity, OFFSET>,
+ remove_RasterizationScaleChanged: remove_RasterizationScaleChanged::<Identity, OFFSET>,
+ BoundsMode: BoundsMode::<Identity, OFFSET>,
+ SetBoundsMode: SetBoundsMode::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Controller3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Controller4,
+ ICoreWebView2Controller4_Vtbl,
+ 0x97d418d5_a426_4e49_a151_e1a10f327d9e
+);
+impl core::ops::Deref for ICoreWebView2Controller4 {
+ type Target = ICoreWebView2Controller3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Controller4,
+ windows_core::IUnknown,
+ ICoreWebView2Controller,
+ ICoreWebView2Controller2,
+ ICoreWebView2Controller3
+);
+impl ICoreWebView2Controller4 {
+ pub unsafe fn AllowExternalDrop(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AllowExternalDrop)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAllowExternalDrop(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAllowExternalDrop)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Controller4_Vtbl {
+ pub base__: ICoreWebView2Controller3_Vtbl,
+ pub AllowExternalDrop: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAllowExternalDrop: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Controller4_Impl: ICoreWebView2Controller3_Impl {
+ fn AllowExternalDrop(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetAllowExternalDrop(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Controller4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Controller4_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn AllowExternalDrop<
+ Identity: ICoreWebView2Controller4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller4_Impl::AllowExternalDrop(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAllowExternalDrop<
+ Identity: ICoreWebView2Controller4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Controller4_Impl::SetAllowExternalDrop(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Controller3_Vtbl::new::<Identity, OFFSET>(),
+ AllowExternalDrop: AllowExternalDrop::<Identity, OFFSET>,
+ SetAllowExternalDrop: SetAllowExternalDrop::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Controller4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ControllerOptions,
+ ICoreWebView2ControllerOptions_Vtbl,
+ 0x12aae616_8ccb_44ec_bcb3_eb1831881635
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ControllerOptions, windows_core::IUnknown);
+impl ICoreWebView2ControllerOptions {
+ pub unsafe fn ProfileName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ProfileName)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetProfileName<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetProfileName)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsInPrivateModeEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsInPrivateModeEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsInPrivateModeEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsInPrivateModeEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ControllerOptions_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ProfileName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetProfileName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub IsInPrivateModeEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsInPrivateModeEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ControllerOptions_Impl: windows_core::IUnknownImpl {
+ 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_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsInPrivateModeEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ControllerOptions_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ControllerOptions_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn ProfileName<
+ Identity: ICoreWebView2ControllerOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions_Impl::ProfileName(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetProfileName<
+ Identity: ICoreWebView2ControllerOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions_Impl::SetProfileName(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsInPrivateModeEnabled<
+ Identity: ICoreWebView2ControllerOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions_Impl::IsInPrivateModeEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsInPrivateModeEnabled<
+ Identity: ICoreWebView2ControllerOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions_Impl::SetIsInPrivateModeEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ProfileName: ProfileName::<Identity, OFFSET>,
+ SetProfileName: SetProfileName::<Identity, OFFSET>,
+ IsInPrivateModeEnabled: IsInPrivateModeEnabled::<Identity, OFFSET>,
+ SetIsInPrivateModeEnabled: SetIsInPrivateModeEnabled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ControllerOptions as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ControllerOptions {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ControllerOptions2,
+ ICoreWebView2ControllerOptions2_Vtbl,
+ 0x06c991d8_9e7e_11ed_a8fc_0242ac120002
+);
+impl core::ops::Deref for ICoreWebView2ControllerOptions2 {
+ type Target = ICoreWebView2ControllerOptions;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ControllerOptions2,
+ windows_core::IUnknown,
+ ICoreWebView2ControllerOptions
+);
+impl ICoreWebView2ControllerOptions2 {
+ pub unsafe fn ScriptLocale(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ScriptLocale)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetScriptLocale<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetScriptLocale)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ControllerOptions2_Vtbl {
+ pub base__: ICoreWebView2ControllerOptions_Vtbl,
+ pub ScriptLocale: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetScriptLocale: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ControllerOptions2_Impl: ICoreWebView2ControllerOptions_Impl {
+ fn ScriptLocale(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn SetScriptLocale(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ControllerOptions2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ControllerOptions2_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn ScriptLocale<
+ Identity: ICoreWebView2ControllerOptions2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions2_Impl::ScriptLocale(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetScriptLocale<
+ Identity: ICoreWebView2ControllerOptions2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions2_Impl::SetScriptLocale(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2ControllerOptions_Vtbl::new::<Identity, OFFSET>(),
+ ScriptLocale: ScriptLocale::<Identity, OFFSET>,
+ SetScriptLocale: SetScriptLocale::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ControllerOptions2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ControllerOptions as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ControllerOptions2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ControllerOptions3,
+ ICoreWebView2ControllerOptions3_Vtbl,
+ 0xb32b191a_8998_57ca_b7cb_e04617e4ce4a
+);
+impl core::ops::Deref for ICoreWebView2ControllerOptions3 {
+ type Target = ICoreWebView2ControllerOptions2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ControllerOptions3,
+ windows_core::IUnknown,
+ ICoreWebView2ControllerOptions,
+ ICoreWebView2ControllerOptions2
+);
+impl ICoreWebView2ControllerOptions3 {
+ pub unsafe fn DefaultBackgroundColor(
+ &self,
+ value: *mut COREWEBVIEW2_COLOR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DefaultBackgroundColor)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetDefaultBackgroundColor(
+ &self,
+ value: COREWEBVIEW2_COLOR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetDefaultBackgroundColor)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(value),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ControllerOptions3_Vtbl {
+ pub base__: ICoreWebView2ControllerOptions2_Vtbl,
+ pub DefaultBackgroundColor: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT,
+ pub SetDefaultBackgroundColor: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ControllerOptions3_Impl: ICoreWebView2ControllerOptions2_Impl {
+ fn DefaultBackgroundColor(&self, value: *mut COREWEBVIEW2_COLOR) -> windows_core::Result<()>;
+ fn SetDefaultBackgroundColor(&self, value: &COREWEBVIEW2_COLOR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ControllerOptions3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ControllerOptions3_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn DefaultBackgroundColor<
+ Identity: ICoreWebView2ControllerOptions3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions3_Impl::DefaultBackgroundColor(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetDefaultBackgroundColor<
+ Identity: ICoreWebView2ControllerOptions3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_COLOR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions3_Impl::SetDefaultBackgroundColor(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2ControllerOptions2_Vtbl::new::<Identity, OFFSET>(),
+ DefaultBackgroundColor: DefaultBackgroundColor::<Identity, OFFSET>,
+ SetDefaultBackgroundColor: SetDefaultBackgroundColor::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ControllerOptions3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ControllerOptions as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ControllerOptions2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ControllerOptions3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ControllerOptions4,
+ ICoreWebView2ControllerOptions4_Vtbl,
+ 0x21eb052f_ad39_555e_824a_c87b091d4d36
+);
+impl core::ops::Deref for ICoreWebView2ControllerOptions4 {
+ type Target = ICoreWebView2ControllerOptions3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ControllerOptions4,
+ windows_core::IUnknown,
+ ICoreWebView2ControllerOptions,
+ ICoreWebView2ControllerOptions2,
+ ICoreWebView2ControllerOptions3
+);
+impl ICoreWebView2ControllerOptions4 {
+ pub unsafe fn AllowHostInputProcessing(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AllowHostInputProcessing)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAllowHostInputProcessing(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAllowHostInputProcessing)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ControllerOptions4_Vtbl {
+ pub base__: ICoreWebView2ControllerOptions3_Vtbl,
+ pub AllowHostInputProcessing: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAllowHostInputProcessing: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ControllerOptions4_Impl: ICoreWebView2ControllerOptions3_Impl {
+ fn AllowHostInputProcessing(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetAllowHostInputProcessing(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ControllerOptions4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ControllerOptions4_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn AllowHostInputProcessing<
+ Identity: ICoreWebView2ControllerOptions4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions4_Impl::AllowHostInputProcessing(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAllowHostInputProcessing<
+ Identity: ICoreWebView2ControllerOptions4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ControllerOptions4_Impl::SetAllowHostInputProcessing(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2ControllerOptions3_Vtbl::new::<Identity, OFFSET>(),
+ AllowHostInputProcessing: AllowHostInputProcessing::<Identity, OFFSET>,
+ SetAllowHostInputProcessing: SetAllowHostInputProcessing::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ControllerOptions4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ControllerOptions as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ControllerOptions2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ControllerOptions3 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ControllerOptions4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Cookie,
+ ICoreWebView2Cookie_Vtbl,
+ 0xad26d6be_1486_43e6_bf87_a2034006ca21
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Cookie, windows_core::IUnknown);
+impl ICoreWebView2Cookie {
+ pub unsafe fn Name(&self, name: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Name)(
+ windows_core::Interface::as_raw(self),
+ name as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Value(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Value)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetValue<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetValue)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Domain(&self, domain: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Domain)(
+ windows_core::Interface::as_raw(self),
+ domain as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Path(&self, path: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Path)(
+ windows_core::Interface::as_raw(self),
+ path as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Expires(&self, expires: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Expires)(
+ windows_core::Interface::as_raw(self),
+ expires as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetExpires(&self, expires: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetExpires)(
+ windows_core::Interface::as_raw(self),
+ expires,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsHttpOnly(
+ &self,
+ ishttponly: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsHttpOnly)(
+ windows_core::Interface::as_raw(self),
+ ishttponly as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsHttpOnly(&self, ishttponly: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsHttpOnly)(
+ windows_core::Interface::as_raw(self),
+ ishttponly.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SameSite(
+ &self,
+ samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SameSite)(
+ windows_core::Interface::as_raw(self),
+ samesite as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetSameSite(
+ &self,
+ samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSameSite)(
+ windows_core::Interface::as_raw(self),
+ samesite,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsSecure(&self, issecure: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsSecure)(
+ windows_core::Interface::as_raw(self),
+ issecure as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsSecure(&self, issecure: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsSecure)(
+ windows_core::Interface::as_raw(self),
+ issecure.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsSession(&self, issession: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsSession)(
+ windows_core::Interface::as_raw(self),
+ issession as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Cookie_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Name: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Value: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetValue: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub Domain: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Path: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Expires:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetExpires: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub IsHttpOnly: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsHttpOnly: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SameSite: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
+ ) -> windows_core::HRESULT,
+ pub SetSameSite: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
+ ) -> windows_core::HRESULT,
+ pub IsSecure: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsSecure: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsSession: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Cookie_Impl: windows_core::IUnknownImpl {
+ 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_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsHttpOnly(&self, ishttponly: windows_core::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_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsSecure(&self, issecure: windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsSession(&self, issession: *mut windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Cookie_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Name<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ name: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::Name(this, core::mem::transmute_copy(&name)).into()
+ }
+ }
+ unsafe extern "system" fn Value<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::Value(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn SetValue<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::SetValue(this, core::mem::transmute(&value)).into()
+ }
+ }
+ unsafe extern "system" fn Domain<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ domain: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::Domain(this, core::mem::transmute_copy(&domain)).into()
+ }
+ }
+ unsafe extern "system" fn Path<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ path: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::Path(this, core::mem::transmute_copy(&path)).into()
+ }
+ }
+ unsafe extern "system" fn Expires<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ expires: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::Expires(this, core::mem::transmute_copy(&expires)).into()
+ }
+ }
+ unsafe extern "system" fn SetExpires<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ expires: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::SetExpires(this, core::mem::transmute_copy(&expires))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsHttpOnly<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ishttponly: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::IsHttpOnly(this, core::mem::transmute_copy(&ishttponly))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsHttpOnly<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ishttponly: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::SetIsHttpOnly(
+ this,
+ core::mem::transmute_copy(&ishttponly),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SameSite<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::SameSite(this, core::mem::transmute_copy(&samesite))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetSameSite<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::SetSameSite(this, core::mem::transmute_copy(&samesite))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsSecure<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ issecure: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::IsSecure(this, core::mem::transmute_copy(&issecure))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsSecure<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ issecure: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::SetIsSecure(this, core::mem::transmute_copy(&issecure))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsSession<
+ Identity: ICoreWebView2Cookie_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ issession: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Cookie_Impl::IsSession(this, core::mem::transmute_copy(&issession))
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Name: Name::<Identity, OFFSET>,
+ Value: Value::<Identity, OFFSET>,
+ SetValue: SetValue::<Identity, OFFSET>,
+ Domain: Domain::<Identity, OFFSET>,
+ Path: Path::<Identity, OFFSET>,
+ Expires: Expires::<Identity, OFFSET>,
+ SetExpires: SetExpires::<Identity, OFFSET>,
+ IsHttpOnly: IsHttpOnly::<Identity, OFFSET>,
+ SetIsHttpOnly: SetIsHttpOnly::<Identity, OFFSET>,
+ SameSite: SameSite::<Identity, OFFSET>,
+ SetSameSite: SetSameSite::<Identity, OFFSET>,
+ IsSecure: IsSecure::<Identity, OFFSET>,
+ SetIsSecure: SetIsSecure::<Identity, OFFSET>,
+ IsSession: IsSession::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Cookie as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Cookie {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CookieList,
+ ICoreWebView2CookieList_Vtbl,
+ 0xf7f6f714_5d2a_43c6_9503_346ece02d186
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2CookieList, windows_core::IUnknown);
+impl ICoreWebView2CookieList {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2Cookie> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CookieList_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CookieList_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2Cookie>;
+}
+impl ICoreWebView2CookieList_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CookieList_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2CookieList_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CookieList_Impl::Count(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2CookieList_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2CookieList_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CookieList as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CookieList {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CookieManager,
+ ICoreWebView2CookieManager_Vtbl,
+ 0x177cd9e7_b6f5_451a_94a0_5d7a3a4c4141
+);
+windows_core::imp::interface_hierarchy!(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: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ P2: windows_core::Param<windows_core::PCWSTR>,
+ P3: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateCookie)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ value.param().abi(),
+ domain.param().abi(),
+ path.param().abi(),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn CopyCookie<P0>(
+ &self,
+ cookieparam: P0,
+ ) -> windows_core::Result<ICoreWebView2Cookie>
+ where
+ P0: windows_core::Param<ICoreWebView2Cookie>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CopyCookie)(
+ windows_core::Interface::as_raw(self),
+ cookieparam.param().abi(),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn GetCookies<P0, P1>(&self, uri: P0, handler: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2GetCookiesCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetCookies)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AddOrUpdateCookie<P0>(&self, cookie: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Cookie>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).AddOrUpdateCookie)(
+ windows_core::Interface::as_raw(self),
+ cookie.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DeleteCookie<P0>(&self, cookie: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Cookie>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).DeleteCookie)(
+ windows_core::Interface::as_raw(self),
+ cookie.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DeleteCookies<P0, P1>(&self, name: P0, uri: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).DeleteCookies)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ uri.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DeleteCookiesWithDomainAndPath<P0, P1, P2>(
+ &self,
+ name: P0,
+ domain: P1,
+ path: P2,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ P2: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).DeleteCookiesWithDomainAndPath)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ domain.param().abi(),
+ path.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DeleteAllCookies(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DeleteAllCookies)(
+ windows_core::Interface::as_raw(self),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CookieManager_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub CreateCookie: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub CopyCookie: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub GetCookies: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub AddOrUpdateCookie: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub DeleteCookie: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub DeleteCookies: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub DeleteCookiesWithDomainAndPath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub DeleteAllCookies:
+ unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CookieManager_Impl: windows_core::IUnknownImpl {
+ 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: windows_core::Ref<'_, ICoreWebView2Cookie>,
+ ) -> windows_core::Result<ICoreWebView2Cookie>;
+ fn GetCookies(
+ &self,
+ uri: &windows_core::PCWSTR,
+ handler: windows_core::Ref<'_, ICoreWebView2GetCookiesCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn AddOrUpdateCookie(
+ &self,
+ cookie: windows_core::Ref<'_, ICoreWebView2Cookie>,
+ ) -> windows_core::Result<()>;
+ fn DeleteCookie(
+ &self,
+ cookie: windows_core::Ref<'_, 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 ICoreWebView2CookieManager_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CookieManager_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateCookie<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2CookieManager_Impl::CreateCookie(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute(&value),
+ core::mem::transmute(&domain),
+ core::mem::transmute(&path),
+ ) {
+ Ok(ok__) => {
+ cookie.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn CopyCookie<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2CookieManager_Impl::CopyCookie(
+ this,
+ core::mem::transmute_copy(&cookieparam),
+ ) {
+ Ok(ok__) => {
+ cookie.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn GetCookies<
+ Identity: ICoreWebView2CookieManager_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: windows_core::PCWSTR,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CookieManager_Impl::GetCookies(
+ this,
+ core::mem::transmute(&uri),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AddOrUpdateCookie<
+ Identity: ICoreWebView2CookieManager_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cookie: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CookieManager_Impl::AddOrUpdateCookie(
+ this,
+ core::mem::transmute_copy(&cookie),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DeleteCookie<
+ Identity: ICoreWebView2CookieManager_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cookie: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CookieManager_Impl::DeleteCookie(
+ this,
+ core::mem::transmute_copy(&cookie),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DeleteCookies<
+ Identity: ICoreWebView2CookieManager_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ uri: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CookieManager_Impl::DeleteCookies(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute(&uri),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DeleteCookiesWithDomainAndPath<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CookieManager_Impl::DeleteCookiesWithDomainAndPath(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute(&domain),
+ core::mem::transmute(&path),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DeleteAllCookies<
+ Identity: ICoreWebView2CookieManager_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CookieManager_Impl::DeleteAllCookies(this).into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ CreateCookie: CreateCookie::<Identity, OFFSET>,
+ CopyCookie: CopyCookie::<Identity, OFFSET>,
+ GetCookies: GetCookies::<Identity, OFFSET>,
+ AddOrUpdateCookie: AddOrUpdateCookie::<Identity, OFFSET>,
+ DeleteCookie: DeleteCookie::<Identity, OFFSET>,
+ DeleteCookies: DeleteCookies::<Identity, OFFSET>,
+ DeleteCookiesWithDomainAndPath: DeleteCookiesWithDomainAndPath::<Identity, OFFSET>,
+ DeleteAllCookies: DeleteAllCookies::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CookieManager as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CookieManager {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl,
+ 0x02fab84b_1428_4fb7_ad45_1b2e64736184
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2CompositionController>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2CompositionController>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName
+ for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler
+{
+}
+windows_core::imp::define_interface!(
+ ICoreWebView2CreateCoreWebView2ControllerCompletedHandler,
+ ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl,
+ 0x6c4819f3_c9b7_4260_8127_c9f5bde7f68c
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CreateCoreWebView2ControllerCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2Controller>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2Controller>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2CreateCoreWebView2ControllerCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler,
+ ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl,
+ 0x4e8a3389_c9d8_4bd2_b6b5_124fee6cc14d
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2Environment>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2Environment>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CursorChangedEventHandler,
+ ICoreWebView2CursorChangedEventHandler_Vtbl,
+ 0x9da43ccc_26e1_4dad_b56c_d8961c94c571
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CursorChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CursorChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2CompositionController>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CursorChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CursorChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2CompositionController>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CursorChangedEventHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CursorChangedEventHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CursorChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CursorChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CursorChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CustomItemSelectedEventHandler,
+ ICoreWebView2CustomItemSelectedEventHandler_Vtbl,
+ 0x49e1d0bc_fe9e_4481_b7c2_32324aa21998
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CustomItemSelectedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CustomItemSelectedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ContextMenuItem>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CustomItemSelectedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CustomItemSelectedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2ContextMenuItem>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CustomItemSelectedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2CustomItemSelectedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomItemSelectedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CustomItemSelectedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CustomItemSelectedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2CustomSchemeRegistration,
+ ICoreWebView2CustomSchemeRegistration_Vtbl,
+ 0xd60ac92c_37a6_4b26_a39e_95cfe59047bb
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2CustomSchemeRegistration,
+ windows_core::IUnknown
+);
+impl ICoreWebView2CustomSchemeRegistration {
+ pub unsafe fn SchemeName(
+ &self,
+ schemename: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SchemeName)(
+ windows_core::Interface::as_raw(self),
+ schemename as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TreatAsSecure(
+ &self,
+ treatassecure: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TreatAsSecure)(
+ windows_core::Interface::as_raw(self),
+ treatassecure as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTreatAsSecure(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTreatAsSecure)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetAllowedOrigins(
+ &self,
+ allowedoriginscount: *mut u32,
+ allowedorigins: *mut *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetAllowedOrigins)(
+ windows_core::Interface::as_raw(self),
+ allowedoriginscount as _,
+ allowedorigins as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAllowedOrigins(
+ &self,
+ allowedoriginscount: u32,
+ allowedorigins: *const windows_core::PCWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAllowedOrigins)(
+ windows_core::Interface::as_raw(self),
+ allowedoriginscount,
+ allowedorigins,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HasAuthorityComponent(
+ &self,
+ hasauthoritycomponent: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasAuthorityComponent)(
+ windows_core::Interface::as_raw(self),
+ hasauthoritycomponent as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHasAuthorityComponent(
+ &self,
+ hasauthoritycomponent: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHasAuthorityComponent)(
+ windows_core::Interface::as_raw(self),
+ hasauthoritycomponent.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2CustomSchemeRegistration_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub SchemeName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub TreatAsSecure: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetTreatAsSecure: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetAllowedOrigins: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut u32,
+ *mut *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetAllowedOrigins: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *const windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub HasAuthorityComponent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHasAuthorityComponent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2CustomSchemeRegistration_Impl: windows_core::IUnknownImpl {
+ fn SchemeName(&self, schemename: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn TreatAsSecure(&self, treatassecure: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetTreatAsSecure(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetAllowedOrigins(
+ &self,
+ allowedoriginscount: *mut u32,
+ allowedorigins: *mut *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()>;
+ fn SetAllowedOrigins(
+ &self,
+ allowedoriginscount: u32,
+ allowedorigins: *const windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+ fn HasAuthorityComponent(
+ &self,
+ hasauthoritycomponent: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetHasAuthorityComponent(
+ &self,
+ hasauthoritycomponent: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2CustomSchemeRegistration_Vtbl {
+ pub const fn new<Identity: ICoreWebView2CustomSchemeRegistration_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn SchemeName<
+ Identity: ICoreWebView2CustomSchemeRegistration_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ schemename: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomSchemeRegistration_Impl::SchemeName(
+ this,
+ core::mem::transmute_copy(&schemename),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TreatAsSecure<
+ Identity: ICoreWebView2CustomSchemeRegistration_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ treatassecure: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomSchemeRegistration_Impl::TreatAsSecure(
+ this,
+ core::mem::transmute_copy(&treatassecure),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTreatAsSecure<
+ Identity: ICoreWebView2CustomSchemeRegistration_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomSchemeRegistration_Impl::SetTreatAsSecure(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetAllowedOrigins<
+ Identity: ICoreWebView2CustomSchemeRegistration_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ allowedoriginscount: *mut u32,
+ allowedorigins: *mut *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomSchemeRegistration_Impl::GetAllowedOrigins(
+ this,
+ core::mem::transmute_copy(&allowedoriginscount),
+ core::mem::transmute_copy(&allowedorigins),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAllowedOrigins<
+ Identity: ICoreWebView2CustomSchemeRegistration_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ allowedoriginscount: u32,
+ allowedorigins: *const windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomSchemeRegistration_Impl::SetAllowedOrigins(
+ this,
+ core::mem::transmute_copy(&allowedoriginscount),
+ core::mem::transmute_copy(&allowedorigins),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HasAuthorityComponent<
+ Identity: ICoreWebView2CustomSchemeRegistration_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ hasauthoritycomponent: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomSchemeRegistration_Impl::HasAuthorityComponent(
+ this,
+ core::mem::transmute_copy(&hasauthoritycomponent),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHasAuthorityComponent<
+ Identity: ICoreWebView2CustomSchemeRegistration_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ hasauthoritycomponent: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2CustomSchemeRegistration_Impl::SetHasAuthorityComponent(
+ this,
+ core::mem::transmute_copy(&hasauthoritycomponent),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ SchemeName: SchemeName::<Identity, OFFSET>,
+ TreatAsSecure: TreatAsSecure::<Identity, OFFSET>,
+ SetTreatAsSecure: SetTreatAsSecure::<Identity, OFFSET>,
+ GetAllowedOrigins: GetAllowedOrigins::<Identity, OFFSET>,
+ SetAllowedOrigins: SetAllowedOrigins::<Identity, OFFSET>,
+ HasAuthorityComponent: HasAuthorityComponent::<Identity, OFFSET>,
+ SetHasAuthorityComponent: SetHasAuthorityComponent::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2CustomSchemeRegistration as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2CustomSchemeRegistration {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DOMContentLoadedEventArgs,
+ ICoreWebView2DOMContentLoadedEventArgs_Vtbl,
+ 0x16b1e21a_c503_44f2_84c9_70aba5031283
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DOMContentLoadedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DOMContentLoadedEventArgs {
+ pub unsafe fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).NavigationId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DOMContentLoadedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub NavigationId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DOMContentLoadedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DOMContentLoadedEventArgs_Vtbl {
+ pub const fn new<Identity: ICoreWebView2DOMContentLoadedEventArgs_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn NavigationId<
+ Identity: ICoreWebView2DOMContentLoadedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DOMContentLoadedEventArgs_Impl::NavigationId(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ NavigationId: NavigationId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2DOMContentLoadedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DOMContentLoadedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DOMContentLoadedEventHandler,
+ ICoreWebView2DOMContentLoadedEventHandler_Vtbl,
+ 0x4bac7e9c_199e_49ed_87ed_249303acf019
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DOMContentLoadedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DOMContentLoadedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2DOMContentLoadedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DOMContentLoadedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DOMContentLoadedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2DOMContentLoadedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DOMContentLoadedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2DOMContentLoadedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DOMContentLoadedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2DOMContentLoadedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DOMContentLoadedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Deferral,
+ ICoreWebView2Deferral_Vtbl,
+ 0xc10e7f7b_b585_46f0_a623_8befbf3e4ee0
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Deferral, windows_core::IUnknown);
+impl ICoreWebView2Deferral {
+ pub unsafe fn Complete(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Complete)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Deferral_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Complete: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Deferral_Impl: windows_core::IUnknownImpl {
+ fn Complete(&self) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Deferral_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Deferral_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Complete<
+ Identity: ICoreWebView2Deferral_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Deferral_Impl::Complete(this).into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Complete: Complete::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Deferral as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Deferral {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs,
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl,
+ 0x653c2959_bb3a_4377_8632_b58ada4e66c4
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
+ pub unsafe fn ParameterObjectAsJson(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ParameterObjectAsJson)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ParameterObjectAsJson: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl:
+ windows_core::IUnknownImpl
+{
+ fn ParameterObjectAsJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn ParameterObjectAsJson<
+ Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl::ParameterObjectAsJson(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ParameterObjectAsJson: ParameterObjectAsJson::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs2,
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl,
+ 0x2dc4959d_1494_4393_95ba_bea4cb9ebd1b
+);
+impl core::ops::Deref for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
+ type Target = ICoreWebView2DevToolsProtocolEventReceivedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs
+);
+impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
+ pub unsafe fn SessionId(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SessionId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl,
+ pub SessionId: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl:
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl
+{
+ fn SessionId(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn SessionId<
+ Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl::SessionId(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl::new::<Identity, OFFSET>(
+ ),
+ SessionId: SessionId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 as windows_core::Interface >::IID || iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DevToolsProtocolEventReceivedEventHandler,
+ ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl,
+ 0xe2fda4be_5456_406c_a261_3d452138362c
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DevToolsProtocolEventReceivedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2DevToolsProtocolEventReceivedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2DevToolsProtocolEventReceivedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DevToolsProtocolEventReceiver,
+ ICoreWebView2DevToolsProtocolEventReceiver_Vtbl,
+ 0xb32ca51a_8371_45e9_9317_af021d080367
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DevToolsProtocolEventReceiver,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DevToolsProtocolEventReceiver {
+ pub unsafe fn add_DevToolsProtocolEventReceived<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2DevToolsProtocolEventReceivedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_DevToolsProtocolEventReceived)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_DevToolsProtocolEventReceived(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_DevToolsProtocolEventReceived)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DevToolsProtocolEventReceiver_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub add_DevToolsProtocolEventReceived: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_DevToolsProtocolEventReceived:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DevToolsProtocolEventReceiver_Impl: windows_core::IUnknownImpl {
+ fn add_DevToolsProtocolEventReceived(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2DevToolsProtocolEventReceivedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_DevToolsProtocolEventReceived(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DevToolsProtocolEventReceiver_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn add_DevToolsProtocolEventReceived<
+ Identity: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DevToolsProtocolEventReceiver_Impl::add_DevToolsProtocolEventReceived(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_DevToolsProtocolEventReceived<
+ Identity: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DevToolsProtocolEventReceiver_Impl:: remove_DevToolsProtocolEventReceived ( this , core::mem::transmute_copy ( & token ) , ) . into ( )
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ add_DevToolsProtocolEventReceived: add_DevToolsProtocolEventReceived::<Identity, OFFSET>,
+ remove_DevToolsProtocolEventReceived: remove_DevToolsProtocolEventReceived::<
+ Identity,
+ OFFSET,
+ >,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2DevToolsProtocolEventReceiver as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceiver {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DocumentTitleChangedEventHandler,
+ ICoreWebView2DocumentTitleChangedEventHandler_Vtbl,
+ 0xf5f2b923_953e_4042_9f95_f3a118e1afd4
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DocumentTitleChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DocumentTitleChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DocumentTitleChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DocumentTitleChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DocumentTitleChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2DocumentTitleChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DocumentTitleChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2DocumentTitleChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DocumentTitleChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DownloadOperation,
+ ICoreWebView2DownloadOperation_Vtbl,
+ 0x3d6b6cf2_afe1_44c7_a995_c65117714336
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2DownloadOperation, windows_core::IUnknown);
+impl ICoreWebView2DownloadOperation {
+ pub unsafe fn add_BytesReceivedChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2BytesReceivedChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_BytesReceivedChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_BytesReceivedChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_BytesReceivedChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_EstimatedEndTimeChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2EstimatedEndTimeChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_EstimatedEndTimeChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_EstimatedEndTimeChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_EstimatedEndTimeChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_StateChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2StateChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_StateChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_StateChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_StateChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ uri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ContentDisposition(
+ &self,
+ contentdisposition: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ContentDisposition)(
+ windows_core::Interface::as_raw(self),
+ contentdisposition as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MimeType(&self, mimetype: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MimeType)(
+ windows_core::Interface::as_raw(self),
+ mimetype as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TotalBytesToReceive(
+ &self,
+ totalbytestoreceive: *mut i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TotalBytesToReceive)(
+ windows_core::Interface::as_raw(self),
+ totalbytestoreceive as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn BytesReceived(&self, bytesreceived: *mut i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BytesReceived)(
+ windows_core::Interface::as_raw(self),
+ bytesreceived as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn EstimatedEndTime(
+ &self,
+ estimatedendtime: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).EstimatedEndTime)(
+ windows_core::Interface::as_raw(self),
+ estimatedendtime as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ResultFilePath(
+ &self,
+ resultfilepath: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ResultFilePath)(
+ windows_core::Interface::as_raw(self),
+ resultfilepath as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn State(
+ &self,
+ downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).State)(
+ windows_core::Interface::as_raw(self),
+ downloadstate as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn InterruptReason(
+ &self,
+ interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).InterruptReason)(
+ windows_core::Interface::as_raw(self),
+ interruptreason as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Cancel(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn Pause(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn Resume(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn CanResume(&self, canresume: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).CanResume)(
+ windows_core::Interface::as_raw(self),
+ canresume as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DownloadOperation_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub add_BytesReceivedChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_BytesReceivedChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_EstimatedEndTimeChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_EstimatedEndTimeChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_StateChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_StateChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ContentDisposition: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub MimeType: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub TotalBytesToReceive:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
+ pub BytesReceived:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
+ pub EstimatedEndTime: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ResultFilePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub State: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_DOWNLOAD_STATE,
+ ) -> windows_core::HRESULT,
+ pub InterruptReason: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
+ ) -> windows_core::HRESULT,
+ pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub Resume: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub CanResume: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DownloadOperation_Impl: windows_core::IUnknownImpl {
+ fn add_BytesReceivedChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2BytesReceivedChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_BytesReceivedChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn add_EstimatedEndTimeChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2EstimatedEndTimeChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_EstimatedEndTimeChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn add_StateChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2StateChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_StateChanged(&self, token: i64) -> 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_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DownloadOperation_Vtbl {
+ pub const fn new<Identity: ICoreWebView2DownloadOperation_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_BytesReceivedChanged<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::add_BytesReceivedChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_BytesReceivedChanged<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::remove_BytesReceivedChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_EstimatedEndTimeChanged<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::add_EstimatedEndTimeChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_EstimatedEndTimeChanged<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::remove_EstimatedEndTimeChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_StateChanged<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::add_StateChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_StateChanged<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::remove_StateChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::Uri(this, core::mem::transmute_copy(&uri))
+ .into()
+ }
+ }
+ unsafe extern "system" fn ContentDisposition<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ contentdisposition: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::ContentDisposition(
+ this,
+ core::mem::transmute_copy(&contentdisposition),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn MimeType<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ mimetype: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::MimeType(
+ this,
+ core::mem::transmute_copy(&mimetype),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TotalBytesToReceive<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ totalbytestoreceive: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::TotalBytesToReceive(
+ this,
+ core::mem::transmute_copy(&totalbytestoreceive),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn BytesReceived<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ bytesreceived: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::BytesReceived(
+ this,
+ core::mem::transmute_copy(&bytesreceived),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn EstimatedEndTime<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ estimatedendtime: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::EstimatedEndTime(
+ this,
+ core::mem::transmute_copy(&estimatedendtime),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ResultFilePath<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ resultfilepath: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::ResultFilePath(
+ this,
+ core::mem::transmute_copy(&resultfilepath),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn State<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::State(
+ this,
+ core::mem::transmute_copy(&downloadstate),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn InterruptReason<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::InterruptReason(
+ this,
+ core::mem::transmute_copy(&interruptreason),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::Cancel(this).into()
+ }
+ }
+ unsafe extern "system" fn Pause<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::Pause(this).into()
+ }
+ }
+ unsafe extern "system" fn Resume<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::Resume(this).into()
+ }
+ }
+ unsafe extern "system" fn CanResume<
+ Identity: ICoreWebView2DownloadOperation_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ canresume: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadOperation_Impl::CanResume(
+ this,
+ core::mem::transmute_copy(&canresume),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ add_BytesReceivedChanged: add_BytesReceivedChanged::<Identity, OFFSET>,
+ remove_BytesReceivedChanged: remove_BytesReceivedChanged::<Identity, OFFSET>,
+ add_EstimatedEndTimeChanged: add_EstimatedEndTimeChanged::<Identity, OFFSET>,
+ remove_EstimatedEndTimeChanged: remove_EstimatedEndTimeChanged::<Identity, OFFSET>,
+ add_StateChanged: add_StateChanged::<Identity, OFFSET>,
+ remove_StateChanged: remove_StateChanged::<Identity, OFFSET>,
+ Uri: Uri::<Identity, OFFSET>,
+ ContentDisposition: ContentDisposition::<Identity, OFFSET>,
+ MimeType: MimeType::<Identity, OFFSET>,
+ TotalBytesToReceive: TotalBytesToReceive::<Identity, OFFSET>,
+ BytesReceived: BytesReceived::<Identity, OFFSET>,
+ EstimatedEndTime: EstimatedEndTime::<Identity, OFFSET>,
+ ResultFilePath: ResultFilePath::<Identity, OFFSET>,
+ State: State::<Identity, OFFSET>,
+ InterruptReason: InterruptReason::<Identity, OFFSET>,
+ Cancel: Cancel::<Identity, OFFSET>,
+ Pause: Pause::<Identity, OFFSET>,
+ Resume: Resume::<Identity, OFFSET>,
+ CanResume: CanResume::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2DownloadOperation as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DownloadOperation {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DownloadStartingEventArgs,
+ ICoreWebView2DownloadStartingEventArgs_Vtbl,
+ 0xe99bbe21_43e9_4544_a732_282764eafa60
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DownloadStartingEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DownloadStartingEventArgs {
+ pub unsafe fn DownloadOperation(&self) -> windows_core::Result<ICoreWebView2DownloadOperation> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).DownloadOperation)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(
+ windows_core::Interface::as_raw(self),
+ cancel as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancel(&self, cancel: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancel)(
+ windows_core::Interface::as_raw(self),
+ cancel.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ResultFilePath(
+ &self,
+ resultfilepath: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ResultFilePath)(
+ windows_core::Interface::as_raw(self),
+ resultfilepath as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetResultFilePath<P0>(&self, resultfilepath: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetResultFilePath)(
+ windows_core::Interface::as_raw(self),
+ resultfilepath.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ handled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHandled(&self, handled: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ handled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DownloadStartingEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub DownloadOperation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Cancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetCancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ResultFilePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetResultFilePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DownloadStartingEventArgs_Impl: windows_core::IUnknownImpl {
+ fn DownloadOperation(&self) -> windows_core::Result<ICoreWebView2DownloadOperation>;
+ fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetCancel(&self, cancel: windows_core::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_core::BOOL) -> windows_core::Result<()>;
+ fn SetHandled(&self, handled: windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2DownloadStartingEventArgs_Vtbl {
+ pub const fn new<Identity: ICoreWebView2DownloadStartingEventArgs_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn DownloadOperation<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ downloadoperation: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2DownloadStartingEventArgs_Impl::DownloadOperation(this) {
+ Ok(ok__) => {
+ downloadoperation.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cancel: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadStartingEventArgs_Impl::Cancel(
+ this,
+ core::mem::transmute_copy(&cancel),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancel<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cancel: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadStartingEventArgs_Impl::SetCancel(
+ this,
+ core::mem::transmute_copy(&cancel),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ResultFilePath<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ resultfilepath: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadStartingEventArgs_Impl::ResultFilePath(
+ this,
+ core::mem::transmute_copy(&resultfilepath),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetResultFilePath<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ resultfilepath: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadStartingEventArgs_Impl::SetResultFilePath(
+ this,
+ core::mem::transmute(&resultfilepath),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadStartingEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&handled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadStartingEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&handled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2DownloadStartingEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ DownloadOperation: DownloadOperation::<Identity, OFFSET>,
+ Cancel: Cancel::<Identity, OFFSET>,
+ SetCancel: SetCancel::<Identity, OFFSET>,
+ ResultFilePath: ResultFilePath::<Identity, OFFSET>,
+ SetResultFilePath: SetResultFilePath::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2DownloadStartingEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DownloadStartingEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2DownloadStartingEventHandler,
+ ICoreWebView2DownloadStartingEventHandler_Vtbl,
+ 0xefedc989_c396_41ca_83f7_07f845a55724
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2DownloadStartingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2DownloadStartingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2DownloadStartingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2DownloadStartingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2DownloadStartingEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2DownloadStartingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2DownloadStartingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2DownloadStartingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2DownloadStartingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2DownloadStartingEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2DownloadStartingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment,
+ ICoreWebView2Environment_Vtbl,
+ 0xb96d755e_0319_4e92_a296_23436f46a1fc
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Environment, windows_core::IUnknown);
+impl ICoreWebView2Environment {
+ pub unsafe fn CreateCoreWebView2Controller<P1>(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).CreateCoreWebView2Controller)(
+ windows_core::Interface::as_raw(self),
+ parentwindow,
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CreateWebResourceResponse<P0, P2, P3>(
+ &self,
+ content: P0,
+ statuscode: i32,
+ reasonphrase: P2,
+ headers: P3,
+ ) -> windows_core::Result<ICoreWebView2WebResourceResponse>
+ where
+ P0: windows_core::Param<windows::Win32::System::Com::IStream>,
+ P2: windows_core::Param<windows_core::PCWSTR>,
+ P3: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateWebResourceResponse)(
+ windows_core::Interface::as_raw(self),
+ content.param().abi(),
+ statuscode,
+ reasonphrase.param().abi(),
+ headers.param().abi(),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn BrowserVersionString(
+ &self,
+ versioninfo: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BrowserVersionString)(
+ windows_core::Interface::as_raw(self),
+ versioninfo as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_NewBrowserVersionAvailable<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NewBrowserVersionAvailable)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NewBrowserVersionAvailable(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NewBrowserVersionAvailable)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub CreateCoreWebView2Controller: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::HWND,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub CreateWebResourceResponse: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ i32,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub BrowserVersionString: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub add_NewBrowserVersionAvailable: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NewBrowserVersionAvailable:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment_Impl: windows_core::IUnknownImpl {
+ fn CreateCoreWebView2Controller(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ handler: windows_core::Ref<'_, ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn CreateWebResourceResponse(
+ &self,
+ content: windows_core::Ref<'_, 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: windows_core::Ref<'_, ICoreWebView2NewBrowserVersionAvailableEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NewBrowserVersionAvailable(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Environment_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateCoreWebView2Controller<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment_Impl::CreateCoreWebView2Controller(
+ this,
+ core::mem::transmute_copy(&parentwindow),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn CreateWebResourceResponse<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment_Impl::CreateWebResourceResponse(
+ this,
+ core::mem::transmute_copy(&content),
+ core::mem::transmute_copy(&statuscode),
+ core::mem::transmute(&reasonphrase),
+ core::mem::transmute(&headers),
+ ) {
+ Ok(ok__) => {
+ response.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn BrowserVersionString<
+ Identity: ICoreWebView2Environment_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ versioninfo: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment_Impl::BrowserVersionString(
+ this,
+ core::mem::transmute_copy(&versioninfo),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_NewBrowserVersionAvailable<
+ Identity: ICoreWebView2Environment_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment_Impl::add_NewBrowserVersionAvailable(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NewBrowserVersionAvailable<
+ Identity: ICoreWebView2Environment_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment_Impl::remove_NewBrowserVersionAvailable(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ CreateCoreWebView2Controller: CreateCoreWebView2Controller::<Identity, OFFSET>,
+ CreateWebResourceResponse: CreateWebResourceResponse::<Identity, OFFSET>,
+ BrowserVersionString: BrowserVersionString::<Identity, OFFSET>,
+ add_NewBrowserVersionAvailable: add_NewBrowserVersionAvailable::<Identity, OFFSET>,
+ remove_NewBrowserVersionAvailable: remove_NewBrowserVersionAvailable::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment10,
+ ICoreWebView2Environment10_Vtbl,
+ 0xee0eb9df_6f12_46ce_b53f_3f47b9c928e0
+);
+impl core::ops::Deref for ICoreWebView2Environment10 {
+ type Target = ICoreWebView2Environment9;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment10,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment8,
+ ICoreWebView2Environment9
+);
+impl ICoreWebView2Environment10 {
+ pub unsafe fn CreateCoreWebView2ControllerOptions(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2ControllerOptions> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateCoreWebView2ControllerOptions)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn CreateCoreWebView2ControllerWithOptions<P1, P2>(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ options: P1,
+ handler: P2,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2ControllerOptions>,
+ P2: windows_core::Param<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).CreateCoreWebView2ControllerWithOptions)(
+ windows_core::Interface::as_raw(self),
+ parentwindow,
+ options.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CreateCoreWebView2CompositionControllerWithOptions<P1, P2>(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ options: P1,
+ handler: P2,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2ControllerOptions>,
+ P2: windows_core::Param<
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
+ >,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self)
+ .CreateCoreWebView2CompositionControllerWithOptions)(
+ windows_core::Interface::as_raw(self),
+ parentwindow,
+ options.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment10_Vtbl {
+ pub base__: ICoreWebView2Environment9_Vtbl,
+ pub CreateCoreWebView2ControllerOptions: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ )
+ -> windows_core::HRESULT,
+ pub CreateCoreWebView2ControllerWithOptions: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::HWND,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ )
+ -> windows_core::HRESULT,
+ pub CreateCoreWebView2CompositionControllerWithOptions:
+ unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::HWND,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment10_Impl: ICoreWebView2Environment9_Impl {
+ fn CreateCoreWebView2ControllerOptions(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2ControllerOptions>;
+ fn CreateCoreWebView2ControllerWithOptions(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ options: windows_core::Ref<'_, ICoreWebView2ControllerOptions>,
+ handler: windows_core::Ref<'_, ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn CreateCoreWebView2CompositionControllerWithOptions(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ options: windows_core::Ref<'_, ICoreWebView2ControllerOptions>,
+ handler: windows_core::Ref<
+ '_,
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
+ >,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Environment10_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment10_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateCoreWebView2ControllerOptions<
+ Identity: ICoreWebView2Environment10_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment10_Impl::CreateCoreWebView2ControllerOptions(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn CreateCoreWebView2ControllerWithOptions<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment10_Impl::CreateCoreWebView2ControllerWithOptions(
+ this,
+ core::mem::transmute_copy(&parentwindow),
+ core::mem::transmute_copy(&options),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn CreateCoreWebView2CompositionControllerWithOptions<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment10_Impl::CreateCoreWebView2CompositionControllerWithOptions(
+ this,
+ core::mem::transmute_copy(&parentwindow),
+ core::mem::transmute_copy(&options),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment9_Vtbl::new::<Identity, OFFSET>(),
+ CreateCoreWebView2ControllerOptions: CreateCoreWebView2ControllerOptions::<
+ Identity,
+ OFFSET,
+ >,
+ CreateCoreWebView2ControllerWithOptions: CreateCoreWebView2ControllerWithOptions::<
+ Identity,
+ OFFSET,
+ >,
+ CreateCoreWebView2CompositionControllerWithOptions:
+ CreateCoreWebView2CompositionControllerWithOptions::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment10 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment11,
+ ICoreWebView2Environment11_Vtbl,
+ 0xf0913dc6_a0ec_42ef_9805_91dff3a2966a
+);
+impl core::ops::Deref for ICoreWebView2Environment11 {
+ type Target = ICoreWebView2Environment10;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment11,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment8,
+ ICoreWebView2Environment9,
+ ICoreWebView2Environment10
+);
+impl ICoreWebView2Environment11 {
+ pub unsafe fn FailureReportFolderPath(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FailureReportFolderPath)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment11_Vtbl {
+ pub base__: ICoreWebView2Environment10_Vtbl,
+ pub FailureReportFolderPath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment11_Impl: ICoreWebView2Environment10_Impl {
+ fn FailureReportFolderPath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Environment11_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment11_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn FailureReportFolderPath<
+ Identity: ICoreWebView2Environment11_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment11_Impl::FailureReportFolderPath(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment10_Vtbl::new::<Identity, OFFSET>(),
+ FailureReportFolderPath: FailureReportFolderPath::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment11 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment12,
+ ICoreWebView2Environment12_Vtbl,
+ 0xf503db9b_739f_48dd_b151_fdfcf253f54e
+);
+impl core::ops::Deref for ICoreWebView2Environment12 {
+ type Target = ICoreWebView2Environment11;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment12,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment8,
+ ICoreWebView2Environment9,
+ ICoreWebView2Environment10,
+ ICoreWebView2Environment11
+);
+impl ICoreWebView2Environment12 {
+ pub unsafe fn CreateSharedBuffer(
+ &self,
+ size: u64,
+ ) -> windows_core::Result<ICoreWebView2SharedBuffer> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateSharedBuffer)(
+ windows_core::Interface::as_raw(self),
+ size,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment12_Vtbl {
+ pub base__: ICoreWebView2Environment11_Vtbl,
+ pub CreateSharedBuffer: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u64,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment12_Impl: ICoreWebView2Environment11_Impl {
+ fn CreateSharedBuffer(&self, size: u64) -> windows_core::Result<ICoreWebView2SharedBuffer>;
+}
+impl ICoreWebView2Environment12_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment12_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateSharedBuffer<
+ Identity: ICoreWebView2Environment12_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ size: u64,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment12_Impl::CreateSharedBuffer(
+ this,
+ core::mem::transmute_copy(&size),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment11_Vtbl::new::<Identity, OFFSET>(),
+ CreateSharedBuffer: CreateSharedBuffer::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Environment12 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
+ || iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment12 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment13,
+ ICoreWebView2Environment13_Vtbl,
+ 0xaf641f58_72b2_11ee_b962_0242ac120002
+);
+impl core::ops::Deref for ICoreWebView2Environment13 {
+ type Target = ICoreWebView2Environment12;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment13,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment8,
+ ICoreWebView2Environment9,
+ ICoreWebView2Environment10,
+ ICoreWebView2Environment11,
+ ICoreWebView2Environment12
+);
+impl ICoreWebView2Environment13 {
+ pub unsafe fn GetProcessExtendedInfos<P0>(&self, handler: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2GetProcessExtendedInfosCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetProcessExtendedInfos)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment13_Vtbl {
+ pub base__: ICoreWebView2Environment12_Vtbl,
+ pub GetProcessExtendedInfos: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment13_Impl: ICoreWebView2Environment12_Impl {
+ fn GetProcessExtendedInfos(
+ &self,
+ handler: windows_core::Ref<'_, ICoreWebView2GetProcessExtendedInfosCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Environment13_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment13_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn GetProcessExtendedInfos<
+ Identity: ICoreWebView2Environment13_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment13_Impl::GetProcessExtendedInfos(
+ this,
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment12_Vtbl::new::<Identity, OFFSET>(),
+ GetProcessExtendedInfos: GetProcessExtendedInfos::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Environment13 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
+ || iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Environment12 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment13 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment14,
+ ICoreWebView2Environment14_Vtbl,
+ 0xa5e9fad9_c875_59da_9bd7_473aa5ca1cef
+);
+impl core::ops::Deref for ICoreWebView2Environment14 {
+ type Target = ICoreWebView2Environment13;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment14,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment8,
+ ICoreWebView2Environment9,
+ ICoreWebView2Environment10,
+ ICoreWebView2Environment11,
+ ICoreWebView2Environment12,
+ ICoreWebView2Environment13
+);
+impl ICoreWebView2Environment14 {
+ pub unsafe fn CreateWebFileSystemFileHandle<P0>(
+ &self,
+ path: P0,
+ permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::Result<ICoreWebView2FileSystemHandle>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateWebFileSystemFileHandle)(
+ windows_core::Interface::as_raw(self),
+ path.param().abi(),
+ permission,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn CreateWebFileSystemDirectoryHandle<P0>(
+ &self,
+ path: P0,
+ permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::Result<ICoreWebView2FileSystemHandle>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateWebFileSystemDirectoryHandle)(
+ windows_core::Interface::as_raw(self),
+ path.param().abi(),
+ permission,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn CreateObjectCollection(
+ &self,
+ length: u32,
+ items: *mut Option<windows_core::IUnknown>,
+ objectcollection: *mut Option<ICoreWebView2ObjectCollection>,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).CreateObjectCollection)(
+ windows_core::Interface::as_raw(self),
+ length,
+ core::mem::transmute(items),
+ core::mem::transmute(objectcollection),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment14_Vtbl {
+ pub base__: ICoreWebView2Environment13_Vtbl,
+ pub CreateWebFileSystemFileHandle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub CreateWebFileSystemDirectoryHandle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub CreateObjectCollection: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment14_Impl: ICoreWebView2Environment13_Impl {
+ fn CreateWebFileSystemFileHandle(
+ &self,
+ path: &windows_core::PCWSTR,
+ permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::Result<ICoreWebView2FileSystemHandle>;
+ fn CreateWebFileSystemDirectoryHandle(
+ &self,
+ path: &windows_core::PCWSTR,
+ permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::Result<ICoreWebView2FileSystemHandle>;
+ fn CreateObjectCollection(
+ &self,
+ length: u32,
+ items: windows_core::OutRef<'_, windows_core::IUnknown>,
+ objectcollection: windows_core::OutRef<'_, ICoreWebView2ObjectCollection>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Environment14_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment14_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateWebFileSystemFileHandle<
+ Identity: ICoreWebView2Environment14_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ path: windows_core::PCWSTR,
+ permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment14_Impl::CreateWebFileSystemFileHandle(
+ this,
+ core::mem::transmute(&path),
+ core::mem::transmute_copy(&permission),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn CreateWebFileSystemDirectoryHandle<
+ Identity: ICoreWebView2Environment14_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ path: windows_core::PCWSTR,
+ permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment14_Impl::CreateWebFileSystemDirectoryHandle(
+ this,
+ core::mem::transmute(&path),
+ core::mem::transmute_copy(&permission),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn CreateObjectCollection<
+ Identity: ICoreWebView2Environment14_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ length: u32,
+ items: *mut *mut core::ffi::c_void,
+ objectcollection: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment14_Impl::CreateObjectCollection(
+ this,
+ core::mem::transmute_copy(&length),
+ core::mem::transmute_copy(&items),
+ core::mem::transmute_copy(&objectcollection),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment13_Vtbl::new::<Identity, OFFSET>(),
+ CreateWebFileSystemFileHandle: CreateWebFileSystemFileHandle::<Identity, OFFSET>,
+ CreateWebFileSystemDirectoryHandle: CreateWebFileSystemDirectoryHandle::<
+ Identity,
+ OFFSET,
+ >,
+ CreateObjectCollection: CreateObjectCollection::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Environment14 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
+ || iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Environment12 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Environment13 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment14 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment15,
+ ICoreWebView2Environment15_Vtbl,
+ 0x2ac5ebfb_e654_5961_a667_7971885c7b27
+);
+impl core::ops::Deref for ICoreWebView2Environment15 {
+ type Target = ICoreWebView2Environment14;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment15,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment8,
+ ICoreWebView2Environment9,
+ ICoreWebView2Environment10,
+ ICoreWebView2Environment11,
+ ICoreWebView2Environment12,
+ ICoreWebView2Environment13,
+ ICoreWebView2Environment14
+);
+impl ICoreWebView2Environment15 {
+ pub unsafe fn CreateFindOptions(&self) -> windows_core::Result<ICoreWebView2FindOptions> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateFindOptions)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment15_Vtbl {
+ pub base__: ICoreWebView2Environment14_Vtbl,
+ pub CreateFindOptions: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment15_Impl: ICoreWebView2Environment14_Impl {
+ fn CreateFindOptions(&self) -> windows_core::Result<ICoreWebView2FindOptions>;
+}
+impl ICoreWebView2Environment15_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment15_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateFindOptions<
+ Identity: ICoreWebView2Environment15_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment15_Impl::CreateFindOptions(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment14_Vtbl::new::<Identity, OFFSET>(),
+ CreateFindOptions: CreateFindOptions::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Environment15 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
+ || iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Environment12 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Environment13 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Environment14 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment15 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment2_Vtbl,
+ 0x41f3632b_5ef4_404f_ad82_2d606c5a9a21
+);
+impl core::ops::Deref for ICoreWebView2Environment2 {
+ type Target = ICoreWebView2Environment;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment2,
+ windows_core::IUnknown,
+ ICoreWebView2Environment
+);
+impl ICoreWebView2Environment2 {
+ pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
+ &self,
+ uri: P0,
+ method: P1,
+ postdata: P2,
+ headers: P3,
+ ) -> windows_core::Result<ICoreWebView2WebResourceRequest>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ P2: windows_core::Param<windows::Win32::System::Com::IStream>,
+ P3: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateWebResourceRequest)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ method.param().abi(),
+ postdata.param().abi(),
+ headers.param().abi(),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment2_Vtbl {
+ pub base__: ICoreWebView2Environment_Vtbl,
+ pub CreateWebResourceRequest: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment2_Impl: ICoreWebView2Environment_Impl {
+ fn CreateWebResourceRequest(
+ &self,
+ uri: &windows_core::PCWSTR,
+ method: &windows_core::PCWSTR,
+ postdata: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
+ headers: &windows_core::PCWSTR,
+ ) -> windows_core::Result<ICoreWebView2WebResourceRequest>;
+}
+impl ICoreWebView2Environment2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateWebResourceRequest<
+ Identity: 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,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment2_Impl::CreateWebResourceRequest(
+ this,
+ core::mem::transmute(&uri),
+ core::mem::transmute(&method),
+ core::mem::transmute_copy(&postdata),
+ core::mem::transmute(&headers),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment_Vtbl::new::<Identity, OFFSET>(),
+ CreateWebResourceRequest: CreateWebResourceRequest::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment3_Vtbl,
+ 0x80a22ae3_be7c_4ce2_afe1_5a50056cdeeb
+);
+impl core::ops::Deref for ICoreWebView2Environment3 {
+ type Target = ICoreWebView2Environment2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment3,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2
+);
+impl ICoreWebView2Environment3 {
+ pub unsafe fn CreateCoreWebView2CompositionController<P1>(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
+ >,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).CreateCoreWebView2CompositionController)(
+ windows_core::Interface::as_raw(self),
+ parentwindow,
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CreateCoreWebView2PointerInfo(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2PointerInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateCoreWebView2PointerInfo)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment3_Vtbl {
+ pub base__: ICoreWebView2Environment2_Vtbl,
+ pub CreateCoreWebView2CompositionController: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::HWND,
+ *mut core::ffi::c_void,
+ )
+ -> windows_core::HRESULT,
+ pub CreateCoreWebView2PointerInfo: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment3_Impl: ICoreWebView2Environment2_Impl {
+ fn CreateCoreWebView2CompositionController(
+ &self,
+ parentwindow: windows::Win32::Foundation::HWND,
+ handler: windows_core::Ref<
+ '_,
+ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
+ >,
+ ) -> windows_core::Result<()>;
+ fn CreateCoreWebView2PointerInfo(&self) -> windows_core::Result<ICoreWebView2PointerInfo>;
+}
+impl ICoreWebView2Environment3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment3_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateCoreWebView2CompositionController<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment3_Impl::CreateCoreWebView2CompositionController(
+ this,
+ core::mem::transmute_copy(&parentwindow),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn CreateCoreWebView2PointerInfo<
+ Identity: ICoreWebView2Environment3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment3_Impl::CreateCoreWebView2PointerInfo(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment2_Vtbl::new::<Identity, OFFSET>(),
+ CreateCoreWebView2CompositionController: CreateCoreWebView2CompositionController::<
+ Identity,
+ OFFSET,
+ >,
+ CreateCoreWebView2PointerInfo: CreateCoreWebView2PointerInfo::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment4_Vtbl,
+ 0x20944379_6dcf_41d6_a0a0_abc0fc50de0d
+);
+impl core::ops::Deref for ICoreWebView2Environment4 {
+ type Target = ICoreWebView2Environment3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment4,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3
+);
+impl ICoreWebView2Environment4 {
+ pub unsafe fn GetAutomationProviderForWindow(
+ &self,
+ hwnd: windows::Win32::Foundation::HWND,
+ ) -> windows_core::Result<windows_core::IUnknown> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetAutomationProviderForWindow)(
+ windows_core::Interface::as_raw(self),
+ hwnd,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment4_Vtbl {
+ pub base__: ICoreWebView2Environment3_Vtbl,
+ pub GetAutomationProviderForWindow: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::HWND,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment4_Impl: ICoreWebView2Environment3_Impl {
+ fn GetAutomationProviderForWindow(
+ &self,
+ hwnd: windows::Win32::Foundation::HWND,
+ ) -> windows_core::Result<windows_core::IUnknown>;
+}
+impl ICoreWebView2Environment4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment4_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn GetAutomationProviderForWindow<
+ Identity: ICoreWebView2Environment4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ hwnd: windows::Win32::Foundation::HWND,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment4_Impl::GetAutomationProviderForWindow(
+ this,
+ core::mem::transmute_copy(&hwnd),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment3_Vtbl::new::<Identity, OFFSET>(),
+ GetAutomationProviderForWindow: GetAutomationProviderForWindow::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment5_Vtbl,
+ 0x319e423d_e0d7_4b8d_9254_ae9475de9b17
+);
+impl core::ops::Deref for ICoreWebView2Environment5 {
+ type Target = ICoreWebView2Environment4;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment5,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4
+);
+impl ICoreWebView2Environment5 {
+ pub unsafe fn add_BrowserProcessExited<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2BrowserProcessExitedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_BrowserProcessExited)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_BrowserProcessExited(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_BrowserProcessExited)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment5_Vtbl {
+ pub base__: ICoreWebView2Environment4_Vtbl,
+ pub add_BrowserProcessExited: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_BrowserProcessExited:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment5_Impl: ICoreWebView2Environment4_Impl {
+ fn add_BrowserProcessExited(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2BrowserProcessExitedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_BrowserProcessExited(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Environment5_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment5_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_BrowserProcessExited<
+ Identity: ICoreWebView2Environment5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment5_Impl::add_BrowserProcessExited(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_BrowserProcessExited<
+ Identity: ICoreWebView2Environment5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment5_Impl::remove_BrowserProcessExited(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment4_Vtbl::new::<Identity, OFFSET>(),
+ add_BrowserProcessExited: add_BrowserProcessExited::<Identity, OFFSET>,
+ remove_BrowserProcessExited: remove_BrowserProcessExited::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment5 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment6_Vtbl,
+ 0xe59ee362_acbd_4857_9a8e_d3644d9459a9
+);
+impl core::ops::Deref for ICoreWebView2Environment6 {
+ type Target = ICoreWebView2Environment5;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment6,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5
+);
+impl ICoreWebView2Environment6 {
+ pub unsafe fn CreatePrintSettings(&self) -> windows_core::Result<ICoreWebView2PrintSettings> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreatePrintSettings)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment6_Vtbl {
+ pub base__: ICoreWebView2Environment5_Vtbl,
+ pub CreatePrintSettings: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment6_Impl: ICoreWebView2Environment5_Impl {
+ fn CreatePrintSettings(&self) -> windows_core::Result<ICoreWebView2PrintSettings>;
+}
+impl ICoreWebView2Environment6_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment6_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreatePrintSettings<
+ Identity: ICoreWebView2Environment6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment6_Impl::CreatePrintSettings(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment5_Vtbl::new::<Identity, OFFSET>(),
+ CreatePrintSettings: CreatePrintSettings::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment6 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment7_Vtbl,
+ 0x43c22296_3bbd_43a4_9c00_5c0df6dd29a2
+);
+impl core::ops::Deref for ICoreWebView2Environment7 {
+ type Target = ICoreWebView2Environment6;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment7,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6
+);
+impl ICoreWebView2Environment7 {
+ pub unsafe fn UserDataFolder(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).UserDataFolder)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment7_Vtbl {
+ pub base__: ICoreWebView2Environment6_Vtbl,
+ pub UserDataFolder: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment7_Impl: ICoreWebView2Environment6_Impl {
+ fn UserDataFolder(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Environment7_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment7_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn UserDataFolder<
+ Identity: ICoreWebView2Environment7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment7_Impl::UserDataFolder(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment6_Vtbl::new::<Identity, OFFSET>(),
+ UserDataFolder: UserDataFolder::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment7 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment8,
+ ICoreWebView2Environment8_Vtbl,
+ 0xd6eb91dd_c3d2_45e5_bd29_6dc2bc4de9cf
+);
+impl core::ops::Deref for ICoreWebView2Environment8 {
+ type Target = ICoreWebView2Environment7;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment8,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7
+);
+impl ICoreWebView2Environment8 {
+ pub unsafe fn add_ProcessInfosChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ProcessInfosChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ProcessInfosChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ProcessInfosChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ProcessInfosChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetProcessInfos(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2ProcessInfoCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetProcessInfos)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment8_Vtbl {
+ pub base__: ICoreWebView2Environment7_Vtbl,
+ pub add_ProcessInfosChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ProcessInfosChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub GetProcessInfos: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment8_Impl: ICoreWebView2Environment7_Impl {
+ fn add_ProcessInfosChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ProcessInfosChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ProcessInfosChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn GetProcessInfos(&self) -> windows_core::Result<ICoreWebView2ProcessInfoCollection>;
+}
+impl ICoreWebView2Environment8_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment8_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_ProcessInfosChanged<
+ Identity: ICoreWebView2Environment8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment8_Impl::add_ProcessInfosChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ProcessInfosChanged<
+ Identity: ICoreWebView2Environment8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Environment8_Impl::remove_ProcessInfosChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetProcessInfos<
+ Identity: ICoreWebView2Environment8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment8_Impl::GetProcessInfos(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment7_Vtbl::new::<Identity, OFFSET>(),
+ add_ProcessInfosChanged: add_ProcessInfosChanged::<Identity, OFFSET>,
+ remove_ProcessInfosChanged: remove_ProcessInfosChanged::<Identity, OFFSET>,
+ GetProcessInfos: GetProcessInfos::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment8 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Environment9,
+ ICoreWebView2Environment9_Vtbl,
+ 0xf06f41bf_4b5a_49d8_b9f6_fa16cd29f274
+);
+impl core::ops::Deref for ICoreWebView2Environment9 {
+ type Target = ICoreWebView2Environment8;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Environment9,
+ windows_core::IUnknown,
+ ICoreWebView2Environment,
+ ICoreWebView2Environment2,
+ ICoreWebView2Environment3,
+ ICoreWebView2Environment4,
+ ICoreWebView2Environment5,
+ ICoreWebView2Environment6,
+ ICoreWebView2Environment7,
+ ICoreWebView2Environment8
+);
+impl ICoreWebView2Environment9 {
+ pub unsafe fn CreateContextMenuItem<P0, P1>(
+ &self,
+ label: P0,
+ iconstream: P1,
+ kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
+ ) -> windows_core::Result<ICoreWebView2ContextMenuItem>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows::Win32::System::Com::IStream>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CreateContextMenuItem)(
+ windows_core::Interface::as_raw(self),
+ label.param().abi(),
+ iconstream.param().abi(),
+ kind,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Environment9_Vtbl {
+ pub base__: ICoreWebView2Environment8_Vtbl,
+ pub CreateContextMenuItem: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Environment9_Impl: ICoreWebView2Environment8_Impl {
+ fn CreateContextMenuItem(
+ &self,
+ label: &windows_core::PCWSTR,
+ iconstream: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
+ kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
+ ) -> windows_core::Result<ICoreWebView2ContextMenuItem>;
+}
+impl ICoreWebView2Environment9_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Environment9_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CreateContextMenuItem<
+ Identity: 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,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Environment9_Impl::CreateContextMenuItem(
+ this,
+ core::mem::transmute(&label),
+ core::mem::transmute_copy(&iconstream),
+ core::mem::transmute_copy(&kind),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Environment8_Vtbl::new::<Identity, OFFSET>(),
+ CreateContextMenuItem: CreateContextMenuItem::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Environment9 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions,
+ ICoreWebView2EnvironmentOptions_Vtbl,
+ 0x2fde08a8_1e9a_4766_8c05_95a9ceb9d1c5
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions {
+ pub unsafe fn AdditionalBrowserArguments(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AdditionalBrowserArguments)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAdditionalBrowserArguments<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAdditionalBrowserArguments)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Language(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Language)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetLanguage<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetLanguage)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TargetCompatibleBrowserVersion(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TargetCompatibleBrowserVersion)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTargetCompatibleBrowserVersion<P0>(
+ &self,
+ value: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTargetCompatibleBrowserVersion)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AllowSingleSignOnUsingOSPrimaryAccount(
+ &self,
+ allow: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AllowSingleSignOnUsingOSPrimaryAccount)(
+ windows_core::Interface::as_raw(self),
+ allow as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAllowSingleSignOnUsingOSPrimaryAccount(
+ &self,
+ allow: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAllowSingleSignOnUsingOSPrimaryAccount)(
+ windows_core::Interface::as_raw(self),
+ allow.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub AdditionalBrowserArguments: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetAdditionalBrowserArguments: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub Language: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetLanguage: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub TargetCompatibleBrowserVersion: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetTargetCompatibleBrowserVersion: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub AllowSingleSignOnUsingOSPrimaryAccount: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ )
+ -> windows_core::HRESULT,
+ pub SetAllowSingleSignOnUsingOSPrimaryAccount:
+ unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions_Impl: windows_core::IUnknownImpl {
+ 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_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetAllowSingleSignOnUsingOSPrimaryAccount(
+ &self,
+ allow: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2EnvironmentOptions_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn AdditionalBrowserArguments<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::AdditionalBrowserArguments(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAdditionalBrowserArguments<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::SetAdditionalBrowserArguments(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Language<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::Language(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetLanguage<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::SetLanguage(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TargetCompatibleBrowserVersion<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::TargetCompatibleBrowserVersion(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTargetCompatibleBrowserVersion<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::SetTargetCompatibleBrowserVersion(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AllowSingleSignOnUsingOSPrimaryAccount<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ allow: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::AllowSingleSignOnUsingOSPrimaryAccount(
+ this,
+ core::mem::transmute_copy(&allow),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAllowSingleSignOnUsingOSPrimaryAccount<
+ Identity: ICoreWebView2EnvironmentOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ allow: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions_Impl::SetAllowSingleSignOnUsingOSPrimaryAccount(
+ this,
+ core::mem::transmute_copy(&allow),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ AdditionalBrowserArguments: AdditionalBrowserArguments::<Identity, OFFSET>,
+ SetAdditionalBrowserArguments: SetAdditionalBrowserArguments::<Identity, OFFSET>,
+ Language: Language::<Identity, OFFSET>,
+ SetLanguage: SetLanguage::<Identity, OFFSET>,
+ TargetCompatibleBrowserVersion: TargetCompatibleBrowserVersion::<Identity, OFFSET>,
+ SetTargetCompatibleBrowserVersion: SetTargetCompatibleBrowserVersion::<Identity, OFFSET>,
+ AllowSingleSignOnUsingOSPrimaryAccount: AllowSingleSignOnUsingOSPrimaryAccount::<
+ Identity,
+ OFFSET,
+ >,
+ SetAllowSingleSignOnUsingOSPrimaryAccount: SetAllowSingleSignOnUsingOSPrimaryAccount::<
+ Identity,
+ OFFSET,
+ >,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions2,
+ ICoreWebView2EnvironmentOptions2_Vtbl,
+ 0xff85c98a_1ba7_4a6b_90c8_2b752c89e9e2
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions2, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions2 {
+ pub unsafe fn ExclusiveUserDataFolderAccess(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ExclusiveUserDataFolderAccess)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetExclusiveUserDataFolderAccess(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetExclusiveUserDataFolderAccess)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions2_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ExclusiveUserDataFolderAccess: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetExclusiveUserDataFolderAccess: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions2_Impl: windows_core::IUnknownImpl {
+ fn ExclusiveUserDataFolderAccess(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetExclusiveUserDataFolderAccess(
+ &self,
+ value: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2EnvironmentOptions2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions2_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn ExclusiveUserDataFolderAccess<
+ Identity: ICoreWebView2EnvironmentOptions2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions2_Impl::ExclusiveUserDataFolderAccess(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetExclusiveUserDataFolderAccess<
+ Identity: ICoreWebView2EnvironmentOptions2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions2_Impl::SetExclusiveUserDataFolderAccess(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ExclusiveUserDataFolderAccess: ExclusiveUserDataFolderAccess::<Identity, OFFSET>,
+ SetExclusiveUserDataFolderAccess: SetExclusiveUserDataFolderAccess::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions3,
+ ICoreWebView2EnvironmentOptions3_Vtbl,
+ 0x4a5c436e_a9e3_4a2e_89c3_910d3513f5cc
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions3, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions3 {
+ pub unsafe fn IsCustomCrashReportingEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsCustomCrashReportingEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsCustomCrashReportingEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsCustomCrashReportingEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions3_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub IsCustomCrashReportingEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsCustomCrashReportingEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions3_Impl: windows_core::IUnknownImpl {
+ fn IsCustomCrashReportingEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetIsCustomCrashReportingEnabled(
+ &self,
+ value: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2EnvironmentOptions3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions3_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn IsCustomCrashReportingEnabled<
+ Identity: ICoreWebView2EnvironmentOptions3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions3_Impl::IsCustomCrashReportingEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsCustomCrashReportingEnabled<
+ Identity: ICoreWebView2EnvironmentOptions3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions3_Impl::SetIsCustomCrashReportingEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ IsCustomCrashReportingEnabled: IsCustomCrashReportingEnabled::<Identity, OFFSET>,
+ SetIsCustomCrashReportingEnabled: SetIsCustomCrashReportingEnabled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions3 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions4,
+ ICoreWebView2EnvironmentOptions4_Vtbl,
+ 0xac52d13f_0d38_475a_9dca_876580d6793e
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions4, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions4 {
+ pub unsafe fn GetCustomSchemeRegistrations(
+ &self,
+ count: *mut u32,
+ schemeregistrations: *mut *mut Option<ICoreWebView2CustomSchemeRegistration>,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetCustomSchemeRegistrations)(
+ windows_core::Interface::as_raw(self),
+ count as _,
+ schemeregistrations as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCustomSchemeRegistrations(
+ &self,
+ count: u32,
+ ) -> windows_core::Result<ICoreWebView2CustomSchemeRegistration> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).SetCustomSchemeRegistrations)(
+ windows_core::Interface::as_raw(self),
+ count,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions4_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub GetCustomSchemeRegistrations: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut u32,
+ *mut *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetCustomSchemeRegistrations: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions4_Impl: windows_core::IUnknownImpl {
+ fn GetCustomSchemeRegistrations(
+ &self,
+ count: *mut u32,
+ schemeregistrations: *mut *mut Option<ICoreWebView2CustomSchemeRegistration>,
+ ) -> windows_core::Result<()>;
+ fn SetCustomSchemeRegistrations(
+ &self,
+ count: u32,
+ ) -> windows_core::Result<ICoreWebView2CustomSchemeRegistration>;
+}
+impl ICoreWebView2EnvironmentOptions4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions4_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn GetCustomSchemeRegistrations<
+ Identity: ICoreWebView2EnvironmentOptions4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ count: *mut u32,
+ schemeregistrations: *mut *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions4_Impl::GetCustomSchemeRegistrations(
+ this,
+ core::mem::transmute_copy(&count),
+ core::mem::transmute_copy(&schemeregistrations),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCustomSchemeRegistrations<
+ Identity: ICoreWebView2EnvironmentOptions4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ count: u32,
+ schemeregistrations: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2EnvironmentOptions4_Impl::SetCustomSchemeRegistrations(
+ this,
+ core::mem::transmute_copy(&count),
+ ) {
+ Ok(ok__) => {
+ schemeregistrations.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ GetCustomSchemeRegistrations: GetCustomSchemeRegistrations::<Identity, OFFSET>,
+ SetCustomSchemeRegistrations: SetCustomSchemeRegistrations::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions4 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions5,
+ ICoreWebView2EnvironmentOptions5_Vtbl,
+ 0x0ae35d64_c47f_4464_814e_259c345d1501
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions5, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions5 {
+ pub unsafe fn EnableTrackingPrevention(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).EnableTrackingPrevention)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetEnableTrackingPrevention(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetEnableTrackingPrevention)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions5_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub EnableTrackingPrevention: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetEnableTrackingPrevention: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions5_Impl: windows_core::IUnknownImpl {
+ fn EnableTrackingPrevention(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetEnableTrackingPrevention(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2EnvironmentOptions5_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions5_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn EnableTrackingPrevention<
+ Identity: ICoreWebView2EnvironmentOptions5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions5_Impl::EnableTrackingPrevention(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetEnableTrackingPrevention<
+ Identity: ICoreWebView2EnvironmentOptions5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions5_Impl::SetEnableTrackingPrevention(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ EnableTrackingPrevention: EnableTrackingPrevention::<Identity, OFFSET>,
+ SetEnableTrackingPrevention: SetEnableTrackingPrevention::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions5 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions5 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions6,
+ ICoreWebView2EnvironmentOptions6_Vtbl,
+ 0x57d29cc3_c84f_42a0_b0e2_effbd5e179de
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions6, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions6 {
+ pub unsafe fn AreBrowserExtensionsEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AreBrowserExtensionsEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAreBrowserExtensionsEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAreBrowserExtensionsEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions6_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub AreBrowserExtensionsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAreBrowserExtensionsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions6_Impl: windows_core::IUnknownImpl {
+ fn AreBrowserExtensionsEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetAreBrowserExtensionsEnabled(&self, value: windows_core::BOOL)
+ -> windows_core::Result<()>;
+}
+impl ICoreWebView2EnvironmentOptions6_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions6_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn AreBrowserExtensionsEnabled<
+ Identity: ICoreWebView2EnvironmentOptions6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions6_Impl::AreBrowserExtensionsEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAreBrowserExtensionsEnabled<
+ Identity: ICoreWebView2EnvironmentOptions6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions6_Impl::SetAreBrowserExtensionsEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ AreBrowserExtensionsEnabled: AreBrowserExtensionsEnabled::<Identity, OFFSET>,
+ SetAreBrowserExtensionsEnabled: SetAreBrowserExtensionsEnabled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions6 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions6 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions7,
+ ICoreWebView2EnvironmentOptions7_Vtbl,
+ 0xc48d539f_e39f_441c_ae68_1f66e570bdc5
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions7, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions7 {
+ pub unsafe fn ChannelSearchKind(
+ &self,
+ value: *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ChannelSearchKind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetChannelSearchKind(
+ &self,
+ value: COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetChannelSearchKind)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ReleaseChannels(
+ &self,
+ value: *mut COREWEBVIEW2_RELEASE_CHANNELS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ReleaseChannels)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetReleaseChannels(
+ &self,
+ value: COREWEBVIEW2_RELEASE_CHANNELS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetReleaseChannels)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions7_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ChannelSearchKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::HRESULT,
+ pub SetChannelSearchKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::HRESULT,
+ pub ReleaseChannels: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_RELEASE_CHANNELS,
+ ) -> windows_core::HRESULT,
+ pub SetReleaseChannels: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_RELEASE_CHANNELS,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions7_Impl: windows_core::IUnknownImpl {
+ fn ChannelSearchKind(
+ &self,
+ value: *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::Result<()>;
+ fn SetChannelSearchKind(
+ &self,
+ value: COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::Result<()>;
+ fn ReleaseChannels(
+ &self,
+ value: *mut COREWEBVIEW2_RELEASE_CHANNELS,
+ ) -> windows_core::Result<()>;
+ fn SetReleaseChannels(&self, value: COREWEBVIEW2_RELEASE_CHANNELS) -> windows_core::Result<()>;
+}
+impl ICoreWebView2EnvironmentOptions7_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions7_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn ChannelSearchKind<
+ Identity: ICoreWebView2EnvironmentOptions7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions7_Impl::ChannelSearchKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetChannelSearchKind<
+ Identity: ICoreWebView2EnvironmentOptions7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_CHANNEL_SEARCH_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions7_Impl::SetChannelSearchKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ReleaseChannels<
+ Identity: ICoreWebView2EnvironmentOptions7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_RELEASE_CHANNELS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions7_Impl::ReleaseChannels(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetReleaseChannels<
+ Identity: ICoreWebView2EnvironmentOptions7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_RELEASE_CHANNELS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions7_Impl::SetReleaseChannels(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ChannelSearchKind: ChannelSearchKind::<Identity, OFFSET>,
+ SetChannelSearchKind: SetChannelSearchKind::<Identity, OFFSET>,
+ ReleaseChannels: ReleaseChannels::<Identity, OFFSET>,
+ SetReleaseChannels: SetReleaseChannels::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions7 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions7 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EnvironmentOptions8,
+ ICoreWebView2EnvironmentOptions8_Vtbl,
+ 0x7c7ecf51_e918_5caf_853c_e9a2bcc27775
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions8, windows_core::IUnknown);
+impl ICoreWebView2EnvironmentOptions8 {
+ pub unsafe fn ScrollBarStyle(
+ &self,
+ value: *mut COREWEBVIEW2_SCROLLBAR_STYLE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ScrollBarStyle)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetScrollBarStyle(
+ &self,
+ value: COREWEBVIEW2_SCROLLBAR_STYLE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetScrollBarStyle)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EnvironmentOptions8_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ScrollBarStyle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_SCROLLBAR_STYLE,
+ ) -> windows_core::HRESULT,
+ pub SetScrollBarStyle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_SCROLLBAR_STYLE,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EnvironmentOptions8_Impl: windows_core::IUnknownImpl {
+ fn ScrollBarStyle(&self, value: *mut COREWEBVIEW2_SCROLLBAR_STYLE) -> windows_core::Result<()>;
+ fn SetScrollBarStyle(&self, value: COREWEBVIEW2_SCROLLBAR_STYLE) -> windows_core::Result<()>;
+}
+impl ICoreWebView2EnvironmentOptions8_Vtbl {
+ pub const fn new<Identity: ICoreWebView2EnvironmentOptions8_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn ScrollBarStyle<
+ Identity: ICoreWebView2EnvironmentOptions8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_SCROLLBAR_STYLE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions8_Impl::ScrollBarStyle(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetScrollBarStyle<
+ Identity: ICoreWebView2EnvironmentOptions8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_SCROLLBAR_STYLE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EnvironmentOptions8_Impl::SetScrollBarStyle(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ScrollBarStyle: ScrollBarStyle::<Identity, OFFSET>,
+ SetScrollBarStyle: SetScrollBarStyle::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EnvironmentOptions8 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions8 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2EstimatedEndTimeChangedEventHandler,
+ ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl,
+ 0x28f0d425_93fe_4e63_9f8d_2aeec6d3ba1e
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2EstimatedEndTimeChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2EstimatedEndTimeChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2DownloadOperation>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2DownloadOperation>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2EstimatedEndTimeChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2EstimatedEndTimeChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ExecuteScriptCompletedHandler,
+ ICoreWebView2ExecuteScriptCompletedHandler_Vtbl,
+ 0x49511172_cc67_4bca_9923_137112f4c4cc
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ExecuteScriptCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ExecuteScriptCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ExecuteScriptCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ExecuteScriptCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ExecuteScriptCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ExecuteScriptCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ExecuteScriptCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ExecuteScriptCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ExecuteScriptCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ExecuteScriptCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ExecuteScriptResult,
+ ICoreWebView2ExecuteScriptResult_Vtbl,
+ 0x0ce15963_3698_4df7_9399_71ed6cdd8c9f
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ExecuteScriptResult, windows_core::IUnknown);
+impl ICoreWebView2ExecuteScriptResult {
+ pub unsafe fn Succeeded(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Succeeded)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ResultAsJson(
+ &self,
+ jsonresult: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ResultAsJson)(
+ windows_core::Interface::as_raw(self),
+ jsonresult as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TryGetResultAsString(
+ &self,
+ stringresult: *mut windows_core::PWSTR,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TryGetResultAsString)(
+ windows_core::Interface::as_raw(self),
+ stringresult as _,
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Exception(&self) -> windows_core::Result<ICoreWebView2ScriptException> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Exception)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ExecuteScriptResult_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Succeeded: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ResultAsJson: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub TryGetResultAsString: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Exception: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ExecuteScriptResult_Impl: windows_core::IUnknownImpl {
+ fn Succeeded(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn ResultAsJson(&self, jsonresult: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn TryGetResultAsString(
+ &self,
+ stringresult: *mut windows_core::PWSTR,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn Exception(&self) -> windows_core::Result<ICoreWebView2ScriptException>;
+}
+impl ICoreWebView2ExecuteScriptResult_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ExecuteScriptResult_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn Succeeded<
+ Identity: ICoreWebView2ExecuteScriptResult_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ExecuteScriptResult_Impl::Succeeded(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ResultAsJson<
+ Identity: ICoreWebView2ExecuteScriptResult_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ jsonresult: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ExecuteScriptResult_Impl::ResultAsJson(
+ this,
+ core::mem::transmute_copy(&jsonresult),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TryGetResultAsString<
+ Identity: ICoreWebView2ExecuteScriptResult_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ stringresult: *mut windows_core::PWSTR,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ExecuteScriptResult_Impl::TryGetResultAsString(
+ this,
+ core::mem::transmute_copy(&stringresult),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Exception<
+ Identity: ICoreWebView2ExecuteScriptResult_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ exception: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ExecuteScriptResult_Impl::Exception(this) {
+ Ok(ok__) => {
+ exception.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Succeeded: Succeeded::<Identity, OFFSET>,
+ ResultAsJson: ResultAsJson::<Identity, OFFSET>,
+ TryGetResultAsString: TryGetResultAsString::<Identity, OFFSET>,
+ Exception: Exception::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ExecuteScriptResult as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ExecuteScriptResult {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ExecuteScriptWithResultCompletedHandler,
+ ICoreWebView2ExecuteScriptWithResultCompletedHandler_Vtbl,
+ 0x1bb5317b_8238_4c67_a7ff_baf6558f289d
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ExecuteScriptWithResultCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ExecuteScriptWithResultCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2ExecuteScriptResult>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ExecuteScriptWithResultCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2ExecuteScriptResult>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ExecuteScriptWithResultCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ExecuteScriptWithResultCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ExecuteScriptWithResultCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FaviconChangedEventHandler,
+ ICoreWebView2FaviconChangedEventHandler_Vtbl,
+ 0x2913da94_833d_4de0_8dca_900fc524a1a4
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FaviconChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FaviconChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FaviconChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FaviconChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FaviconChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FaviconChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FaviconChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FaviconChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FaviconChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2File,
+ ICoreWebView2File_Vtbl,
+ 0xf2c19559_6bc1_4583_a757_90021be9afec
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2File, windows_core::IUnknown);
+impl ICoreWebView2File {
+ pub unsafe fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Path)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2File_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Path: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2File_Impl: windows_core::IUnknownImpl {
+ fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2File_Vtbl {
+ pub const fn new<Identity: ICoreWebView2File_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Path<Identity: ICoreWebView2File_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2File_Impl::Path(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Path: Path::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2File as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2File {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FileSystemHandle,
+ ICoreWebView2FileSystemHandle_Vtbl,
+ 0xc65100ac_0de2_5551_a362_23d9bd1d0e1f
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2FileSystemHandle, windows_core::IUnknown);
+impl ICoreWebView2FileSystemHandle {
+ pub unsafe fn Kind(
+ &self,
+ value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Kind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Path)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Permission(
+ &self,
+ value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Permission)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FileSystemHandle_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Kind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND,
+ ) -> windows_core::HRESULT,
+ pub Path: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Permission: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FileSystemHandle_Impl: windows_core::IUnknownImpl {
+ fn Kind(&self, value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND) -> windows_core::Result<()>;
+ fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Permission(
+ &self,
+ value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FileSystemHandle_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FileSystemHandle_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Kind<
+ Identity: ICoreWebView2FileSystemHandle_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FileSystemHandle_Impl::Kind(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Path<
+ Identity: ICoreWebView2FileSystemHandle_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FileSystemHandle_Impl::Path(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Permission<
+ Identity: ICoreWebView2FileSystemHandle_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FileSystemHandle_Impl::Permission(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Kind: Kind::<Identity, OFFSET>,
+ Path: Path::<Identity, OFFSET>,
+ Permission: Permission::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FileSystemHandle as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FileSystemHandle {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Find,
+ ICoreWebView2Find_Vtbl,
+ 0xa3ec0f5f_ddbc_54ed_8546_af75a785b9a6
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Find, windows_core::IUnknown);
+impl ICoreWebView2Find {
+ pub unsafe fn ActiveMatchIndex(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ActiveMatchIndex)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MatchCount(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MatchCount)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ActiveMatchIndexChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FindActiveMatchIndexChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ActiveMatchIndexChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ActiveMatchIndexChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ActiveMatchIndexChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_MatchCountChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FindMatchCountChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_MatchCountChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_MatchCountChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_MatchCountChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Start<P0, P1>(&self, options: P0, handler: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FindOptions>,
+ P1: windows_core::Param<ICoreWebView2FindStartCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Start)(
+ windows_core::Interface::as_raw(self),
+ options.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FindNext(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FindNext)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn FindPrevious(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FindPrevious)(windows_core::Interface::as_raw(
+ self,
+ ))
+ .ok()
+ }
+ }
+ pub unsafe fn Stop(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Find_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ActiveMatchIndex:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub MatchCount:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub add_ActiveMatchIndexChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ActiveMatchIndexChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_MatchCountChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_MatchCountChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub Start: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub FindNext: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub FindPrevious: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Find_Impl: windows_core::IUnknownImpl {
+ fn ActiveMatchIndex(&self, value: *mut i32) -> windows_core::Result<()>;
+ fn MatchCount(&self, value: *mut i32) -> windows_core::Result<()>;
+ fn add_ActiveMatchIndexChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FindActiveMatchIndexChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ActiveMatchIndexChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn add_MatchCountChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FindMatchCountChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_MatchCountChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn Start(
+ &self,
+ options: windows_core::Ref<'_, ICoreWebView2FindOptions>,
+ handler: windows_core::Ref<'_, ICoreWebView2FindStartCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn FindNext(&self) -> windows_core::Result<()>;
+ fn FindPrevious(&self) -> windows_core::Result<()>;
+ fn Stop(&self) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Find_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Find_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn ActiveMatchIndex<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::ActiveMatchIndex(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn MatchCount<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::MatchCount(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn add_ActiveMatchIndexChanged<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::add_ActiveMatchIndexChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ActiveMatchIndexChanged<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::remove_ActiveMatchIndexChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_MatchCountChanged<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::add_MatchCountChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_MatchCountChanged<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::remove_MatchCountChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Start<Identity: ICoreWebView2Find_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ options: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::Start(
+ this,
+ core::mem::transmute_copy(&options),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FindNext<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::FindNext(this).into()
+ }
+ }
+ unsafe extern "system" fn FindPrevious<
+ Identity: ICoreWebView2Find_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::FindPrevious(this).into()
+ }
+ }
+ unsafe extern "system" fn Stop<Identity: ICoreWebView2Find_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Find_Impl::Stop(this).into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ActiveMatchIndex: ActiveMatchIndex::<Identity, OFFSET>,
+ MatchCount: MatchCount::<Identity, OFFSET>,
+ add_ActiveMatchIndexChanged: add_ActiveMatchIndexChanged::<Identity, OFFSET>,
+ remove_ActiveMatchIndexChanged: remove_ActiveMatchIndexChanged::<Identity, OFFSET>,
+ add_MatchCountChanged: add_MatchCountChanged::<Identity, OFFSET>,
+ remove_MatchCountChanged: remove_MatchCountChanged::<Identity, OFFSET>,
+ Start: Start::<Identity, OFFSET>,
+ FindNext: FindNext::<Identity, OFFSET>,
+ FindPrevious: FindPrevious::<Identity, OFFSET>,
+ Stop: Stop::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Find as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Find {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FindActiveMatchIndexChangedEventHandler,
+ ICoreWebView2FindActiveMatchIndexChangedEventHandler_Vtbl,
+ 0x0054f514_9a8e_5876_aed5_30b37f8c86a5
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FindActiveMatchIndexChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FindActiveMatchIndexChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Find>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FindActiveMatchIndexChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FindActiveMatchIndexChangedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Find>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FindActiveMatchIndexChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FindActiveMatchIndexChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2FindActiveMatchIndexChangedEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindActiveMatchIndexChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2FindActiveMatchIndexChangedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FindActiveMatchIndexChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FindMatchCountChangedEventHandler,
+ ICoreWebView2FindMatchCountChangedEventHandler_Vtbl,
+ 0xda0d6827_4254_5b10_a6d9_412076afc9f3
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FindMatchCountChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FindMatchCountChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Find>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FindMatchCountChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FindMatchCountChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Find>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FindMatchCountChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FindMatchCountChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2FindMatchCountChangedEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindMatchCountChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FindMatchCountChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FindMatchCountChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FindOptions,
+ ICoreWebView2FindOptions_Vtbl,
+ 0xe82e3b2b_a4af_5bc6_94c6_18b44157a16c
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2FindOptions, windows_core::IUnknown);
+impl ICoreWebView2FindOptions {
+ pub unsafe fn FindTerm(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FindTerm)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetFindTerm<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetFindTerm)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsCaseSensitive(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsCaseSensitive)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsCaseSensitive(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsCaseSensitive)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldHighlightAllMatches(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldHighlightAllMatches)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetShouldHighlightAllMatches(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetShouldHighlightAllMatches)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldMatchWord(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldMatchWord)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetShouldMatchWord(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetShouldMatchWord)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SuppressDefaultFindDialog(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SuppressDefaultFindDialog)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetSuppressDefaultFindDialog(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSuppressDefaultFindDialog)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FindOptions_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub FindTerm: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetFindTerm: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub IsCaseSensitive: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsCaseSensitive: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ShouldHighlightAllMatches: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetShouldHighlightAllMatches: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ShouldMatchWord: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetShouldMatchWord: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SuppressDefaultFindDialog: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetSuppressDefaultFindDialog: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FindOptions_Impl: windows_core::IUnknownImpl {
+ fn FindTerm(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn SetFindTerm(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
+ fn IsCaseSensitive(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsCaseSensitive(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn ShouldHighlightAllMatches(&self, value: *mut windows_core::BOOL)
+ -> windows_core::Result<()>;
+ fn SetShouldHighlightAllMatches(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn ShouldMatchWord(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetShouldMatchWord(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn SuppressDefaultFindDialog(&self, value: *mut windows_core::BOOL)
+ -> windows_core::Result<()>;
+ fn SetSuppressDefaultFindDialog(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FindOptions_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FindOptions_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn FindTerm<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::FindTerm(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetFindTerm<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::SetFindTerm(this, core::mem::transmute(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsCaseSensitive<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::IsCaseSensitive(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsCaseSensitive<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::SetIsCaseSensitive(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldHighlightAllMatches<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::ShouldHighlightAllMatches(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetShouldHighlightAllMatches<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::SetShouldHighlightAllMatches(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldMatchWord<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::ShouldMatchWord(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetShouldMatchWord<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::SetShouldMatchWord(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SuppressDefaultFindDialog<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::SuppressDefaultFindDialog(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetSuppressDefaultFindDialog<
+ Identity: ICoreWebView2FindOptions_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindOptions_Impl::SetSuppressDefaultFindDialog(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ FindTerm: FindTerm::<Identity, OFFSET>,
+ SetFindTerm: SetFindTerm::<Identity, OFFSET>,
+ IsCaseSensitive: IsCaseSensitive::<Identity, OFFSET>,
+ SetIsCaseSensitive: SetIsCaseSensitive::<Identity, OFFSET>,
+ ShouldHighlightAllMatches: ShouldHighlightAllMatches::<Identity, OFFSET>,
+ SetShouldHighlightAllMatches: SetShouldHighlightAllMatches::<Identity, OFFSET>,
+ ShouldMatchWord: ShouldMatchWord::<Identity, OFFSET>,
+ SetShouldMatchWord: SetShouldMatchWord::<Identity, OFFSET>,
+ SuppressDefaultFindDialog: SuppressDefaultFindDialog::<Identity, OFFSET>,
+ SetSuppressDefaultFindDialog: SetSuppressDefaultFindDialog::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FindOptions as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FindOptions {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FindStartCompletedHandler,
+ ICoreWebView2FindStartCompletedHandler_Vtbl,
+ 0x6a90ecaf_44b0_5bd9_8f07_1967e17be9fb
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FindStartCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FindStartCompletedHandler {
+ pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FindStartCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FindStartCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FindStartCompletedHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FindStartCompletedHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2FindStartCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FindStartCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FindStartCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FindStartCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FocusChangedEventHandler,
+ ICoreWebView2FocusChangedEventHandler_Vtbl,
+ 0x05ea24bd_6452_4926_9014_4b82b498135d
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FocusChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FocusChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Controller>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FocusChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FocusChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Controller>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FocusChangedEventHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FocusChangedEventHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FocusChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FocusChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FocusChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Frame,
+ ICoreWebView2Frame_Vtbl,
+ 0xf1131a5e_9ba9_11eb_a8b3_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Frame, windows_core::IUnknown);
+impl ICoreWebView2Frame {
+ pub unsafe fn Name(&self, name: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Name)(
+ windows_core::Interface::as_raw(self),
+ name as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_NameChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameNameChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NameChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NameChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NameChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AddHostObjectToScriptWithOrigins<P0>(
+ &self,
+ name: P0,
+ object: *mut windows::Win32::System::Variant::VARIANT,
+ originscount: u32,
+ origins: *const windows_core::PCWSTR,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).AddHostObjectToScriptWithOrigins)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ core::mem::transmute(object),
+ originscount,
+ origins,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).RemoveHostObjectFromScript)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_Destroyed<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameDestroyedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_Destroyed)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_Destroyed(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_Destroyed)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsDestroyed(
+ &self,
+ destroyed: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsDestroyed)(
+ windows_core::Interface::as_raw(self),
+ destroyed as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Frame_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Name: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub add_NameChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NameChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub AddHostObjectToScriptWithOrigins: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut windows::Win32::System::Variant::VARIANT,
+ u32,
+ *const windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub RemoveHostObjectFromScript: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub add_Destroyed: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_Destroyed:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub IsDestroyed: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Frame_Impl: windows_core::IUnknownImpl {
+ fn Name(&self, name: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn add_NameChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameNameChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NameChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn AddHostObjectToScriptWithOrigins(
+ &self,
+ name: &windows_core::PCWSTR,
+ object: *mut windows::Win32::System::Variant::VARIANT,
+ originscount: u32,
+ origins: *const windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+ fn RemoveHostObjectFromScript(&self, name: &windows_core::PCWSTR) -> windows_core::Result<()>;
+ fn add_Destroyed(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameDestroyedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_Destroyed(&self, token: i64) -> windows_core::Result<()>;
+ fn IsDestroyed(&self, destroyed: *mut windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Frame_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Frame_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Name<Identity: ICoreWebView2Frame_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ name: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::Name(this, core::mem::transmute_copy(&name)).into()
+ }
+ }
+ unsafe extern "system" fn add_NameChanged<
+ Identity: ICoreWebView2Frame_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::add_NameChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NameChanged<
+ Identity: ICoreWebView2Frame_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::remove_NameChanged(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn AddHostObjectToScriptWithOrigins<
+ Identity: ICoreWebView2Frame_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ object: *mut windows::Win32::System::Variant::VARIANT,
+ originscount: u32,
+ origins: *const windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::AddHostObjectToScriptWithOrigins(
+ this,
+ 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: ICoreWebView2Frame_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::RemoveHostObjectFromScript(
+ this,
+ core::mem::transmute(&name),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_Destroyed<
+ Identity: ICoreWebView2Frame_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::add_Destroyed(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_Destroyed<
+ Identity: ICoreWebView2Frame_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::remove_Destroyed(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsDestroyed<
+ Identity: ICoreWebView2Frame_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ destroyed: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame_Impl::IsDestroyed(this, core::mem::transmute_copy(&destroyed))
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Name: Name::<Identity, OFFSET>,
+ add_NameChanged: add_NameChanged::<Identity, OFFSET>,
+ remove_NameChanged: remove_NameChanged::<Identity, OFFSET>,
+ AddHostObjectToScriptWithOrigins: AddHostObjectToScriptWithOrigins::<Identity, OFFSET>,
+ RemoveHostObjectFromScript: RemoveHostObjectFromScript::<Identity, OFFSET>,
+ add_Destroyed: add_Destroyed::<Identity, OFFSET>,
+ remove_Destroyed: remove_Destroyed::<Identity, OFFSET>,
+ IsDestroyed: IsDestroyed::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Frame {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Frame2,
+ ICoreWebView2Frame2_Vtbl,
+ 0x7a6a5834_d185_4dbf_b63f_4a9bc43107d4
+);
+impl core::ops::Deref for ICoreWebView2Frame2 {
+ type Target = ICoreWebView2Frame;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Frame2,
+ windows_core::IUnknown,
+ ICoreWebView2Frame
+);
+impl ICoreWebView2Frame2 {
+ pub unsafe fn add_NavigationStarting<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameNavigationStartingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NavigationStarting)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NavigationStarting)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ContentLoading<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameContentLoadingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ContentLoading)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ContentLoading)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_NavigationCompleted<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameNavigationCompletedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NavigationCompleted)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NavigationCompleted)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_DOMContentLoaded<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameDOMContentLoadedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_DOMContentLoaded)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_DOMContentLoaded)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ExecuteScript<P0, P1>(
+ &self,
+ javascript: P0,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2ExecuteScriptCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ExecuteScript)(
+ windows_core::Interface::as_raw(self),
+ javascript.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PostWebMessageAsJson<P0>(&self, webmessageasjson: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PostWebMessageAsJson)(
+ windows_core::Interface::as_raw(self),
+ webmessageasjson.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PostWebMessageAsString<P0>(
+ &self,
+ webmessageasstring: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PostWebMessageAsString)(
+ windows_core::Interface::as_raw(self),
+ webmessageasstring.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_WebMessageReceived<P0>(
+ &self,
+ handler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameWebMessageReceivedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_WebMessageReceived)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_WebMessageReceived)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Frame2_Vtbl {
+ pub base__: ICoreWebView2Frame_Vtbl,
+ pub add_NavigationStarting: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NavigationStarting:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_ContentLoading: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ContentLoading:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_NavigationCompleted: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NavigationCompleted:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_DOMContentLoaded: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_DOMContentLoaded:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub ExecuteScript: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub PostWebMessageAsJson: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub PostWebMessageAsString: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub add_WebMessageReceived: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_WebMessageReceived:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Frame2_Impl: ICoreWebView2Frame_Impl {
+ fn add_NavigationStarting(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameNavigationStartingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()>;
+ fn add_ContentLoading(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameContentLoadingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()>;
+ fn add_NavigationCompleted(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameNavigationCompletedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()>;
+ fn add_DOMContentLoaded(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameDOMContentLoadedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()>;
+ fn ExecuteScript(
+ &self,
+ javascript: &windows_core::PCWSTR,
+ handler: windows_core::Ref<'_, 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: windows_core::Ref<'_, ICoreWebView2FrameWebMessageReceivedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Frame2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Frame2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_NavigationStarting<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::add_NavigationStarting(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NavigationStarting<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::remove_NavigationStarting(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_ContentLoading<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::add_ContentLoading(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ContentLoading<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::remove_ContentLoading(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_NavigationCompleted<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::add_NavigationCompleted(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NavigationCompleted<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::remove_NavigationCompleted(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_DOMContentLoaded<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::add_DOMContentLoaded(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_DOMContentLoaded<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::remove_DOMContentLoaded(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ExecuteScript<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ javascript: windows_core::PCWSTR,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::ExecuteScript(
+ this,
+ core::mem::transmute(&javascript),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PostWebMessageAsJson<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ webmessageasjson: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::PostWebMessageAsJson(
+ this,
+ core::mem::transmute(&webmessageasjson),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PostWebMessageAsString<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ webmessageasstring: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::PostWebMessageAsString(
+ this,
+ core::mem::transmute(&webmessageasstring),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_WebMessageReceived<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::add_WebMessageReceived(
+ this,
+ core::mem::transmute_copy(&handler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_WebMessageReceived<
+ Identity: ICoreWebView2Frame2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame2_Impl::remove_WebMessageReceived(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Frame_Vtbl::new::<Identity, OFFSET>(),
+ add_NavigationStarting: add_NavigationStarting::<Identity, OFFSET>,
+ remove_NavigationStarting: remove_NavigationStarting::<Identity, OFFSET>,
+ add_ContentLoading: add_ContentLoading::<Identity, OFFSET>,
+ remove_ContentLoading: remove_ContentLoading::<Identity, OFFSET>,
+ add_NavigationCompleted: add_NavigationCompleted::<Identity, OFFSET>,
+ remove_NavigationCompleted: remove_NavigationCompleted::<Identity, OFFSET>,
+ add_DOMContentLoaded: add_DOMContentLoaded::<Identity, OFFSET>,
+ remove_DOMContentLoaded: remove_DOMContentLoaded::<Identity, OFFSET>,
+ ExecuteScript: ExecuteScript::<Identity, OFFSET>,
+ PostWebMessageAsJson: PostWebMessageAsJson::<Identity, OFFSET>,
+ PostWebMessageAsString: PostWebMessageAsString::<Identity, OFFSET>,
+ add_WebMessageReceived: add_WebMessageReceived::<Identity, OFFSET>,
+ remove_WebMessageReceived: remove_WebMessageReceived::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Frame2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Frame3,
+ ICoreWebView2Frame3_Vtbl,
+ 0xb50d82cc_cc28_481d_9614_cb048895e6a0
+);
+impl core::ops::Deref for ICoreWebView2Frame3 {
+ type Target = ICoreWebView2Frame2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Frame3,
+ windows_core::IUnknown,
+ ICoreWebView2Frame,
+ ICoreWebView2Frame2
+);
+impl ICoreWebView2Frame3 {
+ pub unsafe fn add_PermissionRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FramePermissionRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_PermissionRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_PermissionRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Frame3_Vtbl {
+ pub base__: ICoreWebView2Frame2_Vtbl,
+ pub add_PermissionRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_PermissionRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Frame3_Impl: ICoreWebView2Frame2_Impl {
+ fn add_PermissionRequested(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FramePermissionRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Frame3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Frame3_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_PermissionRequested<
+ Identity: ICoreWebView2Frame3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame3_Impl::add_PermissionRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_PermissionRequested<
+ Identity: ICoreWebView2Frame3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame3_Impl::remove_PermissionRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Frame2_Vtbl::new::<Identity, OFFSET>(),
+ add_PermissionRequested: add_PermissionRequested::<Identity, OFFSET>,
+ remove_PermissionRequested: remove_PermissionRequested::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Frame3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Frame4,
+ ICoreWebView2Frame4_Vtbl,
+ 0x188782dc_92aa_4732_ab3c_fcc59f6f68b9
+);
+impl core::ops::Deref for ICoreWebView2Frame4 {
+ type Target = ICoreWebView2Frame3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Frame4,
+ windows_core::IUnknown,
+ ICoreWebView2Frame,
+ ICoreWebView2Frame2,
+ ICoreWebView2Frame3
+);
+impl ICoreWebView2Frame4 {
+ pub unsafe fn PostSharedBufferToScript<P0, P2>(
+ &self,
+ sharedbuffer: P0,
+ access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ additionaldataasjson: P2,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2SharedBuffer>,
+ P2: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PostSharedBufferToScript)(
+ windows_core::Interface::as_raw(self),
+ sharedbuffer.param().abi(),
+ access,
+ additionaldataasjson.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Frame4_Vtbl {
+ pub base__: ICoreWebView2Frame3_Vtbl,
+ pub PostSharedBufferToScript: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Frame4_Impl: ICoreWebView2Frame3_Impl {
+ fn PostSharedBufferToScript(
+ &self,
+ sharedbuffer: windows_core::Ref<'_, ICoreWebView2SharedBuffer>,
+ access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ additionaldataasjson: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Frame4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Frame4_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PostSharedBufferToScript<
+ Identity: ICoreWebView2Frame4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ sharedbuffer: *mut core::ffi::c_void,
+ access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ additionaldataasjson: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame4_Impl::PostSharedBufferToScript(
+ this,
+ core::mem::transmute_copy(&sharedbuffer),
+ core::mem::transmute_copy(&access),
+ core::mem::transmute(&additionaldataasjson),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Frame3_Vtbl::new::<Identity, OFFSET>(),
+ PostSharedBufferToScript: PostSharedBufferToScript::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Frame4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Frame4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Frame5,
+ ICoreWebView2Frame5_Vtbl,
+ 0x99d199c4_7305_11ee_b962_0242ac120002
+);
+impl core::ops::Deref for ICoreWebView2Frame5 {
+ type Target = ICoreWebView2Frame4;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Frame5,
+ windows_core::IUnknown,
+ ICoreWebView2Frame,
+ ICoreWebView2Frame2,
+ ICoreWebView2Frame3,
+ ICoreWebView2Frame4
+);
+impl ICoreWebView2Frame5 {
+ pub unsafe fn FrameId(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FrameId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Frame5_Vtbl {
+ pub base__: ICoreWebView2Frame4_Vtbl,
+ pub FrameId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Frame5_Impl: ICoreWebView2Frame4_Impl {
+ fn FrameId(&self, value: *mut u32) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Frame5_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Frame5_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn FrameId<
+ Identity: ICoreWebView2Frame5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame5_Impl::FrameId(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Frame4_Vtbl::new::<Identity, OFFSET>(),
+ FrameId: FrameId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Frame5 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame4 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Frame5 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Frame6,
+ ICoreWebView2Frame6_Vtbl,
+ 0x0de611fd_31e9_5ddc_9d71_95eda26eff32
+);
+impl core::ops::Deref for ICoreWebView2Frame6 {
+ type Target = ICoreWebView2Frame5;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Frame6,
+ windows_core::IUnknown,
+ ICoreWebView2Frame,
+ ICoreWebView2Frame2,
+ ICoreWebView2Frame3,
+ ICoreWebView2Frame4,
+ ICoreWebView2Frame5
+);
+impl ICoreWebView2Frame6 {
+ pub unsafe fn add_ScreenCaptureStarting<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameScreenCaptureStartingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ScreenCaptureStarting)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ScreenCaptureStarting)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Frame6_Vtbl {
+ pub base__: ICoreWebView2Frame5_Vtbl,
+ pub add_ScreenCaptureStarting: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ScreenCaptureStarting:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Frame6_Impl: ICoreWebView2Frame5_Impl {
+ fn add_ScreenCaptureStarting(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameScreenCaptureStartingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Frame6_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Frame6_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_ScreenCaptureStarting<
+ Identity: ICoreWebView2Frame6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame6_Impl::add_ScreenCaptureStarting(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ScreenCaptureStarting<
+ Identity: ICoreWebView2Frame6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame6_Impl::remove_ScreenCaptureStarting(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Frame5_Vtbl::new::<Identity, OFFSET>(),
+ add_ScreenCaptureStarting: add_ScreenCaptureStarting::<Identity, OFFSET>,
+ remove_ScreenCaptureStarting: remove_ScreenCaptureStarting::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Frame6 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame5 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Frame6 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Frame7,
+ ICoreWebView2Frame7_Vtbl,
+ 0x3598cfa2_d85d_5a9f_9228_4dde1f59ec64
+);
+impl core::ops::Deref for ICoreWebView2Frame7 {
+ type Target = ICoreWebView2Frame6;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Frame7,
+ windows_core::IUnknown,
+ ICoreWebView2Frame,
+ ICoreWebView2Frame2,
+ ICoreWebView2Frame3,
+ ICoreWebView2Frame4,
+ ICoreWebView2Frame5,
+ ICoreWebView2Frame6
+);
+impl ICoreWebView2Frame7 {
+ pub unsafe fn add_FrameCreated<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameChildFrameCreatedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_FrameCreated)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_FrameCreated(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_FrameCreated)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Frame7_Vtbl {
+ pub base__: ICoreWebView2Frame6_Vtbl,
+ pub add_FrameCreated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_FrameCreated:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Frame7_Impl: ICoreWebView2Frame6_Impl {
+ fn add_FrameCreated(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameChildFrameCreatedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_FrameCreated(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Frame7_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Frame7_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_FrameCreated<
+ Identity: ICoreWebView2Frame7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame7_Impl::add_FrameCreated(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_FrameCreated<
+ Identity: ICoreWebView2Frame7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Frame7_Impl::remove_FrameCreated(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Frame6_Vtbl::new::<Identity, OFFSET>(),
+ add_FrameCreated: add_FrameCreated::<Identity, OFFSET>,
+ remove_FrameCreated: remove_FrameCreated::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Frame7 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame5 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Frame6 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Frame7 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameChildFrameCreatedEventHandler,
+ ICoreWebView2FrameChildFrameCreatedEventHandler_Vtbl,
+ 0x569e40e7_46b7_563d_83ae_1073155664d7
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameChildFrameCreatedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameChildFrameCreatedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2FrameCreatedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameChildFrameCreatedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameChildFrameCreatedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2FrameCreatedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameChildFrameCreatedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameChildFrameCreatedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2FrameChildFrameCreatedEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameChildFrameCreatedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameChildFrameCreatedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameChildFrameCreatedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameContentLoadingEventHandler,
+ ICoreWebView2FrameContentLoadingEventHandler_Vtbl,
+ 0x0d6156f2_d332_49a7_9e03_7d8f2feeee54
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameContentLoadingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameContentLoadingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2ContentLoadingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameContentLoadingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameContentLoadingEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2ContentLoadingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameContentLoadingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameContentLoadingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameContentLoadingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameContentLoadingEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameContentLoadingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameCreatedEventArgs,
+ ICoreWebView2FrameCreatedEventArgs_Vtbl,
+ 0x4d6e7b5e_9baa_11eb_a8b3_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2FrameCreatedEventArgs, windows_core::IUnknown);
+impl ICoreWebView2FrameCreatedEventArgs {
+ pub unsafe fn Frame(&self) -> windows_core::Result<ICoreWebView2Frame> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Frame)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameCreatedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Frame: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameCreatedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn Frame(&self) -> windows_core::Result<ICoreWebView2Frame>;
+}
+impl ICoreWebView2FrameCreatedEventArgs_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FrameCreatedEventArgs_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Frame<
+ Identity: ICoreWebView2FrameCreatedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2FrameCreatedEventArgs_Impl::Frame(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Frame: Frame::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameCreatedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameCreatedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameCreatedEventHandler,
+ ICoreWebView2FrameCreatedEventHandler_Vtbl,
+ 0x38059770_9baa_11eb_a8b3_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameCreatedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameCreatedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2FrameCreatedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameCreatedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameCreatedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2FrameCreatedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameCreatedEventHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FrameCreatedEventHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameCreatedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameCreatedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameCreatedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameDOMContentLoadedEventHandler,
+ ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl,
+ 0x38d9520d_340f_4d1e_a775_43fce9753683
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameDOMContentLoadedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameDOMContentLoadedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2DOMContentLoadedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameDOMContentLoadedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2DOMContentLoadedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameDOMContentLoadedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameDOMContentLoadedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameDOMContentLoadedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameDOMContentLoadedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameDestroyedEventHandler,
+ ICoreWebView2FrameDestroyedEventHandler_Vtbl,
+ 0x59dd7b4c_9baa_11eb_a8b3_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameDestroyedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameDestroyedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameDestroyedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameDestroyedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameDestroyedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameDestroyedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameDestroyedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameDestroyedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameDestroyedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameInfo,
+ ICoreWebView2FrameInfo_Vtbl,
+ 0xda86b8a1_bdf3_4f11_9955_528cefa59727
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2FrameInfo, windows_core::IUnknown);
+impl ICoreWebView2FrameInfo {
+ pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Name)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Source)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameInfo_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Name: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Source: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameInfo_Impl: windows_core::IUnknownImpl {
+ fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameInfo_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FrameInfo_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Name<
+ Identity: ICoreWebView2FrameInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameInfo_Impl::Name(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn Source<
+ Identity: ICoreWebView2FrameInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameInfo_Impl::Source(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Name: Name::<Identity, OFFSET>,
+ Source: Source::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameInfo as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameInfo {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameInfo2,
+ ICoreWebView2FrameInfo2_Vtbl,
+ 0x56f85cfa_72c4_11ee_b962_0242ac120002
+);
+impl core::ops::Deref for ICoreWebView2FrameInfo2 {
+ type Target = ICoreWebView2FrameInfo;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameInfo2,
+ windows_core::IUnknown,
+ ICoreWebView2FrameInfo
+);
+impl ICoreWebView2FrameInfo2 {
+ pub unsafe fn ParentFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).ParentFrameInfo)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn FrameId(&self, id: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FrameId)(
+ windows_core::Interface::as_raw(self),
+ id as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FrameKind(&self, kind: *mut COREWEBVIEW2_FRAME_KIND) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FrameKind)(
+ windows_core::Interface::as_raw(self),
+ kind as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameInfo2_Vtbl {
+ pub base__: ICoreWebView2FrameInfo_Vtbl,
+ pub ParentFrameInfo: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub FrameId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub FrameKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_FRAME_KIND,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameInfo2_Impl: ICoreWebView2FrameInfo_Impl {
+ fn ParentFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
+ fn FrameId(&self, id: *mut u32) -> windows_core::Result<()>;
+ fn FrameKind(&self, kind: *mut COREWEBVIEW2_FRAME_KIND) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameInfo2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FrameInfo2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn ParentFrameInfo<
+ Identity: ICoreWebView2FrameInfo2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ frameinfo: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2FrameInfo2_Impl::ParentFrameInfo(this) {
+ Ok(ok__) => {
+ frameinfo.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn FrameId<
+ Identity: ICoreWebView2FrameInfo2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ id: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameInfo2_Impl::FrameId(this, core::mem::transmute_copy(&id)).into()
+ }
+ }
+ unsafe extern "system" fn FrameKind<
+ Identity: ICoreWebView2FrameInfo2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ kind: *mut COREWEBVIEW2_FRAME_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameInfo2_Impl::FrameKind(this, core::mem::transmute_copy(&kind))
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2FrameInfo_Vtbl::new::<Identity, OFFSET>(),
+ ParentFrameInfo: ParentFrameInfo::<Identity, OFFSET>,
+ FrameId: FrameId::<Identity, OFFSET>,
+ FrameKind: FrameKind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameInfo2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2FrameInfo as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameInfo2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameInfoCollection,
+ ICoreWebView2FrameInfoCollection_Vtbl,
+ 0x8f834154_d38e_4d90_affb_6800a7272839
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2FrameInfoCollection, windows_core::IUnknown);
+impl ICoreWebView2FrameInfoCollection {
+ pub unsafe fn GetIterator(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2FrameInfoCollectionIterator> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetIterator)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameInfoCollection_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub GetIterator: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameInfoCollection_Impl: windows_core::IUnknownImpl {
+ fn GetIterator(&self) -> windows_core::Result<ICoreWebView2FrameInfoCollectionIterator>;
+}
+impl ICoreWebView2FrameInfoCollection_Vtbl {
+ pub const fn new<Identity: ICoreWebView2FrameInfoCollection_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn GetIterator<
+ Identity: ICoreWebView2FrameInfoCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2FrameInfoCollection_Impl::GetIterator(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ GetIterator: GetIterator::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameInfoCollection as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameInfoCollection {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameInfoCollectionIterator,
+ ICoreWebView2FrameInfoCollectionIterator_Vtbl,
+ 0x1bf89e2d_1b2b_4629_b28f_05099b41bb03
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameInfoCollectionIterator,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameInfoCollectionIterator {
+ pub unsafe fn HasCurrent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasCurrent)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetCurrent(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetCurrent)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn MoveNext(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MoveNext)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameInfoCollectionIterator_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub HasCurrent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetCurrent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub MoveNext: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameInfoCollectionIterator_Impl: windows_core::IUnknownImpl {
+ fn HasCurrent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetCurrent(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
+ fn MoveNext(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameInfoCollectionIterator_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn HasCurrent<
+ Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameInfoCollectionIterator_Impl::HasCurrent(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetCurrent<
+ Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2FrameInfoCollectionIterator_Impl::GetCurrent(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn MoveNext<
+ Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameInfoCollectionIterator_Impl::MoveNext(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ HasCurrent: HasCurrent::<Identity, OFFSET>,
+ GetCurrent: GetCurrent::<Identity, OFFSET>,
+ MoveNext: MoveNext::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameInfoCollectionIterator as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameInfoCollectionIterator {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameNameChangedEventHandler,
+ ICoreWebView2FrameNameChangedEventHandler_Vtbl,
+ 0x435c7dc8_9baa_11eb_a8b3_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameNameChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameNameChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameNameChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameNameChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameNameChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameNameChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameNameChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameNameChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameNameChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameNavigationCompletedEventHandler,
+ ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl,
+ 0x609302ad_0e36_4f9a_a210_6a45272842a9
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameNavigationCompletedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameNavigationCompletedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2NavigationCompletedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameNavigationCompletedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameNavigationCompletedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameNavigationCompletedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameNavigationCompletedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameNavigationCompletedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameNavigationStartingEventHandler,
+ ICoreWebView2FrameNavigationStartingEventHandler_Vtbl,
+ 0xe79908bf_2d5d_4968_83db_263fea2c1da3
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameNavigationStartingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameNavigationStartingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2NavigationStartingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameNavigationStartingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameNavigationStartingEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameNavigationStartingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameNavigationStartingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameNavigationStartingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameNavigationStartingEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameNavigationStartingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FramePermissionRequestedEventHandler,
+ ICoreWebView2FramePermissionRequestedEventHandler_Vtbl,
+ 0x845d0edd_8bd8_429b_9915_4821789f23e9
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FramePermissionRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FramePermissionRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2PermissionRequestedEventArgs2>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FramePermissionRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FramePermissionRequestedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2PermissionRequestedEventArgs2>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FramePermissionRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FramePermissionRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FramePermissionRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FramePermissionRequestedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FramePermissionRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameScreenCaptureStartingEventHandler,
+ ICoreWebView2FrameScreenCaptureStartingEventHandler_Vtbl,
+ 0xa6c1d8ad_bb80_59c5_895b_fba1698b9309
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameScreenCaptureStartingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameScreenCaptureStartingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2ScreenCaptureStartingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameScreenCaptureStartingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameScreenCaptureStartingEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2ScreenCaptureStartingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameScreenCaptureStartingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameScreenCaptureStartingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2FrameScreenCaptureStartingEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameScreenCaptureStartingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2FrameScreenCaptureStartingEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameScreenCaptureStartingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2FrameWebMessageReceivedEventHandler,
+ ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl,
+ 0xe371e005_6d1d_4517_934b_a8f1629c62a5
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2FrameWebMessageReceivedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2FrameWebMessageReceivedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Frame>,
+ P1: windows_core::Param<ICoreWebView2WebMessageReceivedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2FrameWebMessageReceivedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Frame>,
+ args: windows_core::Ref<'_, ICoreWebView2WebMessageReceivedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2FrameWebMessageReceivedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2FrameWebMessageReceivedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2FrameWebMessageReceivedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2FrameWebMessageReceivedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2GetCookiesCompletedHandler,
+ ICoreWebView2GetCookiesCompletedHandler_Vtbl,
+ 0x5a4f5069_5c15_47c3_8646_f4de1c116670
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2GetCookiesCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2GetCookiesCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2CookieList>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2GetCookiesCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2GetCookiesCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2CookieList>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2GetCookiesCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2GetCookiesCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2GetCookiesCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2GetCookiesCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2GetCookiesCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2GetCookiesCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2GetFaviconCompletedHandler,
+ ICoreWebView2GetFaviconCompletedHandler_Vtbl,
+ 0xa2508329_7da8_49d7_8c05_fa125e4aee8d
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2GetFaviconCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2GetFaviconCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows::Win32::System::Com::IStream>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2GetFaviconCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2GetFaviconCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2GetFaviconCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2GetFaviconCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2GetFaviconCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2GetFaviconCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2GetFaviconCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2GetFaviconCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler,
+ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Vtbl,
+ 0x38274481_a15c_4563_94cf_990edc9aeb95
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2PermissionSettingCollectionView>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2PermissionSettingCollectionView>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2GetProcessExtendedInfosCompletedHandler,
+ ICoreWebView2GetProcessExtendedInfosCompletedHandler_Vtbl,
+ 0xf45e55aa_3bc2_11ee_be56_0242ac120002
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2GetProcessExtendedInfosCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2GetProcessExtendedInfosCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2ProcessExtendedInfoCollection>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2GetProcessExtendedInfosCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2ProcessExtendedInfoCollection>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2GetProcessExtendedInfosCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2GetProcessExtendedInfosCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2GetProcessExtendedInfosCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2HistoryChangedEventHandler,
+ ICoreWebView2HistoryChangedEventHandler_Vtbl,
+ 0xc79a420c_efd9_4058_9295_3e8b4bcab645
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2HistoryChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2HistoryChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2HistoryChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2HistoryChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2HistoryChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2HistoryChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HistoryChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2HistoryChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2HistoryChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2HttpHeadersCollectionIterator,
+ ICoreWebView2HttpHeadersCollectionIterator_Vtbl,
+ 0x0702fc30_f43b_47bb_ab52_a42cb552ad9f
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2HttpHeadersCollectionIterator,
+ windows_core::IUnknown
+);
+impl ICoreWebView2HttpHeadersCollectionIterator {
+ pub unsafe fn GetCurrentHeader(
+ &self,
+ name: *mut windows_core::PWSTR,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetCurrentHeader)(
+ windows_core::Interface::as_raw(self),
+ name as _,
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HasCurrentHeader(
+ &self,
+ hascurrent: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasCurrentHeader)(
+ windows_core::Interface::as_raw(self),
+ hascurrent as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MoveNext(&self, hasnext: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MoveNext)(
+ windows_core::Interface::as_raw(self),
+ hasnext as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2HttpHeadersCollectionIterator_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub GetCurrentHeader: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub HasCurrentHeader: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub MoveNext: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2HttpHeadersCollectionIterator_Impl: windows_core::IUnknownImpl {
+ fn GetCurrentHeader(
+ &self,
+ name: *mut windows_core::PWSTR,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()>;
+ fn HasCurrentHeader(&self, hascurrent: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn MoveNext(&self, hasnext: *mut windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2HttpHeadersCollectionIterator_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn GetCurrentHeader<
+ Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: *mut windows_core::PWSTR,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpHeadersCollectionIterator_Impl::GetCurrentHeader(
+ this,
+ core::mem::transmute_copy(&name),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HasCurrentHeader<
+ Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ hascurrent: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpHeadersCollectionIterator_Impl::HasCurrentHeader(
+ this,
+ core::mem::transmute_copy(&hascurrent),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn MoveNext<
+ Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ hasnext: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpHeadersCollectionIterator_Impl::MoveNext(
+ this,
+ core::mem::transmute_copy(&hasnext),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ GetCurrentHeader: GetCurrentHeader::<Identity, OFFSET>,
+ HasCurrentHeader: HasCurrentHeader::<Identity, OFFSET>,
+ MoveNext: MoveNext::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2HttpHeadersCollectionIterator as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2HttpHeadersCollectionIterator {}
+windows_core::imp::define_interface!(
+ ICoreWebView2HttpRequestHeaders,
+ ICoreWebView2HttpRequestHeaders_Vtbl,
+ 0xe86cac0e_5523_465c_b536_8fb9fc8c8c60
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2HttpRequestHeaders, windows_core::IUnknown);
+impl ICoreWebView2HttpRequestHeaders {
+ pub unsafe fn GetHeader<P0>(
+ &self,
+ name: P0,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetHeader)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetHeaders<P0>(
+ &self,
+ name: P0,
+ ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetHeaders)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Contains<P0>(
+ &self,
+ name: P0,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Contains)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHeader<P0, P1>(&self, name: P0, value: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHeader)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RemoveHeader<P0>(&self, name: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).RemoveHeader)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetIterator(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetIterator)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2HttpRequestHeaders_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub GetHeader: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub GetHeaders: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Contains: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHeader: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub RemoveHeader: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub GetIterator: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2HttpRequestHeaders_Impl: windows_core::IUnknownImpl {
+ 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,
+ value: *mut windows_core::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 ICoreWebView2HttpRequestHeaders_Vtbl {
+ pub const fn new<Identity: ICoreWebView2HttpRequestHeaders_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn GetHeader<
+ Identity: ICoreWebView2HttpRequestHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpRequestHeaders_Impl::GetHeader(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetHeaders<
+ Identity: ICoreWebView2HttpRequestHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2HttpRequestHeaders_Impl::GetHeaders(
+ this,
+ core::mem::transmute(&name),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Contains<
+ Identity: ICoreWebView2HttpRequestHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpRequestHeaders_Impl::Contains(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHeader<
+ Identity: ICoreWebView2HttpRequestHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpRequestHeaders_Impl::SetHeader(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RemoveHeader<
+ Identity: ICoreWebView2HttpRequestHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpRequestHeaders_Impl::RemoveHeader(
+ this,
+ core::mem::transmute(&name),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetIterator<
+ Identity: ICoreWebView2HttpRequestHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2HttpRequestHeaders_Impl::GetIterator(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ GetHeader: GetHeader::<Identity, OFFSET>,
+ GetHeaders: GetHeaders::<Identity, OFFSET>,
+ Contains: Contains::<Identity, OFFSET>,
+ SetHeader: SetHeader::<Identity, OFFSET>,
+ RemoveHeader: RemoveHeader::<Identity, OFFSET>,
+ GetIterator: GetIterator::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2HttpRequestHeaders as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2HttpRequestHeaders {}
+windows_core::imp::define_interface!(
+ ICoreWebView2HttpResponseHeaders,
+ ICoreWebView2HttpResponseHeaders_Vtbl,
+ 0x03c5ff5a_9b45_4a88_881c_89a9f328619c
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2HttpResponseHeaders, windows_core::IUnknown);
+impl ICoreWebView2HttpResponseHeaders {
+ pub unsafe fn AppendHeader<P0, P1>(&self, name: P0, value: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).AppendHeader)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Contains<P0>(
+ &self,
+ name: P0,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Contains)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetHeader<P0>(
+ &self,
+ name: P0,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetHeader)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetHeaders<P0>(
+ &self,
+ name: P0,
+ ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetHeaders)(
+ windows_core::Interface::as_raw(self),
+ name.param().abi(),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn GetIterator(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetIterator)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2HttpResponseHeaders_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub AppendHeader: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub Contains: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetHeader: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub GetHeaders: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub GetIterator: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2HttpResponseHeaders_Impl: windows_core::IUnknownImpl {
+ fn AppendHeader(
+ &self,
+ name: &windows_core::PCWSTR,
+ value: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+ fn Contains(
+ &self,
+ name: &windows_core::PCWSTR,
+ value: *mut windows_core::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 ICoreWebView2HttpResponseHeaders_Vtbl {
+ pub const fn new<Identity: ICoreWebView2HttpResponseHeaders_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn AppendHeader<
+ Identity: ICoreWebView2HttpResponseHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpResponseHeaders_Impl::AppendHeader(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Contains<
+ Identity: ICoreWebView2HttpResponseHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpResponseHeaders_Impl::Contains(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetHeader<
+ Identity: ICoreWebView2HttpResponseHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2HttpResponseHeaders_Impl::GetHeader(
+ this,
+ core::mem::transmute(&name),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetHeaders<
+ Identity: ICoreWebView2HttpResponseHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ name: windows_core::PCWSTR,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2HttpResponseHeaders_Impl::GetHeaders(
+ this,
+ core::mem::transmute(&name),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn GetIterator<
+ Identity: ICoreWebView2HttpResponseHeaders_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2HttpResponseHeaders_Impl::GetIterator(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ AppendHeader: AppendHeader::<Identity, OFFSET>,
+ Contains: Contains::<Identity, OFFSET>,
+ GetHeader: GetHeader::<Identity, OFFSET>,
+ GetHeaders: GetHeaders::<Identity, OFFSET>,
+ GetIterator: GetIterator::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2HttpResponseHeaders as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2HttpResponseHeaders {}
+windows_core::imp::define_interface!(
+ ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler,
+ ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl,
+ 0x3117da26_ae13_438d_bd46_edbeb2c4ce81
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2IsDocumentPlayingAudioChangedEventHandler,
+ ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl,
+ 0x5def109a_2f4b_49fa_b7f6_11c39e513328
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2IsDocumentPlayingAudioChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2IsDocumentPlayingAudioChangedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2IsMutedChangedEventHandler,
+ ICoreWebView2IsMutedChangedEventHandler_Vtbl,
+ 0x57d90347_cd0e_4952_a4a2_7483a2756f08
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2IsMutedChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2IsMutedChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2IsMutedChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2IsMutedChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2IsMutedChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2IsMutedChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2IsMutedChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2IsMutedChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2IsMutedChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs,
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs_Vtbl,
+ 0x07d1a6c3_7175_4ba1_9306_e593ca07e46c
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2LaunchingExternalUriSchemeEventArgs {
+ pub unsafe fn Uri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn InitiatingOrigin(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).InitiatingOrigin)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsUserInitiated(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsUserInitiated)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancel)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2LaunchingExternalUriSchemeEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub InitiatingOrigin: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub IsUserInitiated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Cancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetCancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Uri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn InitiatingOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn IsUserInitiated(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2LaunchingExternalUriSchemeEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::Uri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn InitiatingOrigin<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::InitiatingOrigin(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsUserInitiated<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::IsUserInitiated(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::Cancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancel<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::SetCancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Uri: Uri::<Identity, OFFSET>,
+ InitiatingOrigin: InitiatingOrigin::<Identity, OFFSET>,
+ IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
+ Cancel: Cancel::<Identity, OFFSET>,
+ SetCancel: SetCancel::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2LaunchingExternalUriSchemeEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2LaunchingExternalUriSchemeEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2LaunchingExternalUriSchemeEventHandler,
+ ICoreWebView2LaunchingExternalUriSchemeEventHandler_Vtbl,
+ 0x74f712e0_8165_43a9_a13f_0cce597e75df
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2LaunchingExternalUriSchemeEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2LaunchingExternalUriSchemeEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2LaunchingExternalUriSchemeEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2LaunchingExternalUriSchemeEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2LaunchingExternalUriSchemeEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2LaunchingExternalUriSchemeEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2LaunchingExternalUriSchemeEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2LaunchingExternalUriSchemeEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2LaunchingExternalUriSchemeEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2LaunchingExternalUriSchemeEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2LaunchingExternalUriSchemeEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2MoveFocusRequestedEventArgs,
+ ICoreWebView2MoveFocusRequestedEventArgs_Vtbl,
+ 0x2d6aa13b_3839_4a15_92fc_d88b3c0d9c9d
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2MoveFocusRequestedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2MoveFocusRequestedEventArgs {
+ pub unsafe fn Reason(
+ &self,
+ reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Reason)(
+ windows_core::Interface::as_raw(self),
+ reason as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2MoveFocusRequestedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Reason: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2MoveFocusRequestedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn Reason(&self, reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON) -> windows_core::Result<()>;
+ fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2MoveFocusRequestedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Reason<
+ Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2MoveFocusRequestedEventArgs_Impl::Reason(
+ this,
+ core::mem::transmute_copy(&reason),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2MoveFocusRequestedEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2MoveFocusRequestedEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Reason: Reason::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2MoveFocusRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2MoveFocusRequestedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2MoveFocusRequestedEventHandler,
+ ICoreWebView2MoveFocusRequestedEventHandler_Vtbl,
+ 0x69035451_6dc7_4cb8_9bce_b2bd70ad289f
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2MoveFocusRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2MoveFocusRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Controller>,
+ P1: windows_core::Param<ICoreWebView2MoveFocusRequestedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2MoveFocusRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2MoveFocusRequestedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Controller>,
+ args: windows_core::Ref<'_, ICoreWebView2MoveFocusRequestedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2MoveFocusRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2MoveFocusRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2MoveFocusRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2MoveFocusRequestedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2MoveFocusRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NavigationCompletedEventArgs,
+ ICoreWebView2NavigationCompletedEventArgs_Vtbl,
+ 0x30d68b7d_20d9_4752_a9ca_ec8448fbb5c1
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NavigationCompletedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NavigationCompletedEventArgs {
+ pub unsafe fn IsSuccess(&self, issuccess: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsSuccess)(
+ windows_core::Interface::as_raw(self),
+ issuccess as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn WebErrorStatus(
+ &self,
+ weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).WebErrorStatus)(
+ windows_core::Interface::as_raw(self),
+ weberrorstatus as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).NavigationId)(
+ windows_core::Interface::as_raw(self),
+ navigationid as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NavigationCompletedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub IsSuccess: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub WebErrorStatus: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_WEB_ERROR_STATUS,
+ ) -> windows_core::HRESULT,
+ pub NavigationId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NavigationCompletedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn IsSuccess(&self, issuccess: *mut windows_core::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 ICoreWebView2NavigationCompletedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn IsSuccess<
+ Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ issuccess: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationCompletedEventArgs_Impl::IsSuccess(
+ this,
+ core::mem::transmute_copy(&issuccess),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn WebErrorStatus<
+ Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationCompletedEventArgs_Impl::WebErrorStatus(
+ this,
+ core::mem::transmute_copy(&weberrorstatus),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn NavigationId<
+ Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ navigationid: *mut u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationCompletedEventArgs_Impl::NavigationId(
+ this,
+ core::mem::transmute_copy(&navigationid),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ IsSuccess: IsSuccess::<Identity, OFFSET>,
+ WebErrorStatus: WebErrorStatus::<Identity, OFFSET>,
+ NavigationId: NavigationId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NavigationCompletedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NavigationCompletedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NavigationCompletedEventArgs2,
+ ICoreWebView2NavigationCompletedEventArgs2_Vtbl,
+ 0xfdf8b738_ee1e_4db2_a329_8d7d7b74d792
+);
+impl core::ops::Deref for ICoreWebView2NavigationCompletedEventArgs2 {
+ type Target = ICoreWebView2NavigationCompletedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NavigationCompletedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2NavigationCompletedEventArgs
+);
+impl ICoreWebView2NavigationCompletedEventArgs2 {
+ pub unsafe fn HttpStatusCode(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HttpStatusCode)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NavigationCompletedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2NavigationCompletedEventArgs_Vtbl,
+ pub HttpStatusCode:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NavigationCompletedEventArgs2_Impl:
+ ICoreWebView2NavigationCompletedEventArgs_Impl
+{
+ fn HttpStatusCode(&self, value: *mut i32) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NavigationCompletedEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NavigationCompletedEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn HttpStatusCode<
+ Identity: ICoreWebView2NavigationCompletedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationCompletedEventArgs2_Impl::HttpStatusCode(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2NavigationCompletedEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ HttpStatusCode: HttpStatusCode::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NavigationCompletedEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2NavigationCompletedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NavigationCompletedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NavigationCompletedEventHandler,
+ ICoreWebView2NavigationCompletedEventHandler_Vtbl,
+ 0xd33a35bf_1c49_4f98_93ab_006e0533fe1c
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NavigationCompletedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NavigationCompletedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2NavigationCompletedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NavigationCompletedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NavigationCompletedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NavigationCompletedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NavigationCompletedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationCompletedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NavigationCompletedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NavigationCompletedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NavigationStartingEventArgs,
+ ICoreWebView2NavigationStartingEventArgs_Vtbl,
+ 0x5b495469_e119_438a_9b18_7604f25f2e49
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NavigationStartingEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NavigationStartingEventArgs {
+ pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ uri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsUserInitiated(
+ &self,
+ isuserinitiated: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsUserInitiated)(
+ windows_core::Interface::as_raw(self),
+ isuserinitiated as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsRedirected(
+ &self,
+ isredirected: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsRedirected)(
+ windows_core::Interface::as_raw(self),
+ isredirected as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RequestHeaders(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).RequestHeaders)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(
+ windows_core::Interface::as_raw(self),
+ cancel as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancel(&self, cancel: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancel)(
+ windows_core::Interface::as_raw(self),
+ cancel.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).NavigationId)(
+ windows_core::Interface::as_raw(self),
+ navigationid as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NavigationStartingEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub IsUserInitiated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsRedirected: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub RequestHeaders: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Cancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetCancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub NavigationId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NavigationStartingEventArgs_Impl: windows_core::IUnknownImpl {
+ fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn IsUserInitiated(&self, isuserinitiated: *mut windows_core::BOOL)
+ -> windows_core::Result<()>;
+ fn IsRedirected(&self, isredirected: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn RequestHeaders(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders>;
+ fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetCancel(&self, cancel: windows_core::BOOL) -> windows_core::Result<()>;
+ fn NavigationId(&self, navigationid: *mut u64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NavigationStartingEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs_Impl::Uri(
+ this,
+ core::mem::transmute_copy(&uri),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsUserInitiated<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isuserinitiated: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs_Impl::IsUserInitiated(
+ this,
+ core::mem::transmute_copy(&isuserinitiated),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsRedirected<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isredirected: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs_Impl::IsRedirected(
+ this,
+ core::mem::transmute_copy(&isredirected),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RequestHeaders<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ requestheaders: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2NavigationStartingEventArgs_Impl::RequestHeaders(this) {
+ Ok(ok__) => {
+ requestheaders.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cancel: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs_Impl::Cancel(
+ this,
+ core::mem::transmute_copy(&cancel),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancel<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cancel: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs_Impl::SetCancel(
+ this,
+ core::mem::transmute_copy(&cancel),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn NavigationId<
+ Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ navigationid: *mut u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs_Impl::NavigationId(
+ this,
+ core::mem::transmute_copy(&navigationid),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Uri: Uri::<Identity, OFFSET>,
+ IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
+ IsRedirected: IsRedirected::<Identity, OFFSET>,
+ RequestHeaders: RequestHeaders::<Identity, OFFSET>,
+ Cancel: Cancel::<Identity, OFFSET>,
+ SetCancel: SetCancel::<Identity, OFFSET>,
+ NavigationId: NavigationId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NavigationStartingEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NavigationStartingEventArgs2,
+ ICoreWebView2NavigationStartingEventArgs2_Vtbl,
+ 0x9086be93_91aa_472d_a7e0_579f2ba006ad
+);
+impl core::ops::Deref for ICoreWebView2NavigationStartingEventArgs2 {
+ type Target = ICoreWebView2NavigationStartingEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NavigationStartingEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2NavigationStartingEventArgs
+);
+impl ICoreWebView2NavigationStartingEventArgs2 {
+ pub unsafe fn AdditionalAllowedFrameAncestors(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AdditionalAllowedFrameAncestors)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAdditionalAllowedFrameAncestors<P0>(
+ &self,
+ value: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAdditionalAllowedFrameAncestors)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NavigationStartingEventArgs2_Vtbl {
+ pub base__: ICoreWebView2NavigationStartingEventArgs_Vtbl,
+ pub AdditionalAllowedFrameAncestors: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetAdditionalAllowedFrameAncestors: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NavigationStartingEventArgs2_Impl:
+ ICoreWebView2NavigationStartingEventArgs_Impl
+{
+ fn AdditionalAllowedFrameAncestors(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()>;
+ fn SetAdditionalAllowedFrameAncestors(
+ &self,
+ value: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NavigationStartingEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NavigationStartingEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn AdditionalAllowedFrameAncestors<
+ Identity: ICoreWebView2NavigationStartingEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs2_Impl::AdditionalAllowedFrameAncestors(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAdditionalAllowedFrameAncestors<
+ Identity: ICoreWebView2NavigationStartingEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs2_Impl::SetAdditionalAllowedFrameAncestors(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2NavigationStartingEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ AdditionalAllowedFrameAncestors: AdditionalAllowedFrameAncestors::<Identity, OFFSET>,
+ SetAdditionalAllowedFrameAncestors: SetAdditionalAllowedFrameAncestors::<
+ Identity,
+ OFFSET,
+ >,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NavigationStartingEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2NavigationStartingEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NavigationStartingEventArgs3,
+ ICoreWebView2NavigationStartingEventArgs3_Vtbl,
+ 0xddffe494_4942_4bd2_ab73_35b8ff40e19f
+);
+impl core::ops::Deref for ICoreWebView2NavigationStartingEventArgs3 {
+ type Target = ICoreWebView2NavigationStartingEventArgs2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NavigationStartingEventArgs3,
+ windows_core::IUnknown,
+ ICoreWebView2NavigationStartingEventArgs,
+ ICoreWebView2NavigationStartingEventArgs2
+);
+impl ICoreWebView2NavigationStartingEventArgs3 {
+ pub unsafe fn NavigationKind(
+ &self,
+ value: *mut COREWEBVIEW2_NAVIGATION_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).NavigationKind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NavigationStartingEventArgs3_Vtbl {
+ pub base__: ICoreWebView2NavigationStartingEventArgs2_Vtbl,
+ pub NavigationKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_NAVIGATION_KIND,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NavigationStartingEventArgs3_Impl:
+ ICoreWebView2NavigationStartingEventArgs2_Impl
+{
+ fn NavigationKind(&self, value: *mut COREWEBVIEW2_NAVIGATION_KIND) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NavigationStartingEventArgs3_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NavigationStartingEventArgs3_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn NavigationKind<
+ Identity: ICoreWebView2NavigationStartingEventArgs3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_NAVIGATION_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventArgs3_Impl::NavigationKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2NavigationStartingEventArgs2_Vtbl::new::<Identity, OFFSET>(),
+ NavigationKind: NavigationKind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NavigationStartingEventArgs3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2NavigationStartingEventArgs as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2NavigationStartingEventArgs2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventArgs3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NavigationStartingEventHandler,
+ ICoreWebView2NavigationStartingEventHandler_Vtbl,
+ 0x9adbe429_f36d_432b_9ddc_f8881fbd76e3
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NavigationStartingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NavigationStartingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2NavigationStartingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NavigationStartingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NavigationStartingEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NavigationStartingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NavigationStartingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NavigationStartingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NavigationStartingEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NewBrowserVersionAvailableEventHandler,
+ ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl,
+ 0xf9a2976e_d34e_44fc_adee_81b6b57ca914
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NewBrowserVersionAvailableEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NewBrowserVersionAvailableEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Environment>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Environment>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2NewBrowserVersionAvailableEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NewBrowserVersionAvailableEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NewWindowRequestedEventArgs,
+ ICoreWebView2NewWindowRequestedEventArgs_Vtbl,
+ 0x34acb11c_fc37_4418_9132_f9c21d1eafb9
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NewWindowRequestedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NewWindowRequestedEventArgs {
+ pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ uri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetNewWindow<P0>(&self, newwindow: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetNewWindow)(
+ windows_core::Interface::as_raw(self),
+ newwindow.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn NewWindow(&self) -> windows_core::Result<ICoreWebView2> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).NewWindow)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetHandled(&self, handled: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ handled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ handled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsUserInitiated(
+ &self,
+ isuserinitiated: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsUserInitiated)(
+ windows_core::Interface::as_raw(self),
+ isuserinitiated as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn WindowFeatures(&self) -> windows_core::Result<ICoreWebView2WindowFeatures> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).WindowFeatures)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NewWindowRequestedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetNewWindow: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub NewWindow: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsUserInitiated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub WindowFeatures: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NewWindowRequestedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn SetNewWindow(
+ &self,
+ newwindow: windows_core::Ref<'_, ICoreWebView2>,
+ ) -> windows_core::Result<()>;
+ fn NewWindow(&self) -> windows_core::Result<ICoreWebView2>;
+ fn SetHandled(&self, handled: windows_core::BOOL) -> windows_core::Result<()>;
+ fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsUserInitiated(&self, isuserinitiated: *mut windows_core::BOOL)
+ -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+ fn WindowFeatures(&self) -> windows_core::Result<ICoreWebView2WindowFeatures>;
+}
+impl ICoreWebView2NewWindowRequestedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewWindowRequestedEventArgs_Impl::Uri(
+ this,
+ core::mem::transmute_copy(&uri),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetNewWindow<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ newwindow: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewWindowRequestedEventArgs_Impl::SetNewWindow(
+ this,
+ core::mem::transmute_copy(&newwindow),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn NewWindow<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ newwindow: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2NewWindowRequestedEventArgs_Impl::NewWindow(this) {
+ Ok(ok__) => {
+ newwindow.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewWindowRequestedEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&handled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewWindowRequestedEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&handled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsUserInitiated<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isuserinitiated: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewWindowRequestedEventArgs_Impl::IsUserInitiated(
+ this,
+ core::mem::transmute_copy(&isuserinitiated),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2NewWindowRequestedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn WindowFeatures<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2NewWindowRequestedEventArgs_Impl::WindowFeatures(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Uri: Uri::<Identity, OFFSET>,
+ SetNewWindow: SetNewWindow::<Identity, OFFSET>,
+ NewWindow: NewWindow::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ WindowFeatures: WindowFeatures::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NewWindowRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NewWindowRequestedEventArgs2,
+ ICoreWebView2NewWindowRequestedEventArgs2_Vtbl,
+ 0xbbc7baed_74c6_4c92_b63a_7f5aeae03de3
+);
+impl core::ops::Deref for ICoreWebView2NewWindowRequestedEventArgs2 {
+ type Target = ICoreWebView2NewWindowRequestedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NewWindowRequestedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2NewWindowRequestedEventArgs
+);
+impl ICoreWebView2NewWindowRequestedEventArgs2 {
+ pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Name)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NewWindowRequestedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2NewWindowRequestedEventArgs_Vtbl,
+ pub Name: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NewWindowRequestedEventArgs2_Impl:
+ ICoreWebView2NewWindowRequestedEventArgs_Impl
+{
+ fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NewWindowRequestedEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Name<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewWindowRequestedEventArgs2_Impl::Name(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2NewWindowRequestedEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ Name: Name::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NewWindowRequestedEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2NewWindowRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NewWindowRequestedEventArgs3,
+ ICoreWebView2NewWindowRequestedEventArgs3_Vtbl,
+ 0x842bed3c_6ad6_4dd9_b938_28c96667ad66
+);
+impl core::ops::Deref for ICoreWebView2NewWindowRequestedEventArgs3 {
+ type Target = ICoreWebView2NewWindowRequestedEventArgs2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NewWindowRequestedEventArgs3,
+ windows_core::IUnknown,
+ ICoreWebView2NewWindowRequestedEventArgs,
+ ICoreWebView2NewWindowRequestedEventArgs2
+);
+impl ICoreWebView2NewWindowRequestedEventArgs3 {
+ pub unsafe fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).OriginalSourceFrameInfo)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NewWindowRequestedEventArgs3_Vtbl {
+ pub base__: ICoreWebView2NewWindowRequestedEventArgs2_Vtbl,
+ pub OriginalSourceFrameInfo: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NewWindowRequestedEventArgs3_Impl:
+ ICoreWebView2NewWindowRequestedEventArgs2_Impl
+{
+ fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
+}
+impl ICoreWebView2NewWindowRequestedEventArgs3_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs3_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn OriginalSourceFrameInfo<
+ Identity: ICoreWebView2NewWindowRequestedEventArgs3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2NewWindowRequestedEventArgs3_Impl::OriginalSourceFrameInfo(this)
+ {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2NewWindowRequestedEventArgs2_Vtbl::new::<Identity, OFFSET>(),
+ OriginalSourceFrameInfo: OriginalSourceFrameInfo::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NewWindowRequestedEventArgs3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2NewWindowRequestedEventArgs as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2NewWindowRequestedEventArgs2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NewWindowRequestedEventHandler,
+ ICoreWebView2NewWindowRequestedEventHandler_Vtbl,
+ 0xd4c185fe_c81c_4989_97af_2d3fa7ab5651
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NewWindowRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NewWindowRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2NewWindowRequestedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NewWindowRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NewWindowRequestedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2NewWindowRequestedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NewWindowRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NewWindowRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NewWindowRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NewWindowRequestedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NonClientRegionChangedEventArgs,
+ ICoreWebView2NonClientRegionChangedEventArgs_Vtbl,
+ 0xab71d500_0820_4a52_809c_48db04ff93bf
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NonClientRegionChangedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NonClientRegionChangedEventArgs {
+ pub unsafe fn RegionKind(
+ &self,
+ value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).RegionKind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NonClientRegionChangedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub RegionKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NonClientRegionChangedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn RegionKind(
+ &self,
+ value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NonClientRegionChangedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NonClientRegionChangedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn RegionKind<
+ Identity: ICoreWebView2NonClientRegionChangedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NonClientRegionChangedEventArgs_Impl::RegionKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ RegionKind: RegionKind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NonClientRegionChangedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NonClientRegionChangedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NonClientRegionChangedEventHandler,
+ ICoreWebView2NonClientRegionChangedEventHandler_Vtbl,
+ 0x4a794e66_aa6c_46bd_93a3_382196837680
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NonClientRegionChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NonClientRegionChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2CompositionController>,
+ P1: windows_core::Param<ICoreWebView2NonClientRegionChangedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NonClientRegionChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NonClientRegionChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2CompositionController>,
+ args: windows_core::Ref<'_, ICoreWebView2NonClientRegionChangedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NonClientRegionChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NonClientRegionChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2NonClientRegionChangedEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NonClientRegionChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NonClientRegionChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NonClientRegionChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Notification,
+ ICoreWebView2Notification_Vtbl,
+ 0xb7434d98_6bc8_419d_9da5_fb5a96d4dacd
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Notification, windows_core::IUnknown);
+impl ICoreWebView2Notification {
+ pub unsafe fn add_CloseRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NotificationCloseRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_CloseRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_CloseRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_CloseRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ReportShown(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ReportShown)(windows_core::Interface::as_raw(
+ self,
+ ))
+ .ok()
+ }
+ }
+ pub unsafe fn ReportClicked(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ReportClicked)(windows_core::Interface::as_raw(
+ self,
+ ))
+ .ok()
+ }
+ }
+ pub unsafe fn ReportClosed(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ReportClosed)(windows_core::Interface::as_raw(
+ self,
+ ))
+ .ok()
+ }
+ }
+ pub unsafe fn Body(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Body)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Direction(
+ &self,
+ value: *mut COREWEBVIEW2_TEXT_DIRECTION_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Direction)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Language(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Language)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Tag(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Tag)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IconUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Title(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Title)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn BadgeUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BadgeUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn BodyImageUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).BodyImageUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldRenotify(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldRenotify)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RequiresInteraction(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).RequiresInteraction)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsSilent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsSilent)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Timestamp(&self, value: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Timestamp)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetVibrationPattern(
+ &self,
+ count: *mut u32,
+ vibrationpattern: *mut *mut u64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetVibrationPattern)(
+ windows_core::Interface::as_raw(self),
+ count as _,
+ vibrationpattern as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Notification_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub add_CloseRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_CloseRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub ReportShown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub ReportClicked: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub ReportClosed: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub Body: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Direction: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_TEXT_DIRECTION_KIND,
+ ) -> windows_core::HRESULT,
+ pub Language: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Tag: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub IconUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Title: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub BadgeUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub BodyImageUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ShouldRenotify: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub RequiresInteraction: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsSilent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Timestamp:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub GetVibrationPattern: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut u32,
+ *mut *mut u64,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Notification_Impl: windows_core::IUnknownImpl {
+ fn add_CloseRequested(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2NotificationCloseRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_CloseRequested(&self, token: i64) -> windows_core::Result<()>;
+ fn ReportShown(&self) -> windows_core::Result<()>;
+ fn ReportClicked(&self) -> windows_core::Result<()>;
+ fn ReportClosed(&self) -> windows_core::Result<()>;
+ fn Body(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Direction(&self, value: *mut COREWEBVIEW2_TEXT_DIRECTION_KIND) -> windows_core::Result<()>;
+ fn Language(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Tag(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn IconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Title(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn BadgeUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn BodyImageUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn ShouldRenotify(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn RequiresInteraction(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsSilent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn Timestamp(&self, value: *mut f64) -> windows_core::Result<()>;
+ fn GetVibrationPattern(
+ &self,
+ count: *mut u32,
+ vibrationpattern: *mut *mut u64,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Notification_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Notification_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_CloseRequested<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::add_CloseRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_CloseRequested<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::remove_CloseRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ReportShown<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::ReportShown(this).into()
+ }
+ }
+ unsafe extern "system" fn ReportClicked<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::ReportClicked(this).into()
+ }
+ }
+ unsafe extern "system" fn ReportClosed<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::ReportClosed(this).into()
+ }
+ }
+ unsafe extern "system" fn Body<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::Body(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn Direction<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_TEXT_DIRECTION_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::Direction(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Language<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::Language(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Tag<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::Tag(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn IconUri<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::IconUri(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Title<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::Title(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn BadgeUri<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::BadgeUri(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn BodyImageUri<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::BodyImageUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldRenotify<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::ShouldRenotify(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RequiresInteraction<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::RequiresInteraction(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsSilent<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::IsSilent(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Timestamp<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::Timestamp(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetVibrationPattern<
+ Identity: ICoreWebView2Notification_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ count: *mut u32,
+ vibrationpattern: *mut *mut u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Notification_Impl::GetVibrationPattern(
+ this,
+ core::mem::transmute_copy(&count),
+ core::mem::transmute_copy(&vibrationpattern),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ add_CloseRequested: add_CloseRequested::<Identity, OFFSET>,
+ remove_CloseRequested: remove_CloseRequested::<Identity, OFFSET>,
+ ReportShown: ReportShown::<Identity, OFFSET>,
+ ReportClicked: ReportClicked::<Identity, OFFSET>,
+ ReportClosed: ReportClosed::<Identity, OFFSET>,
+ Body: Body::<Identity, OFFSET>,
+ Direction: Direction::<Identity, OFFSET>,
+ Language: Language::<Identity, OFFSET>,
+ Tag: Tag::<Identity, OFFSET>,
+ IconUri: IconUri::<Identity, OFFSET>,
+ Title: Title::<Identity, OFFSET>,
+ BadgeUri: BadgeUri::<Identity, OFFSET>,
+ BodyImageUri: BodyImageUri::<Identity, OFFSET>,
+ ShouldRenotify: ShouldRenotify::<Identity, OFFSET>,
+ RequiresInteraction: RequiresInteraction::<Identity, OFFSET>,
+ IsSilent: IsSilent::<Identity, OFFSET>,
+ Timestamp: Timestamp::<Identity, OFFSET>,
+ GetVibrationPattern: GetVibrationPattern::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Notification as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Notification {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NotificationCloseRequestedEventHandler,
+ ICoreWebView2NotificationCloseRequestedEventHandler_Vtbl,
+ 0x47c32d23_1e94_4733_85f1_d9bf4acd0974
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NotificationCloseRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NotificationCloseRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Notification>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NotificationCloseRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NotificationCloseRequestedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Notification>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NotificationCloseRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NotificationCloseRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2NotificationCloseRequestedEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NotificationCloseRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2NotificationCloseRequestedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NotificationCloseRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NotificationReceivedEventArgs,
+ ICoreWebView2NotificationReceivedEventArgs_Vtbl,
+ 0x1512dd5b_5514_4f85_886e_21c3a4c9cfe6
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NotificationReceivedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NotificationReceivedEventArgs {
+ pub unsafe fn SenderOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SenderOrigin)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Notification(&self) -> windows_core::Result<ICoreWebView2Notification> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Notification)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NotificationReceivedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub SenderOrigin: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Notification: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NotificationReceivedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn SenderOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Notification(&self) -> windows_core::Result<ICoreWebView2Notification>;
+ fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2NotificationReceivedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn SenderOrigin<
+ Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NotificationReceivedEventArgs_Impl::SenderOrigin(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Notification<
+ Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2NotificationReceivedEventArgs_Impl::Notification(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NotificationReceivedEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NotificationReceivedEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2NotificationReceivedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ SenderOrigin: SenderOrigin::<Identity, OFFSET>,
+ Notification: Notification::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NotificationReceivedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NotificationReceivedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2NotificationReceivedEventHandler,
+ ICoreWebView2NotificationReceivedEventHandler_Vtbl,
+ 0x89c5d598_8788_423b_be97_e6e01c0f9ee3
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2NotificationReceivedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2NotificationReceivedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2NotificationReceivedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2NotificationReceivedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2NotificationReceivedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2NotificationReceivedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2NotificationReceivedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2NotificationReceivedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2NotificationReceivedEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2NotificationReceivedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2NotificationReceivedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2NotificationReceivedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ObjectCollection,
+ ICoreWebView2ObjectCollection_Vtbl,
+ 0x5cfec11c_25bd_4e8d_9e1a_7acdaeeec047
+);
+impl core::ops::Deref for ICoreWebView2ObjectCollection {
+ type Target = ICoreWebView2ObjectCollectionView;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ObjectCollection,
+ windows_core::IUnknown,
+ ICoreWebView2ObjectCollectionView
+);
+impl ICoreWebView2ObjectCollection {
+ pub unsafe fn RemoveValueAtIndex(&self, index: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).RemoveValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn InsertValueAtIndex<P1>(&self, index: u32, value: P1) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).InsertValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ObjectCollection_Vtbl {
+ pub base__: ICoreWebView2ObjectCollectionView_Vtbl,
+ pub RemoveValueAtIndex:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub InsertValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ObjectCollection_Impl: ICoreWebView2ObjectCollectionView_Impl {
+ fn RemoveValueAtIndex(&self, index: u32) -> windows_core::Result<()>;
+ fn InsertValueAtIndex(
+ &self,
+ index: u32,
+ value: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ObjectCollection_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ObjectCollection_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn RemoveValueAtIndex<
+ Identity: ICoreWebView2ObjectCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ObjectCollection_Impl::RemoveValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn InsertValueAtIndex<
+ Identity: ICoreWebView2ObjectCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ObjectCollection_Impl::InsertValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2ObjectCollectionView_Vtbl::new::<Identity, OFFSET>(),
+ RemoveValueAtIndex: RemoveValueAtIndex::<Identity, OFFSET>,
+ InsertValueAtIndex: InsertValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ObjectCollection as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ObjectCollectionView as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ObjectCollection {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ObjectCollectionView,
+ ICoreWebView2ObjectCollectionView_Vtbl,
+ 0x0f36fd87_4f69_4415_98da_888f89fb9a33
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ObjectCollectionView, windows_core::IUnknown);
+impl ICoreWebView2ObjectCollectionView {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ ) -> windows_core::Result<windows_core::IUnknown> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ObjectCollectionView_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ObjectCollectionView_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<windows_core::IUnknown>;
+}
+impl ICoreWebView2ObjectCollectionView_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ObjectCollectionView_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2ObjectCollectionView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ObjectCollectionView_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2ObjectCollectionView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ObjectCollectionView_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ObjectCollectionView as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ObjectCollectionView {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PermissionRequestedEventArgs,
+ ICoreWebView2PermissionRequestedEventArgs_Vtbl,
+ 0x973ae2ef_ff18_4894_8fb2_3c758f046810
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PermissionRequestedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2PermissionRequestedEventArgs {
+ pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ uri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PermissionKind(
+ &self,
+ permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PermissionKind)(
+ windows_core::Interface::as_raw(self),
+ permissionkind as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsUserInitiated(
+ &self,
+ isuserinitiated: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsUserInitiated)(
+ windows_core::Interface::as_raw(self),
+ isuserinitiated as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn State(
+ &self,
+ state: *mut COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).State)(
+ windows_core::Interface::as_raw(self),
+ state as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetState(
+ &self,
+ state: COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetState)(
+ windows_core::Interface::as_raw(self),
+ state,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PermissionRequestedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub PermissionKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PERMISSION_KIND,
+ ) -> windows_core::HRESULT,
+ pub IsUserInitiated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub State: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::HRESULT,
+ pub SetState: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PermissionRequestedEventArgs_Impl: windows_core::IUnknownImpl {
+ 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_core::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 ICoreWebView2PermissionRequestedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs_Impl::Uri(
+ this,
+ core::mem::transmute_copy(&uri),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PermissionKind<
+ Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs_Impl::PermissionKind(
+ this,
+ core::mem::transmute_copy(&permissionkind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsUserInitiated<
+ Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isuserinitiated: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs_Impl::IsUserInitiated(
+ this,
+ core::mem::transmute_copy(&isuserinitiated),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn State<
+ Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ state: *mut COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs_Impl::State(
+ this,
+ core::mem::transmute_copy(&state),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetState<
+ Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ state: COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs_Impl::SetState(
+ this,
+ core::mem::transmute_copy(&state),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2PermissionRequestedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Uri: Uri::<Identity, OFFSET>,
+ PermissionKind: PermissionKind::<Identity, OFFSET>,
+ IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
+ State: State::<Identity, OFFSET>,
+ SetState: SetState::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PermissionRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PermissionRequestedEventArgs2,
+ ICoreWebView2PermissionRequestedEventArgs2_Vtbl,
+ 0x74d7127f_9de6_4200_8734_42d6fb4ff741
+);
+impl core::ops::Deref for ICoreWebView2PermissionRequestedEventArgs2 {
+ type Target = ICoreWebView2PermissionRequestedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PermissionRequestedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2PermissionRequestedEventArgs
+);
+impl ICoreWebView2PermissionRequestedEventArgs2 {
+ pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PermissionRequestedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2PermissionRequestedEventArgs_Vtbl,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PermissionRequestedEventArgs2_Impl:
+ ICoreWebView2PermissionRequestedEventArgs_Impl
+{
+ fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PermissionRequestedEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2PermissionRequestedEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2PermissionRequestedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs2_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2PermissionRequestedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs2_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2PermissionRequestedEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ Handled: Handled::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PermissionRequestedEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2PermissionRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PermissionRequestedEventArgs3,
+ ICoreWebView2PermissionRequestedEventArgs3_Vtbl,
+ 0xe61670bc_3dce_4177_86d2_c629ae3cb6ac
+);
+impl core::ops::Deref for ICoreWebView2PermissionRequestedEventArgs3 {
+ type Target = ICoreWebView2PermissionRequestedEventArgs2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PermissionRequestedEventArgs3,
+ windows_core::IUnknown,
+ ICoreWebView2PermissionRequestedEventArgs,
+ ICoreWebView2PermissionRequestedEventArgs2
+);
+impl ICoreWebView2PermissionRequestedEventArgs3 {
+ pub unsafe fn SavesInProfile(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SavesInProfile)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetSavesInProfile(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSavesInProfile)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PermissionRequestedEventArgs3_Vtbl {
+ pub base__: ICoreWebView2PermissionRequestedEventArgs2_Vtbl,
+ pub SavesInProfile: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetSavesInProfile: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PermissionRequestedEventArgs3_Impl:
+ ICoreWebView2PermissionRequestedEventArgs2_Impl
+{
+ fn SavesInProfile(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetSavesInProfile(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PermissionRequestedEventArgs3_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2PermissionRequestedEventArgs3_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn SavesInProfile<
+ Identity: ICoreWebView2PermissionRequestedEventArgs3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs3_Impl::SavesInProfile(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetSavesInProfile<
+ Identity: ICoreWebView2PermissionRequestedEventArgs3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventArgs3_Impl::SetSavesInProfile(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2PermissionRequestedEventArgs2_Vtbl::new::<Identity, OFFSET>(),
+ SavesInProfile: SavesInProfile::<Identity, OFFSET>,
+ SetSavesInProfile: SetSavesInProfile::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PermissionRequestedEventArgs3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2PermissionRequestedEventArgs as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2PermissionRequestedEventArgs2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PermissionRequestedEventHandler,
+ ICoreWebView2PermissionRequestedEventHandler_Vtbl,
+ 0x15e1c6a3_c72a_4df3_91d7_d097fbec6bfd
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PermissionRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2PermissionRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2PermissionRequestedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PermissionRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PermissionRequestedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2PermissionRequestedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PermissionRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2PermissionRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PermissionRequestedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PermissionSetting,
+ ICoreWebView2PermissionSetting_Vtbl,
+ 0x792b6eca_5576_421c_9119_74ebb3a4ffb3
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2PermissionSetting, windows_core::IUnknown);
+impl ICoreWebView2PermissionSetting {
+ pub unsafe fn PermissionKind(
+ &self,
+ value: *mut COREWEBVIEW2_PERMISSION_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PermissionKind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PermissionOrigin(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PermissionOrigin)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PermissionState(
+ &self,
+ value: *mut COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PermissionState)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PermissionSetting_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub PermissionKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PERMISSION_KIND,
+ ) -> windows_core::HRESULT,
+ pub PermissionOrigin: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub PermissionState: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PermissionSetting_Impl: windows_core::IUnknownImpl {
+ fn PermissionKind(&self, value: *mut COREWEBVIEW2_PERMISSION_KIND) -> windows_core::Result<()>;
+ fn PermissionOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn PermissionState(
+ &self,
+ value: *mut COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PermissionSetting_Vtbl {
+ pub const fn new<Identity: ICoreWebView2PermissionSetting_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PermissionKind<
+ Identity: ICoreWebView2PermissionSetting_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PERMISSION_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionSetting_Impl::PermissionKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PermissionOrigin<
+ Identity: ICoreWebView2PermissionSetting_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionSetting_Impl::PermissionOrigin(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PermissionState<
+ Identity: ICoreWebView2PermissionSetting_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PERMISSION_STATE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionSetting_Impl::PermissionState(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ PermissionKind: PermissionKind::<Identity, OFFSET>,
+ PermissionOrigin: PermissionOrigin::<Identity, OFFSET>,
+ PermissionState: PermissionState::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PermissionSetting as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PermissionSetting {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PermissionSettingCollectionView,
+ ICoreWebView2PermissionSettingCollectionView_Vtbl,
+ 0xf5596f62_3de5_47b1_91e8_a4104b596b96
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PermissionSettingCollectionView,
+ windows_core::IUnknown
+);
+impl ICoreWebView2PermissionSettingCollectionView {
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ ) -> windows_core::Result<ICoreWebView2PermissionSetting> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PermissionSettingCollectionView_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PermissionSettingCollectionView_Impl: windows_core::IUnknownImpl {
+ fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2PermissionSetting>;
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PermissionSettingCollectionView_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2PermissionSettingCollectionView_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2PermissionSettingCollectionView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ permissionsetting: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2PermissionSettingCollectionView_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ permissionsetting.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2PermissionSettingCollectionView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PermissionSettingCollectionView_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ Count: Count::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PermissionSettingCollectionView as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PermissionSettingCollectionView {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PointerInfo,
+ ICoreWebView2PointerInfo_Vtbl,
+ 0xe6995887_d10d_4f5d_9359_4ce46e4f96b9
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2PointerInfo, windows_core::IUnknown);
+impl ICoreWebView2PointerInfo {
+ pub unsafe fn PointerKind(&self, pointerkind: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PointerKind)(
+ windows_core::Interface::as_raw(self),
+ pointerkind as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPointerKind(&self, pointerkind: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPointerKind)(
+ windows_core::Interface::as_raw(self),
+ pointerkind,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PointerId(&self, pointerid: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PointerId)(
+ windows_core::Interface::as_raw(self),
+ pointerid as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPointerId(&self, pointerid: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPointerId)(
+ windows_core::Interface::as_raw(self),
+ pointerid,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FrameId(&self, frameid: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FrameId)(
+ windows_core::Interface::as_raw(self),
+ frameid as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetFrameId(&self, frameid: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetFrameId)(
+ windows_core::Interface::as_raw(self),
+ frameid,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PointerFlags(&self, pointerflags: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PointerFlags)(
+ windows_core::Interface::as_raw(self),
+ pointerflags as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPointerFlags(&self, pointerflags: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPointerFlags)(
+ windows_core::Interface::as_raw(self),
+ pointerflags,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PointerDeviceRect(
+ &self,
+ pointerdevicerect: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PointerDeviceRect)(
+ windows_core::Interface::as_raw(self),
+ pointerdevicerect as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPointerDeviceRect(
+ &self,
+ pointerdevicerect: windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPointerDeviceRect)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(pointerdevicerect),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DisplayRect(
+ &self,
+ displayrect: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DisplayRect)(
+ windows_core::Interface::as_raw(self),
+ displayrect as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetDisplayRect(
+ &self,
+ displayrect: windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetDisplayRect)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(displayrect),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PixelLocation(
+ &self,
+ pixellocation: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PixelLocation)(
+ windows_core::Interface::as_raw(self),
+ pixellocation as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPixelLocation(
+ &self,
+ pixellocation: windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPixelLocation)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(pixellocation),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HimetricLocation(
+ &self,
+ himetriclocation: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HimetricLocation)(
+ windows_core::Interface::as_raw(self),
+ himetriclocation as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHimetricLocation(
+ &self,
+ himetriclocation: windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHimetricLocation)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(himetriclocation),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PixelLocationRaw(
+ &self,
+ pixellocationraw: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PixelLocationRaw)(
+ windows_core::Interface::as_raw(self),
+ pixellocationraw as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPixelLocationRaw(
+ &self,
+ pixellocationraw: windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPixelLocationRaw)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(pixellocationraw),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HimetricLocationRaw(
+ &self,
+ himetriclocationraw: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HimetricLocationRaw)(
+ windows_core::Interface::as_raw(self),
+ himetriclocationraw as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHimetricLocationRaw(
+ &self,
+ himetriclocationraw: windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHimetricLocationRaw)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(himetriclocationraw),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Time(&self, time: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Time)(
+ windows_core::Interface::as_raw(self),
+ time as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTime(&self, time: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTime)(
+ windows_core::Interface::as_raw(self),
+ time,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HistoryCount(&self, historycount: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HistoryCount)(
+ windows_core::Interface::as_raw(self),
+ historycount as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHistoryCount(&self, historycount: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHistoryCount)(
+ windows_core::Interface::as_raw(self),
+ historycount,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn InputData(&self, inputdata: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).InputData)(
+ windows_core::Interface::as_raw(self),
+ inputdata as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetInputData(&self, inputdata: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetInputData)(
+ windows_core::Interface::as_raw(self),
+ inputdata,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn KeyStates(&self, keystates: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).KeyStates)(
+ windows_core::Interface::as_raw(self),
+ keystates as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetKeyStates(&self, keystates: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetKeyStates)(
+ windows_core::Interface::as_raw(self),
+ keystates,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PerformanceCount(&self, performancecount: *mut u64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PerformanceCount)(
+ windows_core::Interface::as_raw(self),
+ performancecount as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPerformanceCount(&self, performancecount: u64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPerformanceCount)(
+ windows_core::Interface::as_raw(self),
+ performancecount,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ButtonChangeKind(&self, buttonchangekind: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ButtonChangeKind)(
+ windows_core::Interface::as_raw(self),
+ buttonchangekind as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetButtonChangeKind(&self, buttonchangekind: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetButtonChangeKind)(
+ windows_core::Interface::as_raw(self),
+ buttonchangekind,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PenFlags(&self, penflags: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PenFlags)(
+ windows_core::Interface::as_raw(self),
+ penflags as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPenFlags(&self, penflags: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPenFlags)(
+ windows_core::Interface::as_raw(self),
+ penflags,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PenMask(&self, penmask: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PenMask)(
+ windows_core::Interface::as_raw(self),
+ penmask as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPenMask(&self, penmask: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPenMask)(
+ windows_core::Interface::as_raw(self),
+ penmask,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PenPressure(&self, penpressure: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PenPressure)(
+ windows_core::Interface::as_raw(self),
+ penpressure as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPenPressure(&self, penpressure: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPenPressure)(
+ windows_core::Interface::as_raw(self),
+ penpressure,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PenRotation(&self, penrotation: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PenRotation)(
+ windows_core::Interface::as_raw(self),
+ penrotation as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPenRotation(&self, penrotation: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPenRotation)(
+ windows_core::Interface::as_raw(self),
+ penrotation,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PenTiltX(&self, pentiltx: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PenTiltX)(
+ windows_core::Interface::as_raw(self),
+ pentiltx as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPenTiltX(&self, pentiltx: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPenTiltX)(
+ windows_core::Interface::as_raw(self),
+ pentiltx,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PenTiltY(&self, pentilty: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PenTiltY)(
+ windows_core::Interface::as_raw(self),
+ pentilty as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPenTiltY(&self, pentilty: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPenTiltY)(
+ windows_core::Interface::as_raw(self),
+ pentilty,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TouchFlags(&self, touchflags: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TouchFlags)(
+ windows_core::Interface::as_raw(self),
+ touchflags as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTouchFlags(&self, touchflags: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTouchFlags)(
+ windows_core::Interface::as_raw(self),
+ touchflags,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TouchMask(&self, touchmask: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TouchMask)(
+ windows_core::Interface::as_raw(self),
+ touchmask as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTouchMask(&self, touchmask: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTouchMask)(
+ windows_core::Interface::as_raw(self),
+ touchmask,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TouchContact(
+ &self,
+ touchcontact: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TouchContact)(
+ windows_core::Interface::as_raw(self),
+ touchcontact as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTouchContact(
+ &self,
+ touchcontact: windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTouchContact)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(touchcontact),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TouchContactRaw(
+ &self,
+ touchcontactraw: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TouchContactRaw)(
+ windows_core::Interface::as_raw(self),
+ touchcontactraw as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTouchContactRaw(
+ &self,
+ touchcontactraw: windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTouchContactRaw)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(touchcontactraw),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TouchOrientation(&self, touchorientation: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TouchOrientation)(
+ windows_core::Interface::as_raw(self),
+ touchorientation as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTouchOrientation(&self, touchorientation: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTouchOrientation)(
+ windows_core::Interface::as_raw(self),
+ touchorientation,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TouchPressure(&self, touchpressure: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TouchPressure)(
+ windows_core::Interface::as_raw(self),
+ touchpressure as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetTouchPressure(&self, touchpressure: u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetTouchPressure)(
+ windows_core::Interface::as_raw(self),
+ touchpressure,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PointerInfo_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub PointerKind:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetPointerKind:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PointerId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetPointerId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub FrameId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetFrameId: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PointerFlags:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetPointerFlags:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PointerDeviceRect: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub SetPointerDeviceRect: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub DisplayRect: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub SetDisplayRect: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub PixelLocation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub SetPixelLocation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub HimetricLocation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub SetHimetricLocation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub PixelLocationRaw: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub SetPixelLocationRaw: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub HimetricLocationRaw: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub SetHimetricLocationRaw: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub Time: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetTime: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub HistoryCount:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetHistoryCount:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub InputData:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetInputData:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub KeyStates:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetKeyStates:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PerformanceCount:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
+ pub SetPerformanceCount:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
+ pub ButtonChangeKind:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetButtonChangeKind:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub PenFlags:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetPenFlags:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PenMask:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetPenMask: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PenPressure:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetPenPressure:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PenRotation:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetPenRotation:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub PenTiltX:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetPenTiltX:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub PenTiltY:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetPenTiltY:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub TouchFlags:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetTouchFlags:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub TouchMask:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetTouchMask:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub TouchContact: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub SetTouchContact: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub TouchContactRaw: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub SetTouchContactRaw: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+ pub TouchOrientation:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetTouchOrientation:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+ pub TouchPressure:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub SetTouchPressure:
+ unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PointerInfo_Impl: windows_core::IUnknownImpl {
+ 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 ICoreWebView2PointerInfo_Vtbl {
+ pub const fn new<Identity: ICoreWebView2PointerInfo_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PointerKind<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerkind: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PointerKind(
+ this,
+ core::mem::transmute_copy(&pointerkind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPointerKind<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerkind: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPointerKind(
+ this,
+ core::mem::transmute_copy(&pointerkind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PointerId<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerid: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PointerId(
+ this,
+ core::mem::transmute_copy(&pointerid),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPointerId<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerid: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPointerId(
+ this,
+ core::mem::transmute_copy(&pointerid),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FrameId<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ frameid: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::FrameId(this, core::mem::transmute_copy(&frameid))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetFrameId<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ frameid: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetFrameId(this, core::mem::transmute_copy(&frameid))
+ .into()
+ }
+ }
+ unsafe extern "system" fn PointerFlags<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerflags: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PointerFlags(
+ this,
+ core::mem::transmute_copy(&pointerflags),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPointerFlags<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerflags: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPointerFlags(
+ this,
+ core::mem::transmute_copy(&pointerflags),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PointerDeviceRect<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerdevicerect: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PointerDeviceRect(
+ this,
+ core::mem::transmute_copy(&pointerdevicerect),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPointerDeviceRect<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pointerdevicerect: windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPointerDeviceRect(
+ this,
+ core::mem::transmute(&pointerdevicerect),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DisplayRect<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ displayrect: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::DisplayRect(
+ this,
+ core::mem::transmute_copy(&displayrect),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetDisplayRect<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ displayrect: windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetDisplayRect(
+ this,
+ core::mem::transmute(&displayrect),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PixelLocation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pixellocation: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PixelLocation(
+ this,
+ core::mem::transmute_copy(&pixellocation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPixelLocation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pixellocation: windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPixelLocation(
+ this,
+ core::mem::transmute(&pixellocation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HimetricLocation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ himetriclocation: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::HimetricLocation(
+ this,
+ core::mem::transmute_copy(&himetriclocation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHimetricLocation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ himetriclocation: windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetHimetricLocation(
+ this,
+ core::mem::transmute(&himetriclocation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PixelLocationRaw<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pixellocationraw: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PixelLocationRaw(
+ this,
+ core::mem::transmute_copy(&pixellocationraw),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPixelLocationRaw<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pixellocationraw: windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPixelLocationRaw(
+ this,
+ core::mem::transmute(&pixellocationraw),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HimetricLocationRaw<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ himetriclocationraw: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::HimetricLocationRaw(
+ this,
+ core::mem::transmute_copy(&himetriclocationraw),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHimetricLocationRaw<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ himetriclocationraw: windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetHimetricLocationRaw(
+ this,
+ core::mem::transmute(&himetriclocationraw),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Time<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ time: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::Time(this, core::mem::transmute_copy(&time)).into()
+ }
+ }
+ unsafe extern "system" fn SetTime<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ time: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetTime(this, core::mem::transmute_copy(&time))
+ .into()
+ }
+ }
+ unsafe extern "system" fn HistoryCount<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ historycount: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::HistoryCount(
+ this,
+ core::mem::transmute_copy(&historycount),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHistoryCount<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ historycount: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetHistoryCount(
+ this,
+ core::mem::transmute_copy(&historycount),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn InputData<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ inputdata: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::InputData(
+ this,
+ core::mem::transmute_copy(&inputdata),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetInputData<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ inputdata: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetInputData(
+ this,
+ core::mem::transmute_copy(&inputdata),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn KeyStates<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ keystates: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::KeyStates(
+ this,
+ core::mem::transmute_copy(&keystates),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetKeyStates<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ keystates: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetKeyStates(
+ this,
+ core::mem::transmute_copy(&keystates),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PerformanceCount<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ performancecount: *mut u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PerformanceCount(
+ this,
+ core::mem::transmute_copy(&performancecount),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPerformanceCount<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ performancecount: u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPerformanceCount(
+ this,
+ core::mem::transmute_copy(&performancecount),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ButtonChangeKind<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ buttonchangekind: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::ButtonChangeKind(
+ this,
+ core::mem::transmute_copy(&buttonchangekind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetButtonChangeKind<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ buttonchangekind: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetButtonChangeKind(
+ this,
+ core::mem::transmute_copy(&buttonchangekind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PenFlags<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penflags: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PenFlags(this, core::mem::transmute_copy(&penflags))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPenFlags<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penflags: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPenFlags(
+ this,
+ core::mem::transmute_copy(&penflags),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PenMask<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penmask: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PenMask(this, core::mem::transmute_copy(&penmask))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPenMask<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penmask: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPenMask(this, core::mem::transmute_copy(&penmask))
+ .into()
+ }
+ }
+ unsafe extern "system" fn PenPressure<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penpressure: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PenPressure(
+ this,
+ core::mem::transmute_copy(&penpressure),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPenPressure<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penpressure: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPenPressure(
+ this,
+ core::mem::transmute_copy(&penpressure),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PenRotation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penrotation: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PenRotation(
+ this,
+ core::mem::transmute_copy(&penrotation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPenRotation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ penrotation: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPenRotation(
+ this,
+ core::mem::transmute_copy(&penrotation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PenTiltX<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pentiltx: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PenTiltX(this, core::mem::transmute_copy(&pentiltx))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPenTiltX<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pentiltx: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPenTiltX(
+ this,
+ core::mem::transmute_copy(&pentiltx),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PenTiltY<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pentilty: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::PenTiltY(this, core::mem::transmute_copy(&pentilty))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPenTiltY<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pentilty: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetPenTiltY(
+ this,
+ core::mem::transmute_copy(&pentilty),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TouchFlags<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchflags: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::TouchFlags(
+ this,
+ core::mem::transmute_copy(&touchflags),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTouchFlags<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchflags: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetTouchFlags(
+ this,
+ core::mem::transmute_copy(&touchflags),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TouchMask<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchmask: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::TouchMask(
+ this,
+ core::mem::transmute_copy(&touchmask),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTouchMask<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchmask: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetTouchMask(
+ this,
+ core::mem::transmute_copy(&touchmask),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TouchContact<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchcontact: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::TouchContact(
+ this,
+ core::mem::transmute_copy(&touchcontact),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTouchContact<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchcontact: windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetTouchContact(
+ this,
+ core::mem::transmute(&touchcontact),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TouchContactRaw<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchcontactraw: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::TouchContactRaw(
+ this,
+ core::mem::transmute_copy(&touchcontactraw),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTouchContactRaw<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchcontactraw: windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetTouchContactRaw(
+ this,
+ core::mem::transmute(&touchcontactraw),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TouchOrientation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchorientation: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::TouchOrientation(
+ this,
+ core::mem::transmute_copy(&touchorientation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTouchOrientation<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchorientation: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetTouchOrientation(
+ this,
+ core::mem::transmute_copy(&touchorientation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TouchPressure<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchpressure: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::TouchPressure(
+ this,
+ core::mem::transmute_copy(&touchpressure),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetTouchPressure<
+ Identity: ICoreWebView2PointerInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ touchpressure: u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PointerInfo_Impl::SetTouchPressure(
+ this,
+ core::mem::transmute_copy(&touchpressure),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ PointerKind: PointerKind::<Identity, OFFSET>,
+ SetPointerKind: SetPointerKind::<Identity, OFFSET>,
+ PointerId: PointerId::<Identity, OFFSET>,
+ SetPointerId: SetPointerId::<Identity, OFFSET>,
+ FrameId: FrameId::<Identity, OFFSET>,
+ SetFrameId: SetFrameId::<Identity, OFFSET>,
+ PointerFlags: PointerFlags::<Identity, OFFSET>,
+ SetPointerFlags: SetPointerFlags::<Identity, OFFSET>,
+ PointerDeviceRect: PointerDeviceRect::<Identity, OFFSET>,
+ SetPointerDeviceRect: SetPointerDeviceRect::<Identity, OFFSET>,
+ DisplayRect: DisplayRect::<Identity, OFFSET>,
+ SetDisplayRect: SetDisplayRect::<Identity, OFFSET>,
+ PixelLocation: PixelLocation::<Identity, OFFSET>,
+ SetPixelLocation: SetPixelLocation::<Identity, OFFSET>,
+ HimetricLocation: HimetricLocation::<Identity, OFFSET>,
+ SetHimetricLocation: SetHimetricLocation::<Identity, OFFSET>,
+ PixelLocationRaw: PixelLocationRaw::<Identity, OFFSET>,
+ SetPixelLocationRaw: SetPixelLocationRaw::<Identity, OFFSET>,
+ HimetricLocationRaw: HimetricLocationRaw::<Identity, OFFSET>,
+ SetHimetricLocationRaw: SetHimetricLocationRaw::<Identity, OFFSET>,
+ Time: Time::<Identity, OFFSET>,
+ SetTime: SetTime::<Identity, OFFSET>,
+ HistoryCount: HistoryCount::<Identity, OFFSET>,
+ SetHistoryCount: SetHistoryCount::<Identity, OFFSET>,
+ InputData: InputData::<Identity, OFFSET>,
+ SetInputData: SetInputData::<Identity, OFFSET>,
+ KeyStates: KeyStates::<Identity, OFFSET>,
+ SetKeyStates: SetKeyStates::<Identity, OFFSET>,
+ PerformanceCount: PerformanceCount::<Identity, OFFSET>,
+ SetPerformanceCount: SetPerformanceCount::<Identity, OFFSET>,
+ ButtonChangeKind: ButtonChangeKind::<Identity, OFFSET>,
+ SetButtonChangeKind: SetButtonChangeKind::<Identity, OFFSET>,
+ PenFlags: PenFlags::<Identity, OFFSET>,
+ SetPenFlags: SetPenFlags::<Identity, OFFSET>,
+ PenMask: PenMask::<Identity, OFFSET>,
+ SetPenMask: SetPenMask::<Identity, OFFSET>,
+ PenPressure: PenPressure::<Identity, OFFSET>,
+ SetPenPressure: SetPenPressure::<Identity, OFFSET>,
+ PenRotation: PenRotation::<Identity, OFFSET>,
+ SetPenRotation: SetPenRotation::<Identity, OFFSET>,
+ PenTiltX: PenTiltX::<Identity, OFFSET>,
+ SetPenTiltX: SetPenTiltX::<Identity, OFFSET>,
+ PenTiltY: PenTiltY::<Identity, OFFSET>,
+ SetPenTiltY: SetPenTiltY::<Identity, OFFSET>,
+ TouchFlags: TouchFlags::<Identity, OFFSET>,
+ SetTouchFlags: SetTouchFlags::<Identity, OFFSET>,
+ TouchMask: TouchMask::<Identity, OFFSET>,
+ SetTouchMask: SetTouchMask::<Identity, OFFSET>,
+ TouchContact: TouchContact::<Identity, OFFSET>,
+ SetTouchContact: SetTouchContact::<Identity, OFFSET>,
+ TouchContactRaw: TouchContactRaw::<Identity, OFFSET>,
+ SetTouchContactRaw: SetTouchContactRaw::<Identity, OFFSET>,
+ TouchOrientation: TouchOrientation::<Identity, OFFSET>,
+ SetTouchOrientation: SetTouchOrientation::<Identity, OFFSET>,
+ TouchPressure: TouchPressure::<Identity, OFFSET>,
+ SetTouchPressure: SetTouchPressure::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PointerInfo as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PointerInfo {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PrintCompletedHandler,
+ ICoreWebView2PrintCompletedHandler_Vtbl,
+ 0x8fd80075_ed08_42db_8570_f5d14977461e
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2PrintCompletedHandler, windows_core::IUnknown);
+impl ICoreWebView2PrintCompletedHandler {
+ pub unsafe fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: COREWEBVIEW2_PRINT_STATUS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PrintCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ COREWEBVIEW2_PRINT_STATUS,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PrintCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: COREWEBVIEW2_PRINT_STATUS,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PrintCompletedHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2PrintCompletedHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2PrintCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: COREWEBVIEW2_PRINT_STATUS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PrintCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PrintCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PrintSettings,
+ ICoreWebView2PrintSettings_Vtbl,
+ 0x377f3721_c74e_48ca_8db1_df68e51d60e2
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2PrintSettings, windows_core::IUnknown);
+impl ICoreWebView2PrintSettings {
+ pub unsafe fn Orientation(
+ &self,
+ orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Orientation)(
+ windows_core::Interface::as_raw(self),
+ orientation as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetOrientation(
+ &self,
+ orientation: COREWEBVIEW2_PRINT_ORIENTATION,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetOrientation)(
+ windows_core::Interface::as_raw(self),
+ orientation,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ScaleFactor(&self, scalefactor: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ScaleFactor)(
+ windows_core::Interface::as_raw(self),
+ scalefactor as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetScaleFactor(&self, scalefactor: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetScaleFactor)(
+ windows_core::Interface::as_raw(self),
+ scalefactor,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PageWidth(&self, pagewidth: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PageWidth)(
+ windows_core::Interface::as_raw(self),
+ pagewidth as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPageWidth(&self, pagewidth: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPageWidth)(
+ windows_core::Interface::as_raw(self),
+ pagewidth,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PageHeight(&self, pageheight: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PageHeight)(
+ windows_core::Interface::as_raw(self),
+ pageheight as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPageHeight(&self, pageheight: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPageHeight)(
+ windows_core::Interface::as_raw(self),
+ pageheight,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MarginTop(&self, margintop: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MarginTop)(
+ windows_core::Interface::as_raw(self),
+ margintop as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetMarginTop(&self, margintop: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetMarginTop)(
+ windows_core::Interface::as_raw(self),
+ margintop,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MarginBottom(&self, marginbottom: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MarginBottom)(
+ windows_core::Interface::as_raw(self),
+ marginbottom as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetMarginBottom(&self, marginbottom: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetMarginBottom)(
+ windows_core::Interface::as_raw(self),
+ marginbottom,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MarginLeft(&self, marginleft: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MarginLeft)(
+ windows_core::Interface::as_raw(self),
+ marginleft as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetMarginLeft(&self, marginleft: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetMarginLeft)(
+ windows_core::Interface::as_raw(self),
+ marginleft,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MarginRight(&self, marginright: *mut f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MarginRight)(
+ windows_core::Interface::as_raw(self),
+ marginright as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetMarginRight(&self, marginright: f64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetMarginRight)(
+ windows_core::Interface::as_raw(self),
+ marginright,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldPrintBackgrounds(
+ &self,
+ shouldprintbackgrounds: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldPrintBackgrounds)(
+ windows_core::Interface::as_raw(self),
+ shouldprintbackgrounds as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetShouldPrintBackgrounds(
+ &self,
+ shouldprintbackgrounds: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetShouldPrintBackgrounds)(
+ windows_core::Interface::as_raw(self),
+ shouldprintbackgrounds.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldPrintSelectionOnly(
+ &self,
+ shouldprintselectiononly: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldPrintSelectionOnly)(
+ windows_core::Interface::as_raw(self),
+ shouldprintselectiononly as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetShouldPrintSelectionOnly(
+ &self,
+ shouldprintselectiononly: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetShouldPrintSelectionOnly)(
+ windows_core::Interface::as_raw(self),
+ shouldprintselectiononly.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldPrintHeaderAndFooter(
+ &self,
+ shouldprintheaderandfooter: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldPrintHeaderAndFooter)(
+ windows_core::Interface::as_raw(self),
+ shouldprintheaderandfooter as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetShouldPrintHeaderAndFooter(
+ &self,
+ shouldprintheaderandfooter: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetShouldPrintHeaderAndFooter)(
+ windows_core::Interface::as_raw(self),
+ shouldprintheaderandfooter.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HeaderTitle(
+ &self,
+ headertitle: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HeaderTitle)(
+ windows_core::Interface::as_raw(self),
+ headertitle as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHeaderTitle<P0>(&self, headertitle: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHeaderTitle)(
+ windows_core::Interface::as_raw(self),
+ headertitle.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FooterUri(
+ &self,
+ footeruri: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FooterUri)(
+ windows_core::Interface::as_raw(self),
+ footeruri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetFooterUri<P0>(&self, footeruri: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetFooterUri)(
+ windows_core::Interface::as_raw(self),
+ footeruri.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PrintSettings_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Orientation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PRINT_ORIENTATION,
+ ) -> windows_core::HRESULT,
+ pub SetOrientation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PRINT_ORIENTATION,
+ ) -> windows_core::HRESULT,
+ pub ScaleFactor:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetScaleFactor:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub PageWidth:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetPageWidth:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub PageHeight:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetPageHeight:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub MarginTop:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetMarginTop:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub MarginBottom:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetMarginBottom:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub MarginLeft:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetMarginLeft:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub MarginRight:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
+ pub SetMarginRight:
+ unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
+ pub ShouldPrintBackgrounds: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetShouldPrintBackgrounds: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ShouldPrintSelectionOnly: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetShouldPrintSelectionOnly: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ShouldPrintHeaderAndFooter: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetShouldPrintHeaderAndFooter: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub HeaderTitle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetHeaderTitle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub FooterUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetFooterUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PrintSettings_Impl: windows_core::IUnknownImpl {
+ 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_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetShouldPrintBackgrounds(
+ &self,
+ shouldprintbackgrounds: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn ShouldPrintSelectionOnly(
+ &self,
+ shouldprintselectiononly: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetShouldPrintSelectionOnly(
+ &self,
+ shouldprintselectiononly: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn ShouldPrintHeaderAndFooter(
+ &self,
+ shouldprintheaderandfooter: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetShouldPrintHeaderAndFooter(
+ &self,
+ shouldprintheaderandfooter: windows_core::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 ICoreWebView2PrintSettings_Vtbl {
+ pub const fn new<Identity: ICoreWebView2PrintSettings_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Orientation<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::Orientation(
+ this,
+ core::mem::transmute_copy(&orientation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetOrientation<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ orientation: COREWEBVIEW2_PRINT_ORIENTATION,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetOrientation(
+ this,
+ core::mem::transmute_copy(&orientation),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ScaleFactor<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ scalefactor: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::ScaleFactor(
+ this,
+ core::mem::transmute_copy(&scalefactor),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetScaleFactor<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ scalefactor: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetScaleFactor(
+ this,
+ core::mem::transmute_copy(&scalefactor),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PageWidth<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pagewidth: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::PageWidth(
+ this,
+ core::mem::transmute_copy(&pagewidth),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPageWidth<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pagewidth: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetPageWidth(
+ this,
+ core::mem::transmute_copy(&pagewidth),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PageHeight<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pageheight: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::PageHeight(
+ this,
+ core::mem::transmute_copy(&pageheight),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPageHeight<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ pageheight: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetPageHeight(
+ this,
+ core::mem::transmute_copy(&pageheight),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn MarginTop<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ margintop: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::MarginTop(
+ this,
+ core::mem::transmute_copy(&margintop),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetMarginTop<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ margintop: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetMarginTop(
+ this,
+ core::mem::transmute_copy(&margintop),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn MarginBottom<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ marginbottom: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::MarginBottom(
+ this,
+ core::mem::transmute_copy(&marginbottom),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetMarginBottom<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ marginbottom: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetMarginBottom(
+ this,
+ core::mem::transmute_copy(&marginbottom),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn MarginLeft<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ marginleft: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::MarginLeft(
+ this,
+ core::mem::transmute_copy(&marginleft),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetMarginLeft<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ marginleft: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetMarginLeft(
+ this,
+ core::mem::transmute_copy(&marginleft),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn MarginRight<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ marginright: *mut f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::MarginRight(
+ this,
+ core::mem::transmute_copy(&marginright),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetMarginRight<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ marginright: f64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetMarginRight(
+ this,
+ core::mem::transmute_copy(&marginright),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldPrintBackgrounds<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ shouldprintbackgrounds: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::ShouldPrintBackgrounds(
+ this,
+ core::mem::transmute_copy(&shouldprintbackgrounds),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetShouldPrintBackgrounds<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ shouldprintbackgrounds: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetShouldPrintBackgrounds(
+ this,
+ core::mem::transmute_copy(&shouldprintbackgrounds),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldPrintSelectionOnly<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ shouldprintselectiononly: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::ShouldPrintSelectionOnly(
+ this,
+ core::mem::transmute_copy(&shouldprintselectiononly),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetShouldPrintSelectionOnly<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ shouldprintselectiononly: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetShouldPrintSelectionOnly(
+ this,
+ core::mem::transmute_copy(&shouldprintselectiononly),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldPrintHeaderAndFooter<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ shouldprintheaderandfooter: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::ShouldPrintHeaderAndFooter(
+ this,
+ core::mem::transmute_copy(&shouldprintheaderandfooter),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetShouldPrintHeaderAndFooter<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ shouldprintheaderandfooter: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetShouldPrintHeaderAndFooter(
+ this,
+ core::mem::transmute_copy(&shouldprintheaderandfooter),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HeaderTitle<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ headertitle: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::HeaderTitle(
+ this,
+ core::mem::transmute_copy(&headertitle),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHeaderTitle<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ headertitle: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetHeaderTitle(
+ this,
+ core::mem::transmute(&headertitle),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FooterUri<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ footeruri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::FooterUri(
+ this,
+ core::mem::transmute_copy(&footeruri),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetFooterUri<
+ Identity: ICoreWebView2PrintSettings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ footeruri: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings_Impl::SetFooterUri(
+ this,
+ core::mem::transmute(&footeruri),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Orientation: Orientation::<Identity, OFFSET>,
+ SetOrientation: SetOrientation::<Identity, OFFSET>,
+ ScaleFactor: ScaleFactor::<Identity, OFFSET>,
+ SetScaleFactor: SetScaleFactor::<Identity, OFFSET>,
+ PageWidth: PageWidth::<Identity, OFFSET>,
+ SetPageWidth: SetPageWidth::<Identity, OFFSET>,
+ PageHeight: PageHeight::<Identity, OFFSET>,
+ SetPageHeight: SetPageHeight::<Identity, OFFSET>,
+ MarginTop: MarginTop::<Identity, OFFSET>,
+ SetMarginTop: SetMarginTop::<Identity, OFFSET>,
+ MarginBottom: MarginBottom::<Identity, OFFSET>,
+ SetMarginBottom: SetMarginBottom::<Identity, OFFSET>,
+ MarginLeft: MarginLeft::<Identity, OFFSET>,
+ SetMarginLeft: SetMarginLeft::<Identity, OFFSET>,
+ MarginRight: MarginRight::<Identity, OFFSET>,
+ SetMarginRight: SetMarginRight::<Identity, OFFSET>,
+ ShouldPrintBackgrounds: ShouldPrintBackgrounds::<Identity, OFFSET>,
+ SetShouldPrintBackgrounds: SetShouldPrintBackgrounds::<Identity, OFFSET>,
+ ShouldPrintSelectionOnly: ShouldPrintSelectionOnly::<Identity, OFFSET>,
+ SetShouldPrintSelectionOnly: SetShouldPrintSelectionOnly::<Identity, OFFSET>,
+ ShouldPrintHeaderAndFooter: ShouldPrintHeaderAndFooter::<Identity, OFFSET>,
+ SetShouldPrintHeaderAndFooter: SetShouldPrintHeaderAndFooter::<Identity, OFFSET>,
+ HeaderTitle: HeaderTitle::<Identity, OFFSET>,
+ SetHeaderTitle: SetHeaderTitle::<Identity, OFFSET>,
+ FooterUri: FooterUri::<Identity, OFFSET>,
+ SetFooterUri: SetFooterUri::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PrintSettings as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PrintSettings {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PrintSettings2,
+ ICoreWebView2PrintSettings2_Vtbl,
+ 0xca7f0e1f_3484_41d1_8c1a_65cd44a63f8d
+);
+impl core::ops::Deref for ICoreWebView2PrintSettings2 {
+ type Target = ICoreWebView2PrintSettings;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PrintSettings2,
+ windows_core::IUnknown,
+ ICoreWebView2PrintSettings
+);
+impl ICoreWebView2PrintSettings2 {
+ pub unsafe fn PageRanges(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PageRanges)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPageRanges<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPageRanges)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PagesPerSide(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PagesPerSide)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPagesPerSide(&self, value: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPagesPerSide)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Copies(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Copies)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCopies(&self, value: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCopies)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Collation(
+ &self,
+ value: *mut COREWEBVIEW2_PRINT_COLLATION,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Collation)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCollation(
+ &self,
+ value: COREWEBVIEW2_PRINT_COLLATION,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCollation)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ColorMode(
+ &self,
+ value: *mut COREWEBVIEW2_PRINT_COLOR_MODE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ColorMode)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetColorMode(
+ &self,
+ value: COREWEBVIEW2_PRINT_COLOR_MODE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetColorMode)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Duplex(&self, value: *mut COREWEBVIEW2_PRINT_DUPLEX) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Duplex)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetDuplex(&self, value: COREWEBVIEW2_PRINT_DUPLEX) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetDuplex)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn MediaSize(
+ &self,
+ value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MediaSize)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetMediaSize(
+ &self,
+ value: COREWEBVIEW2_PRINT_MEDIA_SIZE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetMediaSize)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PrinterName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PrinterName)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPrinterName<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPrinterName)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PrintSettings2_Vtbl {
+ pub base__: ICoreWebView2PrintSettings_Vtbl,
+ pub PageRanges: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetPageRanges: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub PagesPerSide:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetPagesPerSide:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub Copies:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetCopies: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub Collation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PRINT_COLLATION,
+ ) -> windows_core::HRESULT,
+ pub SetCollation: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PRINT_COLLATION,
+ ) -> windows_core::HRESULT,
+ pub ColorMode: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PRINT_COLOR_MODE,
+ ) -> windows_core::HRESULT,
+ pub SetColorMode: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PRINT_COLOR_MODE,
+ ) -> windows_core::HRESULT,
+ pub Duplex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PRINT_DUPLEX,
+ ) -> windows_core::HRESULT,
+ pub SetDuplex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PRINT_DUPLEX,
+ ) -> windows_core::HRESULT,
+ pub MediaSize: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
+ ) -> windows_core::HRESULT,
+ pub SetMediaSize: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PRINT_MEDIA_SIZE,
+ ) -> windows_core::HRESULT,
+ pub PrinterName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetPrinterName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PrintSettings2_Impl: 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 ICoreWebView2PrintSettings2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2PrintSettings2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PageRanges<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::PageRanges(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPageRanges<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetPageRanges(this, core::mem::transmute(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn PagesPerSide<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::PagesPerSide(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPagesPerSide<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetPagesPerSide(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Copies<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::Copies(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCopies<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetCopies(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Collation<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PRINT_COLLATION,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::Collation(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCollation<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_PRINT_COLLATION,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetCollation(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ColorMode<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PRINT_COLOR_MODE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::ColorMode(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetColorMode<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_PRINT_COLOR_MODE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetColorMode(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Duplex<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PRINT_DUPLEX,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::Duplex(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetDuplex<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_PRINT_DUPLEX,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetDuplex(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn MediaSize<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::MediaSize(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetMediaSize<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_PRINT_MEDIA_SIZE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetMediaSize(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PrinterName<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::PrinterName(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPrinterName<
+ Identity: ICoreWebView2PrintSettings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintSettings2_Impl::SetPrinterName(this, core::mem::transmute(&value))
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2PrintSettings_Vtbl::new::<Identity, OFFSET>(),
+ PageRanges: PageRanges::<Identity, OFFSET>,
+ SetPageRanges: SetPageRanges::<Identity, OFFSET>,
+ PagesPerSide: PagesPerSide::<Identity, OFFSET>,
+ SetPagesPerSide: SetPagesPerSide::<Identity, OFFSET>,
+ Copies: Copies::<Identity, OFFSET>,
+ SetCopies: SetCopies::<Identity, OFFSET>,
+ Collation: Collation::<Identity, OFFSET>,
+ SetCollation: SetCollation::<Identity, OFFSET>,
+ ColorMode: ColorMode::<Identity, OFFSET>,
+ SetColorMode: SetColorMode::<Identity, OFFSET>,
+ Duplex: Duplex::<Identity, OFFSET>,
+ SetDuplex: SetDuplex::<Identity, OFFSET>,
+ MediaSize: MediaSize::<Identity, OFFSET>,
+ SetMediaSize: SetMediaSize::<Identity, OFFSET>,
+ PrinterName: PrinterName::<Identity, OFFSET>,
+ SetPrinterName: SetPrinterName::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PrintSettings2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2PrintSettings as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PrintSettings2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PrintToPdfCompletedHandler,
+ ICoreWebView2PrintToPdfCompletedHandler_Vtbl,
+ 0xccf1ef04_fd8e_4d5f_b2de_0983e41b8c36
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PrintToPdfCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2PrintToPdfCompletedHandler {
+ pub unsafe fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PrintToPdfCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PrintToPdfCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PrintToPdfCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2PrintToPdfCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2PrintToPdfCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintToPdfCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PrintToPdfCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PrintToPdfCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2PrintToPdfStreamCompletedHandler,
+ ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl,
+ 0x4c9f8229_8f93_444f_a711_2c0dfd6359d5
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2PrintToPdfStreamCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2PrintToPdfStreamCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows::Win32::System::Com::IStream>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2PrintToPdfStreamCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2PrintToPdfStreamCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2PrintToPdfStreamCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2PrintToPdfStreamCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2PrintToPdfStreamCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2PrintToPdfStreamCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessExtendedInfo,
+ ICoreWebView2ProcessExtendedInfo_Vtbl,
+ 0xaf4c4c2e_45db_11ee_be56_0242ac120002
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ProcessExtendedInfo, windows_core::IUnknown);
+impl ICoreWebView2ProcessExtendedInfo {
+ pub unsafe fn ProcessInfo(&self) -> windows_core::Result<ICoreWebView2ProcessInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).ProcessInfo)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn AssociatedFrameInfos(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2FrameInfoCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).AssociatedFrameInfos)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessExtendedInfo_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ProcessInfo: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub AssociatedFrameInfos: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessExtendedInfo_Impl: windows_core::IUnknownImpl {
+ fn ProcessInfo(&self) -> windows_core::Result<ICoreWebView2ProcessInfo>;
+ fn AssociatedFrameInfos(&self) -> windows_core::Result<ICoreWebView2FrameInfoCollection>;
+}
+impl ICoreWebView2ProcessExtendedInfo_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ProcessExtendedInfo_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn ProcessInfo<
+ Identity: ICoreWebView2ProcessExtendedInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ processinfo: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ProcessExtendedInfo_Impl::ProcessInfo(this) {
+ Ok(ok__) => {
+ processinfo.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn AssociatedFrameInfos<
+ Identity: ICoreWebView2ProcessExtendedInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ frames: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ProcessExtendedInfo_Impl::AssociatedFrameInfos(this) {
+ Ok(ok__) => {
+ frames.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ProcessInfo: ProcessInfo::<Identity, OFFSET>,
+ AssociatedFrameInfos: AssociatedFrameInfos::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessExtendedInfo as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessExtendedInfo {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessExtendedInfoCollection,
+ ICoreWebView2ProcessExtendedInfoCollection_Vtbl,
+ 0x32efa696_407a_11ee_be56_0242ac120002
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProcessExtendedInfoCollection,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ProcessExtendedInfoCollection {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ ) -> windows_core::Result<ICoreWebView2ProcessExtendedInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessExtendedInfoCollection_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessExtendedInfoCollection_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(&self, index: u32)
+ -> windows_core::Result<ICoreWebView2ProcessExtendedInfo>;
+}
+impl ICoreWebView2ProcessExtendedInfoCollection_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ProcessExtendedInfoCollection_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2ProcessExtendedInfoCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessExtendedInfoCollection_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2ProcessExtendedInfoCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ProcessExtendedInfoCollection_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessExtendedInfoCollection as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessExtendedInfoCollection {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessFailedEventArgs,
+ ICoreWebView2ProcessFailedEventArgs_Vtbl,
+ 0x8155a9a4_1474_4a86_8cae_151b0fa6b8ca
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProcessFailedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ProcessFailedEventArgs {
+ pub unsafe fn ProcessFailedKind(
+ &self,
+ value: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ProcessFailedKind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessFailedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ProcessFailedKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessFailedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn ProcessFailedKind(
+ &self,
+ value: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProcessFailedEventArgs_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ProcessFailedEventArgs_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn ProcessFailedKind<
+ Identity: ICoreWebView2ProcessFailedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessFailedEventArgs_Impl::ProcessFailedKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ProcessFailedKind: ProcessFailedKind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessFailedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessFailedEventArgs2,
+ ICoreWebView2ProcessFailedEventArgs2_Vtbl,
+ 0x4dab9422_46fa_4c3e_a5d2_41d2071d3680
+);
+impl core::ops::Deref for ICoreWebView2ProcessFailedEventArgs2 {
+ type Target = ICoreWebView2ProcessFailedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProcessFailedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2ProcessFailedEventArgs
+);
+impl ICoreWebView2ProcessFailedEventArgs2 {
+ pub unsafe fn Reason(
+ &self,
+ reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Reason)(
+ windows_core::Interface::as_raw(self),
+ reason as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ExitCode(&self, exitcode: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ExitCode)(
+ windows_core::Interface::as_raw(self),
+ exitcode as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ProcessDescription(
+ &self,
+ processdescription: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ProcessDescription)(
+ windows_core::Interface::as_raw(self),
+ processdescription as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FrameInfosForFailedProcess(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2FrameInfoCollection> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).FrameInfosForFailedProcess)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessFailedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2ProcessFailedEventArgs_Vtbl,
+ pub Reason: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
+ ) -> windows_core::HRESULT,
+ pub ExitCode:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub ProcessDescription: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub FrameInfosForFailedProcess: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessFailedEventArgs2_Impl:
+ 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 ICoreWebView2ProcessFailedEventArgs2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ProcessFailedEventArgs2_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Reason<
+ Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessFailedEventArgs2_Impl::Reason(
+ this,
+ core::mem::transmute_copy(&reason),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ExitCode<
+ Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ exitcode: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessFailedEventArgs2_Impl::ExitCode(
+ this,
+ core::mem::transmute_copy(&exitcode),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ProcessDescription<
+ Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ processdescription: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessFailedEventArgs2_Impl::ProcessDescription(
+ this,
+ core::mem::transmute_copy(&processdescription),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FrameInfosForFailedProcess<
+ Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ frames: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ProcessFailedEventArgs2_Impl::FrameInfosForFailedProcess(this) {
+ Ok(ok__) => {
+ frames.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2ProcessFailedEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ Reason: Reason::<Identity, OFFSET>,
+ ExitCode: ExitCode::<Identity, OFFSET>,
+ ProcessDescription: ProcessDescription::<Identity, OFFSET>,
+ FrameInfosForFailedProcess: FrameInfosForFailedProcess::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessFailedEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ProcessFailedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessFailedEventArgs3,
+ ICoreWebView2ProcessFailedEventArgs3_Vtbl,
+ 0xab667428_094d_5fd1_b480_8b4c0fdbdf2f
+);
+impl core::ops::Deref for ICoreWebView2ProcessFailedEventArgs3 {
+ type Target = ICoreWebView2ProcessFailedEventArgs2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProcessFailedEventArgs3,
+ windows_core::IUnknown,
+ ICoreWebView2ProcessFailedEventArgs,
+ ICoreWebView2ProcessFailedEventArgs2
+);
+impl ICoreWebView2ProcessFailedEventArgs3 {
+ pub unsafe fn FailureSourceModulePath(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FailureSourceModulePath)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessFailedEventArgs3_Vtbl {
+ pub base__: ICoreWebView2ProcessFailedEventArgs2_Vtbl,
+ pub FailureSourceModulePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessFailedEventArgs3_Impl:
+ ICoreWebView2ProcessFailedEventArgs2_Impl
+{
+ fn FailureSourceModulePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProcessFailedEventArgs3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ProcessFailedEventArgs3_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn FailureSourceModulePath<
+ Identity: ICoreWebView2ProcessFailedEventArgs3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessFailedEventArgs3_Impl::FailureSourceModulePath(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2ProcessFailedEventArgs2_Vtbl::new::<Identity, OFFSET>(),
+ FailureSourceModulePath: FailureSourceModulePath::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessFailedEventArgs3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ProcessFailedEventArgs as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2ProcessFailedEventArgs2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventArgs3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessFailedEventHandler,
+ ICoreWebView2ProcessFailedEventHandler_Vtbl,
+ 0x79e0aea4_990b_42d9_aa1d_0fcc2e5bc7f1
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProcessFailedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ProcessFailedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2ProcessFailedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessFailedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessFailedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2ProcessFailedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProcessFailedEventHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ProcessFailedEventHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessFailedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessFailedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessInfo,
+ ICoreWebView2ProcessInfo_Vtbl,
+ 0x84fa7612_3f3d_4fbf_889d_fad000492d72
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ProcessInfo, windows_core::IUnknown);
+impl ICoreWebView2ProcessInfo {
+ pub unsafe fn ProcessId(&self, value: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ProcessId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Kind(&self, kind: *mut COREWEBVIEW2_PROCESS_KIND) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Kind)(
+ windows_core::Interface::as_raw(self),
+ kind as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessInfo_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ProcessId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub Kind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PROCESS_KIND,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessInfo_Impl: windows_core::IUnknownImpl {
+ fn ProcessId(&self, value: *mut i32) -> windows_core::Result<()>;
+ fn Kind(&self, kind: *mut COREWEBVIEW2_PROCESS_KIND) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProcessInfo_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ProcessInfo_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn ProcessId<
+ Identity: ICoreWebView2ProcessInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessInfo_Impl::ProcessId(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Kind<
+ Identity: ICoreWebView2ProcessInfo_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ kind: *mut COREWEBVIEW2_PROCESS_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessInfo_Impl::Kind(this, core::mem::transmute_copy(&kind)).into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ProcessId: ProcessId::<Identity, OFFSET>,
+ Kind: Kind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessInfo as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessInfo {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessInfoCollection,
+ ICoreWebView2ProcessInfoCollection_Vtbl,
+ 0x402b99cd_a0cc_4fa5_b7a5_51d86a1d2339
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ProcessInfoCollection, windows_core::IUnknown);
+impl ICoreWebView2ProcessInfoCollection {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ ) -> windows_core::Result<ICoreWebView2ProcessInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessInfoCollection_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessInfoCollection_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2ProcessInfo>;
+}
+impl ICoreWebView2ProcessInfoCollection_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ProcessInfoCollection_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2ProcessInfoCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessInfoCollection_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2ProcessInfoCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ProcessInfoCollection_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessInfoCollection as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessInfoCollection {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProcessInfosChangedEventHandler,
+ ICoreWebView2ProcessInfosChangedEventHandler_Vtbl,
+ 0xf4af0c39_44b9_40e9_8b11_0484cfb9e0a1
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProcessInfosChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ProcessInfosChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Environment>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProcessInfosChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProcessInfosChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Environment>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProcessInfosChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ProcessInfosChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProcessInfosChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProcessInfosChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProcessInfosChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile,
+ ICoreWebView2Profile_Vtbl,
+ 0x79110ad3_cd5d_4373_8bc3_c60658f17a5f
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Profile, windows_core::IUnknown);
+impl ICoreWebView2Profile {
+ pub unsafe fn ProfileName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ProfileName)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsInPrivateModeEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsInPrivateModeEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ProfilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ProfilePath)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DefaultDownloadFolderPath(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DefaultDownloadFolderPath)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetDefaultDownloadFolderPath<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetDefaultDownloadFolderPath)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PreferredColorScheme(
+ &self,
+ value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PreferredColorScheme)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPreferredColorScheme(
+ &self,
+ value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPreferredColorScheme)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ProfileName: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub IsInPrivateModeEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ProfilePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub DefaultDownloadFolderPath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetDefaultDownloadFolderPath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub PreferredColorScheme: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
+ ) -> windows_core::HRESULT,
+ pub SetPreferredColorScheme: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile_Impl: windows_core::IUnknownImpl {
+ fn ProfileName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn IsInPrivateModeEnabled(&self, value: *mut windows_core::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 ICoreWebView2Profile_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn ProfileName<
+ Identity: ICoreWebView2Profile_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile_Impl::ProfileName(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsInPrivateModeEnabled<
+ Identity: ICoreWebView2Profile_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile_Impl::IsInPrivateModeEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ProfilePath<
+ Identity: ICoreWebView2Profile_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile_Impl::ProfilePath(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn DefaultDownloadFolderPath<
+ Identity: ICoreWebView2Profile_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile_Impl::DefaultDownloadFolderPath(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetDefaultDownloadFolderPath<
+ Identity: ICoreWebView2Profile_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile_Impl::SetDefaultDownloadFolderPath(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PreferredColorScheme<
+ Identity: ICoreWebView2Profile_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile_Impl::PreferredColorScheme(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPreferredColorScheme<
+ Identity: ICoreWebView2Profile_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile_Impl::SetPreferredColorScheme(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ProfileName: ProfileName::<Identity, OFFSET>,
+ IsInPrivateModeEnabled: IsInPrivateModeEnabled::<Identity, OFFSET>,
+ ProfilePath: ProfilePath::<Identity, OFFSET>,
+ DefaultDownloadFolderPath: DefaultDownloadFolderPath::<Identity, OFFSET>,
+ SetDefaultDownloadFolderPath: SetDefaultDownloadFolderPath::<Identity, OFFSET>,
+ PreferredColorScheme: PreferredColorScheme::<Identity, OFFSET>,
+ SetPreferredColorScheme: SetPreferredColorScheme::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile2,
+ ICoreWebView2Profile2_Vtbl,
+ 0xfa740d4b_5eae_4344_a8ad_74be31925397
+);
+impl core::ops::Deref for ICoreWebView2Profile2 {
+ type Target = ICoreWebView2Profile;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Profile2,
+ windows_core::IUnknown,
+ ICoreWebView2Profile
+);
+impl ICoreWebView2Profile2 {
+ pub unsafe fn ClearBrowsingData<P1>(
+ &self,
+ datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2ClearBrowsingDataCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ClearBrowsingData)(
+ windows_core::Interface::as_raw(self),
+ datakinds,
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ClearBrowsingDataInTimeRange<P3>(
+ &self,
+ datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
+ starttime: f64,
+ endtime: f64,
+ handler: P3,
+ ) -> windows_core::Result<()>
+ where
+ P3: windows_core::Param<ICoreWebView2ClearBrowsingDataCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ClearBrowsingDataInTimeRange)(
+ windows_core::Interface::as_raw(self),
+ datakinds,
+ starttime,
+ endtime,
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ClearBrowsingDataAll<P0>(&self, handler: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ClearBrowsingDataCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ClearBrowsingDataAll)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile2_Vtbl {
+ pub base__: ICoreWebView2Profile_Vtbl,
+ pub ClearBrowsingData: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_BROWSING_DATA_KINDS,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub ClearBrowsingDataInTimeRange: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_BROWSING_DATA_KINDS,
+ f64,
+ f64,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub ClearBrowsingDataAll: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile2_Impl: ICoreWebView2Profile_Impl {
+ fn ClearBrowsingData(
+ &self,
+ datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
+ handler: windows_core::Ref<'_, ICoreWebView2ClearBrowsingDataCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn ClearBrowsingDataInTimeRange(
+ &self,
+ datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
+ starttime: f64,
+ endtime: f64,
+ handler: windows_core::Ref<'_, ICoreWebView2ClearBrowsingDataCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn ClearBrowsingDataAll(
+ &self,
+ handler: windows_core::Ref<'_, ICoreWebView2ClearBrowsingDataCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Profile2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn ClearBrowsingData<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile2_Impl::ClearBrowsingData(
+ this,
+ core::mem::transmute_copy(&datakinds),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ClearBrowsingDataInTimeRange<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile2_Impl::ClearBrowsingDataInTimeRange(
+ this,
+ core::mem::transmute_copy(&datakinds),
+ core::mem::transmute_copy(&starttime),
+ core::mem::transmute_copy(&endtime),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ClearBrowsingDataAll<
+ Identity: ICoreWebView2Profile2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile2_Impl::ClearBrowsingDataAll(
+ this,
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Profile_Vtbl::new::<Identity, OFFSET>(),
+ ClearBrowsingData: ClearBrowsingData::<Identity, OFFSET>,
+ ClearBrowsingDataInTimeRange: ClearBrowsingDataInTimeRange::<Identity, OFFSET>,
+ ClearBrowsingDataAll: ClearBrowsingDataAll::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile3,
+ ICoreWebView2Profile3_Vtbl,
+ 0xb188e659_5685_4e05_bdba_fc640e0f1992
+);
+impl core::ops::Deref for ICoreWebView2Profile3 {
+ type Target = ICoreWebView2Profile2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Profile3,
+ windows_core::IUnknown,
+ ICoreWebView2Profile,
+ ICoreWebView2Profile2
+);
+impl ICoreWebView2Profile3 {
+ pub unsafe fn PreferredTrackingPreventionLevel(
+ &self,
+ value: *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).PreferredTrackingPreventionLevel)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetPreferredTrackingPreventionLevel(
+ &self,
+ value: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPreferredTrackingPreventionLevel)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile3_Vtbl {
+ pub base__: ICoreWebView2Profile2_Vtbl,
+ pub PreferredTrackingPreventionLevel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ ) -> windows_core::HRESULT,
+ pub SetPreferredTrackingPreventionLevel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ )
+ -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile3_Impl: ICoreWebView2Profile2_Impl {
+ fn PreferredTrackingPreventionLevel(
+ &self,
+ value: *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ ) -> windows_core::Result<()>;
+ fn SetPreferredTrackingPreventionLevel(
+ &self,
+ value: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Profile3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile3_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PreferredTrackingPreventionLevel<
+ Identity: ICoreWebView2Profile3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile3_Impl::PreferredTrackingPreventionLevel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetPreferredTrackingPreventionLevel<
+ Identity: ICoreWebView2Profile3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile3_Impl::SetPreferredTrackingPreventionLevel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Profile2_Vtbl::new::<Identity, OFFSET>(),
+ PreferredTrackingPreventionLevel: PreferredTrackingPreventionLevel::<Identity, OFFSET>,
+ SetPreferredTrackingPreventionLevel: SetPreferredTrackingPreventionLevel::<
+ Identity,
+ OFFSET,
+ >,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile4,
+ ICoreWebView2Profile4_Vtbl,
+ 0x8f4ae680_192e_4ec8_833a_21cfadaef628
+);
+impl core::ops::Deref for ICoreWebView2Profile4 {
+ type Target = ICoreWebView2Profile3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Profile4,
+ windows_core::IUnknown,
+ ICoreWebView2Profile,
+ ICoreWebView2Profile2,
+ ICoreWebView2Profile3
+);
+impl ICoreWebView2Profile4 {
+ pub unsafe fn SetPermissionState<P1, P3>(
+ &self,
+ permissionkind: COREWEBVIEW2_PERMISSION_KIND,
+ origin: P1,
+ state: COREWEBVIEW2_PERMISSION_STATE,
+ handler: P3,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ P3: windows_core::Param<ICoreWebView2SetPermissionStateCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetPermissionState)(
+ windows_core::Interface::as_raw(self),
+ permissionkind,
+ origin.param().abi(),
+ state,
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetNonDefaultPermissionSettings<P0>(
+ &self,
+ handler: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetNonDefaultPermissionSettings)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile4_Vtbl {
+ pub base__: ICoreWebView2Profile3_Vtbl,
+ pub SetPermissionState: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PERMISSION_KIND,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_PERMISSION_STATE,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub GetNonDefaultPermissionSettings: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile4_Impl: ICoreWebView2Profile3_Impl {
+ fn SetPermissionState(
+ &self,
+ permissionkind: COREWEBVIEW2_PERMISSION_KIND,
+ origin: &windows_core::PCWSTR,
+ state: COREWEBVIEW2_PERMISSION_STATE,
+ handler: windows_core::Ref<'_, ICoreWebView2SetPermissionStateCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn GetNonDefaultPermissionSettings(
+ &self,
+ handler: windows_core::Ref<
+ '_,
+ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler,
+ >,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Profile4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile4_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn SetPermissionState<
+ Identity: ICoreWebView2Profile4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ permissionkind: COREWEBVIEW2_PERMISSION_KIND,
+ origin: windows_core::PCWSTR,
+ state: COREWEBVIEW2_PERMISSION_STATE,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile4_Impl::SetPermissionState(
+ this,
+ core::mem::transmute_copy(&permissionkind),
+ core::mem::transmute(&origin),
+ core::mem::transmute_copy(&state),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetNonDefaultPermissionSettings<
+ Identity: ICoreWebView2Profile4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile4_Impl::GetNonDefaultPermissionSettings(
+ this,
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Profile3_Vtbl::new::<Identity, OFFSET>(),
+ SetPermissionState: SetPermissionState::<Identity, OFFSET>,
+ GetNonDefaultPermissionSettings: GetNonDefaultPermissionSettings::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile5,
+ ICoreWebView2Profile5_Vtbl,
+ 0x2ee5b76e_6e80_4df2_bcd3_d4ec3340a01b
+);
+impl core::ops::Deref for ICoreWebView2Profile5 {
+ type Target = ICoreWebView2Profile4;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Profile5,
+ windows_core::IUnknown,
+ ICoreWebView2Profile,
+ ICoreWebView2Profile2,
+ ICoreWebView2Profile3,
+ ICoreWebView2Profile4
+);
+impl ICoreWebView2Profile5 {
+ pub unsafe fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CookieManager)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile5_Vtbl {
+ pub base__: ICoreWebView2Profile4_Vtbl,
+ pub CookieManager: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile5_Impl: ICoreWebView2Profile4_Impl {
+ fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager>;
+}
+impl ICoreWebView2Profile5_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile5_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CookieManager<
+ Identity: ICoreWebView2Profile5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2Profile5_Impl::CookieManager(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2Profile4_Vtbl::new::<Identity, OFFSET>(),
+ CookieManager: CookieManager::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile5 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile6,
+ ICoreWebView2Profile6_Vtbl,
+ 0xbd82fa6a_1d65_4c33_b2b4_0393020cc61b
+);
+impl core::ops::Deref for ICoreWebView2Profile6 {
+ type Target = ICoreWebView2Profile5;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Profile6,
+ windows_core::IUnknown,
+ ICoreWebView2Profile,
+ ICoreWebView2Profile2,
+ ICoreWebView2Profile3,
+ ICoreWebView2Profile4,
+ ICoreWebView2Profile5
+);
+impl ICoreWebView2Profile6 {
+ pub unsafe fn IsPasswordAutosaveEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsPasswordAutosaveEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsPasswordAutosaveEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsPasswordAutosaveEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsGeneralAutofillEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsGeneralAutofillEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsGeneralAutofillEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsGeneralAutofillEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile6_Vtbl {
+ pub base__: ICoreWebView2Profile5_Vtbl,
+ pub IsPasswordAutosaveEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsPasswordAutosaveEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsGeneralAutofillEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsGeneralAutofillEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile6_Impl: ICoreWebView2Profile5_Impl {
+ fn IsPasswordAutosaveEnabled(&self, value: *mut windows_core::BOOL)
+ -> windows_core::Result<()>;
+ fn SetIsPasswordAutosaveEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsGeneralAutofillEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsGeneralAutofillEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Profile6_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile6_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsPasswordAutosaveEnabled<
+ Identity: ICoreWebView2Profile6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile6_Impl::IsPasswordAutosaveEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsPasswordAutosaveEnabled<
+ Identity: ICoreWebView2Profile6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile6_Impl::SetIsPasswordAutosaveEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsGeneralAutofillEnabled<
+ Identity: ICoreWebView2Profile6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile6_Impl::IsGeneralAutofillEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsGeneralAutofillEnabled<
+ Identity: ICoreWebView2Profile6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile6_Impl::SetIsGeneralAutofillEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Profile5_Vtbl::new::<Identity, OFFSET>(),
+ IsPasswordAutosaveEnabled: IsPasswordAutosaveEnabled::<Identity, OFFSET>,
+ SetIsPasswordAutosaveEnabled: SetIsPasswordAutosaveEnabled::<Identity, OFFSET>,
+ IsGeneralAutofillEnabled: IsGeneralAutofillEnabled::<Identity, OFFSET>,
+ SetIsGeneralAutofillEnabled: SetIsGeneralAutofillEnabled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile6 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile6 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile7,
+ ICoreWebView2Profile7_Vtbl,
+ 0x7b4c7906_a1aa_4cb4_b723_db09f813d541
+);
+impl core::ops::Deref for ICoreWebView2Profile7 {
+ type Target = ICoreWebView2Profile6;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Profile7,
+ windows_core::IUnknown,
+ ICoreWebView2Profile,
+ ICoreWebView2Profile2,
+ ICoreWebView2Profile3,
+ ICoreWebView2Profile4,
+ ICoreWebView2Profile5,
+ ICoreWebView2Profile6
+);
+impl ICoreWebView2Profile7 {
+ pub unsafe fn AddBrowserExtension<P0, P1>(
+ &self,
+ extensionfolderpath: P0,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2ProfileAddBrowserExtensionCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).AddBrowserExtension)(
+ windows_core::Interface::as_raw(self),
+ extensionfolderpath.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetBrowserExtensions<P0>(&self, handler: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetBrowserExtensions)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile7_Vtbl {
+ pub base__: ICoreWebView2Profile6_Vtbl,
+ pub AddBrowserExtension: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub GetBrowserExtensions: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile7_Impl: ICoreWebView2Profile6_Impl {
+ fn AddBrowserExtension(
+ &self,
+ extensionfolderpath: &windows_core::PCWSTR,
+ handler: windows_core::Ref<'_, ICoreWebView2ProfileAddBrowserExtensionCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn GetBrowserExtensions(
+ &self,
+ handler: windows_core::Ref<'_, ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Profile7_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile7_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn AddBrowserExtension<
+ Identity: ICoreWebView2Profile7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ extensionfolderpath: windows_core::PCWSTR,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile7_Impl::AddBrowserExtension(
+ this,
+ core::mem::transmute(&extensionfolderpath),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetBrowserExtensions<
+ Identity: ICoreWebView2Profile7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile7_Impl::GetBrowserExtensions(
+ this,
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Profile6_Vtbl::new::<Identity, OFFSET>(),
+ AddBrowserExtension: AddBrowserExtension::<Identity, OFFSET>,
+ GetBrowserExtensions: GetBrowserExtensions::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile7 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile6 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile7 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Profile8,
+ ICoreWebView2Profile8_Vtbl,
+ 0xfbf70c2f_eb1f_4383_85a0_163e92044011
+);
+impl core::ops::Deref for ICoreWebView2Profile8 {
+ type Target = ICoreWebView2Profile7;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Profile8,
+ windows_core::IUnknown,
+ ICoreWebView2Profile,
+ ICoreWebView2Profile2,
+ ICoreWebView2Profile3,
+ ICoreWebView2Profile4,
+ ICoreWebView2Profile5,
+ ICoreWebView2Profile6,
+ ICoreWebView2Profile7
+);
+impl ICoreWebView2Profile8 {
+ pub unsafe fn Delete(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn add_Deleted<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ProfileDeletedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_Deleted)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_Deleted(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_Deleted)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Profile8_Vtbl {
+ pub base__: ICoreWebView2Profile7_Vtbl,
+ pub Delete: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub add_Deleted: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_Deleted:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Profile8_Impl: ICoreWebView2Profile7_Impl {
+ fn Delete(&self) -> windows_core::Result<()>;
+ fn add_Deleted(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ProfileDeletedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_Deleted(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Profile8_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Profile8_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Delete<
+ Identity: ICoreWebView2Profile8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile8_Impl::Delete(this).into()
+ }
+ }
+ unsafe extern "system" fn add_Deleted<
+ Identity: ICoreWebView2Profile8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile8_Impl::add_Deleted(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_Deleted<
+ Identity: ICoreWebView2Profile8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Profile8_Impl::remove_Deleted(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Profile7_Vtbl::new::<Identity, OFFSET>(),
+ Delete: Delete::<Identity, OFFSET>,
+ add_Deleted: add_Deleted::<Identity, OFFSET>,
+ remove_Deleted: remove_Deleted::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Profile8 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile6 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Profile7 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Profile8 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProfileAddBrowserExtensionCompletedHandler,
+ ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Vtbl,
+ 0xdf1aab27_82b9_4ab6_aae8_017a49398c14
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProfileAddBrowserExtensionCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ProfileAddBrowserExtensionCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2BrowserExtension>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2BrowserExtension>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ProfileAddBrowserExtensionCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProfileAddBrowserExtensionCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProfileDeletedEventHandler,
+ ICoreWebView2ProfileDeletedEventHandler_Vtbl,
+ 0xdf35055d_772e_4dbe_b743_5fbf74a2b258
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProfileDeletedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ProfileDeletedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Profile>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProfileDeletedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProfileDeletedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Profile>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProfileDeletedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ProfileDeletedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ProfileDeletedEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProfileDeletedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ProfileDeletedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProfileDeletedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler,
+ ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Vtbl,
+ 0xfce16a1c_f107_4601_8b75_fc4940ae25d0
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2BrowserExtensionList>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, ICoreWebView2BrowserExtensionList>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2RasterizationScaleChangedEventHandler,
+ ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl,
+ 0x9c98c8b1_ac53_427e_a345_3049b5524bbe
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2RasterizationScaleChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2RasterizationScaleChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Controller>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2RasterizationScaleChangedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Controller>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2RasterizationScaleChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2RasterizationScaleChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2RasterizationScaleChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2RasterizationScaleChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2RegionRectCollectionView,
+ ICoreWebView2RegionRectCollectionView_Vtbl,
+ 0x333353b8_48bf_4449_8fcc_22697faf5753
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2RegionRectCollectionView,
+ windows_core::IUnknown
+);
+impl ICoreWebView2RegionRectCollectionView {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ value: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2RegionRectCollectionView_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2RegionRectCollectionView_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(
+ &self,
+ index: u32,
+ value: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2RegionRectCollectionView_Vtbl {
+ pub const fn new<Identity: ICoreWebView2RegionRectCollectionView_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2RegionRectCollectionView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2RegionRectCollectionView_Impl::Count(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2RegionRectCollectionView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut windows::Win32::Foundation::RECT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2RegionRectCollectionView_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2RegionRectCollectionView as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2RegionRectCollectionView {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SaveAsUIShowingEventArgs,
+ ICoreWebView2SaveAsUIShowingEventArgs_Vtbl,
+ 0x55902952_0e0d_5aaa_a7d0_e833cdb34f62
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2SaveAsUIShowingEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2SaveAsUIShowingEventArgs {
+ pub unsafe fn ContentMimeType(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ContentMimeType)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancel)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetSuppressDefaultDialog(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSuppressDefaultDialog)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SuppressDefaultDialog(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SuppressDefaultDialog)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetSaveAsFilePath<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSaveAsFilePath)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SaveAsFilePath(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SaveAsFilePath)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAllowReplace(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAllowReplace)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AllowReplace(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AllowReplace)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetKind(&self, value: COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetKind)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Kind(&self, value: *mut COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Kind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SaveAsUIShowingEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ContentMimeType: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetCancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Cancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetSuppressDefaultDialog: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SuppressDefaultDialog: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetSaveAsFilePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub SaveAsFilePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetAllowReplace: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub AllowReplace: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_SAVE_AS_KIND,
+ ) -> windows_core::HRESULT,
+ pub Kind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_SAVE_AS_KIND,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SaveAsUIShowingEventArgs_Impl: windows_core::IUnknownImpl {
+ fn ContentMimeType(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetSuppressDefaultDialog(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn SuppressDefaultDialog(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+ fn SetSaveAsFilePath(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
+ fn SaveAsFilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn SetAllowReplace(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn AllowReplace(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetKind(&self, value: COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()>;
+ fn Kind(&self, value: *mut COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()>;
+}
+impl ICoreWebView2SaveAsUIShowingEventArgs_Vtbl {
+ pub const fn new<Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn ContentMimeType<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::ContentMimeType(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancel<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetCancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::Cancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetSuppressDefaultDialog<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetSuppressDefaultDialog(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SuppressDefaultDialog<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::SuppressDefaultDialog(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2SaveAsUIShowingEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetSaveAsFilePath<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetSaveAsFilePath(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SaveAsFilePath<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::SaveAsFilePath(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAllowReplace<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetAllowReplace(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AllowReplace<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::AllowReplace(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetKind<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_SAVE_AS_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Kind<
+ Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_SAVE_AS_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventArgs_Impl::Kind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ContentMimeType: ContentMimeType::<Identity, OFFSET>,
+ SetCancel: SetCancel::<Identity, OFFSET>,
+ Cancel: Cancel::<Identity, OFFSET>,
+ SetSuppressDefaultDialog: SetSuppressDefaultDialog::<Identity, OFFSET>,
+ SuppressDefaultDialog: SuppressDefaultDialog::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ SetSaveAsFilePath: SetSaveAsFilePath::<Identity, OFFSET>,
+ SaveAsFilePath: SaveAsFilePath::<Identity, OFFSET>,
+ SetAllowReplace: SetAllowReplace::<Identity, OFFSET>,
+ AllowReplace: AllowReplace::<Identity, OFFSET>,
+ SetKind: SetKind::<Identity, OFFSET>,
+ Kind: Kind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2SaveAsUIShowingEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SaveAsUIShowingEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SaveAsUIShowingEventHandler,
+ ICoreWebView2SaveAsUIShowingEventHandler_Vtbl,
+ 0x6baa177e_3a2e_5ccf_9a13_fad676cd0522
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2SaveAsUIShowingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2SaveAsUIShowingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2SaveAsUIShowingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SaveAsUIShowingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SaveAsUIShowingEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2SaveAsUIShowingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2SaveAsUIShowingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2SaveAsUIShowingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2SaveAsUIShowingEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveAsUIShowingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2SaveAsUIShowingEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SaveAsUIShowingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs,
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Vtbl,
+ 0xcf4ff1d1_5a67_5660_8d63_ef699881ea65
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2SaveFileSecurityCheckStartingEventArgs {
+ pub unsafe fn CancelSave(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).CancelSave)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancelSave(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancelSave)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DocumentOriginUri(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DocumentOriginUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FileExtension(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FileExtension)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FilePath)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SuppressDefaultPolicy(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SuppressDefaultPolicy)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetSuppressDefaultPolicy(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetSuppressDefaultPolicy)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub CancelSave: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetCancelSave: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub DocumentOriginUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub FileExtension: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub FilePath: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SuppressDefaultPolicy: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetSuppressDefaultPolicy: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl:
+ windows_core::IUnknownImpl
+{
+ fn CancelSave(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetCancelSave(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn DocumentOriginUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn FileExtension(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn FilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn SuppressDefaultPolicy(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetSuppressDefaultPolicy(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn CancelSave<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::CancelSave(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancelSave<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::SetCancelSave(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DocumentOriginUri<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::DocumentOriginUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FileExtension<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::FileExtension(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FilePath<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::FilePath(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SuppressDefaultPolicy<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::SuppressDefaultPolicy(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetSuppressDefaultPolicy<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::SetSuppressDefaultPolicy(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ CancelSave: CancelSave::<Identity, OFFSET>,
+ SetCancelSave: SetCancelSave::<Identity, OFFSET>,
+ DocumentOriginUri: DocumentOriginUri::<Identity, OFFSET>,
+ FileExtension: FileExtension::<Identity, OFFSET>,
+ FilePath: FilePath::<Identity, OFFSET>,
+ SuppressDefaultPolicy: SuppressDefaultPolicy::<Identity, OFFSET>,
+ SetSuppressDefaultPolicy: SetSuppressDefaultPolicy::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2SaveFileSecurityCheckStartingEventArgs as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SaveFileSecurityCheckStartingEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SaveFileSecurityCheckStartingEventHandler,
+ ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Vtbl,
+ 0x7899576c_19e3_57c8_b7d1_55808292de57
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2SaveFileSecurityCheckStartingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2SaveFileSecurityCheckStartingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2SaveFileSecurityCheckStartingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2SaveFileSecurityCheckStartingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2SaveFileSecurityCheckStartingEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2SaveFileSecurityCheckStartingEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SaveFileSecurityCheckStartingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ScreenCaptureStartingEventArgs,
+ ICoreWebView2ScreenCaptureStartingEventArgs_Vtbl,
+ 0x892c03fd_aee3_5eba_a1fa_6fd2f6484b2b
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ScreenCaptureStartingEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ScreenCaptureStartingEventArgs {
+ pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Cancel)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetCancel)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Handled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHandled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).OriginalSourceFrameInfo)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ScreenCaptureStartingEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Cancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetCancel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Handled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetHandled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub OriginalSourceFrameInfo: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ScreenCaptureStartingEventArgs_Impl: windows_core::IUnknownImpl {
+ fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+}
+impl ICoreWebView2ScreenCaptureStartingEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Cancel<
+ Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScreenCaptureStartingEventArgs_Impl::Cancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetCancel<
+ Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScreenCaptureStartingEventArgs_Impl::SetCancel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Handled<
+ Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScreenCaptureStartingEventArgs_Impl::Handled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHandled<
+ Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScreenCaptureStartingEventArgs_Impl::SetHandled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn OriginalSourceFrameInfo<
+ Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ScreenCaptureStartingEventArgs_Impl::OriginalSourceFrameInfo(
+ this,
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ScreenCaptureStartingEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Cancel: Cancel::<Identity, OFFSET>,
+ SetCancel: SetCancel::<Identity, OFFSET>,
+ Handled: Handled::<Identity, OFFSET>,
+ SetHandled: SetHandled::<Identity, OFFSET>,
+ OriginalSourceFrameInfo: OriginalSourceFrameInfo::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ScreenCaptureStartingEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ScreenCaptureStartingEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ScreenCaptureStartingEventHandler,
+ ICoreWebView2ScreenCaptureStartingEventHandler_Vtbl,
+ 0xe24ff05a_1db5_59d9_89f3_3c864268db4a
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ScreenCaptureStartingEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ScreenCaptureStartingEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2ScreenCaptureStartingEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ScreenCaptureStartingEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ScreenCaptureStartingEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2ScreenCaptureStartingEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ScreenCaptureStartingEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ScreenCaptureStartingEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ScreenCaptureStartingEventHandler_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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScreenCaptureStartingEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ScreenCaptureStartingEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ScreenCaptureStartingEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ScriptDialogOpeningEventArgs,
+ ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl,
+ 0x7390bb70_abe0_4843_9529_f143b31b03d6
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ScriptDialogOpeningEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ScriptDialogOpeningEventArgs {
+ pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ uri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Kind(
+ &self,
+ kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Kind)(
+ windows_core::Interface::as_raw(self),
+ kind as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Message(&self, message: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Message)(
+ windows_core::Interface::as_raw(self),
+ message as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Accept(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Accept)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn DefaultText(
+ &self,
+ defaulttext: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DefaultText)(
+ windows_core::Interface::as_raw(self),
+ defaulttext as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ResultText(
+ &self,
+ resulttext: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ResultText)(
+ windows_core::Interface::as_raw(self),
+ resulttext as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetResultText<P0>(&self, resulttext: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetResultText)(
+ windows_core::Interface::as_raw(self),
+ resulttext.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Kind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
+ ) -> windows_core::HRESULT,
+ pub Message: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Accept: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub DefaultText: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ResultText: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetResultText: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ScriptDialogOpeningEventArgs_Impl: windows_core::IUnknownImpl {
+ 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 ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Uri(
+ this,
+ core::mem::transmute_copy(&uri),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Kind<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Kind(
+ this,
+ core::mem::transmute_copy(&kind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Message<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ message: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Message(
+ this,
+ core::mem::transmute_copy(&message),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Accept<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Accept(this).into()
+ }
+ }
+ unsafe extern "system" fn DefaultText<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ defaulttext: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventArgs_Impl::DefaultText(
+ this,
+ core::mem::transmute_copy(&defaulttext),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ResultText<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ resulttext: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventArgs_Impl::ResultText(
+ this,
+ core::mem::transmute_copy(&resulttext),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetResultText<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ resulttext: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventArgs_Impl::SetResultText(
+ this,
+ core::mem::transmute(&resulttext),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ScriptDialogOpeningEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Uri: Uri::<Identity, OFFSET>,
+ Kind: Kind::<Identity, OFFSET>,
+ Message: Message::<Identity, OFFSET>,
+ Accept: Accept::<Identity, OFFSET>,
+ DefaultText: DefaultText::<Identity, OFFSET>,
+ ResultText: ResultText::<Identity, OFFSET>,
+ SetResultText: SetResultText::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ScriptDialogOpeningEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ScriptDialogOpeningEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ScriptDialogOpeningEventHandler,
+ ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl,
+ 0xef381bf9_afa8_4e37_91c4_8ac48524bdfb
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ScriptDialogOpeningEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ScriptDialogOpeningEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2ScriptDialogOpeningEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ScriptDialogOpeningEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2ScriptDialogOpeningEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ScriptDialogOpeningEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptDialogOpeningEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ScriptDialogOpeningEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ScriptDialogOpeningEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ScriptException,
+ ICoreWebView2ScriptException_Vtbl,
+ 0x054dae00_84a3_49ff_bc17_4012a90bc9fd
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2ScriptException, windows_core::IUnknown);
+impl ICoreWebView2ScriptException {
+ pub unsafe fn LineNumber(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).LineNumber)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ColumnNumber(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ColumnNumber)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Name)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Message(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Message)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ToJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ToJson)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ScriptException_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub LineNumber:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub ColumnNumber:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub Name: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub Message: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ToJson: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ScriptException_Impl: windows_core::IUnknownImpl {
+ fn LineNumber(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn ColumnNumber(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn Message(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn ToJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ScriptException_Vtbl {
+ pub const fn new<Identity: ICoreWebView2ScriptException_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn LineNumber<
+ Identity: ICoreWebView2ScriptException_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptException_Impl::LineNumber(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ColumnNumber<
+ Identity: ICoreWebView2ScriptException_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptException_Impl::ColumnNumber(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Name<
+ Identity: ICoreWebView2ScriptException_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptException_Impl::Name(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Message<
+ Identity: ICoreWebView2ScriptException_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptException_Impl::Message(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn ToJson<
+ Identity: ICoreWebView2ScriptException_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ScriptException_Impl::ToJson(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ LineNumber: LineNumber::<Identity, OFFSET>,
+ ColumnNumber: ColumnNumber::<Identity, OFFSET>,
+ Name: Name::<Identity, OFFSET>,
+ Message: Message::<Identity, OFFSET>,
+ ToJson: ToJson::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ScriptException as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ScriptException {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ServerCertificateErrorDetectedEventArgs,
+ ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl,
+ 0x012193ed_7c13_48ff_969d_a84c1f432a14
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ServerCertificateErrorDetectedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ServerCertificateErrorDetectedEventArgs {
+ pub unsafe fn ErrorStatus(
+ &self,
+ value: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ErrorStatus)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RequestUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).RequestUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ServerCertificate(&self) -> windows_core::Result<ICoreWebView2Certificate> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).ServerCertificate)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Action(
+ &self,
+ value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Action)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAction(
+ &self,
+ value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAction)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub ErrorStatus: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_WEB_ERROR_STATUS,
+ ) -> windows_core::HRESULT,
+ pub RequestUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub ServerCertificate: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Action: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
+ ) -> windows_core::HRESULT,
+ pub SetAction: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl:
+ windows_core::IUnknownImpl
+{
+ 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 ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn ErrorStatus<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::ErrorStatus(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RequestUri<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::RequestUri(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ServerCertificate<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::ServerCertificate(
+ this,
+ ) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Action<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::Action(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAction<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::SetAction(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ ErrorStatus: ErrorStatus::<Identity, OFFSET>,
+ RequestUri: RequestUri::<Identity, OFFSET>,
+ ServerCertificate: ServerCertificate::<Identity, OFFSET>,
+ Action: Action::<Identity, OFFSET>,
+ SetAction: SetAction::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ServerCertificateErrorDetectedEventArgs as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ServerCertificateErrorDetectedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ServerCertificateErrorDetectedEventHandler,
+ ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl,
+ 0x969b3a26_d85e_4795_8199_fef57344da22
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ServerCertificateErrorDetectedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ServerCertificateErrorDetectedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2ServerCertificateErrorDetectedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2ServerCertificateErrorDetectedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2ServerCertificateErrorDetectedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ServerCertificateErrorDetectedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SetPermissionStateCompletedHandler,
+ ICoreWebView2SetPermissionStateCompletedHandler_Vtbl,
+ 0xfc77fb30_9c9e_4076_b8c7_7644a703ca1b
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2SetPermissionStateCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2SetPermissionStateCompletedHandler {
+ pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SetPermissionStateCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SetPermissionStateCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
+}
+impl ICoreWebView2SetPermissionStateCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2SetPermissionStateCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2SetPermissionStateCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SetPermissionStateCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2SetPermissionStateCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SetPermissionStateCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings,
+ ICoreWebView2Settings_Vtbl,
+ 0xe562e4f0_d7fa_43ac_8d71_c05150499f00
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2Settings, windows_core::IUnknown);
+impl ICoreWebView2Settings {
+ pub unsafe fn IsScriptEnabled(
+ &self,
+ isscriptenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsScriptEnabled)(
+ windows_core::Interface::as_raw(self),
+ isscriptenabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsScriptEnabled(&self, isscriptenabled: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsScriptEnabled)(
+ windows_core::Interface::as_raw(self),
+ isscriptenabled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsWebMessageEnabled(
+ &self,
+ iswebmessageenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsWebMessageEnabled)(
+ windows_core::Interface::as_raw(self),
+ iswebmessageenabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsWebMessageEnabled(
+ &self,
+ iswebmessageenabled: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsWebMessageEnabled)(
+ windows_core::Interface::as_raw(self),
+ iswebmessageenabled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AreDefaultScriptDialogsEnabled(
+ &self,
+ aredefaultscriptdialogsenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AreDefaultScriptDialogsEnabled)(
+ windows_core::Interface::as_raw(self),
+ aredefaultscriptdialogsenabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAreDefaultScriptDialogsEnabled(
+ &self,
+ aredefaultscriptdialogsenabled: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAreDefaultScriptDialogsEnabled)(
+ windows_core::Interface::as_raw(self),
+ aredefaultscriptdialogsenabled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsStatusBarEnabled(
+ &self,
+ isstatusbarenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsStatusBarEnabled)(
+ windows_core::Interface::as_raw(self),
+ isstatusbarenabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsStatusBarEnabled(
+ &self,
+ isstatusbarenabled: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsStatusBarEnabled)(
+ windows_core::Interface::as_raw(self),
+ isstatusbarenabled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AreDevToolsEnabled(
+ &self,
+ aredevtoolsenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AreDevToolsEnabled)(
+ windows_core::Interface::as_raw(self),
+ aredevtoolsenabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAreDevToolsEnabled(
+ &self,
+ aredevtoolsenabled: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAreDevToolsEnabled)(
+ windows_core::Interface::as_raw(self),
+ aredevtoolsenabled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AreDefaultContextMenusEnabled(
+ &self,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AreDefaultContextMenusEnabled)(
+ windows_core::Interface::as_raw(self),
+ enabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAreDefaultContextMenusEnabled(
+ &self,
+ enabled: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAreDefaultContextMenusEnabled)(
+ windows_core::Interface::as_raw(self),
+ enabled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn AreHostObjectsAllowed(
+ &self,
+ allowed: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AreHostObjectsAllowed)(
+ windows_core::Interface::as_raw(self),
+ allowed as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAreHostObjectsAllowed(&self, allowed: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAreHostObjectsAllowed)(
+ windows_core::Interface::as_raw(self),
+ allowed.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsZoomControlEnabled(
+ &self,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsZoomControlEnabled)(
+ windows_core::Interface::as_raw(self),
+ enabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsZoomControlEnabled(&self, enabled: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsZoomControlEnabled)(
+ windows_core::Interface::as_raw(self),
+ enabled.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsBuiltInErrorPageEnabled(
+ &self,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsBuiltInErrorPageEnabled)(
+ windows_core::Interface::as_raw(self),
+ enabled as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsBuiltInErrorPageEnabled(&self, enabled: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsBuiltInErrorPageEnabled)(
+ windows_core::Interface::as_raw(self),
+ enabled.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub IsScriptEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsScriptEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsWebMessageEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsWebMessageEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub AreDefaultScriptDialogsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAreDefaultScriptDialogsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsStatusBarEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsStatusBarEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub AreDevToolsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAreDevToolsEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub AreDefaultContextMenusEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAreDefaultContextMenusEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub AreHostObjectsAllowed: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAreHostObjectsAllowed: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsZoomControlEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsZoomControlEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsBuiltInErrorPageEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsBuiltInErrorPageEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings_Impl: windows_core::IUnknownImpl {
+ fn IsScriptEnabled(&self, isscriptenabled: *mut windows_core::BOOL)
+ -> windows_core::Result<()>;
+ fn SetIsScriptEnabled(&self, isscriptenabled: windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsWebMessageEnabled(
+ &self,
+ iswebmessageenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetIsWebMessageEnabled(
+ &self,
+ iswebmessageenabled: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn AreDefaultScriptDialogsEnabled(
+ &self,
+ aredefaultscriptdialogsenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetAreDefaultScriptDialogsEnabled(
+ &self,
+ aredefaultscriptdialogsenabled: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn IsStatusBarEnabled(
+ &self,
+ isstatusbarenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetIsStatusBarEnabled(
+ &self,
+ isstatusbarenabled: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn AreDevToolsEnabled(
+ &self,
+ aredevtoolsenabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetAreDevToolsEnabled(
+ &self,
+ aredevtoolsenabled: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn AreDefaultContextMenusEnabled(
+ &self,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetAreDefaultContextMenusEnabled(
+ &self,
+ enabled: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn AreHostObjectsAllowed(&self, allowed: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetAreHostObjectsAllowed(&self, allowed: windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsZoomControlEnabled(&self, enabled: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsZoomControlEnabled(&self, enabled: windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsBuiltInErrorPageEnabled(
+ &self,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetIsBuiltInErrorPageEnabled(&self, enabled: windows_core::BOOL)
+ -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsScriptEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isscriptenabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::IsScriptEnabled(
+ this,
+ core::mem::transmute_copy(&isscriptenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsScriptEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isscriptenabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetIsScriptEnabled(
+ this,
+ core::mem::transmute_copy(&isscriptenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsWebMessageEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ iswebmessageenabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::IsWebMessageEnabled(
+ this,
+ core::mem::transmute_copy(&iswebmessageenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsWebMessageEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ iswebmessageenabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetIsWebMessageEnabled(
+ this,
+ core::mem::transmute_copy(&iswebmessageenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AreDefaultScriptDialogsEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ aredefaultscriptdialogsenabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::AreDefaultScriptDialogsEnabled(
+ this,
+ core::mem::transmute_copy(&aredefaultscriptdialogsenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAreDefaultScriptDialogsEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ aredefaultscriptdialogsenabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetAreDefaultScriptDialogsEnabled(
+ this,
+ core::mem::transmute_copy(&aredefaultscriptdialogsenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsStatusBarEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isstatusbarenabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::IsStatusBarEnabled(
+ this,
+ core::mem::transmute_copy(&isstatusbarenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsStatusBarEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ isstatusbarenabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetIsStatusBarEnabled(
+ this,
+ core::mem::transmute_copy(&isstatusbarenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AreDevToolsEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ aredevtoolsenabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::AreDevToolsEnabled(
+ this,
+ core::mem::transmute_copy(&aredevtoolsenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAreDevToolsEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ aredevtoolsenabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetAreDevToolsEnabled(
+ this,
+ core::mem::transmute_copy(&aredevtoolsenabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AreDefaultContextMenusEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::AreDefaultContextMenusEnabled(
+ this,
+ core::mem::transmute_copy(&enabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAreDefaultContextMenusEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ enabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetAreDefaultContextMenusEnabled(
+ this,
+ core::mem::transmute_copy(&enabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn AreHostObjectsAllowed<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ allowed: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::AreHostObjectsAllowed(
+ this,
+ core::mem::transmute_copy(&allowed),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAreHostObjectsAllowed<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ allowed: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetAreHostObjectsAllowed(
+ this,
+ core::mem::transmute_copy(&allowed),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsZoomControlEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::IsZoomControlEnabled(
+ this,
+ core::mem::transmute_copy(&enabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsZoomControlEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ enabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetIsZoomControlEnabled(
+ this,
+ core::mem::transmute_copy(&enabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsBuiltInErrorPageEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ enabled: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::IsBuiltInErrorPageEnabled(
+ this,
+ core::mem::transmute_copy(&enabled),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsBuiltInErrorPageEnabled<
+ Identity: ICoreWebView2Settings_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ enabled: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings_Impl::SetIsBuiltInErrorPageEnabled(
+ this,
+ core::mem::transmute_copy(&enabled),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ IsScriptEnabled: IsScriptEnabled::<Identity, OFFSET>,
+ SetIsScriptEnabled: SetIsScriptEnabled::<Identity, OFFSET>,
+ IsWebMessageEnabled: IsWebMessageEnabled::<Identity, OFFSET>,
+ SetIsWebMessageEnabled: SetIsWebMessageEnabled::<Identity, OFFSET>,
+ AreDefaultScriptDialogsEnabled: AreDefaultScriptDialogsEnabled::<Identity, OFFSET>,
+ SetAreDefaultScriptDialogsEnabled: SetAreDefaultScriptDialogsEnabled::<Identity, OFFSET>,
+ IsStatusBarEnabled: IsStatusBarEnabled::<Identity, OFFSET>,
+ SetIsStatusBarEnabled: SetIsStatusBarEnabled::<Identity, OFFSET>,
+ AreDevToolsEnabled: AreDevToolsEnabled::<Identity, OFFSET>,
+ SetAreDevToolsEnabled: SetAreDevToolsEnabled::<Identity, OFFSET>,
+ AreDefaultContextMenusEnabled: AreDefaultContextMenusEnabled::<Identity, OFFSET>,
+ SetAreDefaultContextMenusEnabled: SetAreDefaultContextMenusEnabled::<Identity, OFFSET>,
+ AreHostObjectsAllowed: AreHostObjectsAllowed::<Identity, OFFSET>,
+ SetAreHostObjectsAllowed: SetAreHostObjectsAllowed::<Identity, OFFSET>,
+ IsZoomControlEnabled: IsZoomControlEnabled::<Identity, OFFSET>,
+ SetIsZoomControlEnabled: SetIsZoomControlEnabled::<Identity, OFFSET>,
+ IsBuiltInErrorPageEnabled: IsBuiltInErrorPageEnabled::<Identity, OFFSET>,
+ SetIsBuiltInErrorPageEnabled: SetIsBuiltInErrorPageEnabled::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings2,
+ ICoreWebView2Settings2_Vtbl,
+ 0xee9a0f68_f46c_4e32_ac23_ef8cac224d2a
+);
+impl core::ops::Deref for ICoreWebView2Settings2 {
+ type Target = ICoreWebView2Settings;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings2,
+ windows_core::IUnknown,
+ ICoreWebView2Settings
+);
+impl ICoreWebView2Settings2 {
+ pub unsafe fn UserAgent(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).UserAgent)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetUserAgent<P0>(&self, value: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetUserAgent)(
+ windows_core::Interface::as_raw(self),
+ value.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings2_Vtbl {
+ pub base__: ICoreWebView2Settings_Vtbl,
+ pub UserAgent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetUserAgent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings2_Impl: ICoreWebView2Settings_Impl {
+ fn UserAgent(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn SetUserAgent(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn UserAgent<
+ Identity: ICoreWebView2Settings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings2_Impl::UserAgent(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetUserAgent<
+ Identity: ICoreWebView2Settings2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings2_Impl::SetUserAgent(this, core::mem::transmute(&value)).into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings_Vtbl::new::<Identity, OFFSET>(),
+ UserAgent: UserAgent::<Identity, OFFSET>,
+ SetUserAgent: SetUserAgent::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings3,
+ ICoreWebView2Settings3_Vtbl,
+ 0xfdb5ab74_af33_4854_84f0_0a631deb5eba
+);
+impl core::ops::Deref for ICoreWebView2Settings3 {
+ type Target = ICoreWebView2Settings2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings3,
+ windows_core::IUnknown,
+ ICoreWebView2Settings,
+ ICoreWebView2Settings2
+);
+impl ICoreWebView2Settings3 {
+ pub unsafe fn AreBrowserAcceleratorKeysEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).AreBrowserAcceleratorKeysEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetAreBrowserAcceleratorKeysEnabled(
+ &self,
+ value: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetAreBrowserAcceleratorKeysEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings3_Vtbl {
+ pub base__: ICoreWebView2Settings2_Vtbl,
+ pub AreBrowserAcceleratorKeysEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetAreBrowserAcceleratorKeysEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ )
+ -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings3_Impl: ICoreWebView2Settings2_Impl {
+ fn AreBrowserAcceleratorKeysEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetAreBrowserAcceleratorKeysEnabled(
+ &self,
+ value: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings3_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn AreBrowserAcceleratorKeysEnabled<
+ Identity: ICoreWebView2Settings3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings3_Impl::AreBrowserAcceleratorKeysEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetAreBrowserAcceleratorKeysEnabled<
+ Identity: ICoreWebView2Settings3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings3_Impl::SetAreBrowserAcceleratorKeysEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings2_Vtbl::new::<Identity, OFFSET>(),
+ AreBrowserAcceleratorKeysEnabled: AreBrowserAcceleratorKeysEnabled::<Identity, OFFSET>,
+ SetAreBrowserAcceleratorKeysEnabled: SetAreBrowserAcceleratorKeysEnabled::<
+ Identity,
+ 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings4,
+ ICoreWebView2Settings4_Vtbl,
+ 0xcb56846c_4168_4d53_b04f_03b6d6796ff2
+);
+impl core::ops::Deref for ICoreWebView2Settings4 {
+ type Target = ICoreWebView2Settings3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings4,
+ windows_core::IUnknown,
+ ICoreWebView2Settings,
+ ICoreWebView2Settings2,
+ ICoreWebView2Settings3
+);
+impl ICoreWebView2Settings4 {
+ pub unsafe fn IsPasswordAutosaveEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsPasswordAutosaveEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsPasswordAutosaveEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsPasswordAutosaveEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsGeneralAutofillEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsGeneralAutofillEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsGeneralAutofillEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsGeneralAutofillEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings4_Vtbl {
+ pub base__: ICoreWebView2Settings3_Vtbl,
+ pub IsPasswordAutosaveEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsPasswordAutosaveEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub IsGeneralAutofillEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsGeneralAutofillEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings4_Impl: ICoreWebView2Settings3_Impl {
+ fn IsPasswordAutosaveEnabled(&self, value: *mut windows_core::BOOL)
+ -> windows_core::Result<()>;
+ fn SetIsPasswordAutosaveEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn IsGeneralAutofillEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsGeneralAutofillEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings4_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsPasswordAutosaveEnabled<
+ Identity: ICoreWebView2Settings4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings4_Impl::IsPasswordAutosaveEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsPasswordAutosaveEnabled<
+ Identity: ICoreWebView2Settings4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings4_Impl::SetIsPasswordAutosaveEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsGeneralAutofillEnabled<
+ Identity: ICoreWebView2Settings4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings4_Impl::IsGeneralAutofillEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsGeneralAutofillEnabled<
+ Identity: ICoreWebView2Settings4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings4_Impl::SetIsGeneralAutofillEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings3_Vtbl::new::<Identity, OFFSET>(),
+ IsPasswordAutosaveEnabled: IsPasswordAutosaveEnabled::<Identity, OFFSET>,
+ SetIsPasswordAutosaveEnabled: SetIsPasswordAutosaveEnabled::<Identity, OFFSET>,
+ IsGeneralAutofillEnabled: IsGeneralAutofillEnabled::<Identity, OFFSET>,
+ SetIsGeneralAutofillEnabled: SetIsGeneralAutofillEnabled::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings5,
+ ICoreWebView2Settings5_Vtbl,
+ 0x183e7052_1d03_43a0_ab99_98e043b66b39
+);
+impl core::ops::Deref for ICoreWebView2Settings5 {
+ type Target = ICoreWebView2Settings4;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings5,
+ windows_core::IUnknown,
+ ICoreWebView2Settings,
+ ICoreWebView2Settings2,
+ ICoreWebView2Settings3,
+ ICoreWebView2Settings4
+);
+impl ICoreWebView2Settings5 {
+ pub unsafe fn IsPinchZoomEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsPinchZoomEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsPinchZoomEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsPinchZoomEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings5_Vtbl {
+ pub base__: ICoreWebView2Settings4_Vtbl,
+ pub IsPinchZoomEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsPinchZoomEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings5_Impl: ICoreWebView2Settings4_Impl {
+ fn IsPinchZoomEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsPinchZoomEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings5_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings5_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsPinchZoomEnabled<
+ Identity: ICoreWebView2Settings5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings5_Impl::IsPinchZoomEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsPinchZoomEnabled<
+ Identity: ICoreWebView2Settings5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings5_Impl::SetIsPinchZoomEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings4_Vtbl::new::<Identity, OFFSET>(),
+ IsPinchZoomEnabled: IsPinchZoomEnabled::<Identity, OFFSET>,
+ SetIsPinchZoomEnabled: SetIsPinchZoomEnabled::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings5 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings6,
+ ICoreWebView2Settings6_Vtbl,
+ 0x11cb3acd_9bc8_43b8_83bf_f40753714f87
+);
+impl core::ops::Deref for ICoreWebView2Settings6 {
+ type Target = ICoreWebView2Settings5;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings6,
+ windows_core::IUnknown,
+ ICoreWebView2Settings,
+ ICoreWebView2Settings2,
+ ICoreWebView2Settings3,
+ ICoreWebView2Settings4,
+ ICoreWebView2Settings5
+);
+impl ICoreWebView2Settings6 {
+ pub unsafe fn IsSwipeNavigationEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsSwipeNavigationEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsSwipeNavigationEnabled(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsSwipeNavigationEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings6_Vtbl {
+ pub base__: ICoreWebView2Settings5_Vtbl,
+ pub IsSwipeNavigationEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsSwipeNavigationEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings6_Impl: ICoreWebView2Settings5_Impl {
+ fn IsSwipeNavigationEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsSwipeNavigationEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings6_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings6_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsSwipeNavigationEnabled<
+ Identity: ICoreWebView2Settings6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings6_Impl::IsSwipeNavigationEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsSwipeNavigationEnabled<
+ Identity: ICoreWebView2Settings6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings6_Impl::SetIsSwipeNavigationEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings5_Vtbl::new::<Identity, OFFSET>(),
+ IsSwipeNavigationEnabled: IsSwipeNavigationEnabled::<Identity, OFFSET>,
+ SetIsSwipeNavigationEnabled: SetIsSwipeNavigationEnabled::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings6 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings7,
+ ICoreWebView2Settings7_Vtbl,
+ 0x488dc902_35ef_42d2_bc7d_94b65c4bc49c
+);
+impl core::ops::Deref for ICoreWebView2Settings7 {
+ type Target = ICoreWebView2Settings6;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings7,
+ windows_core::IUnknown,
+ ICoreWebView2Settings,
+ ICoreWebView2Settings2,
+ ICoreWebView2Settings3,
+ ICoreWebView2Settings4,
+ ICoreWebView2Settings5,
+ ICoreWebView2Settings6
+);
+impl ICoreWebView2Settings7 {
+ pub unsafe fn HiddenPdfToolbarItems(
+ &self,
+ value: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HiddenPdfToolbarItems)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetHiddenPdfToolbarItems(
+ &self,
+ value: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetHiddenPdfToolbarItems)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings7_Vtbl {
+ pub base__: ICoreWebView2Settings6_Vtbl,
+ pub HiddenPdfToolbarItems: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::HRESULT,
+ pub SetHiddenPdfToolbarItems: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings7_Impl: ICoreWebView2Settings6_Impl {
+ fn HiddenPdfToolbarItems(
+ &self,
+ value: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::Result<()>;
+ fn SetHiddenPdfToolbarItems(
+ &self,
+ value: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings7_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings7_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn HiddenPdfToolbarItems<
+ Identity: ICoreWebView2Settings7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings7_Impl::HiddenPdfToolbarItems(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetHiddenPdfToolbarItems<
+ Identity: ICoreWebView2Settings7_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings7_Impl::SetHiddenPdfToolbarItems(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings6_Vtbl::new::<Identity, OFFSET>(),
+ HiddenPdfToolbarItems: HiddenPdfToolbarItems::<Identity, OFFSET>,
+ SetHiddenPdfToolbarItems: SetHiddenPdfToolbarItems::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings7 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings8,
+ ICoreWebView2Settings8_Vtbl,
+ 0x9e6b0e8f_86ad_4e81_8147_a9b5edb68650
+);
+impl core::ops::Deref for ICoreWebView2Settings8 {
+ type Target = ICoreWebView2Settings7;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings8,
+ windows_core::IUnknown,
+ ICoreWebView2Settings,
+ ICoreWebView2Settings2,
+ ICoreWebView2Settings3,
+ ICoreWebView2Settings4,
+ ICoreWebView2Settings5,
+ ICoreWebView2Settings6,
+ ICoreWebView2Settings7
+);
+impl ICoreWebView2Settings8 {
+ pub unsafe fn IsReputationCheckingRequired(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsReputationCheckingRequired)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsReputationCheckingRequired(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsReputationCheckingRequired)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings8_Vtbl {
+ pub base__: ICoreWebView2Settings7_Vtbl,
+ pub IsReputationCheckingRequired: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsReputationCheckingRequired: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings8_Impl: ICoreWebView2Settings7_Impl {
+ fn IsReputationCheckingRequired(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetIsReputationCheckingRequired(
+ &self,
+ value: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings8_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings8_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsReputationCheckingRequired<
+ Identity: ICoreWebView2Settings8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings8_Impl::IsReputationCheckingRequired(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsReputationCheckingRequired<
+ Identity: ICoreWebView2Settings8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings8_Impl::SetIsReputationCheckingRequired(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings7_Vtbl::new::<Identity, OFFSET>(),
+ IsReputationCheckingRequired: IsReputationCheckingRequired::<Identity, OFFSET>,
+ SetIsReputationCheckingRequired: SetIsReputationCheckingRequired::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Settings8 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
+ || iid == &<ICoreWebView2Settings7 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings8 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2Settings9,
+ ICoreWebView2Settings9_Vtbl,
+ 0x0528a73b_e92d_49f4_927a_e547dddaa37d
+);
+impl core::ops::Deref for ICoreWebView2Settings9 {
+ type Target = ICoreWebView2Settings8;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2Settings9,
+ windows_core::IUnknown,
+ ICoreWebView2Settings,
+ ICoreWebView2Settings2,
+ ICoreWebView2Settings3,
+ ICoreWebView2Settings4,
+ ICoreWebView2Settings5,
+ ICoreWebView2Settings6,
+ ICoreWebView2Settings7,
+ ICoreWebView2Settings8
+);
+impl ICoreWebView2Settings9 {
+ pub unsafe fn IsNonClientRegionSupportEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsNonClientRegionSupportEnabled)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsNonClientRegionSupportEnabled(
+ &self,
+ value: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsNonClientRegionSupportEnabled)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2Settings9_Vtbl {
+ pub base__: ICoreWebView2Settings8_Vtbl,
+ pub IsNonClientRegionSupportEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsNonClientRegionSupportEnabled: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2Settings9_Impl: ICoreWebView2Settings8_Impl {
+ fn IsNonClientRegionSupportEnabled(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+ fn SetIsNonClientRegionSupportEnabled(
+ &self,
+ value: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2Settings9_Vtbl {
+ pub const fn new<Identity: ICoreWebView2Settings9_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn IsNonClientRegionSupportEnabled<
+ Identity: ICoreWebView2Settings9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings9_Impl::IsNonClientRegionSupportEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetIsNonClientRegionSupportEnabled<
+ Identity: ICoreWebView2Settings9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2Settings9_Impl::SetIsNonClientRegionSupportEnabled(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2Settings8_Vtbl::new::<Identity, OFFSET>(),
+ IsNonClientRegionSupportEnabled: IsNonClientRegionSupportEnabled::<Identity, OFFSET>,
+ SetIsNonClientRegionSupportEnabled: SetIsNonClientRegionSupportEnabled::<
+ Identity,
+ OFFSET,
+ >,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2Settings9 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
+ || iid == &<ICoreWebView2Settings7 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2Settings8 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2Settings9 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SharedBuffer,
+ ICoreWebView2SharedBuffer_Vtbl,
+ 0xb747a495_0c6f_449e_97b8_2f81e9d6ab43
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2SharedBuffer, windows_core::IUnknown);
+impl ICoreWebView2SharedBuffer {
+ pub unsafe fn Size(&self, value: *mut u64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Size)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Buffer(&self, value: *mut *mut u8) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Buffer)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn OpenStream(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).OpenStream)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn FileMappingHandle(
+ &self,
+ value: *mut windows::Win32::Foundation::HANDLE,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FileMappingHandle)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Close(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SharedBuffer_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Size: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
+ pub Buffer:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8) -> windows_core::HRESULT,
+ pub OpenStream: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub FileMappingHandle: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::HANDLE,
+ ) -> windows_core::HRESULT,
+ pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SharedBuffer_Impl: windows_core::IUnknownImpl {
+ fn Size(&self, value: *mut u64) -> windows_core::Result<()>;
+ fn Buffer(&self, value: *mut *mut u8) -> windows_core::Result<()>;
+ fn OpenStream(&self) -> windows_core::Result<windows::Win32::System::Com::IStream>;
+ fn FileMappingHandle(
+ &self,
+ value: *mut windows::Win32::Foundation::HANDLE,
+ ) -> windows_core::Result<()>;
+ fn Close(&self) -> windows_core::Result<()>;
+}
+impl ICoreWebView2SharedBuffer_Vtbl {
+ pub const fn new<Identity: ICoreWebView2SharedBuffer_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Size<
+ Identity: ICoreWebView2SharedBuffer_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SharedBuffer_Impl::Size(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn Buffer<
+ Identity: ICoreWebView2SharedBuffer_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut u8,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SharedBuffer_Impl::Buffer(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn OpenStream<
+ Identity: ICoreWebView2SharedBuffer_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2SharedBuffer_Impl::OpenStream(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn FileMappingHandle<
+ Identity: ICoreWebView2SharedBuffer_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows::Win32::Foundation::HANDLE,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SharedBuffer_Impl::FileMappingHandle(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Close<
+ Identity: ICoreWebView2SharedBuffer_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SharedBuffer_Impl::Close(this).into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Size: Size::<Identity, OFFSET>,
+ Buffer: Buffer::<Identity, OFFSET>,
+ OpenStream: OpenStream::<Identity, OFFSET>,
+ FileMappingHandle: FileMappingHandle::<Identity, OFFSET>,
+ Close: Close::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2SharedBuffer as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SharedBuffer {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ShowSaveAsUICompletedHandler,
+ ICoreWebView2ShowSaveAsUICompletedHandler_Vtbl,
+ 0xe24b07e3_8169_5c34_994a_7f6478946a3c
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ShowSaveAsUICompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ShowSaveAsUICompletedHandler {
+ pub unsafe fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: COREWEBVIEW2_SAVE_AS_UI_RESULT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ShowSaveAsUICompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ COREWEBVIEW2_SAVE_AS_UI_RESULT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ShowSaveAsUICompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: COREWEBVIEW2_SAVE_AS_UI_RESULT,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ShowSaveAsUICompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ShowSaveAsUICompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2ShowSaveAsUICompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: COREWEBVIEW2_SAVE_AS_UI_RESULT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ShowSaveAsUICompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ShowSaveAsUICompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ShowSaveAsUICompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SourceChangedEventArgs,
+ ICoreWebView2SourceChangedEventArgs_Vtbl,
+ 0x31e0e545_1dba_4266_8914_f63848a1f7d7
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2SourceChangedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2SourceChangedEventArgs {
+ pub unsafe fn IsNewDocument(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsNewDocument)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SourceChangedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub IsNewDocument: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SourceChangedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn IsNewDocument(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2SourceChangedEventArgs_Vtbl {
+ pub const fn new<Identity: ICoreWebView2SourceChangedEventArgs_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn IsNewDocument<
+ Identity: ICoreWebView2SourceChangedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SourceChangedEventArgs_Impl::IsNewDocument(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ IsNewDocument: IsNewDocument::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2SourceChangedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SourceChangedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2SourceChangedEventHandler,
+ ICoreWebView2SourceChangedEventHandler_Vtbl,
+ 0x3c067f9f_5388_4772_8b48_79f7ef1ab37c
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2SourceChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2SourceChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2SourceChangedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2SourceChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2SourceChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2SourceChangedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2SourceChangedEventHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2SourceChangedEventHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2SourceChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2SourceChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2SourceChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2StateChangedEventHandler,
+ ICoreWebView2StateChangedEventHandler_Vtbl,
+ 0x81336594_7ede_4ba9_bf71_acf0a95b58dd
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2StateChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2StateChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2DownloadOperation>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2StateChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2StateChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2DownloadOperation>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2StateChangedEventHandler_Vtbl {
+ pub const fn new<Identity: ICoreWebView2StateChangedEventHandler_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2StateChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2StateChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2StateChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2StatusBarTextChangedEventHandler,
+ ICoreWebView2StatusBarTextChangedEventHandler_Vtbl,
+ 0xa5e3b0d0_10df_4156_bfad_3b43867acac6
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2StatusBarTextChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2StatusBarTextChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2StatusBarTextChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2StatusBarTextChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2StatusBarTextChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2StatusBarTextChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2StatusBarTextChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2StatusBarTextChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2StatusBarTextChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2StringCollection,
+ ICoreWebView2StringCollection_Vtbl,
+ 0xf41f3f8a_bcc3_11eb_8529_0242ac130003
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2StringCollection, windows_core::IUnknown);
+impl ICoreWebView2StringCollection {
+ pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Count)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetValueAtIndex(
+ &self,
+ index: u32,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetValueAtIndex)(
+ windows_core::Interface::as_raw(self),
+ index,
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2StringCollection_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub GetValueAtIndex: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ u32,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2StringCollection_Impl: windows_core::IUnknownImpl {
+ fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
+ fn GetValueAtIndex(
+ &self,
+ index: u32,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2StringCollection_Vtbl {
+ pub const fn new<Identity: ICoreWebView2StringCollection_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Count<
+ Identity: ICoreWebView2StringCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2StringCollection_Impl::Count(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetValueAtIndex<
+ Identity: ICoreWebView2StringCollection_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ index: u32,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2StringCollection_Impl::GetValueAtIndex(
+ this,
+ core::mem::transmute_copy(&index),
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Count: Count::<Identity, OFFSET>,
+ GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2StringCollection as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2StringCollection {}
+windows_core::imp::define_interface!(
+ ICoreWebView2TrySuspendCompletedHandler,
+ ICoreWebView2TrySuspendCompletedHandler_Vtbl,
+ 0x00f206a7_9d17_4605_91f6_4e8e4de192e3
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2TrySuspendCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2TrySuspendCompletedHandler {
+ pub unsafe fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: bool,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.into(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2TrySuspendCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2TrySuspendCompletedHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::BOOL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2TrySuspendCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2TrySuspendCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2TrySuspendCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2TrySuspendCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2TrySuspendCompletedHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2TrySuspendCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebMessageReceivedEventArgs,
+ ICoreWebView2WebMessageReceivedEventArgs_Vtbl,
+ 0x0f99a40c_e962_4207_9e92_e3d542eff849
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebMessageReceivedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebMessageReceivedEventArgs {
+ pub unsafe fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Source)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn WebMessageAsJson(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).WebMessageAsJson)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn TryGetWebMessageAsString(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).TryGetWebMessageAsString)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebMessageReceivedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Source: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub WebMessageAsJson: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub TryGetWebMessageAsString: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebMessageReceivedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn WebMessageAsJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn TryGetWebMessageAsString(&self, value: *mut windows_core::PWSTR)
+ -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebMessageReceivedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Source<
+ Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebMessageReceivedEventArgs_Impl::Source(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn WebMessageAsJson<
+ Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebMessageReceivedEventArgs_Impl::WebMessageAsJson(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn TryGetWebMessageAsString<
+ Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebMessageReceivedEventArgs_Impl::TryGetWebMessageAsString(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Source: Source::<Identity, OFFSET>,
+ WebMessageAsJson: WebMessageAsJson::<Identity, OFFSET>,
+ TryGetWebMessageAsString: TryGetWebMessageAsString::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebMessageReceivedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebMessageReceivedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebMessageReceivedEventArgs2,
+ ICoreWebView2WebMessageReceivedEventArgs2_Vtbl,
+ 0x06fc7ab7_c90c_4297_9389_33ca01cf6d5e
+);
+impl core::ops::Deref for ICoreWebView2WebMessageReceivedEventArgs2 {
+ type Target = ICoreWebView2WebMessageReceivedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebMessageReceivedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2WebMessageReceivedEventArgs
+);
+impl ICoreWebView2WebMessageReceivedEventArgs2 {
+ pub unsafe fn AdditionalObjects(
+ &self,
+ ) -> windows_core::Result<ICoreWebView2ObjectCollectionView> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).AdditionalObjects)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebMessageReceivedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2WebMessageReceivedEventArgs_Vtbl,
+ pub AdditionalObjects: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebMessageReceivedEventArgs2_Impl:
+ ICoreWebView2WebMessageReceivedEventArgs_Impl
+{
+ fn AdditionalObjects(&self) -> windows_core::Result<ICoreWebView2ObjectCollectionView>;
+}
+impl ICoreWebView2WebMessageReceivedEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebMessageReceivedEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn AdditionalObjects<
+ Identity: ICoreWebView2WebMessageReceivedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebMessageReceivedEventArgs2_Impl::AdditionalObjects(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2WebMessageReceivedEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ AdditionalObjects: AdditionalObjects::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebMessageReceivedEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2WebMessageReceivedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebMessageReceivedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebMessageReceivedEventHandler,
+ ICoreWebView2WebMessageReceivedEventHandler_Vtbl,
+ 0x57213f19_00e6_49fa_8e07_898ea01ecbd2
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebMessageReceivedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebMessageReceivedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2WebMessageReceivedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebMessageReceivedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebMessageReceivedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2WebMessageReceivedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebMessageReceivedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebMessageReceivedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebMessageReceivedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebMessageReceivedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebMessageReceivedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceRequest,
+ ICoreWebView2WebResourceRequest_Vtbl,
+ 0x97055cd4_512c_4264_8b5f_e3f446cea6a5
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2WebResourceRequest, windows_core::IUnknown);
+impl ICoreWebView2WebResourceRequest {
+ pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Uri)(
+ windows_core::Interface::as_raw(self),
+ uri as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetUri<P0>(&self, uri: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetUri)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Method(&self, method: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Method)(
+ windows_core::Interface::as_raw(self),
+ method as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetMethod<P0>(&self, method: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetMethod)(
+ windows_core::Interface::as_raw(self),
+ method.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Content(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Content)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetContent<P0>(&self, content: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows::Win32::System::Com::IStream>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetContent)(
+ windows_core::Interface::as_raw(self),
+ content.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Headers)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceRequest_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Uri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub Method: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetMethod: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+ pub Content: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetContent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Headers: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceRequest_Impl: windows_core::IUnknownImpl {
+ 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: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
+ ) -> windows_core::Result<()>;
+ fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders>;
+}
+impl ICoreWebView2WebResourceRequest_Vtbl {
+ pub const fn new<Identity: ICoreWebView2WebResourceRequest_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn Uri<
+ Identity: ICoreWebView2WebResourceRequest_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequest_Impl::Uri(this, core::mem::transmute_copy(&uri))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetUri<
+ Identity: ICoreWebView2WebResourceRequest_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequest_Impl::SetUri(this, core::mem::transmute(&uri))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Method<
+ Identity: ICoreWebView2WebResourceRequest_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ method: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequest_Impl::Method(
+ this,
+ core::mem::transmute_copy(&method),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetMethod<
+ Identity: ICoreWebView2WebResourceRequest_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ method: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequest_Impl::SetMethod(this, core::mem::transmute(&method))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Content<
+ Identity: ICoreWebView2WebResourceRequest_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ content: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceRequest_Impl::Content(this) {
+ Ok(ok__) => {
+ content.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetContent<
+ Identity: ICoreWebView2WebResourceRequest_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ content: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequest_Impl::SetContent(
+ this,
+ core::mem::transmute_copy(&content),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Headers<
+ Identity: ICoreWebView2WebResourceRequest_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ headers: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceRequest_Impl::Headers(this) {
+ Ok(ok__) => {
+ headers.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Uri: Uri::<Identity, OFFSET>,
+ SetUri: SetUri::<Identity, OFFSET>,
+ Method: Method::<Identity, OFFSET>,
+ SetMethod: SetMethod::<Identity, OFFSET>,
+ Content: Content::<Identity, OFFSET>,
+ SetContent: SetContent::<Identity, OFFSET>,
+ Headers: Headers::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebResourceRequest as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceRequest {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceRequestedEventArgs,
+ ICoreWebView2WebResourceRequestedEventArgs_Vtbl,
+ 0x453e667f_12c7_49d4_be6d_ddbe7956f57a
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebResourceRequestedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebResourceRequestedEventArgs {
+ pub unsafe fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Request)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponse> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Response)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetResponse<P0>(&self, response: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2WebResourceResponse>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetResponse)(
+ windows_core::Interface::as_raw(self),
+ response.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).GetDeferral)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn ResourceContext(
+ &self,
+ context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ResourceContext)(
+ windows_core::Interface::as_raw(self),
+ context as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceRequestedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Request: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Response: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetResponse: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub GetDeferral: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub ResourceContext: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceRequestedEventArgs_Impl: windows_core::IUnknownImpl {
+ fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest>;
+ fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponse>;
+ fn SetResponse(
+ &self,
+ response: windows_core::Ref<'_, ICoreWebView2WebResourceResponse>,
+ ) -> windows_core::Result<()>;
+ fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
+ fn ResourceContext(
+ &self,
+ context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebResourceRequestedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Request<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ request: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceRequestedEventArgs_Impl::Request(this) {
+ Ok(ok__) => {
+ request.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Response<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ response: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceRequestedEventArgs_Impl::Response(this) {
+ Ok(ok__) => {
+ response.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetResponse<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ response: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequestedEventArgs_Impl::SetResponse(
+ this,
+ core::mem::transmute_copy(&response),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetDeferral<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ deferral: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceRequestedEventArgs_Impl::GetDeferral(this) {
+ Ok(ok__) => {
+ deferral.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn ResourceContext<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequestedEventArgs_Impl::ResourceContext(
+ this,
+ core::mem::transmute_copy(&context),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Request: Request::<Identity, OFFSET>,
+ Response: Response::<Identity, OFFSET>,
+ SetResponse: SetResponse::<Identity, OFFSET>,
+ GetDeferral: GetDeferral::<Identity, OFFSET>,
+ ResourceContext: ResourceContext::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebResourceRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceRequestedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceRequestedEventArgs2,
+ ICoreWebView2WebResourceRequestedEventArgs2_Vtbl,
+ 0x9c562c24_b219_4d7f_92f6_b187fbbadd56
+);
+impl core::ops::Deref for ICoreWebView2WebResourceRequestedEventArgs2 {
+ type Target = ICoreWebView2WebResourceRequestedEventArgs;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebResourceRequestedEventArgs2,
+ windows_core::IUnknown,
+ ICoreWebView2WebResourceRequestedEventArgs
+);
+impl ICoreWebView2WebResourceRequestedEventArgs2 {
+ pub unsafe fn RequestedSourceKind(
+ &self,
+ value: *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).RequestedSourceKind)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceRequestedEventArgs2_Vtbl {
+ pub base__: ICoreWebView2WebResourceRequestedEventArgs_Vtbl,
+ pub RequestedSourceKind: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceRequestedEventArgs2_Impl:
+ ICoreWebView2WebResourceRequestedEventArgs_Impl
+{
+ fn RequestedSourceKind(
+ &self,
+ value: *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebResourceRequestedEventArgs2_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs2_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn RequestedSourceKind<
+ Identity: ICoreWebView2WebResourceRequestedEventArgs2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequestedEventArgs2_Impl::RequestedSourceKind(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2WebResourceRequestedEventArgs_Vtbl::new::<Identity, OFFSET>(),
+ RequestedSourceKind: RequestedSourceKind::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebResourceRequestedEventArgs2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2WebResourceRequestedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceRequestedEventArgs2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceRequestedEventHandler,
+ ICoreWebView2WebResourceRequestedEventHandler_Vtbl,
+ 0xab00b74c_15f1_4646_80e8_e76341d25d71
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebResourceRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebResourceRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2WebResourceRequestedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceRequestedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2WebResourceRequestedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebResourceRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebResourceRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebResourceRequestedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceResponse,
+ ICoreWebView2WebResourceResponse_Vtbl,
+ 0xaafcc94f_fa27_48fd_97df_830ef75aaec9
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2WebResourceResponse, windows_core::IUnknown);
+impl ICoreWebView2WebResourceResponse {
+ pub unsafe fn Content(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Content)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn SetContent<P0>(&self, content: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows::Win32::System::Com::IStream>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetContent)(
+ windows_core::Interface::as_raw(self),
+ content.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpResponseHeaders> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Headers)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn StatusCode(&self, statuscode: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).StatusCode)(
+ windows_core::Interface::as_raw(self),
+ statuscode as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetStatusCode(&self, statuscode: i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetStatusCode)(
+ windows_core::Interface::as_raw(self),
+ statuscode,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ReasonPhrase(
+ &self,
+ reasonphrase: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ReasonPhrase)(
+ windows_core::Interface::as_raw(self),
+ reasonphrase as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetReasonPhrase<P0>(&self, reasonphrase: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetReasonPhrase)(
+ windows_core::Interface::as_raw(self),
+ reasonphrase.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceResponse_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Content: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub SetContent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Headers: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub StatusCode:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub SetStatusCode:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
+ pub ReasonPhrase: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub SetReasonPhrase: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceResponse_Impl: windows_core::IUnknownImpl {
+ fn Content(&self) -> windows_core::Result<windows::Win32::System::Com::IStream>;
+ fn SetContent(
+ &self,
+ content: windows_core::Ref<'_, 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 ICoreWebView2WebResourceResponse_Vtbl {
+ pub const fn new<Identity: ICoreWebView2WebResourceResponse_Impl, const OFFSET: isize>() -> Self
+ {
+ unsafe extern "system" fn Content<
+ Identity: ICoreWebView2WebResourceResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ content: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceResponse_Impl::Content(this) {
+ Ok(ok__) => {
+ content.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn SetContent<
+ Identity: ICoreWebView2WebResourceResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ content: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponse_Impl::SetContent(
+ this,
+ core::mem::transmute_copy(&content),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn Headers<
+ Identity: ICoreWebView2WebResourceResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ headers: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceResponse_Impl::Headers(this) {
+ Ok(ok__) => {
+ headers.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn StatusCode<
+ Identity: ICoreWebView2WebResourceResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ statuscode: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponse_Impl::StatusCode(
+ this,
+ core::mem::transmute_copy(&statuscode),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetStatusCode<
+ Identity: ICoreWebView2WebResourceResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ statuscode: i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponse_Impl::SetStatusCode(
+ this,
+ core::mem::transmute_copy(&statuscode),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ReasonPhrase<
+ Identity: ICoreWebView2WebResourceResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ reasonphrase: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponse_Impl::ReasonPhrase(
+ this,
+ core::mem::transmute_copy(&reasonphrase),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetReasonPhrase<
+ Identity: ICoreWebView2WebResourceResponse_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ reasonphrase: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponse_Impl::SetReasonPhrase(
+ this,
+ core::mem::transmute(&reasonphrase),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Content: Content::<Identity, OFFSET>,
+ SetContent: SetContent::<Identity, OFFSET>,
+ Headers: Headers::<Identity, OFFSET>,
+ StatusCode: StatusCode::<Identity, OFFSET>,
+ SetStatusCode: SetStatusCode::<Identity, OFFSET>,
+ ReasonPhrase: ReasonPhrase::<Identity, OFFSET>,
+ SetReasonPhrase: SetReasonPhrase::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebResourceResponse as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceResponse {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceResponseReceivedEventArgs,
+ ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl,
+ 0xd1db483d_6796_4b8b_80fc_13712bb716f4
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebResourceResponseReceivedEventArgs,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebResourceResponseReceivedEventArgs {
+ pub unsafe fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Request)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponseView> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Response)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Request: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Response: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceResponseReceivedEventArgs_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest>;
+ fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponseView>;
+}
+impl ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Request<
+ Identity: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceResponseReceivedEventArgs_Impl::Request(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Response<
+ Identity: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceResponseReceivedEventArgs_Impl::Response(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Request: Request::<Identity, OFFSET>,
+ Response: Response::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebResourceResponseReceivedEventArgs as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseReceivedEventArgs {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceResponseReceivedEventHandler,
+ ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl,
+ 0x7de9898a_24f5_40c3_a2de_d4f458e69828
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebResourceResponseReceivedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebResourceResponseReceivedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<ICoreWebView2WebResourceResponseReceivedEventArgs>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceResponseReceivedEventHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, ICoreWebView2WebResourceResponseReceivedEventArgs>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebResourceResponseReceivedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponseReceivedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2WebResourceResponseReceivedEventHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseReceivedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceResponseView,
+ ICoreWebView2WebResourceResponseView_Vtbl,
+ 0x79701053_7759_4162_8f7d_f1b3f084928d
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebResourceResponseView,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebResourceResponseView {
+ pub unsafe fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpResponseHeaders> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Headers)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn StatusCode(&self, statuscode: *mut i32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).StatusCode)(
+ windows_core::Interface::as_raw(self),
+ statuscode as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ReasonPhrase(
+ &self,
+ reasonphrase: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ReasonPhrase)(
+ windows_core::Interface::as_raw(self),
+ reasonphrase as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetContent<P0>(&self, handler: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2WebResourceResponseViewGetContentCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetContent)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceResponseView_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Headers: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub StatusCode:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
+ pub ReasonPhrase: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub GetContent: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceResponseView_Impl: windows_core::IUnknownImpl {
+ 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: windows_core::Ref<
+ '_,
+ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
+ >,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebResourceResponseView_Vtbl {
+ pub const fn new<Identity: ICoreWebView2WebResourceResponseView_Impl, const OFFSET: isize>(
+ ) -> Self {
+ unsafe extern "system" fn Headers<
+ Identity: ICoreWebView2WebResourceResponseView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ headers: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2WebResourceResponseView_Impl::Headers(this) {
+ Ok(ok__) => {
+ headers.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn StatusCode<
+ Identity: ICoreWebView2WebResourceResponseView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ statuscode: *mut i32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponseView_Impl::StatusCode(
+ this,
+ core::mem::transmute_copy(&statuscode),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ReasonPhrase<
+ Identity: ICoreWebView2WebResourceResponseView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ reasonphrase: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponseView_Impl::ReasonPhrase(
+ this,
+ core::mem::transmute_copy(&reasonphrase),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn GetContent<
+ Identity: ICoreWebView2WebResourceResponseView_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponseView_Impl::GetContent(
+ this,
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Headers: Headers::<Identity, OFFSET>,
+ StatusCode: StatusCode::<Identity, OFFSET>,
+ ReasonPhrase: ReasonPhrase::<Identity, OFFSET>,
+ GetContent: GetContent::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WebResourceResponseView as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseView {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
+ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl,
+ 0x875738e1_9fa2_40e3_8b74_2e8972dd6fe7
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {
+ pub unsafe fn Invoke<P1>(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<windows::Win32::System::Com::IStream>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ errorcode,
+ result.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::HRESULT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl:
+ windows_core::IUnknownImpl
+{
+ fn Invoke(
+ &self,
+ errorcode: windows_core::HRESULT,
+ result: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ errorcode: windows_core::HRESULT,
+ result: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&errorcode),
+ core::mem::transmute_copy(&result),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == & < ICoreWebView2WebResourceResponseViewGetContentCompletedHandler as windows_core::Interface >::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WindowCloseRequestedEventHandler,
+ ICoreWebView2WindowCloseRequestedEventHandler_Vtbl,
+ 0x5c19e9e0_092f_486b_affa_ca8231913039
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2WindowCloseRequestedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2WindowCloseRequestedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WindowCloseRequestedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WindowCloseRequestedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WindowCloseRequestedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2WindowCloseRequestedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowCloseRequestedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WindowCloseRequestedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WindowCloseRequestedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2WindowFeatures,
+ ICoreWebView2WindowFeatures_Vtbl,
+ 0x5eaf559f_b46e_4397_8860_e422f287ff1e
+);
+windows_core::imp::interface_hierarchy!(ICoreWebView2WindowFeatures, windows_core::IUnknown);
+impl ICoreWebView2WindowFeatures {
+ pub unsafe fn HasPosition(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasPosition)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn HasSize(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).HasSize)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Left(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Left)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Top(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Top)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Height(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Height)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Width(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Width)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldDisplayMenuBar(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldDisplayMenuBar)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldDisplayStatus(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldDisplayStatus)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldDisplayToolbar(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldDisplayToolbar)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShouldDisplayScrollBars(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShouldDisplayScrollBars)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2WindowFeatures_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub HasPosition: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub HasSize: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub Left: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub Top: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub Height:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub Width: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+ pub ShouldDisplayMenuBar: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ShouldDisplayStatus: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ShouldDisplayToolbar: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub ShouldDisplayScrollBars: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2WindowFeatures_Impl: windows_core::IUnknownImpl {
+ fn HasPosition(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn HasSize(&self, value: *mut windows_core::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_core::BOOL) -> windows_core::Result<()>;
+ fn ShouldDisplayStatus(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn ShouldDisplayToolbar(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn ShouldDisplayScrollBars(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2WindowFeatures_Vtbl {
+ pub const fn new<Identity: ICoreWebView2WindowFeatures_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn HasPosition<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::HasPosition(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn HasSize<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::HasSize(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Left<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::Left(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Top<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::Top(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Height<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::Height(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn Width<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::Width(this, core::mem::transmute_copy(&value))
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldDisplayMenuBar<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::ShouldDisplayMenuBar(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldDisplayStatus<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::ShouldDisplayStatus(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldDisplayToolbar<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::ShouldDisplayToolbar(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShouldDisplayScrollBars<
+ Identity: ICoreWebView2WindowFeatures_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2WindowFeatures_Impl::ShouldDisplayScrollBars(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ HasPosition: HasPosition::<Identity, OFFSET>,
+ HasSize: HasSize::<Identity, OFFSET>,
+ Left: Left::<Identity, OFFSET>,
+ Top: Top::<Identity, OFFSET>,
+ Height: Height::<Identity, OFFSET>,
+ Width: Width::<Identity, OFFSET>,
+ ShouldDisplayMenuBar: ShouldDisplayMenuBar::<Identity, OFFSET>,
+ ShouldDisplayStatus: ShouldDisplayStatus::<Identity, OFFSET>,
+ ShouldDisplayToolbar: ShouldDisplayToolbar::<Identity, OFFSET>,
+ ShouldDisplayScrollBars: ShouldDisplayScrollBars::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2WindowFeatures as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2WindowFeatures {}
+windows_core::imp::define_interface!(
+ ICoreWebView2ZoomFactorChangedEventHandler,
+ ICoreWebView2ZoomFactorChangedEventHandler_Vtbl,
+ 0xb52d71d6_c4df_4543_a90c_64a3e60f38cb
+);
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2ZoomFactorChangedEventHandler,
+ windows_core::IUnknown
+);
+impl ICoreWebView2ZoomFactorChangedEventHandler {
+ pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2Controller>,
+ P1: windows_core::Param<windows_core::IUnknown>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Invoke)(
+ windows_core::Interface::as_raw(self),
+ sender.param().abi(),
+ args.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2ZoomFactorChangedEventHandler_Vtbl {
+ pub base__: windows_core::IUnknown_Vtbl,
+ pub Invoke: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2ZoomFactorChangedEventHandler_Impl: windows_core::IUnknownImpl {
+ fn Invoke(
+ &self,
+ sender: windows_core::Ref<'_, ICoreWebView2Controller>,
+ args: windows_core::Ref<'_, windows_core::IUnknown>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2ZoomFactorChangedEventHandler_Vtbl {
+ pub const fn new<
+ Identity: ICoreWebView2ZoomFactorChangedEventHandler_Impl,
+ const OFFSET: isize,
+ >() -> Self {
+ unsafe extern "system" fn Invoke<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2ZoomFactorChangedEventHandler_Impl::Invoke(
+ this,
+ core::mem::transmute_copy(&sender),
+ core::mem::transmute_copy(&args),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
+ Invoke: Invoke::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2ZoomFactorChangedEventHandler as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2ZoomFactorChangedEventHandler {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_10,
+ ICoreWebView2_10_Vtbl,
+ 0xb1690564_6f5a_4983_8e48_31d1143fecdb
+);
+impl core::ops::Deref for ICoreWebView2_10 {
+ type Target = ICoreWebView2_9;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::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 ICoreWebView2_10 {
+ pub unsafe fn add_BasicAuthenticationRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_BasicAuthenticationRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_BasicAuthenticationRequested(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_BasicAuthenticationRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_10_Vtbl {
+ pub base__: ICoreWebView2_9_Vtbl,
+ pub add_BasicAuthenticationRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_BasicAuthenticationRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_10_Impl: ICoreWebView2_9_Impl {
+ fn add_BasicAuthenticationRequested(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2BasicAuthenticationRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_BasicAuthenticationRequested(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_10_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_10_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_BasicAuthenticationRequested<
+ Identity: ICoreWebView2_10_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_10_Impl::add_BasicAuthenticationRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_BasicAuthenticationRequested<
+ Identity: ICoreWebView2_10_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_10_Impl::remove_BasicAuthenticationRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_9_Vtbl::new::<Identity, OFFSET>(),
+ add_BasicAuthenticationRequested: add_BasicAuthenticationRequested::<Identity, OFFSET>,
+ remove_BasicAuthenticationRequested: remove_BasicAuthenticationRequested::<
+ Identity,
+ 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_10 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_11,
+ ICoreWebView2_11_Vtbl,
+ 0x0be78e56_c193_4051_b943_23b460c08bdb
+);
+impl core::ops::Deref for ICoreWebView2_11 {
+ type Target = ICoreWebView2_10;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::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 ICoreWebView2_11 {
+ pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
+ &self,
+ sessionid: P0,
+ methodname: P1,
+ parametersasjson: P2,
+ handler: P3,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ P2: windows_core::Param<windows_core::PCWSTR>,
+ P3: windows_core::Param<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).CallDevToolsProtocolMethodForSession)(
+ windows_core::Interface::as_raw(self),
+ sessionid.param().abi(),
+ methodname.param().abi(),
+ parametersasjson.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_ContextMenuRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ContextMenuRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ContextMenuRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ContextMenuRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ContextMenuRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_11_Vtbl {
+ pub base__: ICoreWebView2_10_Vtbl,
+ pub CallDevToolsProtocolMethodForSession: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ )
+ -> windows_core::HRESULT,
+ pub add_ContextMenuRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ContextMenuRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_11_Impl: ICoreWebView2_10_Impl {
+ fn CallDevToolsProtocolMethodForSession(
+ &self,
+ sessionid: &windows_core::PCWSTR,
+ methodname: &windows_core::PCWSTR,
+ parametersasjson: &windows_core::PCWSTR,
+ handler: windows_core::Ref<'_, ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn add_ContextMenuRequested(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ContextMenuRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ContextMenuRequested(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_11_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_11_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn CallDevToolsProtocolMethodForSession<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_11_Impl::CallDevToolsProtocolMethodForSession(
+ this,
+ core::mem::transmute(&sessionid),
+ core::mem::transmute(&methodname),
+ core::mem::transmute(&parametersasjson),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_ContextMenuRequested<
+ Identity: ICoreWebView2_11_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_11_Impl::add_ContextMenuRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ContextMenuRequested<
+ Identity: ICoreWebView2_11_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_11_Impl::remove_ContextMenuRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_10_Vtbl::new::<Identity, OFFSET>(),
+ CallDevToolsProtocolMethodForSession: CallDevToolsProtocolMethodForSession::<
+ Identity,
+ OFFSET,
+ >,
+ add_ContextMenuRequested: add_ContextMenuRequested::<Identity, OFFSET>,
+ remove_ContextMenuRequested: remove_ContextMenuRequested::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_11 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_12,
+ ICoreWebView2_12_Vtbl,
+ 0x35d69927_bcfa_4566_9349_6b3e0d154cac
+);
+impl core::ops::Deref for ICoreWebView2_12 {
+ type Target = ICoreWebView2_11;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::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 ICoreWebView2_12 {
+ pub unsafe fn add_StatusBarTextChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2StatusBarTextChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_StatusBarTextChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_StatusBarTextChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_StatusBarTextChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn StatusBarText(
+ &self,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).StatusBarText)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_12_Vtbl {
+ pub base__: ICoreWebView2_11_Vtbl,
+ pub add_StatusBarTextChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_StatusBarTextChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub StatusBarText: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_12_Impl: ICoreWebView2_11_Impl {
+ fn add_StatusBarTextChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2StatusBarTextChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_StatusBarTextChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn StatusBarText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_12_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_12_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_StatusBarTextChanged<
+ Identity: ICoreWebView2_12_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_12_Impl::add_StatusBarTextChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_StatusBarTextChanged<
+ Identity: ICoreWebView2_12_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_12_Impl::remove_StatusBarTextChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn StatusBarText<
+ Identity: ICoreWebView2_12_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_12_Impl::StatusBarText(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_11_Vtbl::new::<Identity, OFFSET>(),
+ add_StatusBarTextChanged: add_StatusBarTextChanged::<Identity, OFFSET>,
+ remove_StatusBarTextChanged: remove_StatusBarTextChanged::<Identity, OFFSET>,
+ StatusBarText: StatusBarText::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_12 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_13,
+ ICoreWebView2_13_Vtbl,
+ 0xf75f09a8_667e_4983_88d6_c8773f315e84
+);
+impl core::ops::Deref for ICoreWebView2_13 {
+ type Target = ICoreWebView2_12;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::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 ICoreWebView2_13 {
+ pub unsafe fn Profile(&self) -> windows_core::Result<ICoreWebView2Profile> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Profile)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_13_Vtbl {
+ pub base__: ICoreWebView2_12_Vtbl,
+ pub Profile: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_13_Impl: ICoreWebView2_12_Impl {
+ fn Profile(&self) -> windows_core::Result<ICoreWebView2Profile>;
+}
+impl ICoreWebView2_13_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_13_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Profile<Identity: ICoreWebView2_13_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2_13_Impl::Profile(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2_12_Vtbl::new::<Identity, OFFSET>(),
+ Profile: Profile::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_13 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_14,
+ ICoreWebView2_14_Vtbl,
+ 0x6daa4f10_4a90_4753_8898_77c5df534165
+);
+impl core::ops::Deref for ICoreWebView2_14 {
+ type Target = ICoreWebView2_13;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::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 ICoreWebView2_14 {
+ pub unsafe fn add_ServerCertificateErrorDetected<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ServerCertificateErrorDetectedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ServerCertificateErrorDetected)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ServerCertificateErrorDetected(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ServerCertificateErrorDetected)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ClearServerCertificateErrorActions<P0>(
+ &self,
+ handler: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ClearServerCertificateErrorActions)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_14_Vtbl {
+ pub base__: ICoreWebView2_13_Vtbl,
+ pub add_ServerCertificateErrorDetected: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ServerCertificateErrorDetected:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub ClearServerCertificateErrorActions: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_14_Impl: ICoreWebView2_13_Impl {
+ fn add_ServerCertificateErrorDetected(
+ &self,
+ eventhandler: windows_core::Ref<
+ '_,
+ ICoreWebView2ServerCertificateErrorDetectedEventHandler,
+ >,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ServerCertificateErrorDetected(&self, token: i64) -> windows_core::Result<()>;
+ fn ClearServerCertificateErrorActions(
+ &self,
+ handler: windows_core::Ref<
+ '_,
+ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
+ >,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_14_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_14_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_ServerCertificateErrorDetected<
+ Identity: ICoreWebView2_14_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_14_Impl::add_ServerCertificateErrorDetected(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ServerCertificateErrorDetected<
+ Identity: ICoreWebView2_14_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_14_Impl::remove_ServerCertificateErrorDetected(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ClearServerCertificateErrorActions<
+ Identity: ICoreWebView2_14_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_14_Impl::ClearServerCertificateErrorActions(
+ this,
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_13_Vtbl::new::<Identity, OFFSET>(),
+ add_ServerCertificateErrorDetected: add_ServerCertificateErrorDetected::<
+ Identity,
+ OFFSET,
+ >,
+ remove_ServerCertificateErrorDetected: remove_ServerCertificateErrorDetected::<
+ Identity,
+ OFFSET,
+ >,
+ ClearServerCertificateErrorActions: ClearServerCertificateErrorActions::<
+ Identity,
+ 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_14 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_15,
+ ICoreWebView2_15_Vtbl,
+ 0x517b2d1d_7dae_4a66_a4f4_10352ffb9518
+);
+impl core::ops::Deref for ICoreWebView2_15 {
+ type Target = ICoreWebView2_14;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::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 ICoreWebView2_15 {
+ pub unsafe fn add_FaviconChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FaviconChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_FaviconChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_FaviconChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_FaviconChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn FaviconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FaviconUri)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn GetFavicon<P1>(
+ &self,
+ format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
+ completedhandler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P1: windows_core::Param<ICoreWebView2GetFaviconCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).GetFavicon)(
+ windows_core::Interface::as_raw(self),
+ format,
+ completedhandler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_15_Vtbl {
+ pub base__: ICoreWebView2_14_Vtbl,
+ pub add_FaviconChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_FaviconChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub FaviconUri: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT,
+ pub GetFavicon: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_15_Impl: ICoreWebView2_14_Impl {
+ fn add_FaviconChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FaviconChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_FaviconChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn FaviconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
+ fn GetFavicon(
+ &self,
+ format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
+ completedhandler: windows_core::Ref<'_, ICoreWebView2GetFaviconCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_15_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_15_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_FaviconChanged<
+ Identity: ICoreWebView2_15_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_15_Impl::add_FaviconChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_FaviconChanged<
+ Identity: ICoreWebView2_15_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_15_Impl::remove_FaviconChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn FaviconUri<
+ Identity: ICoreWebView2_15_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::PWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_15_Impl::FaviconUri(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn GetFavicon<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_15_Impl::GetFavicon(
+ this,
+ core::mem::transmute_copy(&format),
+ core::mem::transmute_copy(&completedhandler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_14_Vtbl::new::<Identity, OFFSET>(),
+ add_FaviconChanged: add_FaviconChanged::<Identity, OFFSET>,
+ remove_FaviconChanged: remove_FaviconChanged::<Identity, OFFSET>,
+ FaviconUri: FaviconUri::<Identity, OFFSET>,
+ GetFavicon: GetFavicon::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_15 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_16,
+ ICoreWebView2_16_Vtbl,
+ 0x0eb34dc9_9f91_41e1_8639_95cd5943906b
+);
+impl core::ops::Deref for ICoreWebView2_16 {
+ type Target = ICoreWebView2_15;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::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 ICoreWebView2_16 {
+ pub unsafe fn Print<P0, P1>(&self, printsettings: P0, handler: P1) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2PrintSettings>,
+ P1: windows_core::Param<ICoreWebView2PrintCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).Print)(
+ windows_core::Interface::as_raw(self),
+ printsettings.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShowPrintUI(
+ &self,
+ printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShowPrintUI)(
+ windows_core::Interface::as_raw(self),
+ printdialogkind,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn PrintToPdfStream<P0, P1>(
+ &self,
+ printsettings: P0,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2PrintSettings>,
+ P1: windows_core::Param<ICoreWebView2PrintToPdfStreamCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PrintToPdfStream)(
+ windows_core::Interface::as_raw(self),
+ printsettings.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_16_Vtbl {
+ pub base__: ICoreWebView2_15_Vtbl,
+ pub Print: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub ShowPrintUI: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_PRINT_DIALOG_KIND,
+ ) -> windows_core::HRESULT,
+ pub PrintToPdfStream: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_16_Impl: ICoreWebView2_15_Impl {
+ fn Print(
+ &self,
+ printsettings: windows_core::Ref<'_, ICoreWebView2PrintSettings>,
+ handler: windows_core::Ref<'_, ICoreWebView2PrintCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn ShowPrintUI(
+ &self,
+ printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
+ ) -> windows_core::Result<()>;
+ fn PrintToPdfStream(
+ &self,
+ printsettings: windows_core::Ref<'_, ICoreWebView2PrintSettings>,
+ handler: windows_core::Ref<'_, ICoreWebView2PrintToPdfStreamCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_16_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_16_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Print<Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_16_Impl::Print(
+ this,
+ core::mem::transmute_copy(&printsettings),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShowPrintUI<
+ Identity: ICoreWebView2_16_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_16_Impl::ShowPrintUI(
+ this,
+ core::mem::transmute_copy(&printdialogkind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn PrintToPdfStream<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_16_Impl::PrintToPdfStream(
+ this,
+ core::mem::transmute_copy(&printsettings),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_15_Vtbl::new::<Identity, OFFSET>(),
+ Print: Print::<Identity, OFFSET>,
+ ShowPrintUI: ShowPrintUI::<Identity, OFFSET>,
+ PrintToPdfStream: PrintToPdfStream::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_16 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_17,
+ ICoreWebView2_17_Vtbl,
+ 0x702e75d4_fd44_434d_9d70_1a68a6b1192a
+);
+impl core::ops::Deref for ICoreWebView2_17 {
+ type Target = ICoreWebView2_16;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_17,
+ 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,
+ ICoreWebView2_16
+);
+impl ICoreWebView2_17 {
+ pub unsafe fn PostSharedBufferToScript<P0, P2>(
+ &self,
+ sharedbuffer: P0,
+ access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ additionaldataasjson: P2,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2SharedBuffer>,
+ P2: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PostSharedBufferToScript)(
+ windows_core::Interface::as_raw(self),
+ sharedbuffer.param().abi(),
+ access,
+ additionaldataasjson.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_17_Vtbl {
+ pub base__: ICoreWebView2_16_Vtbl,
+ pub PostSharedBufferToScript: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ windows_core::PCWSTR,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_17_Impl: ICoreWebView2_16_Impl {
+ fn PostSharedBufferToScript(
+ &self,
+ sharedbuffer: windows_core::Ref<'_, ICoreWebView2SharedBuffer>,
+ access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ additionaldataasjson: &windows_core::PCWSTR,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_17_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_17_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PostSharedBufferToScript<
+ Identity: ICoreWebView2_17_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ sharedbuffer: *mut core::ffi::c_void,
+ access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
+ additionaldataasjson: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_17_Impl::PostSharedBufferToScript(
+ this,
+ core::mem::transmute_copy(&sharedbuffer),
+ core::mem::transmute_copy(&access),
+ core::mem::transmute(&additionaldataasjson),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_16_Vtbl::new::<Identity, OFFSET>(),
+ PostSharedBufferToScript: PostSharedBufferToScript::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_17 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_17 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_18,
+ ICoreWebView2_18_Vtbl,
+ 0x7a626017_28be_49b2_b865_3ba2b3522d90
+);
+impl core::ops::Deref for ICoreWebView2_18 {
+ type Target = ICoreWebView2_17;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_18,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17
+);
+impl ICoreWebView2_18 {
+ pub unsafe fn add_LaunchingExternalUriScheme<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2LaunchingExternalUriSchemeEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_LaunchingExternalUriScheme)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_LaunchingExternalUriScheme(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_LaunchingExternalUriScheme)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_18_Vtbl {
+ pub base__: ICoreWebView2_17_Vtbl,
+ pub add_LaunchingExternalUriScheme: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_LaunchingExternalUriScheme:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_18_Impl: ICoreWebView2_17_Impl {
+ fn add_LaunchingExternalUriScheme(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2LaunchingExternalUriSchemeEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_LaunchingExternalUriScheme(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_18_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_18_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_LaunchingExternalUriScheme<
+ Identity: ICoreWebView2_18_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_18_Impl::add_LaunchingExternalUriScheme(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_LaunchingExternalUriScheme<
+ Identity: ICoreWebView2_18_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_18_Impl::remove_LaunchingExternalUriScheme(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_17_Vtbl::new::<Identity, OFFSET>(),
+ add_LaunchingExternalUriScheme: add_LaunchingExternalUriScheme::<Identity, OFFSET>,
+ remove_LaunchingExternalUriScheme: remove_LaunchingExternalUriScheme::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_18 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_18 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_19,
+ ICoreWebView2_19_Vtbl,
+ 0x6921f954_79b0_437f_a997_c85811897c68
+);
+impl core::ops::Deref for ICoreWebView2_19 {
+ type Target = ICoreWebView2_18;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_19,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18
+);
+impl ICoreWebView2_19 {
+ pub unsafe fn MemoryUsageTargetLevel(
+ &self,
+ value: *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).MemoryUsageTargetLevel)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetMemoryUsageTargetLevel(
+ &self,
+ value: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetMemoryUsageTargetLevel)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_19_Vtbl {
+ pub base__: ICoreWebView2_18_Vtbl,
+ pub MemoryUsageTargetLevel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::HRESULT,
+ pub SetMemoryUsageTargetLevel: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_19_Impl: ICoreWebView2_18_Impl {
+ fn MemoryUsageTargetLevel(
+ &self,
+ value: *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::Result<()>;
+ fn SetMemoryUsageTargetLevel(
+ &self,
+ value: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_19_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_19_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn MemoryUsageTargetLevel<
+ Identity: ICoreWebView2_19_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_19_Impl::MemoryUsageTargetLevel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetMemoryUsageTargetLevel<
+ Identity: ICoreWebView2_19_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_19_Impl::SetMemoryUsageTargetLevel(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_18_Vtbl::new::<Identity, OFFSET>(),
+ MemoryUsageTargetLevel: MemoryUsageTargetLevel::<Identity, OFFSET>,
+ SetMemoryUsageTargetLevel: SetMemoryUsageTargetLevel::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_19 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_19 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_2,
+ ICoreWebView2_2_Vtbl,
+ 0x9e8f0cf8_e670_4b5e_b2bc_73e061e3184c
+);
+impl core::ops::Deref for ICoreWebView2_2 {
+ type Target = ICoreWebView2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(ICoreWebView2_2, windows_core::IUnknown, ICoreWebView2);
+impl ICoreWebView2_2 {
+ pub unsafe fn add_WebResourceResponseReceived<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2WebResourceResponseReceivedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_WebResourceResponseReceived)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_WebResourceResponseReceived(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_WebResourceResponseReceived)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn NavigateWithWebResourceRequest<P0>(&self, request: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2WebResourceRequest>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).NavigateWithWebResourceRequest)(
+ windows_core::Interface::as_raw(self),
+ request.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_DOMContentLoaded<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2DOMContentLoadedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_DOMContentLoaded)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_DOMContentLoaded)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).CookieManager)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+ pub unsafe fn Environment(&self) -> windows_core::Result<ICoreWebView2Environment> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Environment)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_2_Vtbl {
+ pub base__: ICoreWebView2_Vtbl,
+ pub add_WebResourceResponseReceived: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_WebResourceResponseReceived:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub NavigateWithWebResourceRequest: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub add_DOMContentLoaded: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_DOMContentLoaded:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub CookieManager: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Environment: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_2_Impl: ICoreWebView2_Impl {
+ fn add_WebResourceResponseReceived(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2WebResourceResponseReceivedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_WebResourceResponseReceived(&self, token: i64) -> windows_core::Result<()>;
+ fn NavigateWithWebResourceRequest(
+ &self,
+ request: windows_core::Ref<'_, ICoreWebView2WebResourceRequest>,
+ ) -> windows_core::Result<()>;
+ fn add_DOMContentLoaded(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2DOMContentLoadedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()>;
+ fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager>;
+ fn Environment(&self) -> windows_core::Result<ICoreWebView2Environment>;
+}
+impl ICoreWebView2_2_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_2_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_WebResourceResponseReceived<
+ Identity: ICoreWebView2_2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_2_Impl::add_WebResourceResponseReceived(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_WebResourceResponseReceived<
+ Identity: ICoreWebView2_2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_2_Impl::remove_WebResourceResponseReceived(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn NavigateWithWebResourceRequest<
+ Identity: ICoreWebView2_2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ request: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_2_Impl::NavigateWithWebResourceRequest(
+ this,
+ core::mem::transmute_copy(&request),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_DOMContentLoaded<
+ Identity: ICoreWebView2_2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_2_Impl::add_DOMContentLoaded(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_DOMContentLoaded<
+ Identity: ICoreWebView2_2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_2_Impl::remove_DOMContentLoaded(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn CookieManager<
+ Identity: ICoreWebView2_2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ cookiemanager: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2_2_Impl::CookieManager(this) {
+ Ok(ok__) => {
+ cookiemanager.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ unsafe extern "system" fn Environment<
+ Identity: ICoreWebView2_2_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ environment: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2_2_Impl::Environment(this) {
+ Ok(ok__) => {
+ environment.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2_Vtbl::new::<Identity, OFFSET>(),
+ add_WebResourceResponseReceived: add_WebResourceResponseReceived::<Identity, OFFSET>,
+ remove_WebResourceResponseReceived: remove_WebResourceResponseReceived::<
+ Identity,
+ OFFSET,
+ >,
+ NavigateWithWebResourceRequest: NavigateWithWebResourceRequest::<Identity, OFFSET>,
+ add_DOMContentLoaded: add_DOMContentLoaded::<Identity, OFFSET>,
+ remove_DOMContentLoaded: remove_DOMContentLoaded::<Identity, OFFSET>,
+ CookieManager: CookieManager::<Identity, OFFSET>,
+ Environment: Environment::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_2 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_20,
+ ICoreWebView2_20_Vtbl,
+ 0xb4bc1926_7305_11ee_b962_0242ac120002
+);
+impl core::ops::Deref for ICoreWebView2_20 {
+ type Target = ICoreWebView2_19;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_20,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19
+);
+impl ICoreWebView2_20 {
+ pub unsafe fn FrameId(&self, value: *mut u32) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).FrameId)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_20_Vtbl {
+ pub base__: ICoreWebView2_19_Vtbl,
+ pub FrameId:
+ unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_20_Impl: ICoreWebView2_19_Impl {
+ fn FrameId(&self, value: *mut u32) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_20_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_20_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn FrameId<Identity: ICoreWebView2_20_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ value: *mut u32,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_20_Impl::FrameId(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_19_Vtbl::new::<Identity, OFFSET>(),
+ FrameId: FrameId::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_20 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_20 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_21,
+ ICoreWebView2_21_Vtbl,
+ 0xc4980dea_587b_43b9_8143_3ef3bf552d95
+);
+impl core::ops::Deref for ICoreWebView2_21 {
+ type Target = ICoreWebView2_20;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_21,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20
+);
+impl ICoreWebView2_21 {
+ pub unsafe fn ExecuteScriptWithResult<P0, P1>(
+ &self,
+ javascript: P0,
+ handler: P1,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2ExecuteScriptWithResultCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ExecuteScriptWithResult)(
+ windows_core::Interface::as_raw(self),
+ javascript.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_21_Vtbl {
+ pub base__: ICoreWebView2_20_Vtbl,
+ pub ExecuteScriptWithResult: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_21_Impl: ICoreWebView2_20_Impl {
+ fn ExecuteScriptWithResult(
+ &self,
+ javascript: &windows_core::PCWSTR,
+ handler: windows_core::Ref<'_, ICoreWebView2ExecuteScriptWithResultCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_21_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_21_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn ExecuteScriptWithResult<
+ Identity: ICoreWebView2_21_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ javascript: windows_core::PCWSTR,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_21_Impl::ExecuteScriptWithResult(
+ this,
+ core::mem::transmute(&javascript),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_20_Vtbl::new::<Identity, OFFSET>(),
+ ExecuteScriptWithResult: ExecuteScriptWithResult::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_21 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_21 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_22,
+ ICoreWebView2_22_Vtbl,
+ 0xdb75dfc7_a857_4632_a398_6969dde26c0a
+);
+impl core::ops::Deref for ICoreWebView2_22 {
+ type Target = ICoreWebView2_21;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_22,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20,
+ ICoreWebView2_21
+);
+impl ICoreWebView2_22 {
+ pub unsafe fn AddWebResourceRequestedFilterWithRequestSourceKinds<P0>(
+ &self,
+ uri: P0,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self)
+ .AddWebResourceRequestedFilterWithRequestSourceKinds)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ resourcecontext,
+ requestsourcekinds,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn RemoveWebResourceRequestedFilterWithRequestSourceKinds<P0>(
+ &self,
+ uri: P0,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self)
+ .RemoveWebResourceRequestedFilterWithRequestSourceKinds)(
+ windows_core::Interface::as_raw(self),
+ uri.param().abi(),
+ resourcecontext,
+ requestsourcekinds,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_22_Vtbl {
+ pub base__: ICoreWebView2_21_Vtbl,
+ pub AddWebResourceRequestedFilterWithRequestSourceKinds:
+ unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::HRESULT,
+ pub RemoveWebResourceRequestedFilterWithRequestSourceKinds:
+ unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_22_Impl: ICoreWebView2_21_Impl {
+ fn AddWebResourceRequestedFilterWithRequestSourceKinds(
+ &self,
+ uri: &windows_core::PCWSTR,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::Result<()>;
+ fn RemoveWebResourceRequestedFilterWithRequestSourceKinds(
+ &self,
+ uri: &windows_core::PCWSTR,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_22_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_22_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn AddWebResourceRequestedFilterWithRequestSourceKinds<
+ Identity: ICoreWebView2_22_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: windows_core::PCWSTR,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_22_Impl::AddWebResourceRequestedFilterWithRequestSourceKinds(
+ this,
+ core::mem::transmute(&uri),
+ core::mem::transmute_copy(&resourcecontext),
+ core::mem::transmute_copy(&requestsourcekinds),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn RemoveWebResourceRequestedFilterWithRequestSourceKinds<
+ Identity: ICoreWebView2_22_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ uri: windows_core::PCWSTR,
+ resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
+ requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_22_Impl::RemoveWebResourceRequestedFilterWithRequestSourceKinds(
+ this,
+ core::mem::transmute(&uri),
+ core::mem::transmute_copy(&resourcecontext),
+ core::mem::transmute_copy(&requestsourcekinds),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_21_Vtbl::new::<Identity, OFFSET>(),
+ AddWebResourceRequestedFilterWithRequestSourceKinds:
+ AddWebResourceRequestedFilterWithRequestSourceKinds::<Identity, OFFSET>,
+ RemoveWebResourceRequestedFilterWithRequestSourceKinds:
+ RemoveWebResourceRequestedFilterWithRequestSourceKinds::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_22 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_22 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_23,
+ ICoreWebView2_23_Vtbl,
+ 0x508f0db5_90c4_5872_90a7_267a91377502
+);
+impl core::ops::Deref for ICoreWebView2_23 {
+ type Target = ICoreWebView2_22;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_23,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20,
+ ICoreWebView2_21,
+ ICoreWebView2_22
+);
+impl ICoreWebView2_23 {
+ pub unsafe fn PostWebMessageAsJsonWithAdditionalObjects<P0, P1>(
+ &self,
+ webmessageasjson: P0,
+ additionalobjects: P1,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2ObjectCollectionView>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PostWebMessageAsJsonWithAdditionalObjects)(
+ windows_core::Interface::as_raw(self),
+ webmessageasjson.param().abi(),
+ additionalobjects.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_23_Vtbl {
+ pub base__: ICoreWebView2_22_Vtbl,
+ pub PostWebMessageAsJsonWithAdditionalObjects:
+ unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_23_Impl: ICoreWebView2_22_Impl {
+ fn PostWebMessageAsJsonWithAdditionalObjects(
+ &self,
+ webmessageasjson: &windows_core::PCWSTR,
+ additionalobjects: windows_core::Ref<'_, ICoreWebView2ObjectCollectionView>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_23_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_23_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PostWebMessageAsJsonWithAdditionalObjects<
+ Identity: ICoreWebView2_23_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ webmessageasjson: windows_core::PCWSTR,
+ additionalobjects: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_23_Impl::PostWebMessageAsJsonWithAdditionalObjects(
+ this,
+ core::mem::transmute(&webmessageasjson),
+ core::mem::transmute_copy(&additionalobjects),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_22_Vtbl::new::<Identity, OFFSET>(),
+ PostWebMessageAsJsonWithAdditionalObjects: PostWebMessageAsJsonWithAdditionalObjects::<
+ Identity,
+ OFFSET,
+ >,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_23 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_23 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_24,
+ ICoreWebView2_24_Vtbl,
+ 0x39a7ad55_4287_5cc1_88a1_c6f458593824
+);
+impl core::ops::Deref for ICoreWebView2_24 {
+ type Target = ICoreWebView2_23;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_24,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20,
+ ICoreWebView2_21,
+ ICoreWebView2_22,
+ ICoreWebView2_23
+);
+impl ICoreWebView2_24 {
+ pub unsafe fn add_NotificationReceived<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2NotificationReceivedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_NotificationReceived)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_NotificationReceived(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_NotificationReceived)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_24_Vtbl {
+ pub base__: ICoreWebView2_23_Vtbl,
+ pub add_NotificationReceived: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_NotificationReceived:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_24_Impl: ICoreWebView2_23_Impl {
+ fn add_NotificationReceived(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2NotificationReceivedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_NotificationReceived(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_24_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_24_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_NotificationReceived<
+ Identity: ICoreWebView2_24_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_24_Impl::add_NotificationReceived(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_NotificationReceived<
+ Identity: ICoreWebView2_24_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_24_Impl::remove_NotificationReceived(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_23_Vtbl::new::<Identity, OFFSET>(),
+ add_NotificationReceived: add_NotificationReceived::<Identity, OFFSET>,
+ remove_NotificationReceived: remove_NotificationReceived::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_24 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_24 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_25,
+ ICoreWebView2_25_Vtbl,
+ 0xb5a86092_df50_5b4f_a17b_6c8f8b40b771
+);
+impl core::ops::Deref for ICoreWebView2_25 {
+ type Target = ICoreWebView2_24;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_25,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20,
+ ICoreWebView2_21,
+ ICoreWebView2_22,
+ ICoreWebView2_23,
+ ICoreWebView2_24
+);
+impl ICoreWebView2_25 {
+ pub unsafe fn add_SaveAsUIShowing<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2SaveAsUIShowingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_SaveAsUIShowing)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_SaveAsUIShowing(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_SaveAsUIShowing)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ShowSaveAsUI<P0>(&self, handler: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ShowSaveAsUICompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ShowSaveAsUI)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_25_Vtbl {
+ pub base__: ICoreWebView2_24_Vtbl,
+ pub add_SaveAsUIShowing: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_SaveAsUIShowing:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub ShowSaveAsUI: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_25_Impl: ICoreWebView2_24_Impl {
+ fn add_SaveAsUIShowing(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2SaveAsUIShowingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_SaveAsUIShowing(&self, token: i64) -> windows_core::Result<()>;
+ fn ShowSaveAsUI(
+ &self,
+ handler: windows_core::Ref<'_, ICoreWebView2ShowSaveAsUICompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_25_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_25_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_SaveAsUIShowing<
+ Identity: ICoreWebView2_25_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_25_Impl::add_SaveAsUIShowing(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_SaveAsUIShowing<
+ Identity: ICoreWebView2_25_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_25_Impl::remove_SaveAsUIShowing(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ShowSaveAsUI<
+ Identity: ICoreWebView2_25_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_25_Impl::ShowSaveAsUI(this, core::mem::transmute_copy(&handler))
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_24_Vtbl::new::<Identity, OFFSET>(),
+ add_SaveAsUIShowing: add_SaveAsUIShowing::<Identity, OFFSET>,
+ remove_SaveAsUIShowing: remove_SaveAsUIShowing::<Identity, OFFSET>,
+ ShowSaveAsUI: ShowSaveAsUI::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_25 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_25 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_26,
+ ICoreWebView2_26_Vtbl,
+ 0x806268b8_f897_5685_88e5_c45fca0b1a48
+);
+impl core::ops::Deref for ICoreWebView2_26 {
+ type Target = ICoreWebView2_25;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_26,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20,
+ ICoreWebView2_21,
+ ICoreWebView2_22,
+ ICoreWebView2_23,
+ ICoreWebView2_24,
+ ICoreWebView2_25
+);
+impl ICoreWebView2_26 {
+ pub unsafe fn add_SaveFileSecurityCheckStarting<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2SaveFileSecurityCheckStartingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_SaveFileSecurityCheckStarting)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_SaveFileSecurityCheckStarting(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_SaveFileSecurityCheckStarting)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_26_Vtbl {
+ pub base__: ICoreWebView2_25_Vtbl,
+ pub add_SaveFileSecurityCheckStarting: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_SaveFileSecurityCheckStarting:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_26_Impl: ICoreWebView2_25_Impl {
+ fn add_SaveFileSecurityCheckStarting(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2SaveFileSecurityCheckStartingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_SaveFileSecurityCheckStarting(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_26_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_26_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_SaveFileSecurityCheckStarting<
+ Identity: ICoreWebView2_26_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_26_Impl::add_SaveFileSecurityCheckStarting(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_SaveFileSecurityCheckStarting<
+ Identity: ICoreWebView2_26_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_26_Impl::remove_SaveFileSecurityCheckStarting(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_25_Vtbl::new::<Identity, OFFSET>(),
+ add_SaveFileSecurityCheckStarting: add_SaveFileSecurityCheckStarting::<Identity, OFFSET>,
+ remove_SaveFileSecurityCheckStarting: remove_SaveFileSecurityCheckStarting::<
+ Identity,
+ OFFSET,
+ >,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_26 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_25 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_26 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_27,
+ ICoreWebView2_27_Vtbl,
+ 0x00fbe33b_8c07_517c_aa23_0ddd4b5f6fa0
+);
+impl core::ops::Deref for ICoreWebView2_27 {
+ type Target = ICoreWebView2_26;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_27,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20,
+ ICoreWebView2_21,
+ ICoreWebView2_22,
+ ICoreWebView2_23,
+ ICoreWebView2_24,
+ ICoreWebView2_25,
+ ICoreWebView2_26
+);
+impl ICoreWebView2_27 {
+ pub unsafe fn add_ScreenCaptureStarting<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ScreenCaptureStartingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ScreenCaptureStarting)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ScreenCaptureStarting)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_27_Vtbl {
+ pub base__: ICoreWebView2_26_Vtbl,
+ pub add_ScreenCaptureStarting: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ScreenCaptureStarting:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_27_Impl: ICoreWebView2_26_Impl {
+ fn add_ScreenCaptureStarting(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ScreenCaptureStartingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_27_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_27_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_ScreenCaptureStarting<
+ Identity: ICoreWebView2_27_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_27_Impl::add_ScreenCaptureStarting(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ScreenCaptureStarting<
+ Identity: ICoreWebView2_27_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_27_Impl::remove_ScreenCaptureStarting(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_26_Vtbl::new::<Identity, OFFSET>(),
+ add_ScreenCaptureStarting: add_ScreenCaptureStarting::<Identity, OFFSET>,
+ remove_ScreenCaptureStarting: remove_ScreenCaptureStarting::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_27 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_25 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_26 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_27 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_28,
+ ICoreWebView2_28_Vtbl,
+ 0x62e50381_5bf5_51a8_aae0_f20a3a9c8a90
+);
+impl core::ops::Deref for ICoreWebView2_28 {
+ type Target = ICoreWebView2_27;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_28,
+ 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,
+ ICoreWebView2_16,
+ ICoreWebView2_17,
+ ICoreWebView2_18,
+ ICoreWebView2_19,
+ ICoreWebView2_20,
+ ICoreWebView2_21,
+ ICoreWebView2_22,
+ ICoreWebView2_23,
+ ICoreWebView2_24,
+ ICoreWebView2_25,
+ ICoreWebView2_26,
+ ICoreWebView2_27
+);
+impl ICoreWebView2_28 {
+ pub unsafe fn Find(&self) -> windows_core::Result<ICoreWebView2Find> {
+ unsafe {
+ let mut result__ = core::mem::zeroed();
+ (windows_core::Interface::vtable(self).Find)(
+ windows_core::Interface::as_raw(self),
+ &mut result__,
+ )
+ .and_then(|| windows_core::Type::from_abi(result__))
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_28_Vtbl {
+ pub base__: ICoreWebView2_27_Vtbl,
+ pub Find: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_28_Impl: ICoreWebView2_27_Impl {
+ fn Find(&self) -> windows_core::Result<ICoreWebView2Find>;
+}
+impl ICoreWebView2_28_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_28_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn Find<Identity: ICoreWebView2_28_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ value: *mut *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ match ICoreWebView2_28_Impl::Find(this) {
+ Ok(ok__) => {
+ value.write(core::mem::transmute(ok__));
+ windows_core::HRESULT(0)
+ }
+ Err(err) => err.into(),
+ }
+ }
+ }
+ Self {
+ base__: ICoreWebView2_27_Vtbl::new::<Identity, OFFSET>(),
+ Find: Find::<Identity, OFFSET>,
+ }
+ }
+ pub fn matches(iid: &windows_core::GUID) -> bool {
+ iid == &<ICoreWebView2_28 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
+ || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_25 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_26 as windows_core::Interface>::IID
+ || iid == &<ICoreWebView2_27 as windows_core::Interface>::IID
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_28 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_3,
+ ICoreWebView2_3_Vtbl,
+ 0xa0d6df20_3b92_416d_aa0c_437a9c727857
+);
+impl core::ops::Deref for ICoreWebView2_3 {
+ type Target = ICoreWebView2_2;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_3,
+ windows_core::IUnknown,
+ ICoreWebView2,
+ ICoreWebView2_2
+);
+impl ICoreWebView2_3 {
+ pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2TrySuspendCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).TrySuspend)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn Resume(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self))
+ .ok()
+ }
+ }
+ pub unsafe fn IsSuspended(
+ &self,
+ issuspended: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsSuspended)(
+ windows_core::Interface::as_raw(self),
+ issuspended as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
+ &self,
+ hostname: P0,
+ folderpath: P1,
+ accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetVirtualHostNameToFolderMapping)(
+ windows_core::Interface::as_raw(self),
+ hostname.param().abi(),
+ folderpath.param().abi(),
+ accesskind,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
+ &self,
+ hostname: P0,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).ClearVirtualHostNameToFolderMapping)(
+ windows_core::Interface::as_raw(self),
+ hostname.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_3_Vtbl {
+ pub base__: ICoreWebView2_2_Vtbl,
+ pub TrySuspend: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+ pub Resume: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub IsSuspended: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetVirtualHostNameToFolderMapping: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ windows_core::PCWSTR,
+ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
+ ) -> windows_core::HRESULT,
+ pub ClearVirtualHostNameToFolderMapping: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ )
+ -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_3_Impl: ICoreWebView2_2_Impl {
+ fn TrySuspend(
+ &self,
+ handler: windows_core::Ref<'_, ICoreWebView2TrySuspendCompletedHandler>,
+ ) -> windows_core::Result<()>;
+ fn Resume(&self) -> windows_core::Result<()>;
+ fn IsSuspended(&self, issuspended: *mut windows_core::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 ICoreWebView2_3_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_3_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn TrySuspend<
+ Identity: ICoreWebView2_3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_3_Impl::TrySuspend(this, core::mem::transmute_copy(&handler)).into()
+ }
+ }
+ unsafe extern "system" fn Resume<Identity: ICoreWebView2_3_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_3_Impl::Resume(this).into()
+ }
+ }
+ unsafe extern "system" fn IsSuspended<
+ Identity: ICoreWebView2_3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ issuspended: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_3_Impl::IsSuspended(this, core::mem::transmute_copy(&issuspended))
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetVirtualHostNameToFolderMapping<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_3_Impl::SetVirtualHostNameToFolderMapping(
+ this,
+ core::mem::transmute(&hostname),
+ core::mem::transmute(&folderpath),
+ core::mem::transmute_copy(&accesskind),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn ClearVirtualHostNameToFolderMapping<
+ Identity: ICoreWebView2_3_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ hostname: windows_core::PCWSTR,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_3_Impl::ClearVirtualHostNameToFolderMapping(
+ this,
+ core::mem::transmute(&hostname),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_2_Vtbl::new::<Identity, OFFSET>(),
+ TrySuspend: TrySuspend::<Identity, OFFSET>,
+ Resume: Resume::<Identity, OFFSET>,
+ IsSuspended: IsSuspended::<Identity, OFFSET>,
+ SetVirtualHostNameToFolderMapping: SetVirtualHostNameToFolderMapping::<Identity, OFFSET>,
+ ClearVirtualHostNameToFolderMapping: ClearVirtualHostNameToFolderMapping::<
+ Identity,
+ 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_3 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_4,
+ ICoreWebView2_4_Vtbl,
+ 0x20d02d59_6df2_42dc_bd06_f98a694b1302
+);
+impl core::ops::Deref for ICoreWebView2_4 {
+ type Target = ICoreWebView2_3;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_4,
+ windows_core::IUnknown,
+ ICoreWebView2,
+ ICoreWebView2_2,
+ ICoreWebView2_3
+);
+impl ICoreWebView2_4 {
+ pub unsafe fn add_FrameCreated<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2FrameCreatedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_FrameCreated)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_FrameCreated(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_FrameCreated)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_DownloadStarting<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2DownloadStartingEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_DownloadStarting)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_DownloadStarting(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_DownloadStarting)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_4_Vtbl {
+ pub base__: ICoreWebView2_3_Vtbl,
+ pub add_FrameCreated: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_FrameCreated:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub add_DownloadStarting: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_DownloadStarting:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_4_Impl: ICoreWebView2_3_Impl {
+ fn add_FrameCreated(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2FrameCreatedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_FrameCreated(&self, token: i64) -> windows_core::Result<()>;
+ fn add_DownloadStarting(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2DownloadStartingEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_DownloadStarting(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_4_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_4_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_FrameCreated<
+ Identity: ICoreWebView2_4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_4_Impl::add_FrameCreated(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_FrameCreated<
+ Identity: ICoreWebView2_4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_4_Impl::remove_FrameCreated(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn add_DownloadStarting<
+ Identity: ICoreWebView2_4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_4_Impl::add_DownloadStarting(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_DownloadStarting<
+ Identity: ICoreWebView2_4_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_4_Impl::remove_DownloadStarting(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_3_Vtbl::new::<Identity, OFFSET>(),
+ add_FrameCreated: add_FrameCreated::<Identity, OFFSET>,
+ remove_FrameCreated: remove_FrameCreated::<Identity, OFFSET>,
+ add_DownloadStarting: add_DownloadStarting::<Identity, OFFSET>,
+ remove_DownloadStarting: remove_DownloadStarting::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_4 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_5,
+ ICoreWebView2_5_Vtbl,
+ 0xbedb11b8_d63c_11eb_b8bc_0242ac130003
+);
+impl core::ops::Deref for ICoreWebView2_5 {
+ type Target = ICoreWebView2_4;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_5,
+ windows_core::IUnknown,
+ ICoreWebView2,
+ ICoreWebView2_2,
+ ICoreWebView2_3,
+ ICoreWebView2_4
+);
+impl ICoreWebView2_5 {
+ pub unsafe fn add_ClientCertificateRequested<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2ClientCertificateRequestedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_ClientCertificateRequested)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_ClientCertificateRequested(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_ClientCertificateRequested)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_5_Vtbl {
+ pub base__: ICoreWebView2_4_Vtbl,
+ pub add_ClientCertificateRequested: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_ClientCertificateRequested:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_5_Impl: ICoreWebView2_4_Impl {
+ fn add_ClientCertificateRequested(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2ClientCertificateRequestedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_ClientCertificateRequested(&self, token: i64) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_5_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_5_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_ClientCertificateRequested<
+ Identity: ICoreWebView2_5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_5_Impl::add_ClientCertificateRequested(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_ClientCertificateRequested<
+ Identity: ICoreWebView2_5_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_5_Impl::remove_ClientCertificateRequested(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_4_Vtbl::new::<Identity, OFFSET>(),
+ add_ClientCertificateRequested: add_ClientCertificateRequested::<Identity, OFFSET>,
+ remove_ClientCertificateRequested: remove_ClientCertificateRequested::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_5 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_6,
+ ICoreWebView2_6_Vtbl,
+ 0x499aadac_d92c_4589_8a75_111bfc167795
+);
+impl core::ops::Deref for ICoreWebView2_6 {
+ type Target = ICoreWebView2_5;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_6,
+ windows_core::IUnknown,
+ ICoreWebView2,
+ ICoreWebView2_2,
+ ICoreWebView2_3,
+ ICoreWebView2_4,
+ ICoreWebView2_5
+);
+impl ICoreWebView2_6 {
+ pub unsafe fn OpenTaskManagerWindow(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).OpenTaskManagerWindow)(
+ windows_core::Interface::as_raw(self),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_6_Vtbl {
+ pub base__: ICoreWebView2_5_Vtbl,
+ pub OpenTaskManagerWindow:
+ unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_6_Impl: ICoreWebView2_5_Impl {
+ fn OpenTaskManagerWindow(&self) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_6_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_6_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn OpenTaskManagerWindow<
+ Identity: ICoreWebView2_6_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_6_Impl::OpenTaskManagerWindow(this).into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_5_Vtbl::new::<Identity, OFFSET>(),
+ OpenTaskManagerWindow: OpenTaskManagerWindow::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_6 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_7,
+ ICoreWebView2_7_Vtbl,
+ 0x79c24d83_09a3_45ae_9418_487f32a58740
+);
+impl core::ops::Deref for ICoreWebView2_7 {
+ type Target = ICoreWebView2_6;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_7,
+ windows_core::IUnknown,
+ ICoreWebView2,
+ ICoreWebView2_2,
+ ICoreWebView2_3,
+ ICoreWebView2_4,
+ ICoreWebView2_5,
+ ICoreWebView2_6
+);
+impl ICoreWebView2_7 {
+ pub unsafe fn PrintToPdf<P0, P1, P2>(
+ &self,
+ resultfilepath: P0,
+ printsettings: P1,
+ handler: P2,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<windows_core::PCWSTR>,
+ P1: windows_core::Param<ICoreWebView2PrintSettings>,
+ P2: windows_core::Param<ICoreWebView2PrintToPdfCompletedHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).PrintToPdf)(
+ windows_core::Interface::as_raw(self),
+ resultfilepath.param().abi(),
+ printsettings.param().abi(),
+ handler.param().abi(),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_7_Vtbl {
+ pub base__: ICoreWebView2_6_Vtbl,
+ pub PrintToPdf: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::PCWSTR,
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_7_Impl: ICoreWebView2_6_Impl {
+ fn PrintToPdf(
+ &self,
+ resultfilepath: &windows_core::PCWSTR,
+ printsettings: windows_core::Ref<'_, ICoreWebView2PrintSettings>,
+ handler: windows_core::Ref<'_, ICoreWebView2PrintToPdfCompletedHandler>,
+ ) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_7_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_7_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn PrintToPdf<
+ Identity: 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 {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_7_Impl::PrintToPdf(
+ this,
+ core::mem::transmute(&resultfilepath),
+ core::mem::transmute_copy(&printsettings),
+ core::mem::transmute_copy(&handler),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_6_Vtbl::new::<Identity, OFFSET>(),
+ PrintToPdf: PrintToPdf::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_7 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_8,
+ ICoreWebView2_8_Vtbl,
+ 0xe9632730_6e1e_43ab_b7b8_7b2c9e62e094
+);
+impl core::ops::Deref for ICoreWebView2_8 {
+ type Target = ICoreWebView2_7;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_8,
+ windows_core::IUnknown,
+ ICoreWebView2,
+ ICoreWebView2_2,
+ ICoreWebView2_3,
+ ICoreWebView2_4,
+ ICoreWebView2_5,
+ ICoreWebView2_6,
+ ICoreWebView2_7
+);
+impl ICoreWebView2_8 {
+ pub unsafe fn add_IsMutedChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2IsMutedChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_IsMutedChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_IsMutedChanged(&self, token: i64) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_IsMutedChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsMuted(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsMuted)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetIsMuted(&self, value: bool) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetIsMuted)(
+ windows_core::Interface::as_raw(self),
+ value.into(),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
+ &self,
+ eventhandler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_IsDocumentPlayingAudioChanged)(
+ windows_core::Interface::as_raw(self),
+ eventhandler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_IsDocumentPlayingAudioChanged(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_IsDocumentPlayingAudioChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsDocumentPlayingAudio(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsDocumentPlayingAudio)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_8_Vtbl {
+ pub base__: ICoreWebView2_7_Vtbl,
+ pub add_IsMutedChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_IsMutedChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub IsMuted: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub SetIsMuted: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub add_IsDocumentPlayingAudioChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ ) -> windows_core::HRESULT,
+ pub remove_IsDocumentPlayingAudioChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub IsDocumentPlayingAudio: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_8_Impl: ICoreWebView2_7_Impl {
+ fn add_IsMutedChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2IsMutedChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_IsMutedChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn IsMuted(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+ fn SetIsMuted(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
+ fn add_IsDocumentPlayingAudioChanged(
+ &self,
+ eventhandler: windows_core::Ref<'_, ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_IsDocumentPlayingAudioChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn IsDocumentPlayingAudio(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
+}
+impl ICoreWebView2_8_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_8_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_IsMutedChanged<
+ Identity: ICoreWebView2_8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_8_Impl::add_IsMutedChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_IsMutedChanged<
+ Identity: ICoreWebView2_8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_8_Impl::remove_IsMutedChanged(this, core::mem::transmute_copy(&token))
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsMuted<Identity: ICoreWebView2_8_Impl, const OFFSET: isize>(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_8_Impl::IsMuted(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn SetIsMuted<
+ Identity: ICoreWebView2_8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_8_Impl::SetIsMuted(this, core::mem::transmute_copy(&value)).into()
+ }
+ }
+ unsafe extern "system" fn add_IsDocumentPlayingAudioChanged<
+ Identity: ICoreWebView2_8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ eventhandler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_8_Impl::add_IsDocumentPlayingAudioChanged(
+ this,
+ core::mem::transmute_copy(&eventhandler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_IsDocumentPlayingAudioChanged<
+ Identity: ICoreWebView2_8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_8_Impl::remove_IsDocumentPlayingAudioChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsDocumentPlayingAudio<
+ Identity: ICoreWebView2_8_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_8_Impl::IsDocumentPlayingAudio(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_7_Vtbl::new::<Identity, OFFSET>(),
+ add_IsMutedChanged: add_IsMutedChanged::<Identity, OFFSET>,
+ remove_IsMutedChanged: remove_IsMutedChanged::<Identity, OFFSET>,
+ IsMuted: IsMuted::<Identity, OFFSET>,
+ SetIsMuted: SetIsMuted::<Identity, OFFSET>,
+ add_IsDocumentPlayingAudioChanged: add_IsDocumentPlayingAudioChanged::<Identity, OFFSET>,
+ remove_IsDocumentPlayingAudioChanged: remove_IsDocumentPlayingAudioChanged::<
+ Identity,
+ OFFSET,
+ >,
+ IsDocumentPlayingAudio: IsDocumentPlayingAudio::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_8 {}
+windows_core::imp::define_interface!(
+ ICoreWebView2_9,
+ ICoreWebView2_9_Vtbl,
+ 0x4d7b2eab_9fdc_468d_b998_a9260b5ed651
+);
+impl core::ops::Deref for ICoreWebView2_9 {
+ type Target = ICoreWebView2_8;
+ fn deref(&self) -> &Self::Target {
+ unsafe { core::mem::transmute(self) }
+ }
+}
+windows_core::imp::interface_hierarchy!(
+ ICoreWebView2_9,
+ windows_core::IUnknown,
+ ICoreWebView2,
+ ICoreWebView2_2,
+ ICoreWebView2_3,
+ ICoreWebView2_4,
+ ICoreWebView2_5,
+ ICoreWebView2_6,
+ ICoreWebView2_7,
+ ICoreWebView2_8
+);
+impl ICoreWebView2_9 {
+ pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
+ &self,
+ handler: P0,
+ token: *mut i64,
+ ) -> windows_core::Result<()>
+ where
+ P0: windows_core::Param<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
+ {
+ unsafe {
+ (windows_core::Interface::vtable(self).add_IsDefaultDownloadDialogOpenChanged)(
+ windows_core::Interface::as_raw(self),
+ handler.param().abi(),
+ token as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
+ &self,
+ token: i64,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).remove_IsDefaultDownloadDialogOpenChanged)(
+ windows_core::Interface::as_raw(self),
+ token,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn IsDefaultDownloadDialogOpen(
+ &self,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).IsDefaultDownloadDialogOpen)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn OpenDefaultDownloadDialog(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).OpenDefaultDownloadDialog)(
+ windows_core::Interface::as_raw(self),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn CloseDefaultDownloadDialog(&self) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).CloseDefaultDownloadDialog)(
+ windows_core::Interface::as_raw(self),
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DefaultDownloadDialogCornerAlignment(
+ &self,
+ value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DefaultDownloadDialogCornerAlignment)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
+ &self,
+ value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetDefaultDownloadDialogCornerAlignment)(
+ windows_core::Interface::as_raw(self),
+ value,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn DefaultDownloadDialogMargin(
+ &self,
+ value: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).DefaultDownloadDialogMargin)(
+ windows_core::Interface::as_raw(self),
+ value as _,
+ )
+ .ok()
+ }
+ }
+ pub unsafe fn SetDefaultDownloadDialogMargin(
+ &self,
+ value: windows::Win32::Foundation::POINT,
+ ) -> windows_core::Result<()> {
+ unsafe {
+ (windows_core::Interface::vtable(self).SetDefaultDownloadDialogMargin)(
+ windows_core::Interface::as_raw(self),
+ core::mem::transmute(value),
+ )
+ .ok()
+ }
+ }
+}
+#[repr(C)]
+#[doc(hidden)]
+pub struct ICoreWebView2_9_Vtbl {
+ pub base__: ICoreWebView2_8_Vtbl,
+ pub add_IsDefaultDownloadDialogOpenChanged: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut core::ffi::c_void,
+ *mut i64,
+ )
+ -> windows_core::HRESULT,
+ pub remove_IsDefaultDownloadDialogOpenChanged:
+ unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
+ pub IsDefaultDownloadDialogOpen: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT,
+ pub OpenDefaultDownloadDialog:
+ unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub CloseDefaultDownloadDialog:
+ unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
+ pub DefaultDownloadDialogCornerAlignment: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
+ )
+ -> windows_core::HRESULT,
+ pub SetDefaultDownloadDialogCornerAlignment: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
+ )
+ -> windows_core::HRESULT,
+ pub DefaultDownloadDialogMargin: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+ pub SetDefaultDownloadDialogMargin: unsafe extern "system" fn(
+ *mut core::ffi::c_void,
+ windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT,
+}
+pub trait ICoreWebView2_9_Impl: ICoreWebView2_8_Impl {
+ fn add_IsDefaultDownloadDialogOpenChanged(
+ &self,
+ handler: windows_core::Ref<'_, ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
+ token: *mut i64,
+ ) -> windows_core::Result<()>;
+ fn remove_IsDefaultDownloadDialogOpenChanged(&self, token: i64) -> windows_core::Result<()>;
+ fn IsDefaultDownloadDialogOpen(
+ &self,
+ value: *mut windows_core::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 ICoreWebView2_9_Vtbl {
+ pub const fn new<Identity: ICoreWebView2_9_Impl, const OFFSET: isize>() -> Self {
+ unsafe extern "system" fn add_IsDefaultDownloadDialogOpenChanged<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ handler: *mut core::ffi::c_void,
+ token: *mut i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::add_IsDefaultDownloadDialogOpenChanged(
+ this,
+ core::mem::transmute_copy(&handler),
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn remove_IsDefaultDownloadDialogOpenChanged<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ token: i64,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::remove_IsDefaultDownloadDialogOpenChanged(
+ this,
+ core::mem::transmute_copy(&token),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn IsDefaultDownloadDialogOpen<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows_core::BOOL,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::IsDefaultDownloadDialogOpen(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn OpenDefaultDownloadDialog<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::OpenDefaultDownloadDialog(this).into()
+ }
+ }
+ unsafe extern "system" fn CloseDefaultDownloadDialog<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::CloseDefaultDownloadDialog(this).into()
+ }
+ }
+ unsafe extern "system" fn DefaultDownloadDialogCornerAlignment<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::DefaultDownloadDialogCornerAlignment(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetDefaultDownloadDialogCornerAlignment<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::SetDefaultDownloadDialogCornerAlignment(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn DefaultDownloadDialogMargin<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: *mut windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::DefaultDownloadDialogMargin(
+ this,
+ core::mem::transmute_copy(&value),
+ )
+ .into()
+ }
+ }
+ unsafe extern "system" fn SetDefaultDownloadDialogMargin<
+ Identity: ICoreWebView2_9_Impl,
+ const OFFSET: isize,
+ >(
+ this: *mut core::ffi::c_void,
+ value: windows::Win32::Foundation::POINT,
+ ) -> windows_core::HRESULT {
+ unsafe {
+ let this: &Identity =
+ &*((this as *const *const ()).offset(OFFSET) as *const Identity);
+ ICoreWebView2_9_Impl::SetDefaultDownloadDialogMargin(
+ this,
+ core::mem::transmute(&value),
+ )
+ .into()
+ }
+ }
+ Self {
+ base__: ICoreWebView2_8_Vtbl::new::<Identity, OFFSET>(),
+ add_IsDefaultDownloadDialogOpenChanged: add_IsDefaultDownloadDialogOpenChanged::<
+ Identity,
+ OFFSET,
+ >,
+ remove_IsDefaultDownloadDialogOpenChanged: remove_IsDefaultDownloadDialogOpenChanged::<
+ Identity,
+ OFFSET,
+ >,
+ IsDefaultDownloadDialogOpen: IsDefaultDownloadDialogOpen::<Identity, OFFSET>,
+ OpenDefaultDownloadDialog: OpenDefaultDownloadDialog::<Identity, OFFSET>,
+ CloseDefaultDownloadDialog: CloseDefaultDownloadDialog::<Identity, OFFSET>,
+ DefaultDownloadDialogCornerAlignment: DefaultDownloadDialogCornerAlignment::<
+ Identity,
+ OFFSET,
+ >,
+ SetDefaultDownloadDialogCornerAlignment: SetDefaultDownloadDialogCornerAlignment::<
+ Identity,
+ OFFSET,
+ >,
+ DefaultDownloadDialogMargin: DefaultDownloadDialogMargin::<Identity, OFFSET>,
+ SetDefaultDownloadDialogMargin: SetDefaultDownloadDialogMargin::<Identity, 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
+ }
+}
+impl windows_core::RuntimeName for ICoreWebView2_9 {}
diff --git a/vendor/webview2-com-sys/src/declared_interfaces.rs b/vendor/webview2-com-sys/src/declared_interfaces.rs
new file mode 100644
index 0000000000..20b3ff3101
--- /dev/null
+++ b/vendor/webview2-com-sys/src/declared_interfaces.rs
@@ -0,0 +1,116 @@
+use std::collections::BTreeSet;
+
+/// Generate a list of all `ICoreWebView2...Handler` interfaces declared in `WebView2.h`. This is
+/// for testing purposes to make sure they are all covered in
+/// [callback.rs](../../webview2-com/src/callback.rs).
+pub fn all_declared_callbacks() -> BTreeSet<&'static str> {
+ let mut interfaces = BTreeSet::new();
+
+ interfaces.insert("ICoreWebView2AcceleratorKeyPressedEventHandler");
+ interfaces.insert("ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler");
+ interfaces.insert("ICoreWebView2BasicAuthenticationRequestedEventHandler");
+ interfaces.insert("ICoreWebView2BrowserExtensionEnableCompletedHandler");
+ interfaces.insert("ICoreWebView2BrowserExtensionRemoveCompletedHandler");
+ interfaces.insert("ICoreWebView2BrowserProcessExitedEventHandler");
+ interfaces.insert("ICoreWebView2BytesReceivedChangedEventHandler");
+ interfaces.insert("ICoreWebView2CallDevToolsProtocolMethodCompletedHandler");
+ interfaces.insert("ICoreWebView2CapturePreviewCompletedHandler");
+ interfaces.insert("ICoreWebView2ClearBrowsingDataCompletedHandler");
+ interfaces.insert("ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler");
+ interfaces.insert("ICoreWebView2ClientCertificateRequestedEventHandler");
+ interfaces.insert("ICoreWebView2ContainsFullScreenElementChangedEventHandler");
+ interfaces.insert("ICoreWebView2ContentLoadingEventHandler");
+ interfaces.insert("ICoreWebView2ContextMenuRequestedEventHandler");
+ interfaces.insert("ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler");
+ interfaces.insert("ICoreWebView2CreateCoreWebView2ControllerCompletedHandler");
+ interfaces.insert("ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler");
+ interfaces.insert("ICoreWebView2CursorChangedEventHandler");
+ interfaces.insert("ICoreWebView2CustomItemSelectedEventHandler");
+ interfaces.insert("ICoreWebView2DOMContentLoadedEventHandler");
+ interfaces.insert("ICoreWebView2DevToolsProtocolEventReceivedEventHandler");
+ interfaces.insert("ICoreWebView2DocumentTitleChangedEventHandler");
+ interfaces.insert("ICoreWebView2DownloadStartingEventHandler");
+ interfaces.insert("ICoreWebView2EstimatedEndTimeChangedEventHandler");
+ interfaces.insert("ICoreWebView2ExecuteScriptCompletedHandler");
+ interfaces.insert("ICoreWebView2ExecuteScriptWithResultCompletedHandler");
+ interfaces.insert("ICoreWebView2FaviconChangedEventHandler");
+ interfaces.insert("ICoreWebView2FindActiveMatchIndexChangedEventHandler");
+ interfaces.insert("ICoreWebView2FindMatchCountChangedEventHandler");
+ interfaces.insert("ICoreWebView2FindStartCompletedHandler");
+ interfaces.insert("ICoreWebView2FocusChangedEventHandler");
+ interfaces.insert("ICoreWebView2FrameChildFrameCreatedEventHandler");
+ interfaces.insert("ICoreWebView2FrameContentLoadingEventHandler");
+ interfaces.insert("ICoreWebView2FrameCreatedEventHandler");
+ interfaces.insert("ICoreWebView2FrameDOMContentLoadedEventHandler");
+ interfaces.insert("ICoreWebView2FrameDestroyedEventHandler");
+ interfaces.insert("ICoreWebView2FrameNameChangedEventHandler");
+ interfaces.insert("ICoreWebView2FrameNavigationCompletedEventHandler");
+ interfaces.insert("ICoreWebView2FrameNavigationStartingEventHandler");
+ interfaces.insert("ICoreWebView2FramePermissionRequestedEventHandler");
+ interfaces.insert("ICoreWebView2FrameScreenCaptureStartingEventHandler");
+ interfaces.insert("ICoreWebView2FrameWebMessageReceivedEventHandler");
+ interfaces.insert("ICoreWebView2GetCookiesCompletedHandler");
+ interfaces.insert("ICoreWebView2GetFaviconCompletedHandler");
+ interfaces.insert("ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler");
+ interfaces.insert("ICoreWebView2GetProcessExtendedInfosCompletedHandler");
+ interfaces.insert("ICoreWebView2HistoryChangedEventHandler");
+ interfaces.insert("ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler");
+ interfaces.insert("ICoreWebView2IsDocumentPlayingAudioChangedEventHandler");
+ interfaces.insert("ICoreWebView2IsMutedChangedEventHandler");
+ interfaces.insert("ICoreWebView2LaunchingExternalUriSchemeEventHandler");
+ interfaces.insert("ICoreWebView2MoveFocusRequestedEventHandler");
+ interfaces.insert("ICoreWebView2NavigationCompletedEventHandler");
+ interfaces.insert("ICoreWebView2NavigationStartingEventHandler");
+ interfaces.insert("ICoreWebView2NewBrowserVersionAvailableEventHandler");
+ interfaces.insert("ICoreWebView2NewWindowRequestedEventHandler");
+ interfaces.insert("ICoreWebView2NonClientRegionChangedEventHandler");
+ interfaces.insert("ICoreWebView2NotificationCloseRequestedEventHandler");
+ interfaces.insert("ICoreWebView2NotificationReceivedEventHandler");
+ interfaces.insert("ICoreWebView2PermissionRequestedEventHandler");
+ interfaces.insert("ICoreWebView2PrintCompletedHandler");
+ interfaces.insert("ICoreWebView2PrintToPdfCompletedHandler");
+ interfaces.insert("ICoreWebView2PrintToPdfStreamCompletedHandler");
+ interfaces.insert("ICoreWebView2ProcessFailedEventHandler");
+ interfaces.insert("ICoreWebView2ProcessInfosChangedEventHandler");
+ interfaces.insert("ICoreWebView2ProfileAddBrowserExtensionCompletedHandler");
+ interfaces.insert("ICoreWebView2ProfileDeletedEventHandler");
+ interfaces.insert("ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler");
+ interfaces.insert("ICoreWebView2RasterizationScaleChangedEventHandler");
+ interfaces.insert("ICoreWebView2SaveAsUIShowingEventHandler");
+ interfaces.insert("ICoreWebView2SaveFileSecurityCheckStartingEventHandler");
+ interfaces.insert("ICoreWebView2ScreenCaptureStartingEventHandler");
+ interfaces.insert("ICoreWebView2ScriptDialogOpeningEventHandler");
+ interfaces.insert("ICoreWebView2ServerCertificateErrorDetectedEventHandler");
+ interfaces.insert("ICoreWebView2SetPermissionStateCompletedHandler");
+ interfaces.insert("ICoreWebView2ShowSaveAsUICompletedHandler");
+ interfaces.insert("ICoreWebView2SourceChangedEventHandler");
+ interfaces.insert("ICoreWebView2StateChangedEventHandler");
+ interfaces.insert("ICoreWebView2StatusBarTextChangedEventHandler");
+ interfaces.insert("ICoreWebView2TrySuspendCompletedHandler");
+ interfaces.insert("ICoreWebView2WebMessageReceivedEventHandler");
+ interfaces.insert("ICoreWebView2WebResourceRequestedEventHandler");
+ interfaces.insert("ICoreWebView2WebResourceResponseReceivedEventHandler");
+ interfaces.insert("ICoreWebView2WebResourceResponseViewGetContentCompletedHandler");
+ interfaces.insert("ICoreWebView2WindowCloseRequestedEventHandler");
+ interfaces.insert("ICoreWebView2ZoomFactorChangedEventHandler");
+
+ interfaces
+}
+
+/// Generate a list of all `ICoreWebView2EnvironmentOptions` interfaces declared in `WebView2.h`.
+/// This is for testing purposes to make sure they are all covered in
+/// [options.rs](../../webview2-com/src/options.rs).
+pub fn all_declared_options() -> BTreeSet<&'static str> {
+ let mut interfaces = BTreeSet::new();
+
+ interfaces.insert("ICoreWebView2EnvironmentOptions");
+ interfaces.insert("ICoreWebView2EnvironmentOptions2");
+ interfaces.insert("ICoreWebView2EnvironmentOptions3");
+ interfaces.insert("ICoreWebView2EnvironmentOptions4");
+ interfaces.insert("ICoreWebView2EnvironmentOptions5");
+ interfaces.insert("ICoreWebView2EnvironmentOptions6");
+ interfaces.insert("ICoreWebView2EnvironmentOptions7");
+ interfaces.insert("ICoreWebView2EnvironmentOptions8");
+
+ interfaces
+}
diff --git a/vendor/webview2-com-sys/src/lib.rs b/vendor/webview2-com-sys/src/lib.rs
new file mode 100644
index 0000000000..f9d444bc5f
--- /dev/null
+++ b/vendor/webview2-com-sys/src/lib.rs
@@ -0,0 +1,66 @@
+#[allow(
+ non_snake_case,
+ non_upper_case_globals,
+ non_camel_case_types,
+ dead_code,
+ clippy::all
+)]
+pub mod Microsoft {
+ pub mod Web {
+ pub mod WebView2 {
+ pub mod Win32 {
+ mod windows_link {
+ macro_rules! link_webview2 {
+ ($library:literal $abi:literal fn $($function:tt)*) => (
+ #[cfg_attr(
+ target_env = "msvc",
+ link(name = "WebView2LoaderStatic", kind = "static")
+ )]
+ #[cfg_attr(
+ not(target_env = "msvc"),
+ link(name = "WebView2Loader.dll")
+ )]
+ extern $abi {
+ pub fn $($function)*;
+ }
+ )
+ }
+
+ pub(crate) use link_webview2 as link;
+ }
+
+ include!("bindings.rs");
+ }
+ }
+ }
+}
+
+pub mod declared_interfaces;
+
+#[cfg(test)]
+mod test {
+ use windows_core::w;
+
+ use crate::Microsoft::Web::WebView2::Win32::*;
+
+ #[test]
+ fn compare_eq() {
+ let mut result = 1;
+ unsafe { CompareBrowserVersions(w!("1.0.0"), w!("1.0.0"), &mut result) }.unwrap();
+ assert_eq!(0, result);
+ }
+
+ #[test]
+ fn compare_lt() {
+ let mut result = 0;
+ unsafe { CompareBrowserVersions(w!("1.0.0"), w!("1.0.1"), &mut result) }.unwrap();
+ assert_eq!(-1, result);
+ }
+
+ #[test]
+ fn compare_gt() {
+ let mut result = 0;
+ unsafe { CompareBrowserVersions(w!("2.0.0"), w!("1.0.1"), &mut result) }.unwrap();
+ assert_eq!(1, result);
+ }
+}
diff --git a/vendor/webview2-com-sys/win7/x64/WebView2Loader.dll b/vendor/webview2-com-sys/win7/x64/WebView2Loader.dll
new file mode 100644
index 0000000000..59a2385c25
Binary files /dev/null and b/vendor/webview2-com-sys/win7/x64/WebView2Loader.dll differ
diff --git a/vendor/webview2-com-sys/win7/x64/WebView2Loader.dll.lib b/vendor/webview2-com-sys/win7/x64/WebView2Loader.dll.lib
new file mode 100644
index 0000000000..1adad38bcc
Binary files /dev/null and b/vendor/webview2-com-sys/win7/x64/WebView2Loader.dll.lib differ
diff --git a/vendor/webview2-com-sys/win7/x64/WebView2LoaderStatic.lib b/vendor/webview2-com-sys/win7/x64/WebView2LoaderStatic.lib
new file mode 100644
index 0000000000..00deb8d72f
Binary files /dev/null and b/vendor/webview2-com-sys/win7/x64/WebView2LoaderStatic.lib differ
diff --git a/vendor/webview2-com-sys/x64/WebView2Loader.dll b/vendor/webview2-com-sys/x64/WebView2Loader.dll
new file mode 100644
index 0000000000..429a122d8d
Binary files /dev/null and b/vendor/webview2-com-sys/x64/WebView2Loader.dll differ
diff --git a/vendor/webview2-com-sys/x64/WebView2Loader.dll.lib b/vendor/webview2-com-sys/x64/WebView2Loader.dll.lib
new file mode 100644
index 0000000000..226d62a731
Binary files /dev/null and b/vendor/webview2-com-sys/x64/WebView2Loader.dll.lib differ
diff --git a/vendor/webview2-com-sys/x64/WebView2LoaderStatic.lib b/vendor/webview2-com-sys/x64/WebView2LoaderStatic.lib
new file mode 100644
index 0000000000..a778967b7c
Binary files /dev/null and b/vendor/webview2-com-sys/x64/WebView2LoaderStatic.lib differ
diff --git a/vendor/webview2-com-sys/x86/WebView2Loader.dll b/vendor/webview2-com-sys/x86/WebView2Loader.dll
new file mode 100644
index 0000000000..0f4ab78fcb
Binary files /dev/null and b/vendor/webview2-com-sys/x86/WebView2Loader.dll differ
diff --git a/vendor/webview2-com-sys/x86/WebView2Loader.dll.lib b/vendor/webview2-com-sys/x86/WebView2Loader.dll.lib
new file mode 100644
index 0000000000..b8410e8780
Binary files /dev/null and b/vendor/webview2-com-sys/x86/WebView2Loader.dll.lib differ
diff --git a/vendor/webview2-com-sys/x86/WebView2LoaderStatic.lib b/vendor/webview2-com-sys/x86/WebView2LoaderStatic.lib
new file mode 100644
index 0000000000..9607379e0f
Binary files /dev/null and b/vendor/webview2-com-sys/x86/WebView2LoaderStatic.lib differ