diff --git a/.gitignore b/.gitignore
index edc0984..c89eede 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,3 @@
-################################################################################
-# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
-################################################################################
*.pdb
*.xml
*.xsd
@@ -18,4 +15,5 @@ AndroidSideloader.csproj.user
AndroidSideloader.csproj.user
/AndroidSideloader v2.1.exe
/crashlog.txt
-/debuglog.txt
\ No newline at end of file
+/debuglog.txt
+packages/
\ No newline at end of file
diff --git a/packages/Costura.Fody.4.1.0/.signature.p7s b/packages/Costura.Fody.4.1.0/.signature.p7s
deleted file mode 100644
index c9950d4..0000000
Binary files a/packages/Costura.Fody.4.1.0/.signature.p7s and /dev/null differ
diff --git a/packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg b/packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg
deleted file mode 100644
index 175f3c3..0000000
Binary files a/packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg and /dev/null differ
diff --git a/packages/Costura.Fody.4.1.0/build/Costura.Fody.props b/packages/Costura.Fody.4.1.0/build/Costura.Fody.props
deleted file mode 100644
index a189a9a..0000000
--- a/packages/Costura.Fody.4.1.0/build/Costura.Fody.props
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/Costura.Fody.4.1.0/lib/net40/Costura.dll b/packages/Costura.Fody.4.1.0/lib/net40/Costura.dll
deleted file mode 100644
index 27d80be..0000000
Binary files a/packages/Costura.Fody.4.1.0/lib/net40/Costura.dll and /dev/null differ
diff --git a/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll b/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll
deleted file mode 100644
index d74ccba..0000000
Binary files a/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll and /dev/null differ
diff --git a/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.xcf b/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.xcf
deleted file mode 100644
index 0f0424e..0000000
--- a/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.xcf
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
- A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
-
-
-
-
- A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
-
-
-
-
- A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
-
-
-
-
- A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
-
-
-
-
- The order of preloaded assemblies, delimited with line breaks.
-
-
-
-
-
- This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
-
-
-
-
- Controls if .pdbs for reference assemblies are also embedded.
-
-
-
-
- Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
-
-
-
-
- As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
-
-
-
-
- Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
-
-
-
-
- Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
-
-
-
-
- A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
-
-
-
-
- A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
-
-
-
-
- A list of unmanaged 32 bit assembly names to include, delimited with |.
-
-
-
-
- A list of unmanaged 64 bit assembly names to include, delimited with |.
-
-
-
-
- The order of preloaded assemblies, delimited with |.
-
-
-
\ No newline at end of file
diff --git a/packages/Fody.6.0.0/.signature.p7s b/packages/Fody.6.0.0/.signature.p7s
deleted file mode 100644
index 4d9aadd..0000000
Binary files a/packages/Fody.6.0.0/.signature.p7s and /dev/null differ
diff --git a/packages/Fody.6.0.0/Fody.6.0.0.nupkg b/packages/Fody.6.0.0/Fody.6.0.0.nupkg
deleted file mode 100644
index b355281..0000000
Binary files a/packages/Fody.6.0.0/Fody.6.0.0.nupkg and /dev/null differ
diff --git a/packages/Fody.6.0.0/build/Fody.targets b/packages/Fody.6.0.0/build/Fody.targets
deleted file mode 100644
index f8dcd9d..0000000
--- a/packages/Fody.6.0.0/build/Fody.targets
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
- $(ProjectDir)FodyWeavers.xml
- $(MSBuildThisFileDirectory)..\
- $(FodyPath)netstandardtask
- $(FodyPath)netclassictask
- $(FodyAssemblyDirectory)\Fody.dll
- $(DefaultItemExcludes);FodyWeavers.xsd
- true
- 15
- $([System.Version]::Parse($(MSBuildVersion)).Major)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/Fody.6.0.0/netclassictask/Fody.dll b/packages/Fody.6.0.0/netclassictask/Fody.dll
deleted file mode 100644
index 2ca8d38..0000000
Binary files a/packages/Fody.6.0.0/netclassictask/Fody.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netclassictask/FodyCommon.dll b/packages/Fody.6.0.0/netclassictask/FodyCommon.dll
deleted file mode 100644
index 8cd5941..0000000
Binary files a/packages/Fody.6.0.0/netclassictask/FodyCommon.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netclassictask/FodyHelpers.dll b/packages/Fody.6.0.0/netclassictask/FodyHelpers.dll
deleted file mode 100644
index d04ebd9..0000000
Binary files a/packages/Fody.6.0.0/netclassictask/FodyHelpers.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netclassictask/FodyIsolated.dll b/packages/Fody.6.0.0/netclassictask/FodyIsolated.dll
deleted file mode 100644
index fbf1279..0000000
Binary files a/packages/Fody.6.0.0/netclassictask/FodyIsolated.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.dll b/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.dll
deleted file mode 100644
index 980d4da..0000000
Binary files a/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.dll b/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.dll
deleted file mode 100644
index 1355bb7..0000000
Binary files a/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll b/packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll
deleted file mode 100644
index 099fba4..0000000
Binary files a/packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netstandardtask/Fody.dll b/packages/Fody.6.0.0/netstandardtask/Fody.dll
deleted file mode 100644
index cbc88c1..0000000
Binary files a/packages/Fody.6.0.0/netstandardtask/Fody.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netstandardtask/FodyCommon.dll b/packages/Fody.6.0.0/netstandardtask/FodyCommon.dll
deleted file mode 100644
index 909c960..0000000
Binary files a/packages/Fody.6.0.0/netstandardtask/FodyCommon.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll b/packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll
deleted file mode 100644
index d04ebd9..0000000
Binary files a/packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll b/packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll
deleted file mode 100644
index c938719..0000000
Binary files a/packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.dll b/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.dll
deleted file mode 100644
index e81b2f8..0000000
Binary files a/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.dll b/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.dll
deleted file mode 100644
index 2b2652b..0000000
Binary files a/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.dll and /dev/null differ
diff --git a/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll b/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll
deleted file mode 100644
index f1a5119..0000000
Binary files a/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll and /dev/null differ
diff --git a/packages/Microsoft.Web.WebView2.1.0.1072.54/.signature.p7s b/packages/Microsoft.Web.WebView2.1.0.1072.54/.signature.p7s
deleted file mode 100644
index 4f832c0..0000000
Binary files a/packages/Microsoft.Web.WebView2.1.0.1072.54/.signature.p7s and /dev/null differ
diff --git a/packages/Microsoft.Web.WebView2.1.0.1072.54/LICENSE.txt b/packages/Microsoft.Web.WebView2.1.0.1072.54/LICENSE.txt
deleted file mode 100644
index 45f0297..0000000
--- a/packages/Microsoft.Web.WebView2.1.0.1072.54/LICENSE.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (C) Microsoft Corporation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * The name of Microsoft Corporation, or the names of its contributors
-may not be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/packages/Microsoft.Web.WebView2.1.0.1072.54/Microsoft.Web.WebView2.1.0.1072.54.nupkg b/packages/Microsoft.Web.WebView2.1.0.1072.54/Microsoft.Web.WebView2.1.0.1072.54.nupkg
deleted file mode 100644
index 489dec4..0000000
Binary files a/packages/Microsoft.Web.WebView2.1.0.1072.54/Microsoft.Web.WebView2.1.0.1072.54.nupkg and /dev/null differ
diff --git a/packages/Microsoft.Web.WebView2.1.0.1072.54/WebView2.idl b/packages/Microsoft.Web.WebView2.1.0.1072.54/WebView2.idl
deleted file mode 100644
index 2f9db50..0000000
--- a/packages/Microsoft.Web.WebView2.1.0.1072.54/WebView2.idl
+++ /dev/null
@@ -1,5696 +0,0 @@
-// Copyright (C) Microsoft Corporation. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import "objidl.idl";
-import "oaidl.idl";
-import "EventToken.idl";
-
-[uuid(26d34152-879f-4065-bea2-3daa2cfadfb8), version(1.0)]
-library WebView2 {
-
-// Interface forward declarations
-
-interface ICoreWebView2AcceleratorKeyPressedEventArgs;
-interface ICoreWebView2AcceleratorKeyPressedEventHandler;
-interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler;
-interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler;
-interface ICoreWebView2CapturePreviewCompletedHandler;
-interface ICoreWebView2;
-interface ICoreWebView2_2;
-interface ICoreWebView2_3;
-interface ICoreWebView2_4;
-interface ICoreWebView2_5;
-interface ICoreWebView2_6;
-interface ICoreWebView2_7;
-interface ICoreWebView2_8;
-interface ICoreWebView2_9;
-interface ICoreWebView2BrowserProcessExitedEventArgs;
-interface ICoreWebView2BrowserProcessExitedEventHandler;
-interface ICoreWebView2BytesReceivedChangedEventHandler;
-interface ICoreWebView2CompositionController;
-interface ICoreWebView2CompositionController2;
-interface ICoreWebView2Controller;
-interface ICoreWebView2Controller2;
-interface ICoreWebView2Controller3;
-interface ICoreWebView2ContentLoadingEventArgs;
-interface ICoreWebView2ContentLoadingEventHandler;
-interface ICoreWebView2Cookie;
-interface ICoreWebView2CookieList;
-interface ICoreWebView2CookieManager;
-interface ICoreWebView2ClientCertificate;
-interface ICoreWebView2StringCollection;
-interface ICoreWebView2ClientCertificateCollection;
-interface ICoreWebView2ClientCertificateRequestedEventArgs;
-interface ICoreWebView2ClientCertificateRequestedEventHandler;
-interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler;
-interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler;
-interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler;
-interface ICoreWebView2ContainsFullScreenElementChangedEventHandler;
-interface ICoreWebView2CursorChangedEventHandler;
-interface ICoreWebView2DocumentTitleChangedEventHandler;
-interface ICoreWebView2DOMContentLoadedEventArgs;
-interface ICoreWebView2DOMContentLoadedEventHandler;
-interface ICoreWebView2Deferral;
-interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs;
-interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler;
-interface ICoreWebView2DevToolsProtocolEventReceiver;
-interface ICoreWebView2DownloadOperation;
-interface ICoreWebView2DownloadStartingEventArgs;
-interface ICoreWebView2DownloadStartingEventHandler;
-interface ICoreWebView2Environment;
-interface ICoreWebView2Environment2;
-interface ICoreWebView2Environment3;
-interface ICoreWebView2Environment4;
-interface ICoreWebView2Environment5;
-interface ICoreWebView2Environment6;
-interface ICoreWebView2Environment7;
-interface ICoreWebView2EnvironmentOptions;
-interface ICoreWebView2EstimatedEndTimeChangedEventHandler;
-interface ICoreWebView2ExecuteScriptCompletedHandler;
-interface ICoreWebView2Frame;
-interface ICoreWebView2FrameCreatedEventArgs;
-interface ICoreWebView2FrameCreatedEventHandler;
-interface ICoreWebView2FrameDestroyedEventHandler;
-interface ICoreWebView2FrameNameChangedEventHandler;
-interface ICoreWebView2FrameInfo;
-interface ICoreWebView2FrameInfoCollection;
-interface ICoreWebView2FrameInfoCollectionIterator;
-interface ICoreWebView2FocusChangedEventHandler;
-interface ICoreWebView2GetCookiesCompletedHandler;
-interface ICoreWebView2HistoryChangedEventHandler;
-interface ICoreWebView2HttpHeadersCollectionIterator;
-interface ICoreWebView2HttpRequestHeaders;
-interface ICoreWebView2HttpResponseHeaders;
-interface ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler;
-interface ICoreWebView2MoveFocusRequestedEventArgs;
-interface ICoreWebView2MoveFocusRequestedEventHandler;
-interface ICoreWebView2NavigationCompletedEventArgs;
-interface ICoreWebView2NavigationCompletedEventHandler;
-interface ICoreWebView2NavigationStartingEventArgs;
-interface ICoreWebView2NavigationStartingEventHandler;
-interface ICoreWebView2NewBrowserVersionAvailableEventHandler;
-interface ICoreWebView2NewWindowRequestedEventArgs;
-interface ICoreWebView2NewWindowRequestedEventArgs2;
-interface ICoreWebView2NewWindowRequestedEventHandler;
-interface ICoreWebView2PermissionRequestedEventArgs;
-interface ICoreWebView2PermissionRequestedEventHandler;
-interface ICoreWebView2PointerInfo;
-interface ICoreWebView2PrintSettings;
-interface ICoreWebView2PrintToPdfCompletedHandler;
-interface ICoreWebView2ProcessFailedEventArgs;
-interface ICoreWebView2ProcessFailedEventArgs2;
-interface ICoreWebView2ProcessFailedEventHandler;
-interface ICoreWebView2RasterizationScaleChangedEventHandler;
-interface ICoreWebView2ScriptDialogOpeningEventArgs;
-interface ICoreWebView2ScriptDialogOpeningEventHandler;
-interface ICoreWebView2Settings;
-interface ICoreWebView2Settings2;
-interface ICoreWebView2Settings3;
-interface ICoreWebView2Settings4;
-interface ICoreWebView2Settings5;
-interface ICoreWebView2Settings6;
-interface ICoreWebView2SourceChangedEventArgs;
-interface ICoreWebView2SourceChangedEventHandler;
-interface ICoreWebView2StateChangedEventHandler;
-interface ICoreWebView2TrySuspendCompletedHandler;
-interface ICoreWebView2WebMessageReceivedEventArgs;
-interface ICoreWebView2WebMessageReceivedEventHandler;
-interface ICoreWebView2WebResourceRequest;
-interface ICoreWebView2WebResourceRequestedEventArgs;
-interface ICoreWebView2WebResourceRequestedEventHandler;
-interface ICoreWebView2WebResourceResponse;
-interface ICoreWebView2WebResourceResponseReceivedEventHandler;
-interface ICoreWebView2WebResourceResponseReceivedEventArgs;
-interface ICoreWebView2WebResourceResponseView;
-interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler;
-interface ICoreWebView2WindowCloseRequestedEventHandler;
-interface ICoreWebView2WindowFeatures;
-interface ICoreWebView2ZoomFactorChangedEventHandler;
-interface ICoreWebView2IsMutedChangedEventHandler;
-interface ICoreWebView2IsDocumentPlayingAudioChangedEventHandler;
-
-// Enums and structs
-
-/// Specifies the image format for the `ICoreWebView2::CapturePreview` method.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT {
-
- /// Indicates that the PNG image format is used.
-
- COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG,
-
- /// Indicates the JPEG image format is used.
-
- COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG,
-} COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT;
-
-/// Kind of cookie SameSite status used in the ICoreWebView2Cookie interface.
-/// These fields match those as specified in https://developer.mozilla.org/docs/Web/HTTP/Cookies#.
-/// Learn more about SameSite cookies here: https://tools.ietf.org/html/draft-west-first-party-cookies-07
-[v1_enum]
-typedef enum COREWEBVIEW2_COOKIE_SAME_SITE_KIND {
- /// None SameSite type. No restrictions on cross-site requests.
- COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE,
- /// Lax SameSite type. The cookie will be sent with "same-site" requests, and with "cross-site" top level navigation.
- COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX,
- /// Strict SameSite type. The cookie will only be sent along with "same-site" requests.
- COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT,
-} COREWEBVIEW2_COOKIE_SAME_SITE_KIND;
-
-/// Kind of cross origin resource access allowed for host resources during download.
-/// Note that other normal access checks like same origin DOM access check and [Content
-/// Security Policy](https://developer.mozilla.org/docs/Web/HTTP/CSP) still apply.
-/// The following table illustrates the host resource cross origin access according to
-/// access context and `COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND`.
-///
-/// Cross Origin Access Context | DENY | ALLOW | DENY_CORS
-/// --- | --- | --- | ---
-/// From DOM like src of img, script or iframe element| Deny | Allow | Allow
-/// From Script like Fetch or XMLHttpRequest| Deny | Allow | Deny
-[v1_enum]
-typedef enum COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND {
- /// All cross origin resource access is denied, including normal sub resource access
- /// as src of a script or image element.
- COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY,
-
- /// All cross origin resource access is allowed, including accesses that are
- /// subject to Cross-Origin Resource Sharing(CORS) check. The behavior is similar to
- /// a web site sends back http header Access-Control-Allow-Origin: *.
- COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW,
-
- /// Cross origin resource access is allowed for normal sub resource access like
- /// as src of a script or image element, while any access that subjects to CORS check
- /// will be denied.
- /// See [Cross-Origin Resource Sharing](https://developer.mozilla.org/docs/Web/HTTP/CORS)
- /// for more information.
- COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS,
-} COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND;
-
-/// Specifies the JavaScript dialog type used in the
-/// `ICoreWebView2ScriptDialogOpeningEventHandler` interface.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_SCRIPT_DIALOG_KIND {
-
- /// Indicates that the dialog uses the `window.alert` JavaScript function.
-
- COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT,
-
- /// Indicates that the dialog uses the `window.confirm` JavaScript function.
-
- COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM,
-
- /// Indicates that the dialog uses the `window.prompt` JavaScript function.
-
- COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT,
-
- /// Indicates that the dialog uses the `beforeunload` JavaScript event.
-
- COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD,
-} COREWEBVIEW2_SCRIPT_DIALOG_KIND;
-
-/// Specifies the process failure type used in the
-/// `ICoreWebView2ProcessFailedEventHandler` interface. The values in this enum
-/// make reference to the process kinds in the Chromium architecture. For more
-/// information about what these processes are and what they do, see
-/// [Browser Architecture - Inside look at modern web browser](https://developers.google.com/web/updates/2018/09/inside-browser-part1).
-
-[v1_enum]
-typedef enum COREWEBVIEW2_PROCESS_FAILED_KIND {
-
- /// Indicates that the browser process ended unexpectedly. The WebView
- /// automatically moves to the Closed state. The app has to recreate a new
- /// WebView to recover from this failure.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED,
-
- /// Indicates that the main frame's render process ended unexpectedly. A new
- /// render process is created automatically and navigated to an error page.
- /// You can use the `Reload` method to try to reload the page that failed.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED,
-
- /// Indicates that the main frame's render process is unresponsive.
-
- // Note that this does not seem to work right now.
- // Does not fire for simple long running script case, the only related test
- // SitePerProcessBrowserTest::NoCommitTimeoutForInvisibleWebContents is
- // disabled.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE,
-
- /// Indicates that a frame-only render process ended unexpectedly. The process
- /// exit does not affect the top-level document, only a subset of the
- /// subframes within it. The content in these frames is replaced with an error
- /// page in the frame.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED,
-
- /// Indicates that a utility process ended unexpectedly.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED,
-
- /// Indicates that a sandbox helper process ended unexpectedly.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED,
-
- /// Indicates that the GPU process ended unexpectedly.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED,
-
- /// Indicates that a PPAPI plugin process ended unexpectedly.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED,
-
- /// Indicates that a PPAPI plugin broker process ended unexpectedly.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED,
-
- /// Indicates that a process of unspecified kind ended unexpectedly.
-
- COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED,
-} COREWEBVIEW2_PROCESS_FAILED_KIND;
-
-/// Specifies the process failure reason used in the
-/// `ICoreWebView2ProcessFailedEventHandler` interface.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_PROCESS_FAILED_REASON {
-
- /// An unexpected process failure occurred.
- COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED,
-
- /// The process became unresponsive.
- /// This only applies to the main frame's render process.
-
- COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE,
-
- /// The process was terminated. For example, from Task Manager.
-
- COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED,
-
- /// The process crashed.
-
- COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED,
-
- /// The process failed to launch.
-
- COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED,
-
- /// The process died due to running out of memory.
-
- COREWEBVIEW2_PROCESS_FAILED_REASON_OUT_OF_MEMORY,
-} COREWEBVIEW2_PROCESS_FAILED_REASON;
-
-/// Indicates the type of a permission request.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_PERMISSION_KIND {
-
- /// Indicates an unknown permission.
-
- COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION,
-
- /// Indicates permission to capture audio.
-
- COREWEBVIEW2_PERMISSION_KIND_MICROPHONE,
-
- /// Indicates permission to capture video.
-
- COREWEBVIEW2_PERMISSION_KIND_CAMERA,
-
- /// Indicates permission to access geolocation.
-
- COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION,
-
- /// Indicates permission to send web notifications. This permission request
- /// is currently auto-rejected and no event is run for it.
-
- COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS,
-
- /// Indicates permission to access generic sensor. Generic Sensor covering
- /// ambient-light-sensor, accelerometer, gyroscope, and magnetometer.
-
- COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS,
-
- /// Indicates permission to read the system clipboard without a user gesture.
-
- COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ,
-} COREWEBVIEW2_PERMISSION_KIND;
-
-/// Specifies the response to a permission request.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_PERMISSION_STATE {
-
- /// Specifies that the default browser behavior is used, which normally
- /// prompt users for decision.
-
- COREWEBVIEW2_PERMISSION_STATE_DEFAULT,
-
- /// Specifies that the permission request is granted.
-
- COREWEBVIEW2_PERMISSION_STATE_ALLOW,
-
- /// Specifies that the permission request is denied.
-
- COREWEBVIEW2_PERMISSION_STATE_DENY,
-} COREWEBVIEW2_PERMISSION_STATE;
-
-/// Indicates the error status values for web navigations.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_WEB_ERROR_STATUS {
-
- /// Indicates that an unknown error occurred.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN,
-
- /// Indicates that the SSL certificate common name does not match the web
- /// address.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT,
-
- /// Indicates that the SSL certificate has expired.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED,
-
- /// Indicates that the SSL client certificate contains errors.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS,
-
- /// Indicates that the SSL certificate has been revoked.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED,
-
- /// Indicates that the SSL certificate is not valid. The certificate may not
- /// match the public key pins for the host name, the certificate is signed
- /// by an untrusted authority or using a weak sign algorithm, the certificate
- /// claimed DNS names violate name constraints, the certificate contains a
- /// weak key, the validity period of the certificate is too long, lack of
- /// revocation information or revocation mechanism, non-unique host name,
- /// lack of certificate transparency information, or the certificate is
- /// chained to a
- /// \[legacy Symantec root\]\[GoogleblogSecurity201803DistrustSymantecPkiImmediateHtml\].
- ///
- /// \[GoogleblogSecurity201803DistrustSymantecPkiImmediateHtml\]: https://security.googleblog.com/2018/03/distrust-of-symantec-pki-immediate.html "Distrust of the Symantec PKI: Immediate action needed by site operators | Google Security Blog"
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID,
-
- /// Indicates that the host is unreachable.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE,
-
- /// Indicates that the connection has timed out.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT,
-
- /// Indicates that the server returned an invalid or unrecognized response.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE,
-
- /// Indicates that the connection was stopped.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED,
-
- /// Indicates that the connection was reset.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET,
-
- /// Indicates that the Internet connection has been lost.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED,
-
- /// Indicates that a connection to the destination was not established.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT,
-
- /// Indicates that the provided host name was not able to be resolved.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED,
-
- /// Indicates that the operation was canceled.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED,
-
- /// Indicates that the request redirect failed.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED,
-
- /// Indicates that an unexpected error occurred.
-
- COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR,
-} COREWEBVIEW2_WEB_ERROR_STATUS;
-
-/// Specifies the web resource request contexts.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_WEB_RESOURCE_CONTEXT {
-
- /// Specifies all resources.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL,
-
- /// Specifies a document resource.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT,
-
- /// Specifies a CSS resource.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET,
-
- /// Specifies an image resource.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE,
-
- /// Specifies another media resource such as a video.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA,
-
- /// Specifies a font resource.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT,
-
- /// Specifies a script resource.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT,
-
- /// Specifies an XML HTTP request.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST,
-
- /// Specifies a Fetch API communication.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH,
-
- /// Specifies a TextTrack resource.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK,
-
- /// Specifies an EventSource API communication.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE,
-
- /// Specifies a WebSocket API communication.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET,
-
- /// Specifies a Web App Manifest.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST,
-
- /// Specifies a Signed HTTP Exchange.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE,
-
- /// Specifies a Ping request.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING,
-
- /// Specifies a CSP Violation Report.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT,
-
- /// Specifies an other resource.
-
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER
-} COREWEBVIEW2_WEB_RESOURCE_CONTEXT;
-
-/// Specifies the reason for moving focus.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_MOVE_FOCUS_REASON {
-
- /// Specifies that the code is setting focus into WebView.
-
- COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC,
-
- /// Specifies that the focus is moving due to Tab traversal forward.
-
- COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT,
-
- /// Specifies that the focus is moving due to Tab traversal backward.
-
- COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS,
-} COREWEBVIEW2_MOVE_FOCUS_REASON;
-
-/// Specifies the key event type that triggered an `AcceleratorKeyPressed`
-/// event.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_KEY_EVENT_KIND {
-
- /// Specifies that the key event type corresponds to window message
- /// `WM_KEYDOWN`.
-
- COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN,
-
- /// Specifies that the key event type corresponds to window message
- /// `WM_KEYUP`.
-
- COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP,
-
- /// Specifies that the key event type corresponds to window message
- /// `WM_SYSKEYDOWN`.
-
- COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN,
-
- /// Specifies that the key event type corresponds to window message
- /// `WM_SYSKEYUP`.
-
- COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP,
-} COREWEBVIEW2_KEY_EVENT_KIND;
-
-/// Specifies the browser process exit type used in the
-/// `ICoreWebView2BrowserProcessExitedEventArgs` interface.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND {
-
- /// Indicates that the browser process ended normally.
-
- COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_NORMAL,
-
- /// Indicates that the browser process ended unexpectedly.
- /// A `ProcessFailed` event will also be sent to listening WebViews from the
- /// `ICoreWebView2Environment` associated to the failed process.
-
- COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_FAILED
-} COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND;
-
-/// Contains the information packed into the `LPARAM` sent to a Win32 key
-/// event. For more information about `WM_KEYDOWN`, navigate to
-/// \[WM_KEYDOWN message\]\[WindowsWin32InputdevWmKeydown\].
-///
-/// \[WindowsWin32InputdevWmKeydown\]: /windows/win32/inputdev/wm-keydown "WM_KEYDOWN message | Microsoft Docs"
-
-typedef struct COREWEBVIEW2_PHYSICAL_KEY_STATUS {
-
- /// Specifies the repeat count for the current message.
-
- UINT32 RepeatCount;
-
- /// Specifies the scan code.
-
- UINT32 ScanCode;
-
- /// Indicates that the key is an extended key.
-
- BOOL IsExtendedKey;
-
- /// Indicates that a menu key is held down (context code).
-
- BOOL IsMenuKeyDown;
-
- /// Indicates that the key was held down.
-
- BOOL WasKeyDown;
-
- /// Indicates that the key was released.
-
- BOOL IsKeyReleased;
-} COREWEBVIEW2_PHYSICAL_KEY_STATUS;
-
-/// A value representing RGBA color (Red, Green, Blue, Alpha) for WebView2.
-/// Each component takes a value from 0 to 255, with 0 being no intensity
-/// and 255 being the highest intensity.
-
-typedef struct COREWEBVIEW2_COLOR {
-
- /// Specifies the intensity of the Alpha ie. opacity value. 0 is transparent,
- /// 255 is opaque.
-
- BYTE A;
-
- /// Specifies the intensity of the Red color.
-
- BYTE R;
-
- /// Specifies the intensity of the Green color.
-
- BYTE G;
-
- /// Specifies the intensity of the Blue color.
-
- BYTE B;
-} COREWEBVIEW2_COLOR;
-
-/// Mouse event type used by SendMouseInput to convey the type of mouse event
-/// being sent to WebView. The values of this enum align with the matching
-/// WM_* window messages.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_MOUSE_EVENT_KIND {
-
- /// Mouse horizontal wheel scroll event, WM_MOUSEHWHEEL.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL = 0x020E,
-
- /// Left button double click mouse event, WM_LBUTTONDBLCLK.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOUBLE_CLICK = 0x0203,
-
- /// Left button down mouse event, WM_LBUTTONDOWN.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOWN = 0x0201,
-
- /// Left button up mouse event, WM_LBUTTONUP.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_UP = 0x0202,
-
- /// Mouse leave event, WM_MOUSELEAVE.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE = 0x02A3,
-
- /// Middle button double click mouse event, WM_MBUTTONDBLCLK.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOUBLE_CLICK = 0x0209,
-
- /// Middle button down mouse event, WM_MBUTTONDOWN.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOWN = 0x0207,
-
- /// Middle button up mouse event, WM_MBUTTONUP.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_UP = 0x0208,
-
- /// Mouse move event, WM_MOUSEMOVE.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE = 0x0200,
-
- /// Right button double click mouse event, WM_RBUTTONDBLCLK.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOUBLE_CLICK = 0x0206,
-
- /// Right button down mouse event, WM_RBUTTONDOWN.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOWN = 0x0204,
-
- /// Right button up mouse event, WM_RBUTTONUP.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_UP = 0x0205,
-
- /// Mouse wheel scroll event, WM_MOUSEWHEEL.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL = 0x020A,
-
- /// First or second X button double click mouse event, WM_XBUTTONDBLCLK.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK = 0x020D,
-
- /// First or second X button down mouse event, WM_XBUTTONDOWN.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN = 0x020B,
-
- /// First or second X button up mouse event, WM_XBUTTONUP.
-
- COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP = 0x020C,
-} COREWEBVIEW2_MOUSE_EVENT_KIND;
-
-/// Mouse event virtual keys associated with a COREWEBVIEW2_MOUSE_EVENT_KIND for
-/// SendMouseInput. These values can be combined into a bit flag if more than
-/// one virtual key is pressed for the event. The values of this enum align
-/// with the matching MK_* mouse keys.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
-
- /// No additional keys pressed.
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_NONE = 0x0,
-
- /// Left mouse button is down, MK_LBUTTON.
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_LEFT_BUTTON = 0x0001,
-
- /// Right mouse button is down, MK_RBUTTON.
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_RIGHT_BUTTON = 0x0002,
-
- /// SHIFT key is down, MK_SHIFT.
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_SHIFT = 0x0004,
-
- /// CTRL key is down, MK_CONTROL.
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_CONTROL = 0x0008,
-
- /// Middle mouse button is down, MK_MBUTTON.
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_MIDDLE_BUTTON = 0x0010,
-
- /// First X button is down, MK_XBUTTON1
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON1 = 0x0020,
-
- /// Second X button is down, MK_XBUTTON2
-
- COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON2 = 0x0040,
-} COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS;
-cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS);")
-
-/// Pointer event type used by SendPointerInput to convey the type of pointer
-/// event being sent to WebView. The values of this enum align with the
-/// matching WM_POINTER* window messages.
-
-[v1_enum]
-typedef enum COREWEBVIEW2_POINTER_EVENT_KIND {
-
- /// Corresponds to WM_POINTERACTIVATE.
-
- COREWEBVIEW2_POINTER_EVENT_KIND_ACTIVATE = 0x024B,
-
- /// Corresponds to WM_POINTERDOWN.
-
- COREWEBVIEW2_POINTER_EVENT_KIND_DOWN = 0x0246,
-
- /// Corresponds to WM_POINTERENTER.
-
- COREWEBVIEW2_POINTER_EVENT_KIND_ENTER = 0x0249,
-
- /// Corresponds to WM_POINTERLEAVE.
-
- COREWEBVIEW2_POINTER_EVENT_KIND_LEAVE = 0x024A,
-
- /// Corresponds to WM_POINTERUP.
-
- COREWEBVIEW2_POINTER_EVENT_KIND_UP = 0x0247,
-
- /// Corresponds to WM_POINTERUPDATE.
-
- COREWEBVIEW2_POINTER_EVENT_KIND_UPDATE = 0x0245,
-} COREWEBVIEW2_POINTER_EVENT_KIND;
-
-/// Mode for how the Bounds property is interpreted in relation to the RasterizationScale property.
-[v1_enum]
-typedef enum COREWEBVIEW2_BOUNDS_MODE {
-
- /// Bounds property represents raw pixels. Physical size of Webview is not impacted by RasterizationScale.
-
- COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS,
-
- /// Bounds property represents logicl pixels and the RasterizationScale property is used to get the physical size of the WebView.
-
- COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE,
-} COREWEBVIEW2_BOUNDS_MODE;
-
-/// Specifies the client certificate kind.
-[v1_enum] typedef enum COREWEBVIEW2_CLIENT_CERTIFICATE_KIND {
- /// Specifies smart card certificate.
- COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_SMART_CARD,
- /// Specifies PIN certificate.
- COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_PIN,
- /// Specifies other certificate.
- COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_OTHER,
-} COREWEBVIEW2_CLIENT_CERTIFICATE_KIND;
-
-/// State of the download operation.
-[v1_enum]
-typedef enum COREWEBVIEW2_DOWNLOAD_STATE {
- /// The download is in progress.
- COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS,
- /// The connection with the file host was broken. The `InterruptReason` property
- /// can be accessed from `ICoreWebView2DownloadOperation`. See
- /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON` for descriptions of kinds of
- /// interrupt reasons. Host can check whether an interrupted download can be
- /// resumed with the `CanResume` property on the `ICoreWebView2DownloadOperation`.
- /// Once resumed, a download is in the `COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS` state.
- COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED,
- /// The download completed successfully.
- COREWEBVIEW2_DOWNLOAD_STATE_COMPLETED,
-} COREWEBVIEW2_DOWNLOAD_STATE;
-
-/// Reason why a download was interrupted.
-[v1_enum]
-typedef enum COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON {
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE,
-
- /// Generic file error.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
- /// Access denied due to security restrictions.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED,
- /// Disk full. User should free some space or choose a different location to
- /// store the file.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
- /// Result file path with file name is too long.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG,
- /// File is too large for file system.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE,
- /// Microsoft Defender Smartscreen detected a virus in the file.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS,
- /// File was in use, too many files opened, or out of memory.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
- /// File blocked by local policy.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED_BY_POLICY,
- /// Security check failed unexpectedly. Microsoft Defender SmartScreen could
- /// not scan this file.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED,
- /// Seeking past the end of a file in opening a file, as part of resuming an
- /// interrupted download. The file did not exist or was not as large as
- /// expected. Partially downloaded file was truncated or deleted, and download
- /// will be restarted automatically.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
- /// Partial file did not match the expected hash and was deleted. Download
- /// will be restarted automatically.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH,
-
- /// Generic network error. User can retry the download manually.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- /// Network operation timed out.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT,
- /// Network connection lost. User can retry the download manually.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED,
- /// Server has gone down. User can retry the download manually.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN,
- /// Network request invalid because original or redirected URI is invalid, has
- /// an unsupported scheme, or is disallowed by network policy.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST,
-
- /// Generic server error. User can retry the download manually.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED,
- /// Server does not support range requests.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE,
- /// Server does not have the requested data.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT,
- /// Server did not authorize access to resource.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED,
- /// Server certificate problem.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CERTIFICATE_PROBLEM,
- /// Server access forbidden.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN,
- /// Unexpected server response. Responding server may not be intended server.
- /// User can retry the download manually.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE,
- /// Server sent fewer bytes than the Content-Length header. Content-length
- /// header may be invalid or connection may have closed. Download is treated
- /// as complete unless there are
- /// [strong validators](https://tools.ietf.org/html/rfc7232#section-2) present
- /// to interrupt the download.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH,
- /// Unexpected cross-origin redirect.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT,
-
- /// User canceled the download.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED,
- /// User shut down the WebView. Resuming downloads that were interrupted
- /// during shutdown is not yet supported.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN,
- /// User paused the download.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED,
-
- /// WebView crashed.
- COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED,
-} COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON;
-
-/// The orientation for printing, used by the `Orientation` property on
-/// `ICoreWebView2PrintSettings`. Currently only printing to PDF is supported.
-[v1_enum]
-typedef enum COREWEBVIEW2_PRINT_ORIENTATION
-{
- /// Print the page(s) in portrait orientation.
- COREWEBVIEW2_PRINT_ORIENTATION_PORTRAIT,
-
- /// Print the page(s) in landscape orientation.
- COREWEBVIEW2_PRINT_ORIENTATION_LANDSCAPE,
-} COREWEBVIEW2_PRINT_ORIENTATION;
-
-/// The default download dialog can be aligned to any of the WebView corners
-/// by setting the `DefaultDownloadDialogCornerAlignment` property. The default
-/// position is top-right corner.
-[v1_enum]
-typedef enum COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT {
-
- /// Top-left corner of the WebView.
- COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_LEFT,
-
- /// Top-right corner of the WebView.
- COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_RIGHT,
-
- /// Bottom-left corner of the WebView.
- COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_LEFT,
-
- /// Bottom-right corner of the WebView.
- COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_RIGHT,
-
-} COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT;
-
-// End of enums and structs
-
-/// WebView2 enables you to host web content using the latest Microsoft Edge
-/// browser and web technology.
-
-[uuid(76eceacb-0462-4d94-ac83-423a6793775e), object, pointer_default(unique)]
-interface ICoreWebView2 : IUnknown {
-
- /// The `ICoreWebView2Settings` object contains various modifiable settings
- /// for the running WebView.
-
- [propget] HRESULT Settings([out, retval] ICoreWebView2Settings** settings);
-
- /// The URI of the current top level document. This value potentially
- /// changes as a part of the `SourceChanged` event that runs for some cases
- /// such as navigating to a different site or fragment navigations. It
- /// remains the same for other types of navigations such as page refreshes
- /// or `history.pushState` with the same URL as the current page.
- ///
- /// \snippet ControlComponent.cpp SourceChanged
-
- [propget] HRESULT Source([out, retval] LPWSTR* uri);
-
- /// Cause a navigation of the top-level document to run to the specified URI.
- /// For more information, navigate to \[Navigation events\]\[MicrosoftEdgeWebview2ConceptsNavigationevents\].
- ///
- /// \[MicrosoftEdgeWebview2ConceptsNavigationevents\]: /microsoft-edge/webview2/concepts/navigation-events "Navigation events | Microsoft Docs"
- ///
- /// \> [!NOTE]\n\> This operation starts a navigation and the corresponding
- /// `NavigationStarting` event triggers sometime after `Navigate` runs.
- ///
- /// \snippet ControlComponent.cpp Navigate
-
- HRESULT Navigate([in] LPCWSTR uri);
-
- /// Initiates a navigation to htmlContent as source HTML of a new document.
- /// The `htmlContent` parameter may not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size.
- /// The origin of the new page is `about:blank`.
- ///
- /// \snippet SettingsComponent.cpp NavigateToString
-
- HRESULT NavigateToString([in] LPCWSTR htmlContent);
-
- /// Add an event handler for the `NavigationStarting` event.
- /// `NavigationStarting` runs when the WebView main frame is requesting
- /// permission to navigate to a different URI. Redirects trigger this
- /// operation as well, and the navigation id is the same as the original
- /// one.
- ///
- /// Navigations will be blocked until all `NavigationStarting` event handlers
- /// return.
- ///
- /// \snippet SettingsComponent.cpp NavigationStarting
-
- HRESULT add_NavigationStarting(
- [in] ICoreWebView2NavigationStartingEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with `add_NavigationStarting`.
-
- HRESULT remove_NavigationStarting(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `ContentLoading` event. `ContentLoading`
- /// triggers before any content is loaded, including scripts added with
- /// `AddScriptToExecuteOnDocumentCreated`. `ContentLoading` does not trigger
- /// if a same page navigation occurs (such as through `fragment`
- /// navigations or `history.pushState` navigations). This operation
- /// follows the `NavigationStarting` and `SourceChanged` events and precedes
- /// the `HistoryChanged` and `NavigationCompleted` events.
-
- HRESULT add_ContentLoading(
- [in] ICoreWebView2ContentLoadingEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with `add_ContentLoading`.
-
- HRESULT remove_ContentLoading(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `SourceChanged` event. `SourceChanged`
- /// triggers when the `Source` property changes. `SourceChanged` runs when
- /// navigating to a different site or fragment navigations. It does not
- /// trigger for other types of navigations such as page refreshes or
- /// `history.pushState` with the same URL as the current page.
- /// `SourceChanged` runs before `ContentLoading` for navigation to a new
- /// document.
- ///
- /// \snippet ControlComponent.cpp SourceChanged
-
- HRESULT add_SourceChanged(
- [in] ICoreWebView2SourceChangedEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with `add_SourceChanged`.
-
- HRESULT remove_SourceChanged(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `HistoryChanged` event. `HistoryChanged`
- /// listens to the change of navigation history for the top level document.
- /// Use `HistoryChanged` to verify that the `CanGoBack` or `CanGoForward`
- /// value has changed. `HistoryChanged` also runs for using `GoBack`or
- /// `GoForward`. `HistoryChanged` runs after `SourceChanged` and
- /// `ContentLoading`.
- ///
- /// \snippet ControlComponent.cpp HistoryChanged
-
- HRESULT add_HistoryChanged(
- [in] ICoreWebView2HistoryChangedEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with `add_HistoryChanged`.
-
- HRESULT remove_HistoryChanged(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `NavigationCompleted` event.
- /// `NavigationCompleted` runs when the WebView has completely loaded
- /// (concurrently when `body.onload` runs) or loading stopped with error.
- ///
- /// \snippet ControlComponent.cpp NavigationCompleted
-
- HRESULT add_NavigationCompleted(
- [in] ICoreWebView2NavigationCompletedEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with `add_NavigationCompleted`.
-
- HRESULT remove_NavigationCompleted(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `FrameNavigationStarting` event.
- /// `FrameNavigationStarting` triggers when a child frame in the WebView
- /// requests permission to navigate to a different URI. Redirects trigger
- /// this operation as well, and the navigation id is the same as the original
- /// one.
- ///
- /// Navigations will be blocked until all `FrameNavigationStarting` event
- /// handlers return.
- ///
- /// \snippet SettingsComponent.cpp FrameNavigationStarting
-
- HRESULT add_FrameNavigationStarting(
- [in] ICoreWebView2NavigationStartingEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with
- /// `add_FrameNavigationStarting`.
-
- HRESULT remove_FrameNavigationStarting(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `FrameNavigationCompleted` event.
- /// `FrameNavigationCompleted` triggers when a child frame has completely
- /// loaded (concurrently when `body.onload` has triggered) or loading stopped with error.
- ///
- /// \snippet ControlComponent.cpp FrameNavigationCompleted
-
- HRESULT add_FrameNavigationCompleted(
- [in] ICoreWebView2NavigationCompletedEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with
- /// `add_FrameNavigationCompleted`.
-
- HRESULT remove_FrameNavigationCompleted(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `ScriptDialogOpening` event.
- /// `ScriptDialogOpening` runs when a JavaScript dialog (`alert`, `confirm`,
- /// `prompt`, or `beforeunload`) displays for the webview. This event only
- /// triggers if the `ICoreWebView2Settings::AreDefaultScriptDialogsEnabled`
- /// property is set to `FALSE`. The `ScriptDialogOpening` event suppresses
- /// dialogs or replaces default dialogs with custom dialogs.
- ///
- /// If a deferral is not taken on the event args, the subsequent scripts are
- /// blocked until the event handler returns. If a deferral is taken, the
- /// scripts are blocked until the deferral is completed.
- ///
- /// \snippet SettingsComponent.cpp ScriptDialogOpening
-
- HRESULT add_ScriptDialogOpening(
- [in] ICoreWebView2ScriptDialogOpeningEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with `add_ScriptDialogOpening`.
-
- HRESULT remove_ScriptDialogOpening(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `PermissionRequested` event.
- /// `PermissionRequested` runs when content in a WebView requests permission
- /// to access some privileged resources.
- ///
- /// If a deferral is not taken on the event args, the subsequent scripts are
- /// blocked until the event handler returns. If a deferral is taken, the
- /// scripts are blocked until the deferral is completed.
- ///
- /// \snippet SettingsComponent.cpp PermissionRequested
-
- HRESULT add_PermissionRequested(
- [in] ICoreWebView2PermissionRequestedEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with `add_PermissionRequested`.
-
- HRESULT remove_PermissionRequested(
- [in] EventRegistrationToken token);
-
- /// Add an event handler for the `ProcessFailed` event. `ProcessFailed` runs
- /// when a WebView process ends unexpectedly or becomes unresponsive.
- ///
- /// \snippet ProcessComponent.cpp ProcessFailed
-
- HRESULT add_ProcessFailed(
- [in] ICoreWebView2ProcessFailedEventHandler* eventHandler,
- [out] EventRegistrationToken* token);
-
- /// Remove an event handler previously added with add_ProcessFailed.
-
- HRESULT remove_ProcessFailed(
- [in] EventRegistrationToken token);
-
- /// Add the provided JavaScript to a list of scripts that should be run after
- /// the global object has been created, but before the HTML document has
- /// been parsed and before any other script included by the HTML document is
- /// run. This method injects a script that runs on all top-level document
- /// and child frame page navigations. This method runs asynchronously, and
- /// you must wait for the completion handler to finish before the injected
- /// script is ready to run. When this method completes, the `Invoke` method
- /// of the handler is run with the `id` of the injected script. `id` is a
- /// string. To remove the injected script, use
- /// `RemoveScriptToExecuteOnDocumentCreated`.
- ///
- /// If the method is run in add_NewWindowRequested handler it should be called
- /// after the new window is set. For more details see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`.
- ///
- /// \> [!NOTE]\n\> If an HTML document is running in a sandbox of some kind using
- /// \[sandbox\]\[MdnDocsWebHtmlElementIframeAttrSandbox\]
- /// properties or the
- /// \[Content-Security-Policy\]\[MdnDocsWebHttpHeadersContentSecurityPolicy\]
- /// HTTP header affects the script that runs. For example, if the
- /// `allow-modals` keyword is not set then requests to run the `alert`
- /// function are ignored.
- ///
- /// \snippet ScriptComponent.cpp AddScriptToExecuteOnDocumentCreated
- ///
- /// \[MdnDocsWebHtmlElementIframeAttrSandbox\]: https://developer.mozilla.org/docs/Web/HTML/Element/iframe#attr-sandbox "sandbox - \