├── README.md ├── config.py ├── redist ├── EventToken.h ├── LICENSE.txt ├── WebView2ExperimentalEnvironmentOptions.h ├── WebView2EnvironmentOptions.h └── WebView2Experimental.h ├── register_types.h ├── register_types.cpp ├── SCsub ├── LICENSE ├── webview.h ├── webview_dummy.cpp ├── doc_classes └── WebViewOverlay.xml ├── webview_common.cpp ├── .gitignore ├── webview_wk.mm ├── webview_edge.cpp └── webview_icons.h /README.md: -------------------------------------------------------------------------------- 1 | Experimental native WebView control for Godot 3.2.x, works on macOS (WKWebView) and Windows (Edge WebView2). 2 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | def can_build(env, platform): 2 | return True 3 | 4 | def get_doc_classes(): 5 | return [ 6 | "WebViewOverlay" 7 | ] 8 | 9 | def get_doc_path(): 10 | return "doc_classes" 11 | 12 | def configure(env): 13 | pass 14 | -------------------------------------------------------------------------------- /redist/EventToken.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* EventToken.h */ 3 | /*************************************************************************/ 4 | 5 | #ifndef EVENT_TOKEN_H 6 | #define EVENT_TOKEN_H 7 | 8 | typedef struct EventRegistrationToken { 9 | __int64 value; 10 | } EventRegistrationToken; 11 | 12 | #endif // EVENT_TOKEN_H 13 | -------------------------------------------------------------------------------- /register_types.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* register_types.h */ 3 | /*************************************************************************/ 4 | 5 | #ifndef NATIVE_WEBVIEW_REGISTER_TYPES_H 6 | #define NATIVE_WEBVIEW_REGISTER_TYPES_H 7 | 8 | void register_webview_module_types(); 9 | void unregister_webview_module_types(); 10 | 11 | #endif // NATIVE_WEBVIEW_REGISTER_TYPES_H 12 | -------------------------------------------------------------------------------- /register_types.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* register_types.cpp */ 3 | /*************************************************************************/ 4 | 5 | #include "register_types.h" 6 | 7 | #include "core/class_db.h" 8 | #include "core/engine.h" 9 | 10 | #include "webview.h" 11 | 12 | void register_webview_module_types() { 13 | ClassDB::register_class(); 14 | WebViewOverlay::init(); 15 | } 16 | 17 | void unregister_webview_module_types() { 18 | WebViewOverlay::finish(); 19 | } 20 | -------------------------------------------------------------------------------- /SCsub: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | Import("env") 4 | Import("env_modules") 5 | 6 | env_native_webview = env_modules.Clone() 7 | env_native_webview.disable_warnings() 8 | 9 | env_native_webview.add_source_files(env.modules_sources, "register_types.cpp") 10 | env_native_webview.add_source_files(env.modules_sources, "webview_common.cpp") 11 | 12 | if env["platform"] == "osx" or env["platform"] == "iphone" or env["platform"] == "tvos": 13 | env.Append(LINKFLAGS=["-framework", "WebKit"]) 14 | env_native_webview.add_source_files(env.modules_sources, "webview_wk.mm") 15 | 16 | elif env["platform"] == "windows": 17 | env_native_webview.Append(CPPPATH=["redist"]) 18 | env_native_webview.add_source_files(env.modules_sources, "webview_edge.cpp") 19 | 20 | else: 21 | env_native_webview.add_source_files(env.modules_sources, "webview_dummy.cpp") 22 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 bruvzg 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /redist/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) Microsoft Corporation. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * The name of Microsoft Corporation, or the names of its contributors 14 | may not be used to endorse or promote products derived from this 15 | software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /webview.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* webview.h */ 3 | /*************************************************************************/ 4 | 5 | #ifndef WEB_VIEW_H 6 | #define WEB_VIEW_H 7 | 8 | #include "scene/gui/control.h" 9 | 10 | /*************************************************************************/ 11 | 12 | class WebViewOverlayImplementation; 13 | class WebViewOverlay : public Control { 14 | GDCLASS(WebViewOverlay, Control); 15 | 16 | WebViewOverlayImplementation *data; 17 | 18 | String home_url; 19 | String user_agent; 20 | double zoom = 1.0f; 21 | bool no_background = false; 22 | int ctrl_err_status = -1; 23 | static int err_status; 24 | 25 | Ref icon_main; 26 | Ref icon_error; 27 | 28 | protected: 29 | void _notification(int p_what); 30 | static void _bind_methods(); 31 | 32 | void _draw_placeholder(); 33 | void _draw_error(const String &p_error); 34 | 35 | public: 36 | WebViewOverlay(); 37 | ~WebViewOverlay(); 38 | 39 | void set_no_background(bool p_bg); 40 | bool get_no_background() const; 41 | 42 | void set_url(const String& p_url); 43 | String get_url() const; 44 | 45 | void set_user_agent(const String& p_user_agent); 46 | String get_user_agent() const; 47 | 48 | double get_zoom_level() const; 49 | void set_zoom_level(double p_zoom); 50 | 51 | String get_title() const; 52 | 53 | void load_string(const String &p_source); 54 | void execute_java_script(const String &p_script); 55 | 56 | void get_snapshot(int p_width); 57 | 58 | bool can_go_back() const; 59 | bool can_go_forward() const; 60 | 61 | bool is_ready() const; 62 | bool is_loading() const; 63 | bool is_secure_content() const; 64 | void go_back(); 65 | void go_forward(); 66 | void reload(); 67 | void stop(); 68 | 69 | static void init(); 70 | static void finish(); 71 | }; 72 | 73 | #endif // WEB_VIEW_H 74 | -------------------------------------------------------------------------------- /webview_dummy.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* webview_dummy.cpp */ 3 | /*************************************************************************/ 4 | 5 | #include "webview.h" 6 | 7 | WebViewOverlay::WebViewOverlay() { 8 | } 9 | 10 | WebViewOverlay::~WebViewOverlay() { 11 | } 12 | 13 | void WebViewOverlay::_notification(int p_what) { 14 | switch (p_what) { 15 | case NOTIFICATION_DRAW: { 16 | _draw_error("Not supported!"); 17 | } break; 18 | default: { 19 | //NOP 20 | } break; 21 | } 22 | } 23 | 24 | void WebViewOverlay::get_snapshot(int p_width) {} 25 | 26 | void WebViewOverlay::set_no_background(bool p_bg) { 27 | no_background = p_bg; 28 | } 29 | 30 | bool WebViewOverlay::get_no_background() const { 31 | return no_background; 32 | } 33 | 34 | void WebViewOverlay::set_url(const String& p_url) { 35 | home_url = p_url; 36 | } 37 | 38 | String WebViewOverlay::get_url() const { 39 | return home_url; 40 | } 41 | 42 | void WebViewOverlay::set_user_agent(const String& p_user_agent) { 43 | user_agent = p_user_agent; 44 | } 45 | 46 | String WebViewOverlay::get_user_agent() const { 47 | return user_agent; 48 | } 49 | 50 | double WebViewOverlay::get_zoom_level() const { 51 | return zoom; 52 | } 53 | 54 | void WebViewOverlay::set_zoom_level(double p_zoom) { 55 | zoom = p_zoom; 56 | } 57 | 58 | String WebViewOverlay::get_title() const { 59 | return ""; 60 | } 61 | 62 | void WebViewOverlay::execute_java_script(const String &p_script) {} 63 | 64 | void WebViewOverlay::load_string(const String &p_source) {} 65 | 66 | bool WebViewOverlay::can_go_back() const { 67 | return false; 68 | } 69 | 70 | bool WebViewOverlay::can_go_forward() const { 71 | return false; 72 | } 73 | 74 | bool WebViewOverlay::is_ready() const { 75 | return false; 76 | } 77 | 78 | bool WebViewOverlay::is_loading() const { 79 | return false; 80 | } 81 | 82 | bool WebViewOverlay::is_secure_content() const { 83 | return false; 84 | } 85 | 86 | void WebViewOverlay::go_back() {} 87 | 88 | void WebViewOverlay::go_forward() {} 89 | 90 | void WebViewOverlay::reload() {} 91 | 92 | void WebViewOverlay::stop() {} 93 | 94 | void WebViewOverlay::init() {} 95 | 96 | void WebViewOverlay::finish() {} -------------------------------------------------------------------------------- /redist/WebView2ExperimentalEnvironmentOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) Microsoft Corporation. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef __core_webview2_experimental_environment_options_h__ 6 | #define __core_webview2_experimental_environment_options_h__ 7 | 8 | #include 9 | #include 10 | 11 | #include "WebView2EnvironmentOptions.h" 12 | #include "webview2experimental.h" 13 | 14 | // This is a base COM class that implements IUnknown if there is no experimental 15 | // options, or ICoreWebView2ExperimentalEnvironmentOptions when there are 16 | // experimental options. 17 | template 21 | class CoreWebView2ExperimentalEnvironmentOptionsBase 22 | : public Microsoft::WRL::Implements< 23 | Microsoft::WRL::RuntimeClassFlags, 24 | IUnknown> { 25 | public: 26 | CoreWebView2ExperimentalEnvironmentOptionsBase() {} 27 | 28 | protected: 29 | ~CoreWebView2ExperimentalEnvironmentOptionsBase(){}; 30 | 31 | }; 32 | 33 | template 37 | class CoreWebView2ExperimentalEnvironmentOptionsClass 38 | : public Microsoft::WRL::RuntimeClass< 39 | Microsoft::WRL::RuntimeClassFlags, 40 | CoreWebView2EnvironmentOptionsBase, 44 | CoreWebView2ExperimentalEnvironmentOptionsBase> { 48 | public: 49 | CoreWebView2ExperimentalEnvironmentOptionsClass() {} 50 | 51 | protected: 52 | ~CoreWebView2ExperimentalEnvironmentOptionsClass() override{}; 53 | }; 54 | 55 | typedef CoreWebView2ExperimentalEnvironmentOptionsClass< 56 | decltype(&::CoTaskMemAlloc), 57 | ::CoTaskMemAlloc, 58 | decltype(&::CoTaskMemFree), 59 | ::CoTaskMemFree> 60 | CoreWebView2ExperimentalEnvironmentOptions; 61 | 62 | #endif // __core_webview2_experimental_environment_options_h__ 63 | -------------------------------------------------------------------------------- /doc_classes/WebViewOverlay.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Control that displays web pages (HTML / CSS / JavaScript). 5 | 6 | 7 | WebViewOverlay control uses the following native backends: 8 | * macOS: WKWebView 9 | * Windows: Microsoft Edge WebView2 10 | 11 | WebViewOverlay is rendered on top of the main window and have some restrictions: 12 | * Control should be used only in the main 2D viewport. 13 | * Control is always rendered on top of other controls / nodes. 14 | * Rotation or scale are ignored. 15 | * Shaders / materials, modulate and light mask are ignored. 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Returns [code]true[/code], if it is possible to navigate backward. 25 | 26 | 27 | 28 | 29 | 30 | 31 | Returns [code]true[/code], if it is possible to navigate forward. 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Runs the given JavaScript code asynchronously, script return value is ignored. 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Generates an image from the page's contents asynchronously. Snapshot can be taken from the hidden control as well. 50 | When the image is ready, [code]snapshot_ready[/code] signal is emitted. 51 | 52 | Note: Snapshots do not support media content (e.g. videos), WebGL content, CSS 3D transforms and do not include scrollbars. 53 | 54 | 55 | 56 | 57 | 58 | 59 | Returns current page title string. 60 | 61 | 62 | 63 | 64 | 65 | 66 | Navigates back, if possible. 67 | 68 | 69 | 70 | 71 | 72 | 73 | Navigates forward, if possible. 74 | 75 | 76 | 77 | 78 | 79 | 80 | Returns [code]true[/code] if current page is loading. 81 | 82 | 83 | 84 | 85 | 86 | 87 | Returns [code]true[/code] if control is initialized and ready to use. 88 | 89 | 90 | 91 | 92 | 93 | 94 | Returns [code]true[/code] if all resources on the current page are loaded through the encrypted connection. 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | Loads page from the [code]source[/code] string. 104 | 105 | 106 | 107 | 108 | 109 | 110 | Reloads current page. 111 | 112 | 113 | 114 | 115 | 116 | 117 | Stops current page loading process. 118 | 119 | 120 | 121 | 122 | 123 | If [code]true[/code], control background can be transparent. 124 | 125 | 126 | The URL of the current page. [code]"res:\\"[/code] and [code]"user:\\"[/code] schemas are supported on macOS only. 127 | 128 | 129 | The custom user agent string. 130 | 131 | 132 | The zoom factor of the page. 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | Emitted when [code]window.chrome.webview.postMessage(`message`);[/code] is called from JavaScript. 141 | 142 | 143 | 144 | 145 | Emitted when page loading process is finished. 146 | 147 | 148 | 149 | 150 | 151 | 152 | Emitted when page is opened in the new window. 153 | 154 | 155 | 156 | 157 | 158 | 159 | Emitted when page snapshot image is ready to use. 160 | 161 | 162 | 163 | 164 | Emitted when page loading process is started. 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /redist/WebView2EnvironmentOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) Microsoft Corporation. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef __core_webview2_environment_options_h__ 6 | #define __core_webview2_environment_options_h__ 7 | 8 | #include 9 | #include 10 | 11 | #include "webview2.h" 12 | #define CORE_WEBVIEW_TARGET_PRODUCT_VERSION L"90.0.781.0" 13 | 14 | #define COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(p) \ 15 | public: \ 16 | HRESULT STDMETHODCALLTYPE get_##p(LPWSTR* value) override { \ 17 | if (!value) \ 18 | return E_POINTER; \ 19 | *value = m_##p.Copy(); \ 20 | if ((*value == nullptr) && (m_##p.Get() != nullptr)) \ 21 | return HRESULT_FROM_WIN32(GetLastError()); \ 22 | return S_OK; \ 23 | } \ 24 | HRESULT STDMETHODCALLTYPE put_##p(LPCWSTR value) override { \ 25 | LPCWSTR result = m_##p.Set(value); \ 26 | if ((result == nullptr) && (value != nullptr)) \ 27 | return HRESULT_FROM_WIN32(GetLastError()); \ 28 | return S_OK; \ 29 | } \ 30 | \ 31 | protected: \ 32 | AutoCoMemString m_##p; 33 | 34 | #define COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(p) \ 35 | public: \ 36 | HRESULT STDMETHODCALLTYPE get_##p(BOOL* value) override { \ 37 | if (!value) \ 38 | return E_POINTER; \ 39 | *value = m_##p; \ 40 | return S_OK; \ 41 | } \ 42 | HRESULT STDMETHODCALLTYPE put_##p(BOOL value) override { \ 43 | m_##p = value; \ 44 | return S_OK; \ 45 | } \ 46 | \ 47 | protected: \ 48 | BOOL m_##p = FALSE; 49 | 50 | // This is a base COM class that implements ICoreWebView2EnvironmentOptions. 51 | template 55 | class CoreWebView2EnvironmentOptionsBase 56 | : public Microsoft::WRL::Implements< 57 | Microsoft::WRL::RuntimeClassFlags, 58 | ICoreWebView2EnvironmentOptions> { 59 | public: 60 | CoreWebView2EnvironmentOptionsBase() { 61 | // Initialize the target compatible browser version value to the version of 62 | // the browser binaries corresponding to this version of the SDK. 63 | m_TargetCompatibleBrowserVersion.Set(CORE_WEBVIEW_TARGET_PRODUCT_VERSION); 64 | } 65 | 66 | protected: 67 | ~CoreWebView2EnvironmentOptionsBase(){}; 68 | 69 | class AutoCoMemString { 70 | public: 71 | AutoCoMemString() {} 72 | ~AutoCoMemString() { Release(); } 73 | void Release() { 74 | if (m_string) { 75 | deallocate_fn(m_string); 76 | m_string = nullptr; 77 | } 78 | } 79 | 80 | LPCWSTR Set(LPCWSTR str) { 81 | Release(); 82 | if (str) { 83 | m_string = MakeCoMemString(str); 84 | } 85 | return m_string; 86 | } 87 | LPCWSTR Get() { return m_string; } 88 | LPWSTR Copy() { 89 | if (m_string) 90 | return MakeCoMemString(m_string); 91 | return nullptr; 92 | } 93 | 94 | protected: 95 | LPWSTR MakeCoMemString(LPCWSTR source) { 96 | const size_t length = wcslen(source); 97 | const size_t bytes = (length + 1) * sizeof(*source); 98 | // Ensure we didn't overflow during our size calculation. 99 | if (bytes <= length) { 100 | return nullptr; 101 | } 102 | 103 | wchar_t* result = reinterpret_cast(allocate_fn(bytes)); 104 | if (result) 105 | memcpy(result, source, bytes); 106 | 107 | return result; 108 | } 109 | 110 | LPWSTR m_string = nullptr; 111 | }; 112 | 113 | COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(AdditionalBrowserArguments) 114 | COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(Language) 115 | COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(TargetCompatibleBrowserVersion) 116 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY( 117 | AllowSingleSignOnUsingOSPrimaryAccount) 118 | }; 119 | 120 | template 124 | class CoreWebView2EnvironmentOptionsBaseClass 125 | : public Microsoft::WRL::RuntimeClass< 126 | Microsoft::WRL::RuntimeClassFlags, 127 | CoreWebView2EnvironmentOptionsBase> { 131 | public: 132 | CoreWebView2EnvironmentOptionsBaseClass() {} 133 | 134 | protected: 135 | ~CoreWebView2EnvironmentOptionsBaseClass() override{}; 136 | }; 137 | 138 | typedef CoreWebView2EnvironmentOptionsBaseClass 142 | CoreWebView2EnvironmentOptions; 143 | 144 | #endif // __core_webview2_environment_options_h__ 145 | -------------------------------------------------------------------------------- /webview_common.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* webview.cpp */ 3 | /*************************************************************************/ 4 | 5 | #include "webview.h" 6 | #include "webview_icons.h" 7 | 8 | int WebViewOverlay::err_status = -1; 9 | 10 | void WebViewOverlay::_bind_methods() { 11 | ClassDB::bind_method(D_METHOD("can_go_back"), &WebViewOverlay::can_go_back); 12 | ClassDB::bind_method(D_METHOD("can_go_forward"), &WebViewOverlay::can_go_forward); 13 | 14 | ClassDB::bind_method(D_METHOD("is_loading"), &WebViewOverlay::is_loading); 15 | ClassDB::bind_method(D_METHOD("is_ready"), &WebViewOverlay::is_ready); 16 | ClassDB::bind_method(D_METHOD("is_secure_content"), &WebViewOverlay::is_secure_content); 17 | 18 | ClassDB::bind_method(D_METHOD("go_back"), &WebViewOverlay::go_back); 19 | ClassDB::bind_method(D_METHOD("go_forward"), &WebViewOverlay::go_forward); 20 | ClassDB::bind_method(D_METHOD("reload"), &WebViewOverlay::reload); 21 | ClassDB::bind_method(D_METHOD("stop"), &WebViewOverlay::stop); 22 | 23 | ClassDB::bind_method(D_METHOD("set_no_background", "no_background"), &WebViewOverlay::set_no_background); 24 | ClassDB::bind_method(D_METHOD("get_no_background"), &WebViewOverlay::get_no_background); 25 | 26 | ClassDB::bind_method(D_METHOD("set_url", "url"), &WebViewOverlay::set_url); 27 | ClassDB::bind_method(D_METHOD("get_url"), &WebViewOverlay::get_url); 28 | 29 | ClassDB::bind_method(D_METHOD("set_user_agent", "user_agent"), &WebViewOverlay::set_user_agent); 30 | ClassDB::bind_method(D_METHOD("get_user_agent"), &WebViewOverlay::get_user_agent); 31 | 32 | ClassDB::bind_method(D_METHOD("get_zoom_level"), &WebViewOverlay::get_zoom_level); 33 | ClassDB::bind_method(D_METHOD("set_zoom_level", "zoom"), &WebViewOverlay::set_zoom_level); 34 | 35 | ClassDB::bind_method(D_METHOD("load_string", "source"), &WebViewOverlay::load_string); 36 | ClassDB::bind_method(D_METHOD("execute_java_script", "script"), &WebViewOverlay::execute_java_script); 37 | 38 | ClassDB::bind_method(D_METHOD("get_snapshot", "width"), &WebViewOverlay::get_snapshot); 39 | 40 | ClassDB::bind_method(D_METHOD("get_title"), &WebViewOverlay::get_title); 41 | 42 | ADD_PROPERTY(PropertyInfo(Variant::BOOL, "no_background"), "set_no_background", "get_no_background"); 43 | ADD_PROPERTY(PropertyInfo(Variant::STRING, "url"), "set_url", "get_url"); 44 | ADD_PROPERTY(PropertyInfo(Variant::STRING, "user_agent"), "set_user_agent", "get_user_agent"); 45 | ADD_PROPERTY(PropertyInfo(Variant::REAL, "zoom_level"), "set_zoom_level", "get_zoom_level"); 46 | 47 | ADD_SIGNAL(MethodInfo("callback", PropertyInfo(Variant::STRING, "url"))); 48 | ADD_SIGNAL(MethodInfo("new_window", PropertyInfo(Variant::STRING, "url"))); 49 | ADD_SIGNAL(MethodInfo("start_navigation")); 50 | ADD_SIGNAL(MethodInfo("finish_navigation")); 51 | ADD_SIGNAL(MethodInfo("snapshot_ready", PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Image"))); 52 | } 53 | 54 | void WebViewOverlay::_draw_placeholder() { 55 | Ref font = get_font("font", "Label"); 56 | Size2i size = get_size(); 57 | 58 | // Main border 59 | draw_rect(Rect2(Point2(), size), Color(0, 0, 0), false); 60 | draw_rect(Rect2(Point2(1, 1), size - Size2(2, 2)), Color(1, 1, 1), false); 61 | draw_rect(Rect2(Point2(2, 2), size - Size2(4, 4)), Color(1, 1, 1), false); 62 | draw_rect(Rect2(Point2(3, 3), size - Size2(6, 6)), Color(0, 0, 0), false); 63 | 64 | if (icon_main.is_null()) { 65 | Ref image = memnew(Image(__icon_dummy, __icon_dummy_len)); 66 | icon_main.instance(); 67 | icon_main->create_from_image(image, Texture::FLAG_VIDEO_SURFACE); 68 | } 69 | 70 | icon_main->draw(get_canvas_item(), Vector2((size.x - 64) / 2, 20)); 71 | 72 | Size2i url_size = font->get_string_size(home_url); 73 | font->draw(get_canvas_item(), Vector2((size.x - url_size.x) / 2, 100 +url_size.y) + Vector2(1, 1), home_url, Color(0, 0, 0, 0.5)); 74 | font->draw(get_canvas_item(), Vector2((size.x - url_size.x) / 2, 100 +url_size.y) + Vector2(-1, 1), home_url, Color(0, 0, 0, 0.5)); 75 | font->draw(get_canvas_item(), Vector2((size.x - url_size.x) / 2, 100 +url_size.y) + Vector2(1, -1), home_url, Color(0, 0, 0, 0.5)); 76 | font->draw(get_canvas_item(), Vector2((size.x - url_size.x) / 2, 100 +url_size.y) + Vector2(-1, -1), home_url, Color(0, 0, 0, 0.5)); 77 | font->draw(get_canvas_item(), Vector2((size.x - url_size.x) / 2, 100 +url_size.y), home_url, Color(1, 1, 1)); 78 | } 79 | 80 | void WebViewOverlay::_draw_error(const String &p_error) { 81 | Ref font = get_font("font", "Label"); 82 | Size2i size = get_size(); 83 | 84 | // Main border 85 | draw_rect(Rect2(Point2(), size), Color(0, 0, 0), false); 86 | draw_rect(Rect2(Point2(1, 1), size - Size2(2, 2)), Color(1, 1, 1), false); 87 | draw_rect(Rect2(Point2(2, 2), size - Size2(4, 4)), Color(1, 1, 1), false); 88 | draw_rect(Rect2(Point2(3, 3), size - Size2(6, 6)), Color(0, 0, 0), false); 89 | 90 | if (icon_error.is_null()) { 91 | Ref image = memnew(Image(__icon_error, __icon_error_len)); 92 | icon_error.instance(); 93 | icon_error->create_from_image(image, Texture::FLAG_VIDEO_SURFACE); 94 | } 95 | 96 | icon_error->draw(get_canvas_item(), Vector2((size.x - 64) / 2, 20)); 97 | 98 | // Error message 99 | String err_ti = "-- WEBVIEW ERROR --"; 100 | Size2i er_size = font->get_string_size(p_error); 101 | Size2i ti_size = font->get_string_size(err_ti); 102 | 103 | font->draw(get_canvas_item(), Vector2((size.x - ti_size.x) / 2, 100 + ti_size.y) + Vector2(1, 1), err_ti, Color(0, 0, 0, 0.5)); 104 | font->draw(get_canvas_item(), Vector2((size.x - ti_size.x) / 2, 100 + ti_size.y) + Vector2(-1, 1), err_ti, Color(0, 0, 0, 0.5)); 105 | font->draw(get_canvas_item(), Vector2((size.x - ti_size.x) / 2, 100 + ti_size.y) + Vector2(1, -1), err_ti, Color(0, 0, 0, 0.5)); 106 | font->draw(get_canvas_item(), Vector2((size.x - ti_size.x) / 2, 100 + ti_size.y) + Vector2(-1, -1), err_ti, Color(0, 0, 0, 0.5)); 107 | font->draw(get_canvas_item(), Vector2((size.x - ti_size.x) / 2, 100 + ti_size.y), err_ti, Color(1, 0, 0)); 108 | 109 | font->draw(get_canvas_item(), Vector2((size.x - er_size.x) / 2, 100 + er_size.y + 10 + ti_size.y) + Vector2(1, 1), p_error, Color(0, 0, 0, 0.5)); 110 | font->draw(get_canvas_item(), Vector2((size.x - er_size.x) / 2, 100 + er_size.y + 10 + ti_size.y) + Vector2(-1, 1), p_error, Color(0, 0, 0, 0.5)); 111 | font->draw(get_canvas_item(), Vector2((size.x - er_size.x) / 2, 100 + er_size.y + 10 + ti_size.y) + Vector2(1, -1), p_error, Color(0, 0, 0, 0.5)); 112 | font->draw(get_canvas_item(), Vector2((size.x - er_size.x) / 2, 100 + er_size.y + 10 + ti_size.y) + Vector2(-1, -1), p_error, Color(0, 0, 0, 0.5)); 113 | font->draw(get_canvas_item(), Vector2((size.x - er_size.x) / 2, 100 + er_size.y + 10 + ti_size.y), p_error, Color(1, 0, 0)); 114 | } 115 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot auto generated files 2 | *.gen.* 3 | .import/ 4 | 5 | # Documentation generated by doxygen or from classes.xml 6 | doc/_build/ 7 | 8 | # Javascript specific 9 | *.bc 10 | 11 | # CLion 12 | cmake-build-debug 13 | 14 | # Android specific 15 | .gradle 16 | local.properties 17 | *.iml 18 | .idea 19 | .gradletasknamecache 20 | project.properties 21 | platform/android/java/app/libs/* 22 | platform/android/java/libs/* 23 | platform/android/java/lib/.cxx/ 24 | platform/android/java/nativeSrcsConfigs/.cxx/ 25 | 26 | # General c++ generated files 27 | *.lib 28 | *.o 29 | *.ox 30 | *.a 31 | *.ax 32 | *.d 33 | *.so 34 | *.os 35 | *.Plo 36 | *.lo 37 | # Binutils tmp linker output of the form "stXXXXXX" where "X" is alphanumeric 38 | st[A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9] 39 | 40 | # Libs generated files 41 | .deps/* 42 | .dirstamp 43 | 44 | # Gprof output 45 | gmon.out 46 | 47 | # Vim temp files 48 | *.swo 49 | *.swp 50 | 51 | # Qt project files 52 | *.config 53 | *.creator 54 | *.creator.* 55 | *.files 56 | *.includes 57 | *.cflags 58 | *.cxxflags 59 | 60 | # Code::Blocks files 61 | *.cbp 62 | *.layout 63 | *.depend 64 | 65 | # Eclipse CDT files 66 | .cproject 67 | .settings/ 68 | *.pydevproject 69 | *.launch 70 | 71 | # Geany/geany-plugins files 72 | *.geany 73 | .geanyprj 74 | 75 | # Jetbrains IDEs 76 | .idea/ 77 | 78 | # Misc 79 | .DS_Store 80 | __MACOSX 81 | logs/ 82 | 83 | # for projects that use SCons for building: http://http://www.scons.org/ 84 | .sconf_temp 85 | .sconsign*.dblite 86 | *.pyc 87 | 88 | # https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 89 | ## Ignore Visual Studio temporary files, build results, and 90 | ## files generated by popular Visual Studio add-ons. 91 | 92 | # User-specific files 93 | *.suo 94 | *.user 95 | *.sln.docstates 96 | *.sln 97 | *.vcxproj* 98 | 99 | # Custom SCons configuration override 100 | /custom.py 101 | 102 | # Build results 103 | [Dd]ebug/ 104 | [Dd]ebugPublic/ 105 | [Rr]elease/ 106 | x64/ 107 | build/ 108 | bld/ 109 | [Bb]in/ 110 | [Oo]bj/ 111 | *.debug 112 | *.dSYM 113 | 114 | # Visual Studio cache/options directory 115 | .vs/ 116 | 117 | # MSTest test Results 118 | [Tt]est[Rr]esult*/ 119 | [Bb]uild[Ll]og.* 120 | 121 | # Hints for improving IntelliSense, created together with VS project 122 | cpp.hint 123 | 124 | #NUNIT 125 | *.VisualState.xml 126 | TestResult.xml 127 | 128 | *.o 129 | *.a 130 | *_i.c 131 | *_p.c 132 | *_i.h 133 | *.ilk 134 | *.meta 135 | *.obj 136 | *.pch 137 | *.pdb 138 | *.pgc 139 | *.pgd 140 | *.rsp 141 | *.sbr 142 | *.tlb 143 | *.tli 144 | *.tlh 145 | *.tmp 146 | *.tmp_proj 147 | *.bak 148 | *.log 149 | *.vspscc 150 | *.vssscc 151 | .builds 152 | *.pidb 153 | *.svclog 154 | *.scc 155 | *.nib 156 | 157 | # Chutzpah Test files 158 | _Chutzpah* 159 | 160 | # Visual C++ cache files 161 | ipch/ 162 | *.aps 163 | *.ncb 164 | *.opensdf 165 | *.sdf 166 | *.cachefile 167 | *.VC.db 168 | *.VC.opendb 169 | *.VC.VC.opendb 170 | enc_temp_folder/ 171 | 172 | # Visual Studio profiler 173 | *.psess 174 | *.vsp 175 | *.vspx 176 | 177 | # CodeLite project files 178 | *.project 179 | *.workspace 180 | .codelite/ 181 | 182 | # TFS 2012 Local Workspace 183 | $tf/ 184 | 185 | # Guidance Automation Toolkit 186 | *.gpState 187 | 188 | # ReSharper is a .NET coding add-in 189 | _ReSharper*/ 190 | *.[Rr]e[Ss]harper 191 | *.DotSettings.user 192 | 193 | # JustCode is a .NET coding addin-in 194 | .JustCode 195 | 196 | # TeamCity is a build add-in 197 | _TeamCity* 198 | 199 | # DotCover is a Code Coverage Tool 200 | *.dotCover 201 | 202 | # NCrunch 203 | *.ncrunch* 204 | _NCrunch_* 205 | .*crunch*.local.xml 206 | 207 | # MightyMoose 208 | *.mm.* 209 | AutoTest.Net/ 210 | 211 | # Web workbench (sass) 212 | .sass-cache/ 213 | 214 | # Installshield output folder 215 | [Ee]xpress/ 216 | 217 | # DocProject is a documentation generator add-in 218 | DocProject/buildhelp/ 219 | DocProject/Help/*.HxT 220 | DocProject/Help/*.HxC 221 | DocProject/Help/*.hhc 222 | DocProject/Help/*.hhk 223 | DocProject/Help/*.hhp 224 | DocProject/Help/Html2 225 | DocProject/Help/html 226 | 227 | # Click-Once directory 228 | publish/ 229 | 230 | # Publish Web Output 231 | *.[Pp]ublish.xml 232 | *.azurePubxml 233 | 234 | # NuGet Packages Directory 235 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 236 | #packages/* 237 | ## TODO: If the tool you use requires repositories.config, also uncomment the next line 238 | #!packages/repositories.config 239 | 240 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 241 | # This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) 242 | !packages/build/ 243 | 244 | # Windows Azure Build Output 245 | csx/ 246 | *.build.csdef 247 | 248 | # Windows Store app package directory 249 | AppPackages/ 250 | 251 | # Others 252 | sql/ 253 | *.Cache 254 | ClientBin/ 255 | [Ss]tyle[Cc]op.* 256 | ~$* 257 | *~ 258 | *.dbmdl 259 | *.dbproj.schemaview 260 | *.pfx 261 | *.publishsettings 262 | node_modules/ 263 | __pycache__/ 264 | 265 | # KDE 266 | .directory 267 | 268 | #Kdevelop project files 269 | *.kdev4 270 | 271 | # Xcode 272 | xcuserdata/ 273 | *.xcscmblueprint 274 | *.xccheckout 275 | *.xcodeproj/* 276 | 277 | # RIA/Silverlight projects 278 | Generated_Code/ 279 | 280 | # Backup & report files from converting an old project file to a newer 281 | # Visual Studio version. Backup files are not needed, because we have git ;-) 282 | _UpgradeReport_Files/ 283 | Backup*/ 284 | UpgradeLog*.XML 285 | UpgradeLog*.htm 286 | 287 | # SQL Server files 288 | App_Data/*.mdf 289 | App_Data/*.ldf 290 | 291 | # Business Intelligence projects 292 | *.rdl.data 293 | *.bim.layout 294 | *.bim_*.settings 295 | 296 | # Microsoft Fakes 297 | FakesAssemblies/ 298 | 299 | # ========================= 300 | # Windows detritus 301 | # ========================= 302 | 303 | # Windows image file caches 304 | [Tt]humbs.db 305 | [Tt]humbs.db:encryptable 306 | ehthumbs.db 307 | ehthumbs_vista.db 308 | 309 | # Windows stackdumps 310 | *.stackdump 311 | 312 | # Windows shortcuts 313 | *.lnk 314 | 315 | # Folder config file 316 | [Dd]esktop.ini 317 | 318 | # Recycle Bin used on file shares 319 | $RECYCLE.BIN/ 320 | logo.h 321 | *.autosave 322 | 323 | # https://github.com/github/gitignore/blob/master/Global/Tags.gitignore 324 | # Ignore tags created by etags, ctags, gtags (GNU global) and cscope 325 | TAGS 326 | !TAGS/ 327 | tags 328 | *.tags 329 | !tags/ 330 | gtags.files 331 | GTAGS 332 | GRTAGS 333 | GPATH 334 | cscope.files 335 | cscope.out 336 | cscope.in.out 337 | cscope.po.out 338 | godot.creator.* 339 | 340 | projects/ 341 | platform/windows/godot_res.res 342 | 343 | # Visual Studio 2017 and Visual Studio Code workspace folder 344 | /.vs 345 | /.vscode 346 | 347 | # Visual Studio Code workspace file 348 | *.code-workspace 349 | 350 | # Scons construction environment dump 351 | .scons_env.json 352 | 353 | # Scons progress indicator 354 | .scons_node_count 355 | 356 | # ccls cache (https://github.com/MaskRay/ccls) 357 | .ccls-cache/ 358 | 359 | # compile commands (https://clang.llvm.org/docs/JSONCompilationDatabase.html) 360 | compile_commands.json 361 | 362 | # Cppcheck 363 | *.cppcheck 364 | 365 | # https://clangd.llvm.org/ cache folder 366 | .clangd/ 367 | .cache/ 368 | -------------------------------------------------------------------------------- /webview_wk.mm: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* webview_wk.mm */ 3 | /*************************************************************************/ 4 | 5 | #include "webview.h" 6 | #include "core/os/os.h" 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #if defined(IPHONE_ENABLED) 13 | #include "platform/iphone/app_delegate.h" 14 | #include "platform/iphone/godot_view.h" 15 | #include "platform/iphone/view_controller.h" 16 | #endif 17 | 18 | /*************************************************************************/ 19 | 20 | @interface GDWKNavigationDelegate: NSObject { 21 | WebViewOverlay *control; 22 | } 23 | - (void)setControl:(WebViewOverlay *)p_control; 24 | @end 25 | 26 | @implementation GDWKNavigationDelegate 27 | 28 | - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message { 29 | NSString *ns = [message body]; 30 | String url = String::utf8([ns UTF8String]); 31 | if (control != nullptr) { 32 | control->emit_signal("callback", url); 33 | } 34 | } 35 | 36 | - (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures { 37 | if (control != nullptr) { 38 | NSURL *requestURL = navigationAction.request.URL; 39 | NSString *ns = [requestURL absoluteString]; 40 | String url = String::utf8([ns UTF8String]); 41 | control->emit_signal("new_window", url); 42 | } 43 | return nil; 44 | } 45 | 46 | - (void)setControl:(WebViewOverlay *)p_control { 47 | control = p_control; 48 | } 49 | 50 | - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation { 51 | if (control != nullptr) { 52 | control->emit_signal("start_navigation"); 53 | } 54 | } 55 | 56 | - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { 57 | if (control != nullptr) { 58 | control->emit_signal("finish_navigation"); 59 | } 60 | } 61 | 62 | @end 63 | 64 | /*************************************************************************/ 65 | 66 | @interface GDWKURLSchemeHandler: NSObject { 67 | WebViewOverlay *control; 68 | } 69 | - (void)setControl:(WebViewOverlay *)p_control; 70 | @end 71 | 72 | @implementation GDWKURLSchemeHandler 73 | 74 | - (void)setControl:(WebViewOverlay *)p_control { 75 | control = p_control; 76 | } 77 | 78 | - (void)webView:(WKWebView *)webView startURLSchemeTask:(id)urlSchemeTask { 79 | NSURL *requestURL = urlSchemeTask.request.URL; 80 | NSString *ns = [requestURL absoluteString]; 81 | String url = String::utf8([ns UTF8String]); 82 | 83 | if (url.begins_with("res") || url.begins_with("user")) { 84 | Error err; 85 | FileAccess *f = FileAccess::open(url, FileAccess::READ, &err); 86 | if (err != OK) { 87 | [urlSchemeTask didReceiveResponse:[[NSHTTPURLResponse alloc] initWithURL:requestURL statusCode:404 HTTPVersion:@"HTTP/1.1" headerFields:nil]]; 88 | [urlSchemeTask didFinish]; 89 | } else { 90 | PoolVector data; 91 | data.resize(f->get_len()); 92 | f->get_buffer(data.write().ptr(), f->get_len()); 93 | 94 | [urlSchemeTask didReceiveResponse:[[NSURLResponse alloc] initWithURL:requestURL MIMEType:@"text/html" expectedContentLength:(NSInteger)data.size() textEncodingName:nil]]; 95 | [urlSchemeTask didReceiveData:[[NSData alloc] initWithBytes:(const void *)data.read().ptr() length:(NSUInteger)data.size()]]; 96 | [urlSchemeTask didFinish]; 97 | } 98 | } else { 99 | [urlSchemeTask didReceiveResponse:[[NSHTTPURLResponse alloc] initWithURL:requestURL statusCode:404 HTTPVersion:@"HTTP/1.1" headerFields:nil]]; 100 | [urlSchemeTask didFinish]; 101 | } 102 | } 103 | 104 | - (void)webView:(WKWebView *)webView stopURLSchemeTask:(id)urlSchemeTask { 105 | [urlSchemeTask didFinish]; 106 | } 107 | 108 | @end 109 | 110 | /*************************************************************************/ 111 | 112 | class WebViewOverlayImplementation { 113 | public: 114 | WKWebView* view = nullptr; 115 | }; 116 | 117 | /*************************************************************************/ 118 | 119 | WebViewOverlay::WebViewOverlay() { 120 | data = memnew(WebViewOverlayImplementation()); 121 | } 122 | 123 | WebViewOverlay::~WebViewOverlay() { 124 | memdelete(data); 125 | } 126 | 127 | void WebViewOverlay::_notification(int p_what) { 128 | switch (p_what) { 129 | case NOTIFICATION_ENTER_TREE: { 130 | if (!Engine::get_singleton()->is_editor_hint() && (err_status == 0)) { 131 | set_process_internal(true); // Wait for window to init, do not init in editor. 132 | } 133 | } break; 134 | case NOTIFICATION_INTERNAL_PROCESS: { 135 | if (!Engine::get_singleton()->is_editor_hint() && (data->view == nullptr) && (err_status == 0)) { 136 | #if defined(OSX_ENABLED) 137 | NSView *main_view = [[[NSApplication sharedApplication] mainWindow] contentView]; 138 | #elif defined(IPHONE_ENABLED) 139 | UIView *main_view = AppDelegate.viewController.godotView; 140 | #else 141 | #error Unsupported platform! 142 | #endif 143 | if (main_view != nullptr) { 144 | GDWKURLSchemeHandler *sch_handle = [[GDWKURLSchemeHandler alloc] init]; 145 | [sch_handle setControl:this]; 146 | 147 | GDWKNavigationDelegate *nav_handle = [[GDWKNavigationDelegate alloc] init]; 148 | [nav_handle setControl:this]; 149 | 150 | WKWebViewConfiguration* webViewConfig = [[WKWebViewConfiguration alloc] init]; 151 | [webViewConfig setURLSchemeHandler:sch_handle forURLScheme:@"res"]; 152 | [webViewConfig setURLSchemeHandler:sch_handle forURLScheme:@"user"]; 153 | [[webViewConfig userContentController] addScriptMessageHandler:nav_handle name:@"callback"]; 154 | 155 | WKUserScript *scr = [[WKUserScript alloc] initWithSource:(NSString *)@"function webviewMessage(s){window.webkit.messageHandlers.callback.postMessage(s);}" injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:true]; 156 | [[webViewConfig userContentController] addUserScript:scr]; 157 | 158 | float sc = OS::get_singleton()->get_screen_max_scale(); 159 | Rect2i rect = get_window_rect(); 160 | float wh = OS::get_singleton()->get_window_size().y / sc; 161 | WKWebView* m_webView = [[WKWebView alloc] initWithFrame:CGRectMake(rect.position.x / sc, wh - rect.position.y / sc - rect.size.height / sc, rect.size.width / sc, rect.size.height / sc) configuration:webViewConfig]; 162 | 163 | [m_webView setNavigationDelegate:nav_handle]; 164 | [m_webView setUIDelegate:nav_handle]; 165 | if (user_agent.length() > 0) { 166 | [m_webView setCustomUserAgent:[NSString stringWithUTF8String:user_agent.utf8().get_data()]]; 167 | } else { 168 | [m_webView setCustomUserAgent:nil]; 169 | } 170 | [m_webView setValue:((no_background) ? @(NO) : @(YES)) forKey:@"drawsBackground"]; 171 | [m_webView setPageZoom:zoom]; 172 | 173 | [m_webView setHidden:!is_visible_in_tree()]; 174 | [main_view addSubview:m_webView]; 175 | [m_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithUTF8String:home_url.utf8().get_data()]]]]; 176 | 177 | data->view = m_webView; 178 | ctrl_err_status = 0; 179 | 180 | set_process_internal(false); 181 | } 182 | } 183 | } break; 184 | case NOTIFICATION_DRAW: { 185 | if (err_status != 0) { 186 | switch (err_status) { 187 | case -1: { 188 | _draw_error("WebView interface not initialized."); 189 | } break; 190 | default: { 191 | _draw_error("Unknown error."); 192 | } break; 193 | }; 194 | } else if (ctrl_err_status > 0) { 195 | _draw_error("Unknown control error."); 196 | } else if (Engine::get_singleton()->is_editor_hint()) { 197 | _draw_placeholder(); 198 | } 199 | } FALLTHROUGH; 200 | case NOTIFICATION_MOVED_IN_PARENT: 201 | case NOTIFICATION_RESIZED: { 202 | if (data->view != nullptr) { 203 | float sc = OS::get_singleton()->get_screen_max_scale(); 204 | Rect2i rect = get_window_rect(); 205 | float wh = OS::get_singleton()->get_window_size().y / sc; 206 | [data->view setFrame:CGRectMake(rect.position.x / sc, wh - rect.position.y / sc - rect.size.height / sc, rect.size.width / sc, rect.size.height / sc)]; 207 | } 208 | } break; 209 | case NOTIFICATION_VISIBILITY_CHANGED: { 210 | if (data->view != nullptr) { 211 | [data->view setHidden:!is_visible_in_tree()]; 212 | } 213 | } break; 214 | case NOTIFICATION_EXIT_TREE: { 215 | 216 | if (data->view != nullptr) { 217 | [data->view removeFromSuperview]; 218 | data->view = nullptr; 219 | } 220 | } break; 221 | default: { 222 | //NOP 223 | } break; 224 | } 225 | } 226 | 227 | void WebViewOverlay::get_snapshot(int p_width) { 228 | 229 | WKSnapshotConfiguration *wkSnapshotConfig = [[WKSnapshotConfiguration alloc] init]; 230 | wkSnapshotConfig.snapshotWidth = [NSNumber numberWithInt:p_width]; 231 | wkSnapshotConfig.afterScreenUpdates = NO; 232 | 233 | 234 | [data->view takeSnapshotWithConfiguration:wkSnapshotConfig 235 | #if defined(OSX_ENABLED) 236 | completionHandler:^(NSImage * _Nullable image, NSError * _Nullable error) { 237 | #elif defined(IPHONE_ENABLED) 238 | completionHandler:^(UIImage * _Nullable image, NSError * _Nullable error) { 239 | #else 240 | #error Unsupported platform! 241 | #endif 242 | if (image != nullptr) { 243 | CGImageRef imageRef = [image CGImage]; 244 | NSUInteger width = CGImageGetWidth(imageRef); 245 | NSUInteger height = CGImageGetHeight(imageRef); 246 | 247 | PoolVector imgdata; 248 | imgdata.resize(width * height * 4); 249 | PoolVector::Write wr = imgdata.write(); 250 | 251 | NSUInteger bytesPerPixel = 4; 252 | NSUInteger bytesPerRow = bytesPerPixel * width; 253 | NSUInteger bitsPerComponent = 8; 254 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 255 | CGContextRef context = CGBitmapContextCreate(wr.ptr(), width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); 256 | CGColorSpaceRelease(colorSpace); 257 | 258 | CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef); 259 | CGContextRelease(context); 260 | 261 | emit_signal("snapshot_ready", memnew(Image(width, height, false, Image::FORMAT_RGBA8, imgdata))); 262 | } 263 | }]; 264 | } 265 | 266 | void WebViewOverlay::set_no_background(bool p_bg) { 267 | no_background = p_bg; 268 | 269 | if (data->view != nullptr) { 270 | [data->view setValue:((no_background) ? @(NO) : @(YES)) forKey:@"drawsBackground"]; 271 | } 272 | } 273 | 274 | bool WebViewOverlay::get_no_background() const { 275 | return no_background; 276 | } 277 | 278 | void WebViewOverlay::set_url(const String& p_url) { 279 | home_url = p_url; 280 | 281 | if (data->view != nullptr) { 282 | [data->view loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithUTF8String:home_url.utf8().get_data()]]]]; 283 | } 284 | } 285 | 286 | String WebViewOverlay::get_url() const { 287 | if (data->view != nullptr) { 288 | NSString *ns = [[data->view URL] absoluteString]; 289 | return String::utf8([ns UTF8String]); 290 | } 291 | return home_url; 292 | } 293 | 294 | void WebViewOverlay::set_user_agent(const String& p_user_agent) { 295 | user_agent = p_user_agent; 296 | 297 | if (data->view != nullptr) { 298 | if (user_agent.length() > 0) { 299 | [data->view setCustomUserAgent:[NSString stringWithUTF8String:user_agent.utf8().get_data()]]; 300 | } else { 301 | [data->view setCustomUserAgent:nil]; 302 | } 303 | } 304 | } 305 | 306 | String WebViewOverlay::get_user_agent() const { 307 | if (data->view != nullptr) { 308 | NSString *ns = [data->view customUserAgent]; 309 | return String::utf8([ns UTF8String]); 310 | } 311 | return user_agent; 312 | } 313 | 314 | double WebViewOverlay::get_zoom_level() const { 315 | if (data->view != nullptr) { 316 | return [data->view pageZoom]; 317 | } 318 | return zoom; 319 | } 320 | 321 | void WebViewOverlay::set_zoom_level(double p_zoom) { 322 | zoom = p_zoom; 323 | 324 | if (data->view != nullptr) { 325 | [data->view setPageZoom:zoom]; 326 | } 327 | } 328 | 329 | String WebViewOverlay::get_title() const { 330 | ERR_FAIL_COND_V(data->view == nullptr, ""); 331 | 332 | NSString *ns = [data->view title]; 333 | return String::utf8([ns UTF8String]); 334 | } 335 | 336 | void WebViewOverlay::execute_java_script(const String &p_script) { 337 | ERR_FAIL_COND(data->view == nullptr); 338 | [data->view evaluateJavaScript:[NSString stringWithUTF8String:p_script.utf8().get_data()] completionHandler:nil]; 339 | } 340 | 341 | void WebViewOverlay::load_string(const String &p_source) { 342 | ERR_FAIL_COND(data->view == nullptr); 343 | [data->view loadHTMLString:[NSString stringWithUTF8String:p_source.utf8().get_data()] baseURL:nil]; 344 | } 345 | 346 | bool WebViewOverlay::can_go_back() const { 347 | ERR_FAIL_COND_V(data->view == nullptr, false); 348 | 349 | return [data->view canGoBack]; 350 | } 351 | 352 | bool WebViewOverlay::can_go_forward() const { 353 | ERR_FAIL_COND_V(data->view == nullptr, false); 354 | 355 | return [data->view canGoForward]; 356 | } 357 | 358 | bool WebViewOverlay::is_ready() const { 359 | return (data->view != nullptr); 360 | } 361 | 362 | bool WebViewOverlay::is_loading() const { 363 | ERR_FAIL_COND_V(data->view == nullptr, false); 364 | 365 | return [data->view isLoading]; 366 | } 367 | 368 | bool WebViewOverlay::is_secure_content() const { 369 | ERR_FAIL_COND_V(data->view == nullptr, false); 370 | 371 | return [data->view hasOnlySecureContent]; 372 | } 373 | 374 | void WebViewOverlay::go_back() { 375 | ERR_FAIL_COND(data->view == nullptr); 376 | 377 | [data->view goBack]; 378 | } 379 | 380 | void WebViewOverlay::go_forward() { 381 | ERR_FAIL_COND(data->view == nullptr); 382 | 383 | [data->view goForward]; 384 | } 385 | 386 | void WebViewOverlay::reload() { 387 | ERR_FAIL_COND(data->view == nullptr); 388 | 389 | [data->view reload]; 390 | } 391 | 392 | void WebViewOverlay::stop() { 393 | ERR_FAIL_COND(data->view == nullptr); 394 | 395 | [data->view stopLoading]; 396 | } 397 | 398 | void WebViewOverlay::init() { 399 | err_status = 0; 400 | } 401 | 402 | void WebViewOverlay::finish() { 403 | //NOP 404 | } -------------------------------------------------------------------------------- /webview_edge.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* webview_edge.cpp */ 3 | /*************************************************************************/ 4 | 5 | #include "webview.h" 6 | #include "core/os/os.h" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | using namespace Microsoft::WRL; 14 | 15 | typedef HRESULT (WINAPI *CreateCoreWebView2EnvironmentWithOptionsPtr)(PCWSTR p_browser_executable_folder, PCWSTR p_user_data_folder, ICoreWebView2EnvironmentOptions* p_environment_options, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* r_environment_created_handler); 16 | CreateCoreWebView2EnvironmentWithOptionsPtr webview_CreateCoreWebView2EnvironmentWithOptions = nullptr; 17 | 18 | class WebViewOverlaySnapshotDelegate : public ICoreWebView2CapturePreviewCompletedHandler { 19 | public: 20 | WebViewOverlay *control = nullptr; 21 | ComPtr img_data_stream = nullptr; 22 | LONG _cRef = 1; 23 | 24 | ULONG STDMETHODCALLTYPE AddRef() { 25 | return InterlockedIncrement(&_cRef); 26 | } 27 | 28 | ULONG STDMETHODCALLTYPE Release() { 29 | ULONG ulRef = InterlockedDecrement(&_cRef); 30 | if (0 == ulRef) { 31 | delete this; 32 | } 33 | return ulRef; 34 | } 35 | 36 | HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID **ppvInterface) { 37 | AddRef(); 38 | *ppvInterface = this; 39 | return S_OK; 40 | } 41 | 42 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT p_error_code) { 43 | STATSTG stats; 44 | img_data_stream->Stat(&stats, STATFLAG_NONAME); 45 | ULONG size = stats.cbSize.QuadPart; 46 | ULONG bytes_read; 47 | 48 | PoolVector imgdata; 49 | imgdata.resize(size); 50 | PoolVector::Write wr = imgdata.write(); 51 | 52 | LARGE_INTEGER li; 53 | li.QuadPart = 0; 54 | img_data_stream->Seek(li, STREAM_SEEK_SET, nullptr); 55 | img_data_stream->Read(wr.ptr(), size, &bytes_read); 56 | 57 | Ref image; 58 | image.instance(); 59 | image->load_png_from_buffer(imgdata); 60 | 61 | control->emit_signal("snapshot_ready", image); 62 | 63 | return S_OK; 64 | } 65 | 66 | WebViewOverlaySnapshotDelegate(WebViewOverlay* p_control) { 67 | control = p_control; 68 | img_data_stream = SHCreateMemStream(nullptr, 0); 69 | } 70 | }; 71 | 72 | /*************************************************************************/ 73 | 74 | class WebViewOverlayDelegate : 75 | public ICoreWebView2CreateCoreWebView2ControllerCompletedHandler, 76 | public ICoreWebView2NavigationStartingEventHandler, 77 | public ICoreWebView2NavigationCompletedEventHandler, 78 | public ICoreWebView2NewWindowRequestedEventHandler, 79 | public ICoreWebView2WebMessageReceivedEventHandler, 80 | public ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler, 81 | public ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler { 82 | public: 83 | WebViewOverlay *control = nullptr; 84 | HWND hwnd = nullptr; 85 | 86 | LONG _cRef = 1; 87 | 88 | bool is_loading = false; 89 | bool is_ready = false; 90 | 91 | ComPtr env = nullptr; 92 | ComPtr webview = nullptr; 93 | ComPtr controller = nullptr; 94 | 95 | EventRegistrationToken navigation_start_token = {}; 96 | EventRegistrationToken navigation_completed_token = {}; 97 | EventRegistrationToken new_window_token = {}; 98 | EventRegistrationToken message_token = {}; 99 | 100 | ULONG STDMETHODCALLTYPE AddRef() { 101 | return InterlockedIncrement(&_cRef); 102 | } 103 | 104 | ULONG STDMETHODCALLTYPE Release() { 105 | ULONG ulRef = InterlockedDecrement(&_cRef); 106 | if (0 == ulRef) { 107 | delete this; 108 | } 109 | return ulRef; 110 | } 111 | 112 | HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID **ppvInterface) { 113 | AddRef(); 114 | *ppvInterface = this; 115 | return S_OK; 116 | } 117 | 118 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2* p_sender, ICoreWebView2NavigationStartingEventArgs* p_args) { 119 | if (control != nullptr) { 120 | control->emit_signal("start_navigation"); 121 | } 122 | is_loading = true; 123 | return S_OK; 124 | } 125 | 126 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2* p_sender, ICoreWebView2NavigationCompletedEventArgs* p_args) { 127 | if (control != nullptr) { 128 | control->emit_signal("finish_navigation"); 129 | } 130 | is_loading = false; 131 | return S_OK; 132 | } 133 | 134 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2* p_sender, ICoreWebView2NewWindowRequestedEventArgs* p_args) { 135 | LPWSTR uri; 136 | p_args->get_Uri(&uri); 137 | ERR_FAIL_COND_V(uri == nullptr, S_OK); 138 | String result = String(uri); 139 | 140 | control->emit_signal("new_window", result); 141 | return S_OK; 142 | } 143 | 144 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT p_result, ICoreWebView2Environment* p_environment) { 145 | env = p_environment; 146 | HRESULT hr = env->CreateCoreWebView2Controller(hwnd, this); 147 | ERR_FAIL_COND_V(FAILED(hr), S_OK); 148 | 149 | return S_OK; 150 | } 151 | 152 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT p_result, ICoreWebView2Controller* p_controller) { 153 | controller = p_controller; 154 | HRESULT hr = controller->get_CoreWebView2(&webview); 155 | ERR_FAIL_COND_V(FAILED(hr), S_OK); 156 | 157 | webview->add_NavigationStarting(this, &navigation_start_token); 158 | webview->add_NavigationCompleted(this, &navigation_completed_token); 159 | webview->add_NewWindowRequested(this, &new_window_token); 160 | webview->add_WebMessageReceived(this, &message_token); 161 | 162 | webview->AddScriptToExecuteOnDocumentCreated(L"function webviewMessage(s){window.chrome.callback.postMessage(s);}", this); 163 | 164 | is_ready = true; 165 | 166 | return S_OK; 167 | } 168 | 169 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT p_error_code, LPCWSTR p_id) { 170 | // script is injected 171 | return S_OK; 172 | } 173 | 174 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *p_sender, ICoreWebView2WebMessageReceivedEventArgs *p_args) { 175 | LPWSTR json; 176 | p_args->get_WebMessageAsJson(&json); 177 | 178 | control->emit_signal("callback", String(json)); 179 | return S_OK; 180 | } 181 | 182 | WebViewOverlayDelegate(WebViewOverlay* p_control, HWND p_hwnd) { 183 | control = p_control; 184 | hwnd = p_hwnd; 185 | 186 | String cache_path = OS::get_singleton()->get_cache_path(); 187 | 188 | CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 189 | 190 | HRESULT hr = webview_CreateCoreWebView2EnvironmentWithOptions(nullptr, (LPCWSTR)cache_path.c_str(), nullptr, this); 191 | ERR_FAIL_COND(FAILED(hr)); 192 | } 193 | 194 | ~WebViewOverlayDelegate() { 195 | if (webview) { 196 | webview->remove_NavigationCompleted(navigation_completed_token); 197 | webview->remove_NavigationStarting(navigation_start_token); 198 | webview->remove_NewWindowRequested(new_window_token); 199 | webview->remove_WebMessageReceived(message_token); 200 | } 201 | } 202 | }; 203 | 204 | /*************************************************************************/ 205 | 206 | class WebViewOverlayImplementation { 207 | public: 208 | WebViewOverlayDelegate *view = nullptr; 209 | }; 210 | 211 | /*************************************************************************/ 212 | 213 | WebViewOverlay::WebViewOverlay() { 214 | data = memnew(WebViewOverlayImplementation()); 215 | } 216 | 217 | WebViewOverlay::~WebViewOverlay() { 218 | memdelete(data); 219 | } 220 | 221 | void WebViewOverlay::_notification(int p_what) { 222 | switch (p_what) { 223 | case NOTIFICATION_ENTER_TREE: { 224 | if (!Engine::get_singleton()->is_editor_hint() && (err_status == 0)) { 225 | set_process_internal(true); // Wait for window to init, do not init in editor. 226 | } 227 | } break; 228 | case NOTIFICATION_INTERNAL_PROCESS: { 229 | if (!Engine::get_singleton()->is_editor_hint() && (data->view == nullptr) && (err_status == 0)) { 230 | HWND hwnd = (HWND)OS::get_singleton()->get_native_handle(OS::WINDOW_HANDLE); 231 | if (hwnd != nullptr) { 232 | float sc = OS::get_singleton()->get_screen_max_scale(); 233 | Rect2i rect = get_window_rect(); 234 | WebViewOverlayDelegate *webview = new WebViewOverlayDelegate(this, hwnd); 235 | data->view = webview; 236 | ctrl_err_status = -1; 237 | } 238 | } 239 | if (!Engine::get_singleton()->is_editor_hint() && (data->view != nullptr) && (data->view->is_ready) && (ctrl_err_status == -1) && (err_status == 0)) { 240 | float sc = OS::get_singleton()->get_screen_max_scale(); 241 | Rect2i rect = get_window_rect(); 242 | 243 | if (user_agent.length() > 0) { 244 | //TODO - available in unreleased ICoreWebView2ExperimentalSettings only 245 | } 246 | //set (no_background) TODO, add WM_PAINT handler with SetBkMode(hdc, TRANSPARENT); 247 | 248 | RECT rc; 249 | rc.left = rect.position.x / sc; 250 | rc.top = rect.position.y / sc; 251 | rc.right = rc.left + rect.size.width / sc; 252 | rc.bottom = rc.top + rect.size.height / sc; 253 | 254 | data->view->controller->put_Bounds(rc); 255 | data->view->controller->put_ZoomFactor(zoom); 256 | if (is_visible_in_tree()) { 257 | data->view->controller->put_IsVisible(TRUE); 258 | } else { 259 | data->view->controller->put_IsVisible(FALSE); 260 | } 261 | 262 | data->view->webview->Navigate((LPCWSTR)home_url.c_str()); 263 | ctrl_err_status = 0; 264 | 265 | set_process_internal(false); 266 | } 267 | } break; 268 | case NOTIFICATION_DRAW: { 269 | if (err_status != 0) { 270 | switch (err_status) { 271 | case -1: { 272 | _draw_error("WebView interface no initialized."); 273 | } break; 274 | case 1: { 275 | _draw_error("Failed to load 'WebView2Loader.dll' library."); 276 | } break; 277 | case 2: { 278 | _draw_error("'CreateCoreWebView2EnvironmentWithOptions' function not found."); 279 | } break; 280 | default: { 281 | _draw_error("Unknown error."); 282 | } break; 283 | }; 284 | } else if (ctrl_err_status > 0) { 285 | _draw_error("Unknown control error."); 286 | } else if (Engine::get_singleton()->is_editor_hint()) { 287 | _draw_placeholder(); 288 | } 289 | } FALLTHROUGH; 290 | case NOTIFICATION_MOVED_IN_PARENT: 291 | case NOTIFICATION_RESIZED: { 292 | if ((data->view != nullptr) && (data->view->is_ready)) { 293 | float sc = OS::get_singleton()->get_screen_max_scale(); 294 | Rect2i rect = get_window_rect(); 295 | 296 | RECT rc; 297 | rc.left = rect.position.x / sc; 298 | rc.top = rect.position.y / sc; 299 | rc.right = rc.left + rect.size.width / sc; 300 | rc.bottom = rc.top + rect.size.height / sc; 301 | data->view->controller->put_Bounds(rc); 302 | } 303 | } break; 304 | case NOTIFICATION_VISIBILITY_CHANGED: { 305 | if ((data->view != nullptr) && (data->view->is_ready)) { 306 | if (is_visible_in_tree()) { 307 | data->view->controller->put_IsVisible(TRUE); 308 | } else { 309 | data->view->controller->put_IsVisible(FALSE); 310 | } 311 | } 312 | } break; 313 | case NOTIFICATION_EXIT_TREE: { 314 | if (data->view != nullptr) { 315 | delete data->view; 316 | data->view = nullptr; 317 | } 318 | } break; 319 | default: { 320 | //NOP 321 | } break; 322 | } 323 | } 324 | 325 | void WebViewOverlay::get_snapshot(int p_width) { 326 | ERR_FAIL_COND(data->view == nullptr || !data->view->is_ready); 327 | 328 | ComPtr del = new WebViewOverlaySnapshotDelegate(this); 329 | data->view->webview->CapturePreview(COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG, del->img_data_stream.Get(), del.Get()); 330 | } 331 | 332 | void WebViewOverlay::set_no_background(bool p_bg) { 333 | no_background = p_bg; 334 | //TODO 335 | } 336 | 337 | bool WebViewOverlay::get_no_background() const { 338 | return no_background; 339 | } 340 | 341 | void WebViewOverlay::set_url(const String& p_url) { 342 | home_url = p_url; 343 | if ((data->view != nullptr) && (data->view->is_ready)) { 344 | data->view->webview->Navigate((LPCWSTR)p_url.c_str()); 345 | } 346 | } 347 | 348 | String WebViewOverlay::get_url() const { 349 | if ((data->view != nullptr) && (data->view->is_ready)) { 350 | LPWSTR uri; 351 | data->view->webview->get_Source(&uri); 352 | ERR_FAIL_COND_V(uri == nullptr, ""); 353 | 354 | String result = String(uri); 355 | return result; 356 | } 357 | 358 | return home_url; 359 | } 360 | 361 | void WebViewOverlay::set_user_agent(const String& p_user_agent) { 362 | user_agent = p_user_agent; 363 | //TODO 364 | } 365 | 366 | String WebViewOverlay::get_user_agent() const { 367 | //TODO 368 | return user_agent; 369 | } 370 | 371 | double WebViewOverlay::get_zoom_level() const { 372 | if ((data->view != nullptr) && (data->view->is_ready)) { 373 | double _zoom; 374 | data->view->controller->get_ZoomFactor(&_zoom); 375 | return _zoom; 376 | } 377 | return zoom; 378 | } 379 | 380 | void WebViewOverlay::set_zoom_level(double p_zoom) { 381 | zoom = p_zoom; 382 | if ((data->view != nullptr) && (data->view->is_ready)) { 383 | data->view->controller->put_ZoomFactor(zoom); 384 | } 385 | } 386 | 387 | String WebViewOverlay::get_title() const { 388 | ERR_FAIL_COND_V(data->view == nullptr, ""); 389 | 390 | LPWSTR title; 391 | data->view->webview->get_DocumentTitle(&title); 392 | ERR_FAIL_COND_V(title == nullptr, ""); 393 | String result = String(title); 394 | 395 | return result; 396 | } 397 | 398 | void WebViewOverlay::execute_java_script(const String &p_script) { 399 | ERR_FAIL_COND(data->view == nullptr || !data->view->is_ready); 400 | 401 | data->view->webview->ExecuteScript((LPCWSTR)p_script.c_str(), nullptr); 402 | } 403 | 404 | void WebViewOverlay::load_string(const String &p_source) { 405 | ERR_FAIL_COND(data->view == nullptr || !data->view->is_ready); 406 | data->view->webview->NavigateToString((LPCWSTR)p_source.c_str()); 407 | } 408 | 409 | bool WebViewOverlay::can_go_back() const { 410 | ERR_FAIL_COND_V(data->view == nullptr, false); 411 | BOOL result = false; 412 | data->view->webview->get_CanGoBack(&result); 413 | return result; 414 | } 415 | 416 | bool WebViewOverlay::can_go_forward() const { 417 | ERR_FAIL_COND_V(data->view == nullptr, false); 418 | BOOL result = false; 419 | data->view->webview->get_CanGoForward(&result); 420 | return result; 421 | } 422 | 423 | bool WebViewOverlay::is_ready() const { 424 | return (data->view != nullptr) && data->view->is_ready; 425 | } 426 | 427 | bool WebViewOverlay::is_loading() const { 428 | ERR_FAIL_COND_V(data->view == nullptr, false); 429 | return data->view->is_loading; 430 | } 431 | 432 | bool WebViewOverlay::is_secure_content() const { 433 | ERR_FAIL_COND_V(data->view == nullptr, false); 434 | //TODO not supported ??? 435 | return false; 436 | } 437 | 438 | void WebViewOverlay::go_back() { 439 | ERR_FAIL_COND(data->view == nullptr || !data->view->is_ready); 440 | data->view->webview->GoBack(); 441 | } 442 | 443 | void WebViewOverlay::go_forward() { 444 | ERR_FAIL_COND(data->view == nullptr || !data->view->is_ready); 445 | data->view->webview->GoForward(); 446 | } 447 | 448 | void WebViewOverlay::reload() { 449 | ERR_FAIL_COND(data->view == nullptr || !data->view->is_ready); 450 | data->view->webview->Reload(); 451 | } 452 | 453 | void WebViewOverlay::stop() { 454 | ERR_FAIL_COND(data->view == nullptr || !data->view->is_ready); 455 | data->view->webview->Stop(); 456 | } 457 | 458 | void WebViewOverlay::init() { 459 | HMODULE wv2_lib = LoadLibraryW(L"WebView2Loader.dll"); 460 | if (wv2_lib) { 461 | webview_CreateCoreWebView2EnvironmentWithOptions = (CreateCoreWebView2EnvironmentWithOptionsPtr)GetProcAddress(wv2_lib, "CreateCoreWebView2EnvironmentWithOptions"); 462 | if (webview_CreateCoreWebView2EnvironmentWithOptions != nullptr) { 463 | err_status = 0; 464 | } else { 465 | err_status = 2; 466 | } 467 | } else { 468 | err_status = 1; 469 | } 470 | } 471 | 472 | void WebViewOverlay::finish() {} -------------------------------------------------------------------------------- /webview_icons.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* webview_icon.h */ 3 | /*************************************************************************/ 4 | 5 | #ifndef WEBVIEW_ICONS_H 6 | #define WEBVIEW_ICONS_H 7 | 8 | unsigned char __icon_error[] = { 9 | 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 10 | 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 11 | 0x08, 0x06, 0x00, 0x00, 0x00, 0xaa, 0x69, 0x71, 0xde, 0x00, 0x00, 0x00, 12 | 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 13 | 0xec, 0x01, 0x79, 0x28, 0x71, 0xbd, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 14 | 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 15 | 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 16 | 0x6f, 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25, 0xf0, 0xce, 0xce, 31 | 0xce, 0xb7, 0x01, 0xb8, 0x1c, 0x60, 0x5c, 0x50, 0xe6, 0xd3, 0xc5, 0x96, 32 | 0x96, 0x96, 0xe7, 0xc2, 0x80, 0x3f, 0x1c, 0x70, 0x3f, 0xe9, 0x2c, 0xec, 33 | 0x5c, 0x6e, 0x6d, 0x6d, 0x7d, 0x51, 0x15, 0xc0, 0x09, 0x20, 0x9c, 0xee, 34 | 0x09, 0x01, 0xe1, 0x57, 0x80, 0xb9, 0x29, 0xf5, 0x2c, 0x8d, 0x36, 0xee, 35 | 0x19, 0x90, 0x78, 0xd6, 0x0b, 0xfd, 0x4d, 0xf1, 0x04, 0x20, 0x6c, 0x5f, 36 | 0x92, 0x02, 0xef, 0xd3, 0x65, 0x93, 0xc9, 0xf4, 0xbc, 0xc4, 0xb3, 0x99, 37 | 0x61, 0x9e, 0x9d, 0x56, 0x43, 0xe8, 0x3f, 0x13, 0x06, 0x04, 0x03, 0xd0, 38 | 0x1b, 0x88, 0x94, 0x5d, 0x46, 0xa3, 0xf1, 0x15, 0xca, 0x73, 0x1f, 0x69, 39 | 0x4f, 0x42, 0xcd, 0x61, 0x9e, 0x1d, 0x51, 0x3c, 0x01, 0x70, 0x72, 0x7b, 40 | 0x38, 0x02, 0x22, 0xd0, 0x0e, 0x55, 0xd4, 0x01, 0x38, 0x3a, 0x17, 0x0d, 41 | 0x02, 0x10, 0x29, 0x55, 0x6a, 0x21, 0xe0, 0x5e, 0x34, 0x08, 0xe0, 0x15, 42 | 0xd0, 0x98, 0x08, 0x63, 0xec, 0x01, 0xe4, 0xf8, 0x53, 0x9c, 0x0e, 0xb0, 43 | 0x0b, 0x8e, 0x56, 0x44, 0x31, 0x05, 0x96, 0x41, 0xc2, 0x97, 0x43, 0x43, 44 | 0x43, 0x8f, 0x48, 0xf9, 0x60, 0x36, 0x9b, 0x77, 0x46, 0xb3, 0xc2, 0x7f, 45 | 0x0e, 0x27, 0x9c, 0xe4, 0x04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0xc0, 0x8b, 0x81, 0xb9, 0x3f, 104 | 0x33, 0x33, 0xd3, 0x01, 0x5b, 0xdb, 0xe4, 0x5e, 0x14, 0x49, 0x0c, 0x5d, 105 | 0xaf, 0x87, 0xa3, 0x36, 0xb3, 0xd9, 0x3c, 0x83, 0xf4, 0xb0, 0x93, 0x13, 106 | 0x34, 0x12, 0x3c, 0xc7, 0x6d, 0x36, 0x1b, 0xdb, 0x88, 0x8c, 0x8f, 0x8f, 107 | 0xbb, 0x79, 0x76, 0x68, 0x00, 0x96, 0x96, 0x96, 0x58, 0x7f, 0x7f, 0xbf, 108 | 0x15, 0xef, 0xa7, 0x0d, 0x14, 0x6b, 0x08, 0x33, 0x18, 0x0c, 0x8f, 0xca, 109 | 0x4a, 0x00, 0xe6, 0xdd, 0xef, 0x70, 0x9c, 0xf2, 0x52, 0x44, 0x50, 0x5a, 110 | 0xf0, 0x1c, 0x27, 0xa7, 0x49, 0x7b, 0x7b, 0x7b, 0xed, 0x88, 0x86, 0xb9, 111 | 0x50, 0x1d, 0x18, 0x18, 0x10, 0x86, 0x96, 0x52, 0x8b, 0x67, 0x87, 0xde, 112 | 0xc5, 0x6b, 0x9d, 0xe4, 0x8f, 0xec, 0x5b, 0x6b, 0x68, 0x2d, 0x9f, 0xe7, 113 | 0xd4, 0xca, 0xca, 0x8a, 0xf0, 0x65, 0xc7, 0xb9, 0x67, 0x85, 0xc0, 0x51, 114 | 0x14, 0xf0, 0xec, 0x50, 0x8d, 0xa1, 0x10, 0xe7, 0x14, 0x38, 0x61, 0xf2, 115 | 0x60, 0xb5, 0x5a, 0x79, 0x76, 0x2c, 0xd1, 0x58, 0xf1, 0xa5, 0x25, 0x28, 116 | 0x87, 0xd4, 0x4b, 0xa9, 0x30, 0x8a, 0x45, 0x92, 0x46, 0x99, 0xc8, 0x20, 117 | 0xb0, 0x94, 0x16, 0xd3, 0xd3, 0xd3, 0x82, 0x92, 0xa0, 0x68, 0x71, 0xeb, 118 | 0x04, 0x3d, 0x47, 0x36, 0x26, 0x26, 0x26, 0x18, 0x72, 0x59, 0x00, 0x4a, 119 | 0x91, 0xb5, 0xb8, 0xb8, 0x28, 0xd8, 0x15, 0x8b, 0x1c, 0x5d, 0xe3, 0xd8, 120 | 0xd1, 0x47, 0x65, 0x71, 0x94, 0xf7, 0x2f, 0x72, 0x54, 0x65, 0xd7, 0xfc, 121 | 0xfc, 0xbc, 0x30, 0x7a, 0x44, 0x06, 0x45, 0xc4, 0x7a, 0x82, 0xfb, 0x6c, 122 | 0x3c, 0x02, 0x00, 0x6c, 0x4d, 0x75, 0xa5, 0x90, 0xa7, 0xbc, 0x27, 0xbb, 123 | 0x14, 0xfa, 0x44, 0x0a, 0xda, 0x9c, 0x9d, 0x63, 0xe7, 0xbd, 0x68, 0x11, 124 | 0xf0, 0x32, 0x67, 0x8d, 0x50, 0x2a, 0x64, 0x5d, 0x68, 0x5b, 0xf3, 0xc8, 125 | 0xfb, 0x59, 0x38, 0x4d, 0xad, 0x92, 0x1b, 0x01, 0x28, 0xac, 0x6e, 0x14, 126 | 0xb7, 0x19, 0xd4, 0x04, 0x0b, 0xb5, 0x3b, 0xea, 0xe9, 0xff, 0xb1, 0x4d, 127 | 0x0e, 0xc9, 0x5e, 0x00, 0x43, 0xba, 0xc1, 0x27, 0x0a, 0x9e, 0x04, 0xb9, 128 | 0x50, 0xab, 0xde, 0x8a, 0xc5, 0x0e, 0x90, 0x2f, 0x14, 0x08, 0xde, 0x89, 129 | 0xc1, 0x49, 0x8d, 0xd9, 0x6e, 0x11, 0x84, 0xe6, 0x09, 0xbc, 0xd4, 0xaa, 130 | 0x10, 0xf0, 0xf7, 0x90, 0x3a, 0x6f, 0x6c, 0xc5, 0x5e, 0xa0, 0xa7, 0x69, 131 | 0xcb, 0x1b, 0xed, 0xca, 0xd8, 0x22, 0xe0, 0xb4, 0x19, 0x2b, 0x2f, 0xaa, 132 | 0x39, 0xbf, 0x11, 0xe9, 0xee, 0xee, 0x7e, 0x82, 0x16, 0x21, 0xe1, 0x8c, 133 | 0x29, 0x46, 0x9b, 0x22, 0xfe, 0xa4, 0xf7, 0x61, 0x16, 0xf8, 0x98, 0xe2, 134 | 0x76, 0x88, 0xf9, 0x26, 0x4c, 0x67, 0x68, 0x73, 0x02, 0x74, 0x5c, 0x06, 135 | 0xc0, 0xb4, 0x2d, 0xa7, 0x0f, 0x80, 0x8b, 0xa1, 0x27, 0xd1, 0x19, 0x9e, 136 | 0x8d, 0x53, 0x93, 0xd0, 0xea, 0x32, 0x1c, 0x7f, 0x1d, 0xa9, 0x72, 0x14, 137 | 0xbf, 0x39, 0x00, 0xf3, 0x8d, 0x2f, 0x6d, 0x7e, 0x82, 0xea, 0x70, 0xee, 138 | 0x77, 0xdf, 0xef, 0x4d, 0xfc, 0x16, 0x41, 0xbf, 0x86, 0x9e, 0xc3, 0xf1, 139 | 0x21, 0x1f, 0x99, 0xdb, 0xe3, 0x34, 0xd1, 0x44, 0x13, 0x4d, 0x34, 0xd1, 140 | 0x44, 0x13, 0x39, 0xe5, 0x5f, 0x11, 0x3e, 0x42, 0x56, 0x9e, 0x65, 0x9d, 141 | 0xb9, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 142 | 0x82 143 | }; 144 | unsigned int __icon_error_len = 1597; 145 | 146 | unsigned char __icon_dummy[] = { 147 | 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 148 | 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 149 | 0x08, 0x06, 0x00, 0x00, 0x00, 0xaa, 0x69, 0x71, 0xde, 0x00, 0x00, 0x00, 150 | 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 151 | 0xec, 0x01, 0x79, 0x28, 0x71, 0xbd, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 152 | 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 153 | 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 154 | 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x0a, 0xee, 0x49, 155 | 0x44, 0x41, 0x54, 0x78, 0xda, 0xed, 0x5b, 0x79, 0x54, 0x53, 0x67, 0x16, 156 | 0x7f, 0xda, 0x71, 0x9b, 0x99, 0xda, 0x56, 0x9d, 0xf6, 0xd8, 0xe9, 0xcc, 157 | 0xb4, 0x73, 0x5a, 0x3d, 0xda, 0xce, 0xcc, 0x1f, 0xda, 0x7a, 0xa6, 0x7f, 158 | 0xb4, 0x6a, 0x05, 0x02, 0x6e, 0x53, 0x91, 0x52, 0x9d, 0x62, 0xab, 0x23, 159 | 0x6a, 0x5d, 0x4e, 0xab, 0x75, 0xaf, 0xd3, 0x5a, 0xd0, 0x41, 0xcc, 0x02, 160 | 0x46, 0x70, 0x04, 0x41, 0xa9, 0x0b, 0x2a, 0x4a, 0xd9, 0x64, 0x27, 0x79, 161 | 0x61, 0x51, 0x01, 0x41, 0x64, 0x55, 0x64, 0x5f, 0x65, 0x4d, 0x20, 0x08, 162 | 0x21, 0x01, 0x72, 0xe7, 0x7e, 0x2f, 0x80, 0x90, 0xbc, 0x04, 0x08, 0x21, 163 | 0xe0, 0x1c, 0xbe, 0x73, 0xee, 0x79, 0x87, 0xf7, 0xf2, 0xbe, 0x77, 0x7f, 164 | 0xbf, 0xfb, 0xdd, 0xe5, 0x5b, 0xa0, 0xa8, 0xf1, 0x36, 0xde, 0xc6, 0xdb, 165 | 0x78, 0x1b, 0x6f, 0xcf, 0x57, 0x83, 0xdc, 0x25, 0x8b, 0x20, 0xea, 0x05, 166 | 0x5b, 0x88, 0xa0, 0xbe, 0x87, 0x48, 0xca, 0x13, 0xe5, 0x12, 0x8a, 0x1f, 167 | 0x0a, 0x1f, 0xe5, 0x4b, 0xbc, 0xff, 0xc6, 0xff, 0x17, 0xe0, 0x22, 0xfb, 168 | 0xf7, 0xa1, 0x62, 0xeb, 0x65, 0x28, 0xb4, 0x4d, 0x85, 0x7b, 0x7f, 0x6b, 169 | 0x84, 0x98, 0xc9, 0x80, 0x40, 0x0d, 0x49, 0x27, 0x92, 0x70, 0x13, 0x62, 170 | 0xa9, 0x3f, 0x3e, 0xbf, 0xa0, 0x0b, 0xed, 0xdf, 0x83, 0xca, 0xed, 0x81, 171 | 0xd0, 0x74, 0xac, 0x09, 0xaa, 0xbe, 0x56, 0xc3, 0xed, 0x37, 0x07, 0x02, 172 | 0xcd, 0x26, 0x0d, 0x10, 0x4d, 0x2d, 0x78, 0xbe, 0x80, 0x97, 0xd8, 0x6f, 173 | 0x84, 0xda, 0xbd, 0x05, 0xd0, 0x71, 0x1e, 0x10, 0x38, 0x40, 0xfc, 0x6b, 174 | 0x03, 0x81, 0x6c, 0x83, 0x28, 0x2a, 0x03, 0xaf, 0xe1, 0x28, 0x91, 0x28, 175 | 0x29, 0x28, 0xad, 0x7d, 0x9e, 0x57, 0x40, 0x10, 0xf5, 0xf2, 0x73, 0x00, 176 | 0x7c, 0xe3, 0x21, 0x90, 0x9f, 0x90, 0x03, 0x5c, 0x01, 0xa8, 0xde, 0x85, 177 | 0xc0, 0x5f, 0xd5, 0x0f, 0x3a, 0x8a, 0xca, 0xc3, 0xeb, 0x11, 0x62, 0x5d, 178 | 0xa0, 0xa9, 0x5f, 0xe9, 0xf4, 0x45, 0x53, 0x53, 0xf1, 0xf9, 0x3a, 0x94, 179 | 0x12, 0xe6, 0xf7, 0x11, 0x94, 0xd3, 0xa8, 0x03, 0xb4, 0x13, 0xdc, 0x99, 180 | 0x66, 0x71, 0x52, 0x64, 0x69, 0xc5, 0xa3, 0x79, 0x56, 0x5c, 0xfa, 0xdb, 181 | 0x5e, 0x65, 0xcb, 0x1c, 0x1c, 0xa1, 0xd9, 0x05, 0x81, 0xfb, 0x03, 0xc8, 182 | 0x9c, 0x00, 0xee, 0xbe, 0xa3, 0x0f, 0x78, 0x07, 0xe3, 0xd7, 0x11, 0xd4, 183 | 0x52, 0x00, 0x6a, 0xc2, 0xa0, 0x48, 0x8d, 0xa5, 0x5e, 0xc2, 0xf7, 0x1e, 184 | 0xa0, 0x94, 0x8f, 0x1a, 0x70, 0x4b, 0x9e, 0xe8, 0x23, 0x4b, 0x1e, 0x7d, 185 | 0x15, 0x81, 0x2b, 0x50, 0x80, 0x08, 0xfe, 0xdd, 0x76, 0x37, 0xe9, 0xb0, 186 | 0x35, 0x34, 0x1c, 0x2e, 0x61, 0x2c, 0xae, 0x3a, 0x07, 0x90, 0x83, 0xb8, 187 | 0x22, 0x27, 0xe8, 0x00, 0x57, 0xe3, 0xbd, 0x98, 0xab, 0x1c, 0x70, 0x10, 188 | 0x5e, 0x93, 0x72, 0x78, 0x62, 0x81, 0x0d, 0x3f, 0x6e, 0xce, 0x90, 0x46, 189 | 0x56, 0x34, 0xf5, 0x21, 0xd3, 0x57, 0x18, 0xf5, 0x7b, 0xb3, 0x02, 0xb7, 190 | 0x76, 0xa5, 0xdf, 0x40, 0xb0, 0xd9, 0x3d, 0xa0, 0x7b, 0xc4, 0x9a, 0x27, 191 | 0x86, 0xd8, 0xc4, 0x13, 0xa0, 0x56, 0xf9, 0x00, 0x63, 0xf5, 0xea, 0x9d, 192 | 0x00, 0xa2, 0x97, 0x58, 0xad, 0x9e, 0x7e, 0x63, 0x21, 0x7c, 0xed, 0xe1, 193 | 0x03, 0x5a, 0x7d, 0xa8, 0x51, 0x6e, 0x0d, 0x9a, 0x00, 0x1c, 0x2d, 0x4c, 194 | 0x30, 0x8c, 0xa2, 0x96, 0x99, 0x95, 0x00, 0x8e, 0xab, 0x78, 0xae, 0x36, 195 | 0xf8, 0xad, 0xde, 0x81, 0xd0, 0x5c, 0xe3, 0xa2, 0x01, 0xae, 0xf2, 0x06, 196 | 0xc8, 0x58, 0xc4, 0x0a, 0x5c, 0x19, 0x3e, 0x55, 0xfa, 0x83, 0xd7, 0x7f, 197 | 0xb4, 0x81, 0x3f, 0x13, 0x2e, 0x5d, 0x37, 0xa4, 0x51, 0x40, 0x62, 0x46, 198 | 0x14, 0xb5, 0xda, 0xac, 0x04, 0x58, 0xb8, 0xc6, 0xbc, 0xde, 0x57, 0x69, 199 | 0xf7, 0xc0, 0xb3, 0xd0, 0xa5, 0x38, 0xa3, 0x01, 0x5f, 0x7f, 0x10, 0x40, 200 | 0xfc, 0x0a, 0x2b, 0xf8, 0xf6, 0x88, 0x29, 0x37, 0xec, 0xdc, 0x42, 0x72, 201 | 0xf4, 0x82, 0xd7, 0x48, 0xf1, 0x90, 0x08, 0x88, 0xa4, 0x2a, 0x31, 0x76, 202 | 0x58, 0x9b, 0x95, 0x80, 0x95, 0x47, 0xc3, 0x7e, 0xdd, 0xa3, 0x30, 0x7d, 203 | 0xfb, 0x38, 0x40, 0xd7, 0x45, 0x00, 0xf5, 0x65, 0x80, 0x02, 0x5b, 0x8c, 204 | 0xe2, 0xba, 0xbe, 0xde, 0x74, 0xeb, 0x65, 0x70, 0xf6, 0xfe, 0x09, 0x06, 205 | 0x00, 0xae, 0x11, 0xbe, 0x24, 0x7d, 0x08, 0xd6, 0x9f, 0x81, 0xfd, 0xab, 206 | 0xe1, 0x16, 0x35, 0xcf, 0xec, 0x01, 0xd0, 0x56, 0x18, 0x25, 0x7b, 0x52, 207 | 0xea, 0xac, 0xb1, 0x7a, 0x3b, 0x5a, 0x3f, 0x65, 0x3e, 0xab, 0xd5, 0xf3, 208 | 0x02, 0xdf, 0x85, 0xf5, 0xa7, 0x6e, 0x0e, 0x0e, 0x3c, 0x0a, 0x87, 0x47, 209 | 0x87, 0x0e, 0x9a, 0x80, 0x30, 0xca, 0x86, 0xa9, 0x0b, 0x02, 0xa8, 0x17, 210 | 0xcc, 0x9b, 0xd7, 0x4b, 0xd7, 0xcc, 0x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 0x5c, 0xe3, 0xf3, 0x0f, 0x6d, 0xf4, 0x80, 0x7f, 240 | 0x1b, 0xd6, 0x8e, 0x36, 0x78, 0xa6, 0x76, 0x90, 0x14, 0x91, 0x38, 0x65, 241 | 0x34, 0x09, 0x48, 0xc0, 0x45, 0xed, 0x4e, 0x4f, 0x07, 0xfd, 0x57, 0x53, 242 | 0xe1, 0x15, 0xaf, 0x67, 0x05, 0x5f, 0x1c, 0xf4, 0x67, 0xb0, 0x73, 0x0f, 243 | 0x19, 0x75, 0xf0, 0x9a, 0x19, 0xa8, 0x78, 0xcb, 0xb0, 0x5c, 0x80, 0x04, 244 | 0x12, 0xec, 0xa8, 0xba, 0xa7, 0xc3, 0x1d, 0x3e, 0x37, 0x40, 0xad, 0xf4, 245 | 0xd2, 0x2c, 0x5e, 0xb0, 0xa4, 0xba, 0x92, 0xa0, 0xb7, 0xc0, 0xce, 0x2d, 246 | 0x78, 0x4c, 0x80, 0x47, 0x89, 0x1d, 0x96, 0xf5, 0xfb, 0xe4, 0xff, 0xc5, 247 | 0xd8, 0x59, 0xa7, 0x0d, 0x5f, 0x04, 0x2d, 0xb5, 0x2e, 0x9a, 0x05, 0x8c, 248 | 0xe8, 0x49, 0xba, 0xd1, 0x3e, 0xe4, 0x75, 0xf8, 0xdc, 0xfd, 0x97, 0xb1, 249 | 0x01, 0x1e, 0x67, 0x8e, 0x64, 0x62, 0x66, 0xb2, 0x54, 0x88, 0x99, 0xe0, 250 | 0x78, 0x6a, 0xda, 0x31, 0x00, 0x25, 0x0e, 0x7f, 0x7a, 0x86, 0x0e, 0xf8, 251 | 0xe6, 0xb0, 0xe9, 0xb0, 0x49, 0x78, 0x69, 0xac, 0x58, 0x1e, 0x87, 0xbe, 252 | 0xc4, 0xb4, 0xb3, 0xc0, 0x50, 0x91, 0xd3, 0x5e, 0x66, 0xc1, 0x32, 0x65, 253 | 0x1e, 0xcb, 0x3c, 0x7e, 0x32, 0x1c, 0xf2, 0xf6, 0x80, 0xd3, 0xb1, 0xf9, 254 | 0x10, 0x9b, 0xfb, 0x04, 0xe2, 0x72, 0x6b, 0xe0, 0x8c, 0xb8, 0x00, 0xd6, 255 | 0x9c, 0x4e, 0x34, 0x09, 0x98, 0xaf, 0x7c, 0x92, 0xe1, 0xd2, 0x9d, 0x12, 256 | 0xa0, 0x1f, 0xd6, 0x42, 0x78, 0x66, 0x15, 0xfc, 0x14, 0x92, 0x0d, 0x1c, 257 | 0xbe, 0xe1, 0x77, 0x0c, 0x95, 0xcb, 0x46, 0x4c, 0x01, 0xa8, 0x09, 0x9d, 258 | 0x8d, 0x4e, 0x72, 0xc8, 0x5f, 0xc9, 0xba, 0x74, 0xe5, 0x73, 0xdd, 0x05, 259 | 0xea, 0xe5, 0xed, 0xa0, 0xdd, 0x64, 0xad, 0x4a, 0xd8, 0xed, 0x7f, 0x7f, 260 | 0x58, 0xe0, 0x85, 0x48, 0x6a, 0x47, 0x97, 0x5a, 0xa7, 0xef, 0x9c, 0xca, 261 | 0x26, 0xb0, 0xf3, 0x4c, 0x32, 0x13, 0x01, 0x65, 0x9b, 0x84, 0x20, 0xfd, 262 | 0x11, 0x83, 0xde, 0x44, 0x1d, 0x02, 0xfc, 0xaf, 0x38, 0x82, 0xf4, 0xa9, 263 | 0x92, 0x51, 0xaa, 0xa1, 0xa1, 0x01, 0x3c, 0x4e, 0x7b, 0xc0, 0xfe, 0x7d, 264 | 0x07, 0xc0, 0xd3, 0xf3, 0x0c, 0x48, 0xa5, 0x52, 0x68, 0x51, 0x74, 0xc0, 265 | 0xfa, 0xb3, 0x77, 0x8c, 0x02, 0x7f, 0x24, 0x30, 0x13, 0x08, 0xf4, 0xc7, 266 | 0x8f, 0x1f, 0x83, 0xeb, 0x09, 0x57, 0x38, 0x70, 0xe0, 0x20, 0x7e, 0xcf, 267 | 0x1f, 0x54, 0x2a, 0x15, 0xf3, 0xbd, 0xfb, 0xa5, 0xd2, 0x91, 0x27, 0x00, 268 | 0xf2, 0xd7, 0xcd, 0x82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1c, 0x8a, 0xeb, 0x5a, 283 | 0x74, 0x14, 0xdc, 0x72, 0x21, 0xb5, 0x97, 0x80, 0x96, 0xf6, 0x0e, 0xdd, 284 | 0x79, 0x86, 0x30, 0x91, 0x79, 0xf6, 0xb9, 0xfd, 0x3a, 0xd6, 0x7e, 0x83, 285 | 0x82, 0x82, 0x99, 0xe7, 0xfe, 0xc9, 0xa5, 0x23, 0x48, 0x40, 0xf5, 0xce, 286 | 0x24, 0x48, 0xfa, 0x93, 0x8e, 0xf5, 0xbd, 0x2e, 0x6c, 0xef, 0xfd, 0x50, 287 | 0xf0, 0xfd, 0x4a, 0x8d, 0x22, 0xfe, 0x57, 0x59, 0x15, 0xbd, 0x7e, 0xed, 288 | 0x3a, 0x93, 0x15, 0x86, 0x4a, 0x00, 0x91, 0xda, 0x66, 0x05, 0x1c, 0xf9, 289 | 0xfe, 0xdf, 0xac, 0xfd, 0xe6, 0xe4, 0xe4, 0x30, 0xef, 0x1e, 0x0b, 0xcd, 290 | 0x19, 0x19, 0x02, 0xa0, 0x72, 0xc3, 0x1c, 0x28, 0xb4, 0x57, 0xb2, 0xad, 291 | 0xe3, 0x59, 0xf3, 0x44, 0xbd, 0x1f, 0x72, 0x44, 0x20, 0x9d, 0xe8, 0x8f, 292 | 0x0a, 0x85, 0x02, 0xfe, 0xb5, 0x69, 0x73, 0x3f, 0x25, 0xb7, 0x38, 0x6e, 293 | 0x61, 0xee, 0x7f, 0x73, 0x25, 0xdd, 0x28, 0x02, 0xce, 0x49, 0x0a, 0xa1, 294 | 0xac, 0xac, 0x0c, 0x56, 0xaf, 0xfa, 0x47, 0xbf, 0x7e, 0x5d, 0x5d, 0x4f, 295 | 0x32, 0xef, 0xd5, 0x20, 0x41, 0xc4, 0x55, 0x46, 0x88, 0x80, 0x6d, 0x22, 296 | 0x88, 0xfb, 0x6d, 0xff, 0xa5, 0xeb, 0xf0, 0x29, 0xac, 0xc5, 0x8e, 0x5b, 297 | 0xf4, 0x23, 0xe8, 0x52, 0xab, 0x41, 0xa9, 0x54, 0x42, 0x70, 0x70, 0x30, 298 | 0x08, 0x85, 0xa7, 0x21, 0x34, 0x24, 0x14, 0x94, 0x18, 0xad, 0xbd, 0xe8, 299 | 0x42, 0x56, 0x05, 0x07, 0x43, 0x80, 0x35, 0x5f, 0x02, 0x89, 0x8f, 0xeb, 300 | 0x98, 0xec, 0x42, 0xa2, 0x3f, 0xc9, 0x30, 0x09, 0x09, 0x09, 0xcc, 0x3b, 301 | 0x72, 0x85, 0x0a, 0x76, 0x5d, 0x4e, 0x1b, 0x99, 0x2c, 0x00, 0x0f, 0x37, 302 | 0xcc, 0x84, 0x3c, 0xce, 0x53, 0x6d, 0xeb, 0x9f, 0xf7, 0x73, 0xd4, 0xfb, 303 | 0xc1, 0x6f, 0xfd, 0xd3, 0xe1, 0x4e, 0x41, 0x3d, 0x93, 0x12, 0xa5, 0x98, 304 | 0xff, 0x53, 0x8a, 0x1a, 0x60, 0xdf, 0xf5, 0x0c, 0xbd, 0xbf, 0x27, 0x45, 305 | 0x52, 0xab, 0xb2, 0xa3, 0x37, 0xa7, 0xeb, 0x9d, 0xcd, 0x61, 0xc1, 0x23, 306 | 0x40, 0x82, 0xf3, 0xaa, 0x9a, 0xa1, 0xb9, 0x4d, 0xc5, 0xb8, 0x05, 0x29, 307 | 0x86, 0x1c, 0xbc, 0xef, 0x8e, 0x5c, 0x21, 0x04, 0xc5, 0x0e, 0x42, 0x88, 308 | 0x9d, 0xda, 0x0f, 0xbc, 0x22, 0x62, 0x6a, 0xf5, 0x0a, 0x7e, 0x8c, 0x49, 309 | 0xcb, 0xd5, 0x8d, 0x98, 0x09, 0x48, 0x0a, 0xb4, 0x35, 0x51, 0xc5, 0x68, 310 | 0x3a, 0x02, 0x32, 0x3e, 0xc8, 0xd1, 0xb6, 0xbe, 0xe8, 0xea, 0xd2, 0x1f, 311 | 0xc7, 0x4a, 0x9d, 0x3f, 0xa2, 0x04, 0x40, 0xde, 0x2a, 0x0b, 0x10, 0x4d, 312 | 0xd7, 0x8e, 0xfc, 0x77, 0x0e, 0x5e, 0xcf, 0xb4, 0xb5, 0x11, 0x48, 0x3a, 313 | 0x9e, 0x07, 0xf0, 0x2b, 0x04, 0xf1, 0x4a, 0xbb, 0x80, 0xdc, 0xc9, 0xc6, 314 | 0x11, 0x90, 0x3c, 0xd7, 0x93, 0xe5, 0x60, 0xc2, 0x6a, 0x74, 0xd5, 0x4f, 315 | 0x98, 0x80, 0x85, 0xa5, 0x6d, 0x59, 0xc3, 0x53, 0x78, 0x50, 0x2e, 0x03, 316 | 0x51, 0x5e, 0x0d, 0xdc, 0x4c, 0x2b, 0xef, 0xf2, 0x88, 0x7b, 0xdc, 0xf2, 317 | 0xc3, 0x2f, 0x59, 0x8d, 0xcb, 0x05, 0xf1, 0x0a, 0x73, 0x00, 0xc4, 0x39, 318 | 0x80, 0x1c, 0xd3, 0x9f, 0xec, 0x9c, 0xa4, 0xe8, 0x69, 0x70, 0x7a, 0x05, 319 | 0x24, 0xe4, 0xd7, 0x31, 0x71, 0xa4, 0x4a, 0xd6, 0x06, 0xed, 0xaa, 0xce, 320 | 0x9e, 0xd8, 0x6a, 0xe4, 0x08, 0x88, 0x9e, 0x9c, 0xae, 0x45, 0xc0, 0x43, 321 | 0x38, 0x4a, 0x4d, 0x8c, 0xce, 0xad, 0x59, 0x1a, 0x9b, 0x5b, 0x93, 0x9d, 322 | 0x57, 0xdd, 0x2c, 0x6b, 0x68, 0x69, 0x67, 0x9d, 0xa0, 0x10, 0x32, 0x0c, 323 | 0x29, 0xee, 0xe0, 0x75, 0xb7, 0xd9, 0x5b, 0x52, 0xa8, 0x30, 0x24, 0x9e, 324 | 0xa2, 0x82, 0xb6, 0x55, 0xa7, 0x12, 0x5a, 0x0d, 0xf5, 0x43, 0x4a, 0x64, 325 | 0xed, 0xa6, 0xec, 0xe8, 0x82, 0x27, 0x4d, 0x0a, 0xf5, 0x83, 0x72, 0x69, 326 | 0x75, 0x64, 0x66, 0x75, 0x7a, 0xc0, 0x9d, 0x8a, 0xa1, 0xef, 0x09, 0x40, 327 | 0x18, 0x35, 0x0b, 0x01, 0x77, 0x69, 0x59, 0x7f, 0x07, 0xb3, 0x1e, 0xc0, 328 | 0xa5, 0x97, 0x69, 0xef, 0xd7, 0xaf, 0x72, 0x4f, 0x68, 0x5e, 0x7f, 0xf6, 329 | 0x76, 0xfd, 0xe1, 0xc0, 0x4c, 0x39, 0x51, 0x82, 0x58, 0xc2, 0x90, 0xe2, 330 | 0xf7, 0xba, 0xcb, 0xe6, 0x81, 0x9a, 0x6f, 0x42, 0x51, 0xbb, 0xa1, 0x7e, 331 | 0x88, 0x01, 0x48, 0x36, 0xd8, 0x79, 0x29, 0x4d, 0xb6, 0xee, 0xcc, 0xed, 332 | 0x86, 0x15, 0x6e, 0xf1, 0x3a, 0x84, 0x2d, 0x3e, 0x4a, 0x4f, 0x1d, 0x3a, 333 | 0x01, 0x91, 0xd4, 0x17, 0x5a, 0xd6, 0x57, 0x12, 0x52, 0x98, 0x05, 0x52, 334 | 0x81, 0xf8, 0x63, 0x03, 0x4a, 0xa9, 0x49, 0x1d, 0x90, 0x51, 0x26, 0x35, 335 | 0x48, 0x00, 0x51, 0x9a, 0xc8, 0xe6, 0xf3, 0x29, 0xf2, 0x4d, 0x3e, 0xc9, 336 | 0x52, 0x6d, 0xd9, 0x73, 0xf5, 0xfe, 0x53, 0x42, 0x00, 0x71, 0x2d, 0x43, 337 | 0xfd, 0xa8, 0x3a, 0xbb, 0x98, 0x12, 0xdc, 0x90, 0x3e, 0x76, 0x01, 0x01, 338 | 0x43, 0xdf, 0x14, 0x45, 0x6b, 0x7b, 0x6b, 0x11, 0x10, 0xfa, 0x6c, 0x6d, 339 | 0x50, 0xfc, 0xae, 0x21, 0xa5, 0x48, 0x8e, 0x26, 0x33, 0x3b, 0xbd, 0x51, 340 | 0x99, 0x2f, 0xe9, 0x50, 0x23, 0x49, 0x64, 0x14, 0x18, 0xea, 0xa7, 0x4d, 341 | 0xd9, 0xc9, 0x3a, 0x79, 0xea, 0x33, 0x49, 0x62, 0x9c, 0x9c, 0xd4, 0x1c, 342 | 0x06, 0x36, 0x51, 0x1b, 0x8d, 0xf3, 0x7f, 0x8c, 0xf6, 0x6c, 0xc3, 0x9f, 343 | 0x34, 0x66, 0x0b, 0x8a, 0x47, 0xb7, 0xe8, 0xdd, 0x23, 0x68, 0x6c, 0x65, 344 | 0x86, 0x2f, 0x29, 0x6e, 0x48, 0x89, 0x5a, 0x50, 0x23, 0x67, 0xe6, 0xeb, 345 | 0x92, 0x47, 0xb5, 0x10, 0xf6, 0xa0, 0x0a, 0x6e, 0xa1, 0x90, 0x16, 0x94, 346 | 0x5e, 0x61, 0x30, 0x4e, 0x90, 0xf7, 0x08, 0x09, 0x01, 0xa9, 0x65, 0x10, 347 | 0x99, 0x55, 0x0d, 0x49, 0x58, 0x09, 0x66, 0x62, 0xc0, 0x25, 0x13, 0x2a, 348 | 0xb2, 0xe8, 0xd2, 0x13, 0xe4, 0xa2, 0xb2, 0xab, 0x0d, 0x11, 0x19, 0x63, 349 | 0x2c, 0x01, 0xb5, 0xfd, 0x08, 0xd0, 0x3a, 0x5c, 0xc0, 0xb6, 0x44, 0xde, 350 | 0x23, 0xc7, 0xc3, 0x72, 0x15, 0xa9, 0xc5, 0x0d, 0xf0, 0xb0, 0xba, 0x19, 351 | 0x2a, 0xa5, 0xad, 0xcc, 0x88, 0x20, 0x16, 0xd7, 0x6e, 0xf8, 0xbb, 0x66, 352 | 0x43, 0x04, 0x20, 0x30, 0x9d, 0x97, 0x3a, 0x70, 0xc8, 0x93, 0x0a, 0x93, 353 | 0x64, 0x1f, 0x12, 0xed, 0x6f, 0xa3, 0xf5, 0x1d, 0x2f, 0xa4, 0xc8, 0x0d, 354 | 0xf4, 0xb3, 0xd9, 0xa8, 0x65, 0x2f, 0xe6, 0x48, 0xda, 0x33, 0x02, 0xda, 355 | 0xb5, 0xcf, 0xe2, 0x2d, 0x73, 0x8b, 0x9f, 0xa7, 0x6f, 0x8f, 0x50, 0xef, 356 | 0x90, 0x3d, 0x15, 0xaf, 0xb0, 0x3f, 0x73, 0xbb, 0x69, 0x93, 0x6f, 0x4a, 357 | 0xc3, 0x56, 0xbf, 0xd4, 0x46, 0x0e, 0x4f, 0x62, 0x70, 0x04, 0x2c, 0x77, 358 | 0x93, 0xb4, 0xef, 0xb8, 0x94, 0x56, 0xff, 0xe5, 0xb9, 0xbb, 0x8d, 0x6b, 359 | 0x31, 0xdd, 0x91, 0x9c, 0x3e, 0xc4, 0x34, 0x59, 0x60, 0x5c, 0x00, 0x0c, 360 | 0xa0, 0x26, 0xf7, 0xb3, 0x7e, 0x04, 0x55, 0xc6, 0x7e, 0xfc, 0x4d, 0xb2, 361 | 0x7b, 0x0c, 0x17, 0x41, 0x0a, 0x4b, 0xbe, 0xe8, 0x43, 0xe3, 0x4b, 0x60, 362 | 0x72, 0xd8, 0xf8, 0x19, 0x09, 0xa5, 0xfa, 0xcf, 0x00, 0xd2, 0xce, 0x63, 363 | 0x0e, 0x3c, 0x5f, 0xd2, 0xca, 0xe1, 0x8b, 0x57, 0x0d, 0x6f, 0x0a, 0x8c, 364 | 0x56, 0xef, 0x43, 0x80, 0x0a, 0xd2, 0xa8, 0x49, 0x06, 0x48, 0xf8, 0x27, 365 | 0x7e, 0x58, 0x36, 0x46, 0x08, 0x78, 0x68, 0x21, 0xa0, 0x17, 0x0e, 0x7f, 366 | 0x05, 0x08, 0xd3, 0x5e, 0x3f, 0x37, 0x08, 0xa7, 0x3e, 0x32, 0xb8, 0x59, 367 | 0xe2, 0x96, 0x30, 0x1b, 0x7d, 0xda, 0x8b, 0x39, 0x95, 0x31, 0x3a, 0xc0, 368 | 0xa5, 0xe4, 0x70, 0x84, 0x51, 0x3e, 0xaf, 0xa7, 0x0e, 0x70, 0xd0, 0xaa, 369 | 0x03, 0x82, 0x07, 0xf3, 0xde, 0x72, 0x97, 0xc4, 0x57, 0xc8, 0x26, 0x24, 370 | 0x2a, 0x94, 0x61, 0x86, 0x3d, 0xff, 0x2e, 0x0e, 0x9f, 0x4e, 0x22, 0xdf, 371 | 0xb3, 0xe4, 0x46, 0xff, 0xc6, 0xb4, 0x67, 0xa0, 0x34, 0xa7, 0xad, 0xcb, 372 | 0xb5, 0x48, 0x38, 0x34, 0xd0, 0x21, 0x65, 0x08, 0xa1, 0x5e, 0x84, 0x38, 373 | 0x6a, 0x66, 0x4f, 0xc1, 0xc4, 0xe1, 0x89, 0xb7, 0x93, 0xc3, 0x09, 0xe8, 374 | 0x26, 0x95, 0x26, 0x00, 0xad, 0xc6, 0xc2, 0x26, 0xd7, 0x92, 0x4b, 0x9f, 375 | 0x45, 0xe0, 0x5f, 0xac, 0x10, 0x88, 0x46, 0xf6, 0xec, 0x2f, 0x02, 0x7e, 376 | 0x5f, 0xeb, 0xdc, 0x3d, 0x29, 0x88, 0xe2, 0x51, 0xd6, 0xa3, 0x4b, 0xcc, 377 | 0x81, 0x68, 0xea, 0x0f, 0x18, 0x2b, 0xe6, 0xe3, 0xd5, 0x02, 0xef, 0x6d, 378 | 0x46, 0xf9, 0x06, 0x65, 0x03, 0xd6, 0x0c, 0x0b, 0xf0, 0xfe, 0x14, 0xb6, 379 | 0xdd, 0x65, 0xb4, 0xd6, 0x02, 0x24, 0x63, 0x2d, 0x87, 0x2b, 0xd9, 0x67, 380 | 0xc5, 0xa7, 0x4f, 0x30, 0x6e, 0xc3, 0x95, 0xfc, 0x8c, 0xe0, 0x02, 0x50, 381 | 0x22, 0x34, 0x57, 0x89, 0x2f, 0x66, 0x18, 0x4f, 0x0e, 0x8f, 0x76, 0xc1, 382 | 0xeb, 0x2e, 0x4b, 0x3e, 0xbd, 0x82, 0x90, 0x49, 0x4e, 0xa8, 0x98, 0xff, 383 | 0x0c, 0x3f, 0x16, 0x40, 0x08, 0x3c, 0x71, 0x80, 0x7f, 0x58, 0x88, 0x45, 384 | 0xe0, 0x61, 0x28, 0x8e, 0x0c, 0x21, 0xe6, 0x3e, 0x90, 0x68, 0x16, 0x22, 385 | 0xa2, 0xa9, 0xf7, 0x10, 0xdc, 0x2e, 0x04, 0xeb, 0x81, 0x72, 0xa1, 0xfb, 386 | 0x1f, 0x94, 0xb8, 0xcc, 0x21, 0xc4, 0x70, 0x6a, 0x21, 0xba, 0xc6, 0x44, 387 | 0x6a, 0xbc, 0x8d, 0xb7, 0xf1, 0x36, 0xde, 0xc6, 0xdb, 0xf3, 0xd7, 0xfe, 388 | 0x07, 0x44, 0xfc, 0xf5, 0xfd, 0x46, 0x03, 0x38, 0x23, 0x00, 0x00, 0x00, 389 | 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 390 | }; 391 | unsigned int __icon_dummy_len = 2913; 392 | 393 | #endif // WEBVIEW_ICONS_H 394 | -------------------------------------------------------------------------------- /redist/WebView2Experimental.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.xx.xxxx */ 7 | /* at a redacted point in time 8 | */ 9 | /* Compiler settings for ../../edge_embedded_browser/client/win/current/webview2experimental.idl: 10 | Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.xx.xxxx 11 | protocol : dce , ms_ext, c_ext, robust 12 | error checks: allocation ref bounds_check enum stub_data 13 | VC __declspec() decoration level: 14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable) 15 | DECLSPEC_UUID(), MIDL_INTERFACE() 16 | */ 17 | /* @@MIDL_FILE_HEADING( ) */ 18 | 19 | #pragma warning( disable: 4049 ) /* more than 64k source lines */ 20 | 21 | 22 | /* verify that the version is high enough to compile this file*/ 23 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 24 | #define __REQUIRED_RPCNDR_H_VERSION__ 475 25 | #endif 26 | 27 | #include "rpc.h" 28 | #include "rpcndr.h" 29 | 30 | #ifndef __RPCNDR_H_VERSION__ 31 | #error this stub requires an updated version of 32 | #endif /* __RPCNDR_H_VERSION__ */ 33 | 34 | 35 | #ifndef __webview2experimental_h__ 36 | #define __webview2experimental_h__ 37 | 38 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 39 | #pragma once 40 | #endif 41 | 42 | /* Forward Declarations */ 43 | 44 | #ifndef __ICoreWebView2ExperimentalCompositionControllerInterop_FWD_DEFINED__ 45 | #define __ICoreWebView2ExperimentalCompositionControllerInterop_FWD_DEFINED__ 46 | typedef interface ICoreWebView2ExperimentalCompositionControllerInterop ICoreWebView2ExperimentalCompositionControllerInterop; 47 | 48 | #endif /* __ICoreWebView2ExperimentalCompositionControllerInterop_FWD_DEFINED__ */ 49 | 50 | 51 | #ifndef __ICoreWebView2ExperimentalCompositionController3_FWD_DEFINED__ 52 | #define __ICoreWebView2ExperimentalCompositionController3_FWD_DEFINED__ 53 | typedef interface ICoreWebView2ExperimentalCompositionController3 ICoreWebView2ExperimentalCompositionController3; 54 | 55 | #endif /* __ICoreWebView2ExperimentalCompositionController3_FWD_DEFINED__ */ 56 | 57 | 58 | #ifndef __ICoreWebView2ExperimentalCompositionController4_FWD_DEFINED__ 59 | #define __ICoreWebView2ExperimentalCompositionController4_FWD_DEFINED__ 60 | typedef interface ICoreWebView2ExperimentalCompositionController4 ICoreWebView2ExperimentalCompositionController4; 61 | 62 | #endif /* __ICoreWebView2ExperimentalCompositionController4_FWD_DEFINED__ */ 63 | 64 | 65 | #ifndef __ICoreWebView2ExperimentalController_FWD_DEFINED__ 66 | #define __ICoreWebView2ExperimentalController_FWD_DEFINED__ 67 | typedef interface ICoreWebView2ExperimentalController ICoreWebView2ExperimentalController; 68 | 69 | #endif /* __ICoreWebView2ExperimentalController_FWD_DEFINED__ */ 70 | 71 | 72 | #ifndef __ICoreWebView2ExperimentalEnvironment2_FWD_DEFINED__ 73 | #define __ICoreWebView2ExperimentalEnvironment2_FWD_DEFINED__ 74 | typedef interface ICoreWebView2ExperimentalEnvironment2 ICoreWebView2ExperimentalEnvironment2; 75 | 76 | #endif /* __ICoreWebView2ExperimentalEnvironment2_FWD_DEFINED__ */ 77 | 78 | 79 | #ifndef __ICoreWebView2ExperimentalEnvironmentInterop_FWD_DEFINED__ 80 | #define __ICoreWebView2ExperimentalEnvironmentInterop_FWD_DEFINED__ 81 | typedef interface ICoreWebView2ExperimentalEnvironmentInterop ICoreWebView2ExperimentalEnvironmentInterop; 82 | 83 | #endif /* __ICoreWebView2ExperimentalEnvironmentInterop_FWD_DEFINED__ */ 84 | 85 | 86 | #ifndef __ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_FWD_DEFINED__ 87 | #define __ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_FWD_DEFINED__ 88 | typedef interface ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler; 89 | 90 | #endif /* __ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_FWD_DEFINED__ */ 91 | 92 | 93 | #ifndef __ICoreWebView2ExperimentalSettings_FWD_DEFINED__ 94 | #define __ICoreWebView2ExperimentalSettings_FWD_DEFINED__ 95 | typedef interface ICoreWebView2ExperimentalSettings ICoreWebView2ExperimentalSettings; 96 | 97 | #endif /* __ICoreWebView2ExperimentalSettings_FWD_DEFINED__ */ 98 | 99 | 100 | /* header files for imported files */ 101 | #include "webview2.h" 102 | 103 | #ifdef __cplusplus 104 | extern "C"{ 105 | #endif 106 | 107 | 108 | 109 | #ifndef __WebView2Experimental_LIBRARY_DEFINED__ 110 | #define __WebView2Experimental_LIBRARY_DEFINED__ 111 | 112 | /* library WebView2Experimental */ 113 | /* [version][uuid] */ 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | typedef /* [v1_enum] */ 123 | enum COREWEBVIEW2_BOUNDS_MODE 124 | { 125 | COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS = 0, 126 | COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE = ( COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS + 1 ) 127 | } COREWEBVIEW2_BOUNDS_MODE; 128 | 129 | typedef struct COREWEBVIEW2_MATRIX_4X4 130 | { 131 | FLOAT _11; 132 | FLOAT _12; 133 | FLOAT _13; 134 | FLOAT _14; 135 | FLOAT _21; 136 | FLOAT _22; 137 | FLOAT _23; 138 | FLOAT _24; 139 | FLOAT _31; 140 | FLOAT _32; 141 | FLOAT _33; 142 | FLOAT _34; 143 | FLOAT _41; 144 | FLOAT _42; 145 | FLOAT _43; 146 | FLOAT _44; 147 | } COREWEBVIEW2_MATRIX_4X4; 148 | 149 | 150 | EXTERN_C const IID LIBID_WebView2Experimental; 151 | 152 | #ifndef __ICoreWebView2ExperimentalCompositionControllerInterop_INTERFACE_DEFINED__ 153 | #define __ICoreWebView2ExperimentalCompositionControllerInterop_INTERFACE_DEFINED__ 154 | 155 | /* interface ICoreWebView2ExperimentalCompositionControllerInterop */ 156 | /* [unique][object][uuid] */ 157 | 158 | 159 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalCompositionControllerInterop = {0x4B60F2C9,0x88BB,0x42F4,{0x9C,0x4F,0x3C,0x0D,0x0E,0xD1,0x70,0x72}}; 160 | 161 | #if defined(__cplusplus) && !defined(CINTERFACE) 162 | 163 | MIDL_INTERFACE("4B60F2C9-88BB-42F4-9C4F-3C0D0ED17072") 164 | ICoreWebView2ExperimentalCompositionControllerInterop : public IUnknown 165 | { 166 | public: 167 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_UIAProvider( 168 | /* [retval][out] */ IUnknown **provider) = 0; 169 | 170 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RootVisualTarget( 171 | /* [retval][out] */ IUnknown **target) = 0; 172 | 173 | virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_RootVisualTarget( 174 | /* [in] */ IUnknown *target) = 0; 175 | 176 | }; 177 | 178 | 179 | #else /* C style interface */ 180 | 181 | typedef struct ICoreWebView2ExperimentalCompositionControllerInteropVtbl 182 | { 183 | BEGIN_INTERFACE 184 | 185 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 186 | ICoreWebView2ExperimentalCompositionControllerInterop * This, 187 | /* [in] */ REFIID riid, 188 | /* [annotation][iid_is][out] */ 189 | _COM_Outptr_ void **ppvObject); 190 | 191 | ULONG ( STDMETHODCALLTYPE *AddRef )( 192 | ICoreWebView2ExperimentalCompositionControllerInterop * This); 193 | 194 | ULONG ( STDMETHODCALLTYPE *Release )( 195 | ICoreWebView2ExperimentalCompositionControllerInterop * This); 196 | 197 | /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_UIAProvider )( 198 | ICoreWebView2ExperimentalCompositionControllerInterop * This, 199 | /* [retval][out] */ IUnknown **provider); 200 | 201 | /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RootVisualTarget )( 202 | ICoreWebView2ExperimentalCompositionControllerInterop * This, 203 | /* [retval][out] */ IUnknown **target); 204 | 205 | /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RootVisualTarget )( 206 | ICoreWebView2ExperimentalCompositionControllerInterop * This, 207 | /* [in] */ IUnknown *target); 208 | 209 | END_INTERFACE 210 | } ICoreWebView2ExperimentalCompositionControllerInteropVtbl; 211 | 212 | interface ICoreWebView2ExperimentalCompositionControllerInterop 213 | { 214 | CONST_VTBL struct ICoreWebView2ExperimentalCompositionControllerInteropVtbl *lpVtbl; 215 | }; 216 | 217 | 218 | 219 | #ifdef COBJMACROS 220 | 221 | 222 | #define ICoreWebView2ExperimentalCompositionControllerInterop_QueryInterface(This,riid,ppvObject) \ 223 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 224 | 225 | #define ICoreWebView2ExperimentalCompositionControllerInterop_AddRef(This) \ 226 | ( (This)->lpVtbl -> AddRef(This) ) 227 | 228 | #define ICoreWebView2ExperimentalCompositionControllerInterop_Release(This) \ 229 | ( (This)->lpVtbl -> Release(This) ) 230 | 231 | 232 | #define ICoreWebView2ExperimentalCompositionControllerInterop_get_UIAProvider(This,provider) \ 233 | ( (This)->lpVtbl -> get_UIAProvider(This,provider) ) 234 | 235 | #define ICoreWebView2ExperimentalCompositionControllerInterop_get_RootVisualTarget(This,target) \ 236 | ( (This)->lpVtbl -> get_RootVisualTarget(This,target) ) 237 | 238 | #define ICoreWebView2ExperimentalCompositionControllerInterop_put_RootVisualTarget(This,target) \ 239 | ( (This)->lpVtbl -> put_RootVisualTarget(This,target) ) 240 | 241 | #endif /* COBJMACROS */ 242 | 243 | 244 | #endif /* C style interface */ 245 | 246 | 247 | 248 | 249 | #endif /* __ICoreWebView2ExperimentalCompositionControllerInterop_INTERFACE_DEFINED__ */ 250 | 251 | 252 | #ifndef __ICoreWebView2ExperimentalCompositionController3_INTERFACE_DEFINED__ 253 | #define __ICoreWebView2ExperimentalCompositionController3_INTERFACE_DEFINED__ 254 | 255 | /* interface ICoreWebView2ExperimentalCompositionController3 */ 256 | /* [unique][object][uuid] */ 257 | 258 | 259 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalCompositionController3 = {0xb134916b,0xa104,0x4d2a,{0x95,0x67,0xc2,0xfd,0x53,0x71,0x43,0x50}}; 260 | 261 | #if defined(__cplusplus) && !defined(CINTERFACE) 262 | 263 | MIDL_INTERFACE("b134916b-a104-4d2a-9567-c2fd53714350") 264 | ICoreWebView2ExperimentalCompositionController3 : public IUnknown 265 | { 266 | public: 267 | virtual HRESULT STDMETHODCALLTYPE DragEnter( 268 | /* [in] */ IDataObject *dataObject, 269 | /* [in] */ DWORD keyState, 270 | /* [in] */ POINT point, 271 | /* [retval][out] */ DWORD *effect) = 0; 272 | 273 | virtual HRESULT STDMETHODCALLTYPE DragLeave( void) = 0; 274 | 275 | virtual HRESULT STDMETHODCALLTYPE DragOver( 276 | /* [in] */ DWORD keyState, 277 | /* [in] */ POINT point, 278 | /* [retval][out] */ DWORD *effect) = 0; 279 | 280 | virtual HRESULT STDMETHODCALLTYPE Drop( 281 | /* [in] */ IDataObject *dataObject, 282 | /* [in] */ DWORD keyState, 283 | /* [in] */ POINT point, 284 | /* [retval][out] */ DWORD *effect) = 0; 285 | 286 | }; 287 | 288 | 289 | #else /* C style interface */ 290 | 291 | typedef struct ICoreWebView2ExperimentalCompositionController3Vtbl 292 | { 293 | BEGIN_INTERFACE 294 | 295 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 296 | ICoreWebView2ExperimentalCompositionController3 * This, 297 | /* [in] */ REFIID riid, 298 | /* [annotation][iid_is][out] */ 299 | _COM_Outptr_ void **ppvObject); 300 | 301 | ULONG ( STDMETHODCALLTYPE *AddRef )( 302 | ICoreWebView2ExperimentalCompositionController3 * This); 303 | 304 | ULONG ( STDMETHODCALLTYPE *Release )( 305 | ICoreWebView2ExperimentalCompositionController3 * This); 306 | 307 | HRESULT ( STDMETHODCALLTYPE *DragEnter )( 308 | ICoreWebView2ExperimentalCompositionController3 * This, 309 | /* [in] */ IDataObject *dataObject, 310 | /* [in] */ DWORD keyState, 311 | /* [in] */ POINT point, 312 | /* [retval][out] */ DWORD *effect); 313 | 314 | HRESULT ( STDMETHODCALLTYPE *DragLeave )( 315 | ICoreWebView2ExperimentalCompositionController3 * This); 316 | 317 | HRESULT ( STDMETHODCALLTYPE *DragOver )( 318 | ICoreWebView2ExperimentalCompositionController3 * This, 319 | /* [in] */ DWORD keyState, 320 | /* [in] */ POINT point, 321 | /* [retval][out] */ DWORD *effect); 322 | 323 | HRESULT ( STDMETHODCALLTYPE *Drop )( 324 | ICoreWebView2ExperimentalCompositionController3 * This, 325 | /* [in] */ IDataObject *dataObject, 326 | /* [in] */ DWORD keyState, 327 | /* [in] */ POINT point, 328 | /* [retval][out] */ DWORD *effect); 329 | 330 | END_INTERFACE 331 | } ICoreWebView2ExperimentalCompositionController3Vtbl; 332 | 333 | interface ICoreWebView2ExperimentalCompositionController3 334 | { 335 | CONST_VTBL struct ICoreWebView2ExperimentalCompositionController3Vtbl *lpVtbl; 336 | }; 337 | 338 | 339 | 340 | #ifdef COBJMACROS 341 | 342 | 343 | #define ICoreWebView2ExperimentalCompositionController3_QueryInterface(This,riid,ppvObject) \ 344 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 345 | 346 | #define ICoreWebView2ExperimentalCompositionController3_AddRef(This) \ 347 | ( (This)->lpVtbl -> AddRef(This) ) 348 | 349 | #define ICoreWebView2ExperimentalCompositionController3_Release(This) \ 350 | ( (This)->lpVtbl -> Release(This) ) 351 | 352 | 353 | #define ICoreWebView2ExperimentalCompositionController3_DragEnter(This,dataObject,keyState,point,effect) \ 354 | ( (This)->lpVtbl -> DragEnter(This,dataObject,keyState,point,effect) ) 355 | 356 | #define ICoreWebView2ExperimentalCompositionController3_DragLeave(This) \ 357 | ( (This)->lpVtbl -> DragLeave(This) ) 358 | 359 | #define ICoreWebView2ExperimentalCompositionController3_DragOver(This,keyState,point,effect) \ 360 | ( (This)->lpVtbl -> DragOver(This,keyState,point,effect) ) 361 | 362 | #define ICoreWebView2ExperimentalCompositionController3_Drop(This,dataObject,keyState,point,effect) \ 363 | ( (This)->lpVtbl -> Drop(This,dataObject,keyState,point,effect) ) 364 | 365 | #endif /* COBJMACROS */ 366 | 367 | 368 | #endif /* C style interface */ 369 | 370 | 371 | 372 | 373 | #endif /* __ICoreWebView2ExperimentalCompositionController3_INTERFACE_DEFINED__ */ 374 | 375 | 376 | #ifndef __ICoreWebView2ExperimentalCompositionController4_INTERFACE_DEFINED__ 377 | #define __ICoreWebView2ExperimentalCompositionController4_INTERFACE_DEFINED__ 378 | 379 | /* interface ICoreWebView2ExperimentalCompositionController4 */ 380 | /* [unique][object][uuid] */ 381 | 382 | 383 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalCompositionController4 = {0xe6041d7f,0x18ac,0x4654,{0xa0,0x4e,0x8b,0x3f,0x81,0x25,0x1c,0x33}}; 384 | 385 | #if defined(__cplusplus) && !defined(CINTERFACE) 386 | 387 | MIDL_INTERFACE("e6041d7f-18ac-4654-a04e-8b3f81251c33") 388 | ICoreWebView2ExperimentalCompositionController4 : public IUnknown 389 | { 390 | public: 391 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_UIAProvider( 392 | /* [retval][out] */ IUnknown **provider) = 0; 393 | 394 | virtual HRESULT STDMETHODCALLTYPE CreateCoreWebView2PointerInfoFromPointerId( 395 | /* [in] */ UINT pointerId, 396 | /* [in] */ HWND parentWindow, 397 | /* [in] */ struct COREWEBVIEW2_MATRIX_4X4 transform, 398 | /* [retval][out] */ ICoreWebView2PointerInfo **pointerInfo) = 0; 399 | 400 | }; 401 | 402 | 403 | #else /* C style interface */ 404 | 405 | typedef struct ICoreWebView2ExperimentalCompositionController4Vtbl 406 | { 407 | BEGIN_INTERFACE 408 | 409 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 410 | ICoreWebView2ExperimentalCompositionController4 * This, 411 | /* [in] */ REFIID riid, 412 | /* [annotation][iid_is][out] */ 413 | _COM_Outptr_ void **ppvObject); 414 | 415 | ULONG ( STDMETHODCALLTYPE *AddRef )( 416 | ICoreWebView2ExperimentalCompositionController4 * This); 417 | 418 | ULONG ( STDMETHODCALLTYPE *Release )( 419 | ICoreWebView2ExperimentalCompositionController4 * This); 420 | 421 | /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_UIAProvider )( 422 | ICoreWebView2ExperimentalCompositionController4 * This, 423 | /* [retval][out] */ IUnknown **provider); 424 | 425 | HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2PointerInfoFromPointerId )( 426 | ICoreWebView2ExperimentalCompositionController4 * This, 427 | /* [in] */ UINT pointerId, 428 | /* [in] */ HWND parentWindow, 429 | /* [in] */ struct COREWEBVIEW2_MATRIX_4X4 transform, 430 | /* [retval][out] */ ICoreWebView2PointerInfo **pointerInfo); 431 | 432 | END_INTERFACE 433 | } ICoreWebView2ExperimentalCompositionController4Vtbl; 434 | 435 | interface ICoreWebView2ExperimentalCompositionController4 436 | { 437 | CONST_VTBL struct ICoreWebView2ExperimentalCompositionController4Vtbl *lpVtbl; 438 | }; 439 | 440 | 441 | 442 | #ifdef COBJMACROS 443 | 444 | 445 | #define ICoreWebView2ExperimentalCompositionController4_QueryInterface(This,riid,ppvObject) \ 446 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 447 | 448 | #define ICoreWebView2ExperimentalCompositionController4_AddRef(This) \ 449 | ( (This)->lpVtbl -> AddRef(This) ) 450 | 451 | #define ICoreWebView2ExperimentalCompositionController4_Release(This) \ 452 | ( (This)->lpVtbl -> Release(This) ) 453 | 454 | 455 | #define ICoreWebView2ExperimentalCompositionController4_get_UIAProvider(This,provider) \ 456 | ( (This)->lpVtbl -> get_UIAProvider(This,provider) ) 457 | 458 | #define ICoreWebView2ExperimentalCompositionController4_CreateCoreWebView2PointerInfoFromPointerId(This,pointerId,parentWindow,transform,pointerInfo) \ 459 | ( (This)->lpVtbl -> CreateCoreWebView2PointerInfoFromPointerId(This,pointerId,parentWindow,transform,pointerInfo) ) 460 | 461 | #endif /* COBJMACROS */ 462 | 463 | 464 | #endif /* C style interface */ 465 | 466 | 467 | 468 | 469 | #endif /* __ICoreWebView2ExperimentalCompositionController4_INTERFACE_DEFINED__ */ 470 | 471 | 472 | #ifndef __ICoreWebView2ExperimentalController_INTERFACE_DEFINED__ 473 | #define __ICoreWebView2ExperimentalController_INTERFACE_DEFINED__ 474 | 475 | /* interface ICoreWebView2ExperimentalController */ 476 | /* [unique][object][uuid] */ 477 | 478 | 479 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalController = {0x3413543f,0x7a0e,0x4b56,{0x98,0xc1,0x7a,0xf3,0xa3,0x74,0x16,0xca}}; 480 | 481 | #if defined(__cplusplus) && !defined(CINTERFACE) 482 | 483 | MIDL_INTERFACE("3413543f-7a0e-4b56-98c1-7af3a37416ca") 484 | ICoreWebView2ExperimentalController : public IUnknown 485 | { 486 | public: 487 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RasterizationScale( 488 | /* [retval][out] */ double *scale) = 0; 489 | 490 | virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_RasterizationScale( 491 | /* [in] */ double scale) = 0; 492 | 493 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ShouldDetectMonitorScaleChanges( 494 | /* [retval][out] */ BOOL *value) = 0; 495 | 496 | virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ShouldDetectMonitorScaleChanges( 497 | /* [in] */ BOOL value) = 0; 498 | 499 | virtual HRESULT STDMETHODCALLTYPE add_RasterizationScaleChanged( 500 | /* [in] */ ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler *eventHandler, 501 | /* [out] */ EventRegistrationToken *token) = 0; 502 | 503 | virtual HRESULT STDMETHODCALLTYPE remove_RasterizationScaleChanged( 504 | /* [in] */ EventRegistrationToken token) = 0; 505 | 506 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BoundsMode( 507 | /* [retval][out] */ COREWEBVIEW2_BOUNDS_MODE *boundsMode) = 0; 508 | 509 | virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_BoundsMode( 510 | /* [in] */ COREWEBVIEW2_BOUNDS_MODE boundsMode) = 0; 511 | 512 | }; 513 | 514 | 515 | #else /* C style interface */ 516 | 517 | typedef struct ICoreWebView2ExperimentalControllerVtbl 518 | { 519 | BEGIN_INTERFACE 520 | 521 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 522 | ICoreWebView2ExperimentalController * This, 523 | /* [in] */ REFIID riid, 524 | /* [annotation][iid_is][out] */ 525 | _COM_Outptr_ void **ppvObject); 526 | 527 | ULONG ( STDMETHODCALLTYPE *AddRef )( 528 | ICoreWebView2ExperimentalController * This); 529 | 530 | ULONG ( STDMETHODCALLTYPE *Release )( 531 | ICoreWebView2ExperimentalController * This); 532 | 533 | /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RasterizationScale )( 534 | ICoreWebView2ExperimentalController * This, 535 | /* [retval][out] */ double *scale); 536 | 537 | /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RasterizationScale )( 538 | ICoreWebView2ExperimentalController * This, 539 | /* [in] */ double scale); 540 | 541 | /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ShouldDetectMonitorScaleChanges )( 542 | ICoreWebView2ExperimentalController * This, 543 | /* [retval][out] */ BOOL *value); 544 | 545 | /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ShouldDetectMonitorScaleChanges )( 546 | ICoreWebView2ExperimentalController * This, 547 | /* [in] */ BOOL value); 548 | 549 | HRESULT ( STDMETHODCALLTYPE *add_RasterizationScaleChanged )( 550 | ICoreWebView2ExperimentalController * This, 551 | /* [in] */ ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler *eventHandler, 552 | /* [out] */ EventRegistrationToken *token); 553 | 554 | HRESULT ( STDMETHODCALLTYPE *remove_RasterizationScaleChanged )( 555 | ICoreWebView2ExperimentalController * This, 556 | /* [in] */ EventRegistrationToken token); 557 | 558 | /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BoundsMode )( 559 | ICoreWebView2ExperimentalController * This, 560 | /* [retval][out] */ COREWEBVIEW2_BOUNDS_MODE *boundsMode); 561 | 562 | /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_BoundsMode )( 563 | ICoreWebView2ExperimentalController * This, 564 | /* [in] */ COREWEBVIEW2_BOUNDS_MODE boundsMode); 565 | 566 | END_INTERFACE 567 | } ICoreWebView2ExperimentalControllerVtbl; 568 | 569 | interface ICoreWebView2ExperimentalController 570 | { 571 | CONST_VTBL struct ICoreWebView2ExperimentalControllerVtbl *lpVtbl; 572 | }; 573 | 574 | 575 | 576 | #ifdef COBJMACROS 577 | 578 | 579 | #define ICoreWebView2ExperimentalController_QueryInterface(This,riid,ppvObject) \ 580 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 581 | 582 | #define ICoreWebView2ExperimentalController_AddRef(This) \ 583 | ( (This)->lpVtbl -> AddRef(This) ) 584 | 585 | #define ICoreWebView2ExperimentalController_Release(This) \ 586 | ( (This)->lpVtbl -> Release(This) ) 587 | 588 | 589 | #define ICoreWebView2ExperimentalController_get_RasterizationScale(This,scale) \ 590 | ( (This)->lpVtbl -> get_RasterizationScale(This,scale) ) 591 | 592 | #define ICoreWebView2ExperimentalController_put_RasterizationScale(This,scale) \ 593 | ( (This)->lpVtbl -> put_RasterizationScale(This,scale) ) 594 | 595 | #define ICoreWebView2ExperimentalController_get_ShouldDetectMonitorScaleChanges(This,value) \ 596 | ( (This)->lpVtbl -> get_ShouldDetectMonitorScaleChanges(This,value) ) 597 | 598 | #define ICoreWebView2ExperimentalController_put_ShouldDetectMonitorScaleChanges(This,value) \ 599 | ( (This)->lpVtbl -> put_ShouldDetectMonitorScaleChanges(This,value) ) 600 | 601 | #define ICoreWebView2ExperimentalController_add_RasterizationScaleChanged(This,eventHandler,token) \ 602 | ( (This)->lpVtbl -> add_RasterizationScaleChanged(This,eventHandler,token) ) 603 | 604 | #define ICoreWebView2ExperimentalController_remove_RasterizationScaleChanged(This,token) \ 605 | ( (This)->lpVtbl -> remove_RasterizationScaleChanged(This,token) ) 606 | 607 | #define ICoreWebView2ExperimentalController_get_BoundsMode(This,boundsMode) \ 608 | ( (This)->lpVtbl -> get_BoundsMode(This,boundsMode) ) 609 | 610 | #define ICoreWebView2ExperimentalController_put_BoundsMode(This,boundsMode) \ 611 | ( (This)->lpVtbl -> put_BoundsMode(This,boundsMode) ) 612 | 613 | #endif /* COBJMACROS */ 614 | 615 | 616 | #endif /* C style interface */ 617 | 618 | 619 | 620 | 621 | #endif /* __ICoreWebView2ExperimentalController_INTERFACE_DEFINED__ */ 622 | 623 | 624 | #ifndef __ICoreWebView2ExperimentalEnvironment2_INTERFACE_DEFINED__ 625 | #define __ICoreWebView2ExperimentalEnvironment2_INTERFACE_DEFINED__ 626 | 627 | /* interface ICoreWebView2ExperimentalEnvironment2 */ 628 | /* [unique][object][uuid] */ 629 | 630 | 631 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalEnvironment2 = {0x37b54fd4,0x1ad9,0x4c1f,{0xbd,0x14,0x9d,0xab,0xa9,0xfd,0xeb,0x26}}; 632 | 633 | #if defined(__cplusplus) && !defined(CINTERFACE) 634 | 635 | MIDL_INTERFACE("37b54fd4-1ad9-4c1f-bd14-9daba9fdeb26") 636 | ICoreWebView2ExperimentalEnvironment2 : public IUnknown 637 | { 638 | public: 639 | virtual HRESULT STDMETHODCALLTYPE GetProviderForHwnd( 640 | /* [in] */ HWND hwnd, 641 | /* [retval][out] */ IUnknown **provider) = 0; 642 | 643 | }; 644 | 645 | 646 | #else /* C style interface */ 647 | 648 | typedef struct ICoreWebView2ExperimentalEnvironment2Vtbl 649 | { 650 | BEGIN_INTERFACE 651 | 652 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 653 | ICoreWebView2ExperimentalEnvironment2 * This, 654 | /* [in] */ REFIID riid, 655 | /* [annotation][iid_is][out] */ 656 | _COM_Outptr_ void **ppvObject); 657 | 658 | ULONG ( STDMETHODCALLTYPE *AddRef )( 659 | ICoreWebView2ExperimentalEnvironment2 * This); 660 | 661 | ULONG ( STDMETHODCALLTYPE *Release )( 662 | ICoreWebView2ExperimentalEnvironment2 * This); 663 | 664 | HRESULT ( STDMETHODCALLTYPE *GetProviderForHwnd )( 665 | ICoreWebView2ExperimentalEnvironment2 * This, 666 | /* [in] */ HWND hwnd, 667 | /* [retval][out] */ IUnknown **provider); 668 | 669 | END_INTERFACE 670 | } ICoreWebView2ExperimentalEnvironment2Vtbl; 671 | 672 | interface ICoreWebView2ExperimentalEnvironment2 673 | { 674 | CONST_VTBL struct ICoreWebView2ExperimentalEnvironment2Vtbl *lpVtbl; 675 | }; 676 | 677 | 678 | 679 | #ifdef COBJMACROS 680 | 681 | 682 | #define ICoreWebView2ExperimentalEnvironment2_QueryInterface(This,riid,ppvObject) \ 683 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 684 | 685 | #define ICoreWebView2ExperimentalEnvironment2_AddRef(This) \ 686 | ( (This)->lpVtbl -> AddRef(This) ) 687 | 688 | #define ICoreWebView2ExperimentalEnvironment2_Release(This) \ 689 | ( (This)->lpVtbl -> Release(This) ) 690 | 691 | 692 | #define ICoreWebView2ExperimentalEnvironment2_GetProviderForHwnd(This,hwnd,provider) \ 693 | ( (This)->lpVtbl -> GetProviderForHwnd(This,hwnd,provider) ) 694 | 695 | #endif /* COBJMACROS */ 696 | 697 | 698 | #endif /* C style interface */ 699 | 700 | 701 | 702 | 703 | #endif /* __ICoreWebView2ExperimentalEnvironment2_INTERFACE_DEFINED__ */ 704 | 705 | 706 | #ifndef __ICoreWebView2ExperimentalEnvironmentInterop_INTERFACE_DEFINED__ 707 | #define __ICoreWebView2ExperimentalEnvironmentInterop_INTERFACE_DEFINED__ 708 | 709 | /* interface ICoreWebView2ExperimentalEnvironmentInterop */ 710 | /* [unique][object][uuid] */ 711 | 712 | 713 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalEnvironmentInterop = {0x79455D4F,0xD28D,0x4C3F,{0xA7,0x13,0x13,0xCA,0x39,0x3B,0xD2,0xE4}}; 714 | 715 | #if defined(__cplusplus) && !defined(CINTERFACE) 716 | 717 | MIDL_INTERFACE("79455D4F-D28D-4C3F-A713-13CA393BD2E4") 718 | ICoreWebView2ExperimentalEnvironmentInterop : public IUnknown 719 | { 720 | public: 721 | virtual HRESULT STDMETHODCALLTYPE GetProviderForHwnd( 722 | /* [in] */ HWND hwnd, 723 | /* [retval][out] */ IUnknown **provider) = 0; 724 | 725 | }; 726 | 727 | 728 | #else /* C style interface */ 729 | 730 | typedef struct ICoreWebView2ExperimentalEnvironmentInteropVtbl 731 | { 732 | BEGIN_INTERFACE 733 | 734 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 735 | ICoreWebView2ExperimentalEnvironmentInterop * This, 736 | /* [in] */ REFIID riid, 737 | /* [annotation][iid_is][out] */ 738 | _COM_Outptr_ void **ppvObject); 739 | 740 | ULONG ( STDMETHODCALLTYPE *AddRef )( 741 | ICoreWebView2ExperimentalEnvironmentInterop * This); 742 | 743 | ULONG ( STDMETHODCALLTYPE *Release )( 744 | ICoreWebView2ExperimentalEnvironmentInterop * This); 745 | 746 | HRESULT ( STDMETHODCALLTYPE *GetProviderForHwnd )( 747 | ICoreWebView2ExperimentalEnvironmentInterop * This, 748 | /* [in] */ HWND hwnd, 749 | /* [retval][out] */ IUnknown **provider); 750 | 751 | END_INTERFACE 752 | } ICoreWebView2ExperimentalEnvironmentInteropVtbl; 753 | 754 | interface ICoreWebView2ExperimentalEnvironmentInterop 755 | { 756 | CONST_VTBL struct ICoreWebView2ExperimentalEnvironmentInteropVtbl *lpVtbl; 757 | }; 758 | 759 | 760 | 761 | #ifdef COBJMACROS 762 | 763 | 764 | #define ICoreWebView2ExperimentalEnvironmentInterop_QueryInterface(This,riid,ppvObject) \ 765 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 766 | 767 | #define ICoreWebView2ExperimentalEnvironmentInterop_AddRef(This) \ 768 | ( (This)->lpVtbl -> AddRef(This) ) 769 | 770 | #define ICoreWebView2ExperimentalEnvironmentInterop_Release(This) \ 771 | ( (This)->lpVtbl -> Release(This) ) 772 | 773 | 774 | #define ICoreWebView2ExperimentalEnvironmentInterop_GetProviderForHwnd(This,hwnd,provider) \ 775 | ( (This)->lpVtbl -> GetProviderForHwnd(This,hwnd,provider) ) 776 | 777 | #endif /* COBJMACROS */ 778 | 779 | 780 | #endif /* C style interface */ 781 | 782 | 783 | 784 | 785 | #endif /* __ICoreWebView2ExperimentalEnvironmentInterop_INTERFACE_DEFINED__ */ 786 | 787 | 788 | #ifndef __ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_INTERFACE_DEFINED__ 789 | #define __ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_INTERFACE_DEFINED__ 790 | 791 | /* interface ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler */ 792 | /* [unique][object][uuid] */ 793 | 794 | 795 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler = {0x51560be0,0x0ad4,0x4157,{0x90,0xcf,0xe6,0xda,0xd6,0x38,0xd8,0xaa}}; 796 | 797 | #if defined(__cplusplus) && !defined(CINTERFACE) 798 | 799 | MIDL_INTERFACE("51560be0-0ad4-4157-90cf-e6dad638d8aa") 800 | ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler : public IUnknown 801 | { 802 | public: 803 | virtual HRESULT STDMETHODCALLTYPE Invoke( 804 | /* [in] */ ICoreWebView2ExperimentalController *sender, 805 | /* [in] */ IUnknown *args) = 0; 806 | 807 | }; 808 | 809 | 810 | #else /* C style interface */ 811 | 812 | typedef struct ICoreWebView2ExperimentalRasterizationScaleChangedEventHandlerVtbl 813 | { 814 | BEGIN_INTERFACE 815 | 816 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 817 | ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler * This, 818 | /* [in] */ REFIID riid, 819 | /* [annotation][iid_is][out] */ 820 | _COM_Outptr_ void **ppvObject); 821 | 822 | ULONG ( STDMETHODCALLTYPE *AddRef )( 823 | ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler * This); 824 | 825 | ULONG ( STDMETHODCALLTYPE *Release )( 826 | ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler * This); 827 | 828 | HRESULT ( STDMETHODCALLTYPE *Invoke )( 829 | ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler * This, 830 | /* [in] */ ICoreWebView2ExperimentalController *sender, 831 | /* [in] */ IUnknown *args); 832 | 833 | END_INTERFACE 834 | } ICoreWebView2ExperimentalRasterizationScaleChangedEventHandlerVtbl; 835 | 836 | interface ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler 837 | { 838 | CONST_VTBL struct ICoreWebView2ExperimentalRasterizationScaleChangedEventHandlerVtbl *lpVtbl; 839 | }; 840 | 841 | 842 | 843 | #ifdef COBJMACROS 844 | 845 | 846 | #define ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_QueryInterface(This,riid,ppvObject) \ 847 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 848 | 849 | #define ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_AddRef(This) \ 850 | ( (This)->lpVtbl -> AddRef(This) ) 851 | 852 | #define ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_Release(This) \ 853 | ( (This)->lpVtbl -> Release(This) ) 854 | 855 | 856 | #define ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_Invoke(This,sender,args) \ 857 | ( (This)->lpVtbl -> Invoke(This,sender,args) ) 858 | 859 | #endif /* COBJMACROS */ 860 | 861 | 862 | #endif /* C style interface */ 863 | 864 | 865 | 866 | 867 | #endif /* __ICoreWebView2ExperimentalRasterizationScaleChangedEventHandler_INTERFACE_DEFINED__ */ 868 | 869 | 870 | #ifndef __ICoreWebView2ExperimentalSettings_INTERFACE_DEFINED__ 871 | #define __ICoreWebView2ExperimentalSettings_INTERFACE_DEFINED__ 872 | 873 | /* interface ICoreWebView2ExperimentalSettings */ 874 | /* [unique][object][uuid] */ 875 | 876 | 877 | EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExperimentalSettings = {0x684cbeef,0x47ba,0x4d4a,{0x99,0xf4,0x97,0x61,0x13,0xf9,0xf1,0x0a}}; 878 | 879 | #if defined(__cplusplus) && !defined(CINTERFACE) 880 | 881 | MIDL_INTERFACE("684cbeef-47ba-4d4a-99f4-976113f9f10a") 882 | ICoreWebView2ExperimentalSettings : public IUnknown 883 | { 884 | public: 885 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_UserAgent( 886 | /* [retval][out] */ LPWSTR *userAgent) = 0; 887 | 888 | virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_UserAgent( 889 | /* [in] */ LPCWSTR userAgent) = 0; 890 | 891 | }; 892 | 893 | 894 | #else /* C style interface */ 895 | 896 | typedef struct ICoreWebView2ExperimentalSettingsVtbl 897 | { 898 | BEGIN_INTERFACE 899 | 900 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 901 | ICoreWebView2ExperimentalSettings * This, 902 | /* [in] */ REFIID riid, 903 | /* [annotation][iid_is][out] */ 904 | _COM_Outptr_ void **ppvObject); 905 | 906 | ULONG ( STDMETHODCALLTYPE *AddRef )( 907 | ICoreWebView2ExperimentalSettings * This); 908 | 909 | ULONG ( STDMETHODCALLTYPE *Release )( 910 | ICoreWebView2ExperimentalSettings * This); 911 | 912 | /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserAgent )( 913 | ICoreWebView2ExperimentalSettings * This, 914 | /* [retval][out] */ LPWSTR *userAgent); 915 | 916 | /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_UserAgent )( 917 | ICoreWebView2ExperimentalSettings * This, 918 | /* [in] */ LPCWSTR userAgent); 919 | 920 | END_INTERFACE 921 | } ICoreWebView2ExperimentalSettingsVtbl; 922 | 923 | interface ICoreWebView2ExperimentalSettings 924 | { 925 | CONST_VTBL struct ICoreWebView2ExperimentalSettingsVtbl *lpVtbl; 926 | }; 927 | 928 | 929 | 930 | #ifdef COBJMACROS 931 | 932 | 933 | #define ICoreWebView2ExperimentalSettings_QueryInterface(This,riid,ppvObject) \ 934 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 935 | 936 | #define ICoreWebView2ExperimentalSettings_AddRef(This) \ 937 | ( (This)->lpVtbl -> AddRef(This) ) 938 | 939 | #define ICoreWebView2ExperimentalSettings_Release(This) \ 940 | ( (This)->lpVtbl -> Release(This) ) 941 | 942 | 943 | #define ICoreWebView2ExperimentalSettings_get_UserAgent(This,userAgent) \ 944 | ( (This)->lpVtbl -> get_UserAgent(This,userAgent) ) 945 | 946 | #define ICoreWebView2ExperimentalSettings_put_UserAgent(This,userAgent) \ 947 | ( (This)->lpVtbl -> put_UserAgent(This,userAgent) ) 948 | 949 | #endif /* COBJMACROS */ 950 | 951 | 952 | #endif /* C style interface */ 953 | 954 | 955 | 956 | 957 | #endif /* __ICoreWebView2ExperimentalSettings_INTERFACE_DEFINED__ */ 958 | 959 | #endif /* __WebView2Experimental_LIBRARY_DEFINED__ */ 960 | 961 | /* Additional Prototypes for ALL interfaces */ 962 | 963 | /* end of Additional Prototypes */ 964 | 965 | #ifdef __cplusplus 966 | } 967 | #endif 968 | 969 | #endif 970 | 971 | 972 | --------------------------------------------------------------------------------