From 57c9158551c40fde1509ef9f1bffb13391b2b4da Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Tue, 9 Aug 2022 07:42:11 +1000 Subject: [PATCH] Chore/tidy up (#1713) * Tidy up dev mode output * Rename `appng` package to `app` * Remove `crypto`,`parse`,`messagedispatcher`,`servicebus`,`runtime`,`subsystem`,`ffenestri` packages and `.vscode` dir * Remove misc `fs` functions * Remove `str` package * Fix redundant alias --- .gitignore | 3 - .vscode/launch.json | 48 - .vscode/settings.json | 8 - v2/cmd/wails/internal/commands/dev/dev.go | 2 - .../internal/commands/dev/dev_windows.go | 10 +- v2/internal/{appng => app}/app_bindings.go | 2 +- v2/internal/{appng => app}/app_darwin.go | 2 +- v2/internal/{appng => app}/app_debug.go | 2 +- .../{appng => app}/app_default_darwin.go | 2 +- .../{appng => app}/app_default_linux.go | 2 +- .../{appng => app}/app_default_windows.go | 2 +- v2/internal/{appng => app}/app_dev.go | 2 +- v2/internal/{appng => app}/app_linux.go | 2 +- v2/internal/{appng => app}/app_not_debug.go | 2 +- v2/internal/{appng => app}/app_production.go | 2 +- v2/internal/{appng => app}/app_windows.go | 2 +- v2/internal/crypto/crypto.go | 17 - v2/internal/ffenestri/LICENCES.md | 19 - v2/internal/ffenestri/README.md | 7 - v2/internal/ffenestri/common.c | 98 - v2/internal/ffenestri/common.h | 36 - v2/internal/ffenestri/contextmenus_darwin.c | 99 - v2/internal/ffenestri/contextmenus_darwin.h | 33 - .../ffenestri/contextmenustore_darwin.c | 65 - .../ffenestri/contextmenustore_darwin.h | 27 - .../ffenestri/defaultdialogicons_darwin.c | 41 - v2/internal/ffenestri/effectstructs_windows.h | 64 - v2/internal/ffenestri/ffenestri.go | 178 - v2/internal/ffenestri/ffenestri.h | 56 - v2/internal/ffenestri/ffenestri_client.go | 268 - .../ffenestri/ffenestri_client_windows.go | 310 - v2/internal/ffenestri/ffenestri_darwin.c | 1817 --- v2/internal/ffenestri/ffenestri_darwin.go | 99 - v2/internal/ffenestri/ffenestri_darwin.h | 154 - v2/internal/ffenestri/ffenestri_linux.c | 995 -- v2/internal/ffenestri/ffenestri_linux.go | 17 - v2/internal/ffenestri/ffenestri_linux.h | 6 - v2/internal/ffenestri/ffenestri_windows.cpp | 906 -- v2/internal/ffenestri/ffenestri_windows.go | 198 - v2/internal/ffenestri/ffenestri_windows.h | 95 - v2/internal/ffenestri/hashmap.h | 518 - v2/internal/ffenestri/json.c | 1403 -- v2/internal/ffenestri/json.h | 122 - v2/internal/ffenestri/menu_darwin.c | 1001 -- v2/internal/ffenestri/menu_darwin.h | 117 - v2/internal/ffenestri/runtime_darwin.c | 5 - v2/internal/ffenestri/runtime_linux.c | 5 - v2/internal/ffenestri/runtime_windows.c | 5 - v2/internal/ffenestri/traymenu_darwin.c | 266 - v2/internal/ffenestri/traymenu_darwin.h | 51 - v2/internal/ffenestri/traymenustore_darwin.c | 173 - v2/internal/ffenestri/traymenustore_darwin.h | 36 - v2/internal/ffenestri/vec.c | 115 - v2/internal/ffenestri/vec.h | 181 - v2/internal/ffenestri/windows/EventToken.h | 68 - v2/internal/ffenestri/windows/WebView2.h | 12693 ---------------- .../windows/WebView2EnvironmentOptions.h | 144 - .../ffenestri/windows/scripts/README.md | 11 - .../ffenestri/windows/scripts/sdkversion.txt | 1 - .../ffenestri/windows/scripts/updatesdk.bat | 18 - .../ffenestri/windows/x64/WebView2Loader.dll | Bin 137144 -> 0 bytes v2/internal/ffenestri/windows/x64/x64.go | 8 - v2/internal/ffenestri/windows_checkboxes.go | 95 - .../ffenestri/windows_errorhandler_debug.go | 29 - .../windows_errorhandler_production.go | 48 - v2/internal/ffenestri/windows_menu.go | 233 - v2/internal/ffenestri/windows_menu_cache.go | 75 - .../ffenestri/windows_menu_callbacks.go | 126 - v2/internal/ffenestri/windows_radiogroup.go | 195 - v2/internal/ffenestri/windows_win32.go | 131 - v2/internal/ffenestri/wv2ComHandler_windows.h | 126 - v2/internal/fs/fs.go | 64 - .../messagedispatcher/dispatchclient.go | 90 - v2/internal/messagedispatcher/message/call.go | 38 - .../messagedispatcher/message/contextmenus.go | 43 - .../messagedispatcher/message/dialog.go | 61 - .../messagedispatcher/message/event.go | 47 - v2/internal/messagedispatcher/message/log.go | 36 - v2/internal/messagedispatcher/message/menu.go | 51 - .../message/messageparser.go | 40 - .../messagedispatcher/message/runtime.go | 37 - .../messagedispatcher/message/system.go | 50 - v2/internal/messagedispatcher/message/tray.go | 46 - v2/internal/messagedispatcher/message/url.go | 20 - .../messagedispatcher/message/window.go | 91 - .../messagedispatcher/messagedispatcher.go | 578 - v2/internal/parse/README.md | 10 - v2/internal/parse/parse.go | 436 - v2/internal/runtime/js/package-lock.json | 0 v2/internal/servicebus/extract.go | 17 - v2/internal/servicebus/message.go | 43 - v2/internal/servicebus/servicebus.go | 181 - v2/internal/servicebus/servicebus_test.go | 230 - v2/internal/subsystem/binding.go | 64 - v2/internal/subsystem/call.go | 202 - v2/internal/subsystem/event.go | 191 - v2/internal/subsystem/event_test.go | 50 - v2/internal/subsystem/log.go | 111 - v2/internal/subsystem/menu.go | 176 - v2/internal/subsystem/runtime.go | 103 - v2/internal/subsystem/url.go | 98 - v2/pkg/str/str.go | 10 - v2/wails.go | 2 +- 103 files changed, 19 insertions(+), 26894 deletions(-) delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json rename v2/internal/{appng => app}/app_bindings.go (99%) rename v2/internal/{appng => app}/app_darwin.go (95%) rename v2/internal/{appng => app}/app_debug.go (83%) rename v2/internal/{appng => app}/app_default_darwin.go (97%) rename v2/internal/{appng => app}/app_default_linux.go (97%) rename v2/internal/{appng => app}/app_default_windows.go (98%) rename v2/internal/{appng => app}/app_dev.go (99%) rename v2/internal/{appng => app}/app_linux.go (94%) rename v2/internal/{appng => app}/app_not_debug.go (84%) rename v2/internal/{appng => app}/app_production.go (99%) rename v2/internal/{appng => app}/app_windows.go (98%) delete mode 100644 v2/internal/crypto/crypto.go delete mode 100644 v2/internal/ffenestri/LICENCES.md delete mode 100644 v2/internal/ffenestri/README.md delete mode 100644 v2/internal/ffenestri/common.c delete mode 100644 v2/internal/ffenestri/common.h delete mode 100644 v2/internal/ffenestri/contextmenus_darwin.c delete mode 100644 v2/internal/ffenestri/contextmenus_darwin.h delete mode 100644 v2/internal/ffenestri/contextmenustore_darwin.c delete mode 100644 v2/internal/ffenestri/contextmenustore_darwin.h delete mode 100644 v2/internal/ffenestri/defaultdialogicons_darwin.c delete mode 100644 v2/internal/ffenestri/effectstructs_windows.h delete mode 100644 v2/internal/ffenestri/ffenestri.go delete mode 100644 v2/internal/ffenestri/ffenestri.h delete mode 100644 v2/internal/ffenestri/ffenestri_client.go delete mode 100644 v2/internal/ffenestri/ffenestri_client_windows.go delete mode 100644 v2/internal/ffenestri/ffenestri_darwin.c delete mode 100644 v2/internal/ffenestri/ffenestri_darwin.go delete mode 100644 v2/internal/ffenestri/ffenestri_darwin.h delete mode 100644 v2/internal/ffenestri/ffenestri_linux.c delete mode 100644 v2/internal/ffenestri/ffenestri_linux.go delete mode 100644 v2/internal/ffenestri/ffenestri_linux.h delete mode 100644 v2/internal/ffenestri/ffenestri_windows.cpp delete mode 100644 v2/internal/ffenestri/ffenestri_windows.go delete mode 100644 v2/internal/ffenestri/ffenestri_windows.h delete mode 100644 v2/internal/ffenestri/hashmap.h delete mode 100644 v2/internal/ffenestri/json.c delete mode 100644 v2/internal/ffenestri/json.h delete mode 100644 v2/internal/ffenestri/menu_darwin.c delete mode 100644 v2/internal/ffenestri/menu_darwin.h delete mode 100644 v2/internal/ffenestri/runtime_darwin.c delete mode 100644 v2/internal/ffenestri/runtime_linux.c delete mode 100644 v2/internal/ffenestri/runtime_windows.c delete mode 100644 v2/internal/ffenestri/traymenu_darwin.c delete mode 100644 v2/internal/ffenestri/traymenu_darwin.h delete mode 100644 v2/internal/ffenestri/traymenustore_darwin.c delete mode 100644 v2/internal/ffenestri/traymenustore_darwin.h delete mode 100644 v2/internal/ffenestri/vec.c delete mode 100644 v2/internal/ffenestri/vec.h delete mode 100644 v2/internal/ffenestri/windows/EventToken.h delete mode 100644 v2/internal/ffenestri/windows/WebView2.h delete mode 100644 v2/internal/ffenestri/windows/WebView2EnvironmentOptions.h delete mode 100644 v2/internal/ffenestri/windows/scripts/README.md delete mode 100644 v2/internal/ffenestri/windows/scripts/sdkversion.txt delete mode 100644 v2/internal/ffenestri/windows/scripts/updatesdk.bat delete mode 100644 v2/internal/ffenestri/windows/x64/WebView2Loader.dll delete mode 100644 v2/internal/ffenestri/windows/x64/x64.go delete mode 100644 v2/internal/ffenestri/windows_checkboxes.go delete mode 100644 v2/internal/ffenestri/windows_errorhandler_debug.go delete mode 100644 v2/internal/ffenestri/windows_errorhandler_production.go delete mode 100644 v2/internal/ffenestri/windows_menu.go delete mode 100644 v2/internal/ffenestri/windows_menu_cache.go delete mode 100644 v2/internal/ffenestri/windows_menu_callbacks.go delete mode 100644 v2/internal/ffenestri/windows_radiogroup.go delete mode 100644 v2/internal/ffenestri/windows_win32.go delete mode 100644 v2/internal/ffenestri/wv2ComHandler_windows.h delete mode 100644 v2/internal/messagedispatcher/dispatchclient.go delete mode 100644 v2/internal/messagedispatcher/message/call.go delete mode 100644 v2/internal/messagedispatcher/message/contextmenus.go delete mode 100644 v2/internal/messagedispatcher/message/dialog.go delete mode 100644 v2/internal/messagedispatcher/message/event.go delete mode 100644 v2/internal/messagedispatcher/message/log.go delete mode 100644 v2/internal/messagedispatcher/message/menu.go delete mode 100644 v2/internal/messagedispatcher/message/messageparser.go delete mode 100644 v2/internal/messagedispatcher/message/runtime.go delete mode 100644 v2/internal/messagedispatcher/message/system.go delete mode 100644 v2/internal/messagedispatcher/message/tray.go delete mode 100644 v2/internal/messagedispatcher/message/url.go delete mode 100644 v2/internal/messagedispatcher/message/window.go delete mode 100644 v2/internal/messagedispatcher/messagedispatcher.go delete mode 100644 v2/internal/parse/README.md delete mode 100644 v2/internal/parse/parse.go delete mode 100644 v2/internal/runtime/js/package-lock.json delete mode 100644 v2/internal/servicebus/extract.go delete mode 100644 v2/internal/servicebus/message.go delete mode 100644 v2/internal/servicebus/servicebus.go delete mode 100644 v2/internal/servicebus/servicebus_test.go delete mode 100644 v2/internal/subsystem/binding.go delete mode 100644 v2/internal/subsystem/call.go delete mode 100644 v2/internal/subsystem/event.go delete mode 100644 v2/internal/subsystem/event_test.go delete mode 100644 v2/internal/subsystem/log.go delete mode 100644 v2/internal/subsystem/menu.go delete mode 100644 v2/internal/subsystem/runtime.go delete mode 100644 v2/internal/subsystem/url.go delete mode 100644 v2/pkg/str/str.go diff --git a/.gitignore b/.gitignore index 32e4ec11e..1b4152462 100644 --- a/.gitignore +++ b/.gitignore @@ -27,8 +27,5 @@ v2/pkg/parser/testproject/frontend/wails v2/test/kitchensink/frontend/public v2/test/kitchensink/build/darwin/desktop/kitchensink v2/test/kitchensink/frontend/package.json.md5 -/v2/internal/ffenestri/windows/test/cmake-build-debug/ -!v2/internal/ffenestri/windows/x64/webview2.dll -!v2/internal/ffenestri/windows/x64/WebView2Loader.dll .idea/ v2/cmd/wails/internal/commands/initialise/templates/testtemplates/ diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 51158b5ba..000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Test cmd package", - "type": "go", - "request": "launch", - "mode": "test", - "program": "${workspaceFolder}/cmd/" - }, - { - "name": "Wails Init", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${workspaceFolder}/cmd/wails/main.go", - "env": {}, - "cwd": "/tmp", - "args": [ - "init", - "-name", - "runtime", - "-dir", - "runtime", - "-output", - "runtime", - "-template", - "vuebasic" - ] - }, - { - "name": "Wails Update Pre", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${workspaceFolder}/cmd/wails/main.go", - "env": {}, - "cwd": "/tmp", - "args": [ - "update", - "-pre" - ] - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index da2d84ba6..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "go.formatTool": "goimports", - "eslint.alwaysShowStatus": true, - "files.associations": { - "__locale": "c", - "ios": "c" - } -} \ No newline at end of file diff --git a/v2/cmd/wails/internal/commands/dev/dev.go b/v2/cmd/wails/internal/commands/dev/dev.go index e96c24092..e797dcff0 100644 --- a/v2/cmd/wails/internal/commands/dev/dev.go +++ b/v2/cmd/wails/internal/commands/dev/dev.go @@ -485,13 +485,11 @@ func runFrontendDevWatcherCommand(cwd string, devCommand string, discoverViteSer } } atomic.StoreInt32(&state, stateStopped) - LogGreen("DevWatcher command exited!") wg.Done() }() return func() { if atomic.CompareAndSwapInt32(&state, stateRunning, stateCanceling) { - LogGreen("Killing DevWatcher command...") killProc(cmd, devCommand) } cancel() diff --git a/v2/cmd/wails/internal/commands/dev/dev_windows.go b/v2/cmd/wails/internal/commands/dev/dev_windows.go index f745dbf99..d3c70e399 100644 --- a/v2/cmd/wails/internal/commands/dev/dev_windows.go +++ b/v2/cmd/wails/internal/commands/dev/dev_windows.go @@ -4,7 +4,7 @@ package dev import ( - "os" + "bytes" "os/exec" "strconv" ) @@ -16,11 +16,15 @@ func killProc(cmd *exec.Cmd, devCommand string) { // For whatever reason, killing an npm script on windows just doesn't exit properly with cancel if cmd != nil && cmd.Process != nil { kill := exec.Command("TASKKILL", "/T", "/F", "/PID", strconv.Itoa(cmd.Process.Pid)) - kill.Stderr = os.Stderr - kill.Stdout = os.Stdout + var errorBuffer bytes.Buffer + var stdoutBuffer bytes.Buffer + kill.Stderr = &errorBuffer + kill.Stdout = &stdoutBuffer err := kill.Run() if err != nil { if err.Error() != "exit status 1" { + println(stdoutBuffer.String()) + println(errorBuffer.String()) LogRed("Error from '%s': %s", devCommand, err.Error()) } } diff --git a/v2/internal/appng/app_bindings.go b/v2/internal/app/app_bindings.go similarity index 99% rename from v2/internal/appng/app_bindings.go rename to v2/internal/app/app_bindings.go index 8a80da32b..282ede41c 100644 --- a/v2/internal/appng/app_bindings.go +++ b/v2/internal/app/app_bindings.go @@ -1,7 +1,7 @@ //go:build bindings // +build bindings -package appng +package app import ( "os" diff --git a/v2/internal/appng/app_darwin.go b/v2/internal/app/app_darwin.go similarity index 95% rename from v2/internal/appng/app_darwin.go rename to v2/internal/app/app_darwin.go index 66677040f..939f724a4 100644 --- a/v2/internal/appng/app_darwin.go +++ b/v2/internal/app/app_darwin.go @@ -1,7 +1,7 @@ //go:build darwin && !bindings // +build darwin,!bindings -package appng +package app import ( "github.com/wailsapp/wails/v2/internal/logger" diff --git a/v2/internal/appng/app_debug.go b/v2/internal/app/app_debug.go similarity index 83% rename from v2/internal/appng/app_debug.go rename to v2/internal/app/app_debug.go index 47408ec96..bfcdd13b4 100644 --- a/v2/internal/appng/app_debug.go +++ b/v2/internal/app/app_debug.go @@ -1,7 +1,7 @@ //go:build debug // +build debug -package appng +package app func IsDebug() bool { return true diff --git a/v2/internal/appng/app_default_darwin.go b/v2/internal/app/app_default_darwin.go similarity index 97% rename from v2/internal/appng/app_default_darwin.go rename to v2/internal/app/app_default_darwin.go index 9976a2595..b31a002fd 100644 --- a/v2/internal/appng/app_default_darwin.go +++ b/v2/internal/app/app_default_darwin.go @@ -1,7 +1,7 @@ //go:build !dev && !production && !bindings && darwin // +build !dev,!production,!bindings,darwin -package appng +package app import ( "fmt" diff --git a/v2/internal/appng/app_default_linux.go b/v2/internal/app/app_default_linux.go similarity index 97% rename from v2/internal/appng/app_default_linux.go rename to v2/internal/app/app_default_linux.go index cbd566337..2a2f1770d 100644 --- a/v2/internal/appng/app_default_linux.go +++ b/v2/internal/app/app_default_linux.go @@ -1,7 +1,7 @@ //go:build !dev && !production && !bindings && linux // +build !dev,!production,!bindings,linux -package appng +package app import ( "fmt" diff --git a/v2/internal/appng/app_default_windows.go b/v2/internal/app/app_default_windows.go similarity index 98% rename from v2/internal/appng/app_default_windows.go rename to v2/internal/app/app_default_windows.go index e3388b91f..a05ef2a53 100644 --- a/v2/internal/appng/app_default_windows.go +++ b/v2/internal/app/app_default_windows.go @@ -1,7 +1,7 @@ //go:build !dev && !production && !bindings && windows // +build !dev,!production,!bindings,windows -package appng +package app import ( "os/exec" diff --git a/v2/internal/appng/app_dev.go b/v2/internal/app/app_dev.go similarity index 99% rename from v2/internal/appng/app_dev.go rename to v2/internal/app/app_dev.go index 264ddf148..03008c018 100644 --- a/v2/internal/appng/app_dev.go +++ b/v2/internal/app/app_dev.go @@ -1,7 +1,7 @@ //go:build dev // +build dev -package appng +package app import ( "context" diff --git a/v2/internal/appng/app_linux.go b/v2/internal/app/app_linux.go similarity index 94% rename from v2/internal/appng/app_linux.go rename to v2/internal/app/app_linux.go index e336964f4..154cd38e4 100644 --- a/v2/internal/appng/app_linux.go +++ b/v2/internal/app/app_linux.go @@ -1,7 +1,7 @@ //go:build linux && !bindings // +build linux,!bindings -package appng +package app import ( "github.com/wailsapp/wails/v2/internal/logger" diff --git a/v2/internal/appng/app_not_debug.go b/v2/internal/app/app_not_debug.go similarity index 84% rename from v2/internal/appng/app_not_debug.go rename to v2/internal/app/app_not_debug.go index 5ce0bd248..b20a7c80f 100644 --- a/v2/internal/appng/app_not_debug.go +++ b/v2/internal/app/app_not_debug.go @@ -1,7 +1,7 @@ //go:build !debug // +build !debug -package appng +package app func IsDebug() bool { return false diff --git a/v2/internal/appng/app_production.go b/v2/internal/app/app_production.go similarity index 99% rename from v2/internal/appng/app_production.go rename to v2/internal/app/app_production.go index 444facfa3..152581666 100644 --- a/v2/internal/appng/app_production.go +++ b/v2/internal/app/app_production.go @@ -1,7 +1,7 @@ //go:build production // +build production -package appng +package app import ( "context" diff --git a/v2/internal/appng/app_windows.go b/v2/internal/app/app_windows.go similarity index 98% rename from v2/internal/appng/app_windows.go rename to v2/internal/app/app_windows.go index 474f154b4..affc33736 100644 --- a/v2/internal/appng/app_windows.go +++ b/v2/internal/app/app_windows.go @@ -1,7 +1,7 @@ //go:build windows && !bindings // +build windows,!bindings -package appng +package app import ( "github.com/wailsapp/wails/v2/internal/logger" diff --git a/v2/internal/crypto/crypto.go b/v2/internal/crypto/crypto.go deleted file mode 100644 index 60a010c3c..000000000 --- a/v2/internal/crypto/crypto.go +++ /dev/null @@ -1,17 +0,0 @@ -package crypto - -import ( - "crypto/rand" - "fmt" - "log" -) - -// RandomID returns a random ID as a string -func RandomID() string { - b := make([]byte, 16) - _, err := rand.Read(b) - if err != nil { - log.Fatal(err) - } - return fmt.Sprintf("%x", b) -} diff --git a/v2/internal/ffenestri/LICENCES.md b/v2/internal/ffenestri/LICENCES.md deleted file mode 100644 index 1c02ffa9c..000000000 --- a/v2/internal/ffenestri/LICENCES.md +++ /dev/null @@ -1,19 +0,0 @@ -# 3rd Party Licenses - -## Webview -Whilst not using the library directly, there is certainly some code that is inspired by or used from the webview library. - -Homepage: https://github.com/webview/webview -License: https://github.com/webview/webview/blob/master/LICENSE - -## vec -Homepage: https://github.com/rxi/vec -License: https://github.com/rxi/vec/blob/master/LICENSE - -## json -Homepage: http://git.ozlabs.org/?p=ccan;a=tree;f=ccan/json;hb=HEAD -License: http://git.ozlabs.org/?p=ccan;a=blob;f=licenses/BSD-MIT;h=89de354795ec7a7cdab07c091029653d3618540d;hb=HEAD - -## hashmap -Homepage: https://github.com/sheredom/hashmap.h -License: https://github.com/sheredom/hashmap.h/blob/master/LICENSE \ No newline at end of file diff --git a/v2/internal/ffenestri/README.md b/v2/internal/ffenestri/README.md deleted file mode 100644 index 57103e612..000000000 --- a/v2/internal/ffenestri/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Windows - -- Left and Right Win keys act the same -- Accelerators will automatically add appropriate text into the menu items. This can be prevented by adding a tab - character to the menu label -- Tooltips + styling with font currently unsupported -- \ No newline at end of file diff --git a/v2/internal/ffenestri/common.c b/v2/internal/ffenestri/common.c deleted file mode 100644 index c7d822d7e..000000000 --- a/v2/internal/ffenestri/common.c +++ /dev/null @@ -1,98 +0,0 @@ -// +build !windows - - -// -// Created by Lea Anthony on 6/1/21. -// - -#include "common.h" - -// Credit: https://stackoverflow.com/a/8465083 -char* concat(const char *string1, const char *string2) -{ - const size_t len1 = strlen(string1); - const size_t len2 = strlen(string2); - char *result = malloc(len1 + len2 + 1); - strcpy(result, string1); - memcpy(result + len1, string2, len2 + 1); - return result; -} - -// 10k is more than enough for a log message -#define MAXMESSAGE 1024*10 -char abortbuffer[MAXMESSAGE]; - -void ABORT(const char *message, ...) { - const char *temp = concat("FATAL: ", message); - va_list args; - va_start(args, message); - vsnprintf(abortbuffer, MAXMESSAGE, temp, args); - printf("%s\n", &abortbuffer[0]); - MEMFREE(temp); - va_end(args); - exit(1); -} - -int freeHashmapItem(void *const context, struct hashmap_element_s *const e) { - free(e->data); - return -1; -} - -const char* getJSONString(JsonNode *item, const char* key) { - // Get key - JsonNode *node = json_find_member(item, key); - const char *result = ""; - if ( node != NULL && node->tag == JSON_STRING) { - result = node->string_; - } - return result; -} - -void ABORT_JSON(JsonNode *node, const char* key) { - ABORT("Unable to read required key '%s' from JSON: %s\n", key, json_encode(node)); -} - -const char* mustJSONString(JsonNode *node, const char* key) { - const char* result = getJSONString(node, key); - if ( result == NULL ) { - ABORT_JSON(node, key); - } - return result; -} -JsonNode* mustJSONObject(JsonNode *node, const char* key) { - struct JsonNode* result = getJSONObject(node, key); - if ( result == NULL ) { - ABORT_JSON(node, key); - } - return result; -} - -JsonNode* getJSONObject(JsonNode* node, const char* key) { - return json_find_member(node, key); -} - -bool getJSONBool(JsonNode *item, const char* key, bool *result) { - JsonNode *node = json_find_member(item, key); - if ( node != NULL && node->tag == JSON_BOOL) { - *result = node->bool_; - return true; - } - return false; -} - -bool getJSONInt(JsonNode *item, const char* key, int *result) { - JsonNode *node = json_find_member(item, key); - if ( node != NULL && node->tag == JSON_NUMBER) { - *result = (int) node->number_; - return true; - } - return false; -} - -JsonNode* mustParseJSON(const char* JSON) { - JsonNode* parsedUpdate = json_decode(JSON); - if ( parsedUpdate == NULL ) { - ABORT("Unable to decode JSON: %s\n", JSON); - } - return parsedUpdate; -} \ No newline at end of file diff --git a/v2/internal/ffenestri/common.h b/v2/internal/ffenestri/common.h deleted file mode 100644 index 7f6e3a509..000000000 --- a/v2/internal/ffenestri/common.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Created by Lea Anthony on 6/1/21. -// - -#ifndef COMMON_H -#define COMMON_H - -#include -#include -#include "string.h" -#include "hashmap.h" -#include "vec.h" -#include "json.h" - -#define STREQ(a,b) strcmp(a, b) == 0 -#define STREMPTY(string) strlen(string) == 0 -#define STRCOPY(a) concat(a, "") -#define STR_HAS_CHARS(input) input != NULL && strlen(input) > 0 -#define MEMFREE(input) free((void*)input); input = NULL; -#define FREE_AND_SET(variable, value) if( variable != NULL ) { MEMFREE(variable); } variable = value - -// Credit: https://stackoverflow.com/a/8465083 -char* concat(const char *string1, const char *string2); -void ABORT(const char *message, ...); -int freeHashmapItem(void *const context, struct hashmap_element_s *const e); -const char* getJSONString(JsonNode *item, const char* key); -const char* mustJSONString(JsonNode *node, const char* key); -JsonNode* getJSONObject(JsonNode* node, const char* key); -JsonNode* mustJSONObject(JsonNode *node, const char* key); - -bool getJSONBool(JsonNode *item, const char* key, bool *result); -bool getJSONInt(JsonNode *item, const char* key, int *result); - -JsonNode* mustParseJSON(const char* JSON); - -#endif //ASSETS_C_COMMON_H diff --git a/v2/internal/ffenestri/contextmenus_darwin.c b/v2/internal/ffenestri/contextmenus_darwin.c deleted file mode 100644 index fb2eb4105..000000000 --- a/v2/internal/ffenestri/contextmenus_darwin.c +++ /dev/null @@ -1,99 +0,0 @@ -//// -//// Created by Lea Anthony on 6/1/21. -//// -// - -#include "ffenestri_darwin.h" -#include "common.h" -#include "contextmenus_darwin.h" -#include "menu_darwin.h" - -ContextMenu* NewContextMenu(const char* contextMenuJSON) { - ContextMenu* result = malloc(sizeof(ContextMenu)); - - JsonNode* processedJSON = json_decode(contextMenuJSON); - if( processedJSON == NULL ) { - ABORT("[NewTrayMenu] Unable to parse TrayMenu JSON: %s", contextMenuJSON); - } - // Save reference to this json - result->processedJSON = processedJSON; - - result->ID = mustJSONString(processedJSON, "ID"); - JsonNode* processedMenu = mustJSONObject(processedJSON, "ProcessedMenu"); - - result->menu = NewMenu(processedMenu); - result->nsmenu = NULL; - result->menu->menuType = ContextMenuType; - result->menu->parentData = result; - result->contextMenuData = NULL; - return result; -} - -ContextMenu* GetContextMenuByID(ContextMenuStore* store, const char *contextMenuID) { - return (ContextMenu*)hashmap_get(&store->contextMenuMap, (char*)contextMenuID, strlen(contextMenuID)); -} - -void DeleteContextMenu(ContextMenu* contextMenu) { - // Free Menu - DeleteMenu(contextMenu->menu); - - // Delete any context menu data we may have stored - if( contextMenu->contextMenuData != NULL ) { - MEMFREE(contextMenu->contextMenuData); - } - - // Free JSON - if (contextMenu->processedJSON != NULL ) { - json_delete(contextMenu->processedJSON); - contextMenu->processedJSON = NULL; - } - - // Free context menu - free(contextMenu); -} - -int freeContextMenu(void *const context, struct hashmap_element_s *const e) { - DeleteContextMenu(e->data); - return -1; -} - -void ShowContextMenu(ContextMenuStore* store, id mainWindow, const char *contextMenuID, const char *contextMenuData) { - - // If no context menu ID was given, abort - if( contextMenuID == NULL ) { - return; - } - - ContextMenu* contextMenu = GetContextMenuByID(store, contextMenuID); - - // We don't need the ID now - MEMFREE(contextMenuID); - - if( contextMenu == NULL ) { - // Free context menu data - if( contextMenuData != NULL ) { - MEMFREE(contextMenuData); - return; - } - } - - // We need to store the context menu data. Free existing data if we have it - // and set to the new value. - FREE_AND_SET(contextMenu->contextMenuData, contextMenuData); - - // Grab the content view and show the menu - id contentView = msg_reg(mainWindow, s("contentView")); - - // Get the triggering event - id menuEvent = msg_reg(mainWindow, s("currentEvent")); - - if( contextMenu->nsmenu == NULL ) { - // GetMenu creates the NSMenu - contextMenu->nsmenu = GetMenu(contextMenu->menu); - } - - // Show popup - ((id(*)(id, SEL, id, id, id))objc_msgSend)(c("NSMenu"), s("popUpContextMenu:withEvent:forView:"), contextMenu->nsmenu, menuEvent, contentView); - -} - diff --git a/v2/internal/ffenestri/contextmenus_darwin.h b/v2/internal/ffenestri/contextmenus_darwin.h deleted file mode 100644 index a1e7b976a..000000000 --- a/v2/internal/ffenestri/contextmenus_darwin.h +++ /dev/null @@ -1,33 +0,0 @@ -//// -//// Created by Lea Anthony on 6/1/21. -//// -// -#ifndef CONTEXTMENU_DARWIN_H -#define CONTEXTMENU_DARWIN_H - -#include "json.h" -#include "menu_darwin.h" -#include "contextmenustore_darwin.h" - -typedef struct { - const char* ID; - id nsmenu; - Menu* menu; - - JsonNode* processedJSON; - - // Context menu data is given by the frontend when clicking a context menu. - // We send this to the backend when an item is selected - const char* contextMenuData; -} ContextMenu; - - -ContextMenu* NewContextMenu(const char* contextMenuJSON); - -ContextMenu* GetContextMenuByID( ContextMenuStore* store, const char *contextMenuID); -void DeleteContextMenu(ContextMenu* contextMenu); -int freeContextMenu(void *const context, struct hashmap_element_s *const e); - -void ShowContextMenu(ContextMenuStore* store, id mainWindow, const char *contextMenuID, const char *contextMenuData); - -#endif //CONTEXTMENU_DARWIN_H diff --git a/v2/internal/ffenestri/contextmenustore_darwin.c b/v2/internal/ffenestri/contextmenustore_darwin.c deleted file mode 100644 index c777f014e..000000000 --- a/v2/internal/ffenestri/contextmenustore_darwin.c +++ /dev/null @@ -1,65 +0,0 @@ - -#include "contextmenus_darwin.h" -#include "contextmenustore_darwin.h" - -ContextMenuStore* NewContextMenuStore() { - - ContextMenuStore* result = malloc(sizeof(ContextMenuStore)); - - // Allocate Context Menu Store - if( 0 != hashmap_create((const unsigned)4, &result->contextMenuMap)) { - ABORT("[NewContextMenus] Not enough memory to allocate contextMenuStore!"); - } - - return result; -} - -void AddContextMenuToStore(ContextMenuStore* store, const char* contextMenuJSON) { - ContextMenu* newMenu = NewContextMenu(contextMenuJSON); - - //TODO: check if there is already an entry for this menu - hashmap_put(&store->contextMenuMap, newMenu->ID, strlen(newMenu->ID), newMenu); -} - -ContextMenu* GetContextMenuFromStore(ContextMenuStore* store, const char* menuID) { - // Get the current menu - return hashmap_get(&store->contextMenuMap, menuID, strlen(menuID)); -} - -void UpdateContextMenuInStore(ContextMenuStore* store, const char* menuJSON) { - ContextMenu* newContextMenu = NewContextMenu(menuJSON); - - // Get the current menu - ContextMenu *currentMenu = GetContextMenuFromStore(store, newContextMenu->ID); - if ( currentMenu == NULL ) { - ABORT("Attempted to update unknown context menu with ID '%s'.", newContextMenu->ID); - } - - hashmap_remove(&store->contextMenuMap, newContextMenu->ID, strlen(newContextMenu->ID)); - - // Save the status bar reference - DeleteContextMenu(currentMenu); - - hashmap_put(&store->contextMenuMap, newContextMenu->ID, strlen(newContextMenu->ID), newContextMenu); - -} - - -void DeleteContextMenuStore(ContextMenuStore* store) { - - // Guard against NULLs - if( store == NULL ) { - return; - } - - // Delete context menus - if( hashmap_num_entries(&store->contextMenuMap) > 0 ) { - if (0 != hashmap_iterate_pairs(&store->contextMenuMap, freeContextMenu, NULL)) { - ABORT("[DeleteContextMenuStore] Failed to release contextMenuStore entries!"); - } - } - - // Free context menu hashmap - hashmap_destroy(&store->contextMenuMap); - -} diff --git a/v2/internal/ffenestri/contextmenustore_darwin.h b/v2/internal/ffenestri/contextmenustore_darwin.h deleted file mode 100644 index 793eef691..000000000 --- a/v2/internal/ffenestri/contextmenustore_darwin.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Created by Lea Anthony on 7/1/21. -// - -#ifndef CONTEXTMENUSTORE_DARWIN_H -#define CONTEXTMENUSTORE_DARWIN_H - -#include "common.h" - -typedef struct { - - int dummy; - - // This is our context menu store which keeps track - // of all instances of ContextMenus - struct hashmap_s contextMenuMap; - -} ContextMenuStore; - -ContextMenuStore* NewContextMenuStore(); - -void DeleteContextMenuStore(ContextMenuStore* store); -void UpdateContextMenuInStore(ContextMenuStore* store, const char* menuJSON); - -void AddContextMenuToStore(ContextMenuStore* store, const char* contextMenuJSON); - -#endif //CONTEXTMENUSTORE_DARWIN_H diff --git a/v2/internal/ffenestri/defaultdialogicons_darwin.c b/v2/internal/ffenestri/defaultdialogicons_darwin.c deleted file mode 100644 index 0c79a6b55..000000000 --- a/v2/internal/ffenestri/defaultdialogicons_darwin.c +++ /dev/null @@ -1,41 +0,0 @@ -// defaultdialogicons_darwin.c -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL. -// This file was auto-generated. DO NOT MODIFY. - -const unsigned char defaultDialogIcon0Name[] = { 0x69, 0x6e, 0x66, 0x6f, 0x2d, 0x64, 0x61, 0x72, 0x6b, 0x00 }; -const unsigned char defaultDialogIcon0Length[] = { 0x37, 0x38, 0x30, 0x00 }; -const unsigned char defaultDialogIcon0Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x40, 0x8, 0x3, 0x0, 0x0, 0x0, 0x9d, 0xb7, 0x81, 0xec, 0x0, 0x0, 0x0, 0x84, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0xdb, 0xe6, 0xd1, 0x0, 0x0, 0x0, 0x2b, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xf9, 0x9c, 0xb1, 0xe7, 0x4b, 0x91, 0x3a, 0x1b, 0xe3, 0x1e, 0xa, 0xae, 0x51, 0xe0, 0x98, 0x32, 0x4, 0x66, 0x6d, 0x2b, 0x63, 0x5d, 0x18, 0x11, 0xd6, 0xd0, 0xc8, 0xc2, 0x40, 0x7, 0x76, 0x16, 0x48, 0xa0, 0x2f, 0x57, 0xf1, 0xf0, 0x85, 0x77, 0x2c, 0xf, 0x6d, 0x84, 0xfd, 0x3d, 0x0, 0x0, 0x2, 0xc, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0xed, 0x57, 0xd9, 0x96, 0x82, 0x30, 0xc, 0x15, 0x2c, 0x4b, 0x91, 0x5d, 0x40, 0x10, 0x5, 0xf7, 0x65, 0xfc, 0xff, 0xff, 0x9b, 0x63, 0xca, 0xa1, 0x40, 0xb, 0x61, 0xa6, 0xc7, 0x37, 0xf3, 0x18, 0x92, 0xdb, 0x66, 0xb9, 0x69, 0x58, 0x7c, 0xe5, 0xb3, 0x62, 0x87, 0x46, 0xfa, 0x78, 0xa4, 0x46, 0x68, 0xff, 0xc3, 0x79, 0xe3, 0x99, 0x25, 0xd5, 0x5e, 0x20, 0x1a, 0x2d, 0x4d, 0x6f, 0xf3, 0x27, 0x77, 0x2b, 0xf0, 0x5f, 0x3, 0xf1, 0x3, 0x6b, 0xb6, 0xf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cb, 0xed, 0x86, 0x3c, 0x2c, 0xd8, 0xd3, 0x96, 0x24, 0xf8, 0xd3, 0xa6, 0xfe, 0xb8, 0xce, 0x7f, 0xde, 0x6d, 0xfe, 0xbc, 0xab, 0x2d, 0x18, 0xca, 0x2b, 0xe, 0xbe, 0x64, 0x19, 0xd8, 0x92, 0x85, 0xaf, 0x79, 0x17, 0xbb, 0x97, 0xe1, 0xb, 0xb2, 0xe6, 0x61, 0x8b, 0x26, 0x11, 0x17, 0x4d, 0xf5, 0x55, 0x57, 0x7d, 0xd9, 0x56, 0x5f, 0xf7, 0xd5, 0x7f, 0x38, 0xd4, 0x7f, 0x79, 0xf0, 0x9f, 0xae, 0xba, 0x86, 0x9f, 0xae, 0xaf, 0x7c, 0x54, 0x7e, 0x1, 0x7, 0x4e, 0x88, 0x96, 0x1d, 0xbb, 0xbc, 0x56, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon1Name[] = { 0x69, 0x6e, 0x66, 0x6f, 0x2d, 0x64, 0x61, 0x72, 0x6b, 0x32, 0x78, 0x00 }; -const unsigned char defaultDialogIcon1Length[] = { 0x31, 0x32, 0x39, 0x35, 0x00 }; -const unsigned char defaultDialogIcon1Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x8, 0x3, 0x0, 0x0, 0x0, 0xf4, 0xe0, 0x91, 0xf9, 0x0, 0x0, 0x0, 0x96, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x25, 0xc5, 0xa8, 0x0, 0x0, 0x0, 0x31, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xfb, 0x55, 0x3, 0x61, 0x95, 0xc, 0xd7, 0xb7, 0x8a, 0x82, 0x39, 0xe5, 0x40, 0x19, 0x44, 0x2b, 0x4e, 0xee, 0xc6, 0xbf, 0x48, 0x25, 0x21, 0xe2, 0xb3, 0x67, 0xe8, 0x33, 0xd0, 0x6c, 0x42, 0x9, 0xcb, 0xf, 0xf6, 0xc2, 0xbc, 0xb0, 0xa8, 0x71, 0x52, 0x14, 0x7, 0x90, 0x7c, 0x8f, 0x11, 0x7b, 0xbe, 0x95, 0xf5, 0x71, 0x0, 0x0, 0x3, 0xf7, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xec, 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3, 0x29, 0x4f, 0x9c, 0x2f, 0x1, 0xa0, 0x31, 0x1e, 0xe9, 0x44, 0xa8, 0x75, 0xac, 0xaa, 0x11, 0xa0, 0xd6, 0xdc, 0xb1, 0xde, 0x78, 0xb0, 0xd9, 0xa0, 0xdd, 0xf7, 0xa3, 0xc0, 0xed, 0x9, 0xe0, 0xfd, 0x9, 0x2c, 0x38, 0x7c, 0x56, 0x3c, 0xce, 0x6b, 0x9e, 0x7e, 0x5e, 0xae, 0x78, 0x1c, 0x65, 0xc9, 0x25, 0x81, 0x35, 0x9f, 0xef, 0x45, 0xa7, 0x6e, 0xf6, 0xc7, 0x8b, 0x45, 0x27, 0xb5, 0xea, 0x55, 0xb7, 0x6d, 0x3d, 0xad, 0x7a, 0x95, 0x2a, 0x55, 0xaa, 0x54, 0xa9, 0xcd, 0xf5, 0x6, 0xc2, 0x69, 0xab, 0xf3, 0x71, 0x7e, 0x8e, 0x8, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon2Name[] = { 0x69, 0x6e, 0x66, 0x6f, 0x2d, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x00 }; -const unsigned char defaultDialogIcon2Length[] = { 0x37, 0x36, 0x34, 0x00 }; -const unsigned char defaultDialogIcon2Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x40, 0x8, 0x3, 0x0, 0x0, 0x0, 0x9d, 0xb7, 0x81, 0xec, 0x0, 0x0, 0x0, 0x75, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0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0x2a, 0xd3, 0x61, 0xe2, 0x1, 0xe8, 0x30, 0x71, 0xc7, 0x99, 0x0, 0xf8, 0xe3, 0x4c, 0x5, 0x85, 0x7, 0xa0, 0x82, 0xc2, 0x95, 0x34, 0x2, 0xe0, 0x4b, 0x1a, 0x15, 0x55, 0x16, 0x80, 0x8a, 0x2a, 0x5b, 0xd6, 0xe9, 0x38, 0x33, 0x65, 0xdd, 0xe8, 0x62, 0xe1, 0xaf, 0xb6, 0x2c, 0x63, 0xae, 0x36, 0xe3, 0xcb, 0x55, 0xbf, 0xde, 0x83, 0xf, 0xaf, 0x77, 0xf3, 0x6, 0x83, 0x5a, 0x1c, 0x9b, 0x6d, 0x71, 0x3e, 0x6a, 0xb2, 0xee, 0x4c, 0x93, 0xc5, 0xb5, 0x79, 0x81, 0xd6, 0xe6, 0xf1, 0x8d, 0xe6, 0xf5, 0xd9, 0x68, 0x5e, 0x99, 0x46, 0xd3, 0xa0, 0xd5, 0x35, 0x6a, 0xb6, 0xcd, 0xdb, 0x7d, 0xf3, 0x7, 0x87, 0xf9, 0x93, 0x87, 0x7f, 0x74, 0x5d, 0xd2, 0xf4, 0x82, 0x8f, 0xae, 0x9f, 0x7c, 0x53, 0xfe, 0x1, 0x6f, 0xc7, 0x5c, 0x26, 0x6e, 0x29, 0x2b, 0x15, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon3Name[] = { 0x69, 0x6e, 0x66, 0x6f, 0x2d, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x32, 0x78, 0x00 }; -const unsigned char defaultDialogIcon3Length[] = { 0x31, 0x32, 0x39, 0x33, 0x00 }; -const unsigned char defaultDialogIcon3Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x80, 0x0, 0x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 0x30, 0xfc, 0xa1, 0xc2, 0x71, 0xbb, 0xa4, 0x55, 0x62, 0xc1, 0x1a, 0xcf, 0xe0, 0x57, 0xe3, 0x19, 0xbe, 0x6b, 0x3c, 0xe9, 0x15, 0x99, 0xa2, 0x56, 0xb9, 0x4e, 0x45, 0xac, 0x32, 0xdb, 0x33, 0xb0, 0xcc, 0x96, 0x66, 0x9d, 0x6f, 0x7, 0x85, 0x46, 0x8f, 0x4a, 0xe7, 0x63, 0xb9, 0xd2, 0x99, 0x76, 0xa9, 0x75, 0x9e, 0x4c, 0xe1, 0xb8, 0x1e, 0xa1, 0xd8, 0xac, 0x5f, 0xed, 0xd6, 0x2f, 0xb7, 0xbf, 0x61, 0xbb, 0xc9, 0xb, 0x9d, 0x35, 0xb1, 0x51, 0xf3, 0x7, 0xe, 0xfc, 0x89, 0x47, 0x39, 0xad, 0x40, 0x9, 0x27, 0x1e, 0x87, 0x39, 0x72, 0x99, 0x39, 0xd8, 0x66, 0xf9, 0xcc, 0xa7, 0xb1, 0x85, 0xd9, 0x2, 0xee, 0xf7, 0xa1, 0x93, 0x33, 0xdb, 0xc2, 0xb5, 0x9f, 0x53, 0xaf, 0xd6, 0x99, 0x8c, 0x8c, 0x8c, 0x8c, 0x8c, 0x60, 0xbc, 0x0, 0xd9, 0xfc, 0x9e, 0xf5, 0xee, 0xae, 0x37, 0x12, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon4Name[] = { 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x64, 0x61, 0x72, 0x6b, 0x00 }; -const unsigned char defaultDialogIcon4Length[] = { 0x39, 0x34, 0x31, 0x00 }; -const unsigned char defaultDialogIcon4Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x40, 0x8, 0x3, 0x0, 0x0, 0x0, 0x9d, 0xb7, 0x81, 0xec, 0x0, 0x0, 0x0, 0x99, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0x1d, 0x4, 0x54, 0x0, 0x0, 0x0, 0x32, 0x74, 0x52, 0x4e, 0x53, 0x0, 0xf9, 0x1c, 0xe6, 0xb1, 0x3b, 0x17, 0xc9, 0xad, 0x6, 0x8f, 0x4e, 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x12, 0x89, 0x52, 0x99, 0x94, 0x8, 0x92, 0x9e, 0x52, 0x99, 0x16, 0x53, 0x47, 0x76, 0x72, 0x15, 0x91, 0x62, 0x1a, 0x2e, 0x67, 0x94, 0xd8, 0xb6, 0x11, 0x6c, 0x5a, 0xce, 0xb4, 0xa1, 0x10, 0x39, 0xc8, 0xbd, 0x8f, 0x36, 0x14, 0xda, 0xd2, 0xc6, 0x85, 0xb6, 0x34, 0xda, 0x54, 0x51, 0xa2, 0x3c, 0x47, 0x12, 0x92, 0xa6, 0x3a, 0xd8, 0xd6, 0x11, 0x2e, 0xfb, 0x8e, 0x36, 0x42, 0x4b, 0xda, 0xfa, 0xc0, 0xc3, 0x82, 0x72, 0xab, 0xf7, 0x6e, 0xed, 0x7, 0xf6, 0x42, 0x1f, 0x16, 0xfa, 0xb4, 0x51, 0x1e, 0xd0, 0xa7, 0x6d, 0xfc, 0x71, 0x5, 0xb7, 0xf0, 0x32, 0xfa, 0xb8, 0xe, 0x3f, 0xef, 0x28, 0xc9, 0xf5, 0x9a, 0xc8, 0xf7, 0xe3, 0xf3, 0xae, 0x36, 0x60, 0x28, 0x8f, 0x38, 0xe3, 0x43, 0xd6, 0x6c, 0x64, 0xc8, 0x52, 0x1b, 0xf3, 0x14, 0x7, 0x4d, 0xd5, 0x51, 0x57, 0x6d, 0xd8, 0xae, 0x42, 0xc5, 0x71, 0x5f, 0xf1, 0xf, 0x87, 0xe2, 0x5f, 0x1e, 0xc5, 0x3f, 0x5d, 0xbf, 0xf2, 0x93, 0xf2, 0xf, 0x45, 0x13, 0xb6, 0x9d, 0x6, 0x38, 0x84, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon5Name[] = { 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x64, 0x61, 0x72, 0x6b, 0x32, 0x78, 0x00 }; -const unsigned char defaultDialogIcon5Length[] = { 0x31, 0x35, 0x35, 0x37, 0x00 }; -const unsigned char defaultDialogIcon5Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x8, 0x3, 0x0, 0x0, 0x0, 0xf4, 0xe0, 0x91, 0xf9, 0x0, 0x0, 0x0, 0x9f, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 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e, 0x8a, 0xba, 0x35, 0x9b, 0x97, 0x22, 0xfb, 0xf, 0xa6, 0xb7, 0xf9, 0xe7, 0x9, 0xe4, 0xc9, 0x4f, 0x3c, 0xae, 0xe2, 0x23, 0x97, 0xb, 0xf8, 0xcc, 0xa7, 0xe2, 0x26, 0xfd, 0xa1, 0x53, 0x9b, 0x53, 0xd7, 0xf3, 0x4f, 0xbd, 0x6, 0x6, 0x6, 0x6, 0xae, 0x8a, 0x2f, 0x2e, 0x60, 0x3a, 0x41, 0x7b, 0x3f, 0x8e, 0x53, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon6Name[] = { 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x00 }; -const unsigned char defaultDialogIcon6Length[] = { 0x39, 0x33, 0x30, 0x00 }; -const unsigned char defaultDialogIcon6Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x40, 0x8, 0x3, 0x0, 0x0, 0x0, 0x9d, 0xb7, 0x81, 0xec, 0x0, 0x0, 0x0, 0x96, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0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b, 0x8d, 0x85, 0xd6, 0xc6, 0x3a, 0x80, 0xb5, 0x15, 0xcc, 0x55, 0xbf, 0xa5, 0xcd, 0x60, 0xae, 0xef, 0xf6, 0x2e, 0x74, 0xdb, 0xd6, 0xdd, 0xf7, 0x97, 0xbd, 0x7b, 0x1, 0xc3, 0x8d, 0x38, 0x76, 0xc8, 0x72, 0x63, 0x9e, 0x19, 0x34, 0xdd, 0xa8, 0xeb, 0x85, 0xed, 0xa9, 0x36, 0xe3, 0xbe, 0x39, 0x70, 0x98, 0x23, 0x8f, 0x39, 0x74, 0xfd, 0xf8, 0x12, 0x3b, 0xca, 0x8, 0xb2, 0x9d, 0xe6, 0x23, 0xa2, 0x27, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon7Name[] = { 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x32, 0x78, 0x00 }; -const unsigned char defaultDialogIcon7Length[] = { 0x31, 0x35, 0x33, 0x38, 0x00 }; -const unsigned char defaultDialogIcon7Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x8, 0x3, 0x0, 0x0, 0x0, 0xf4, 0xe0, 0x91, 0xf9, 0x0, 0x0, 0x0, 0x9c, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,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ff, 0x6a, 0x35, 0xf, 0x64, 0xbf, 0xb, 0xf2, 0xfd, 0xed, 0xc, 0xc, 0x1f, 0x3b, 0x6, 0x86, 0x2e, 0x59, 0x38, 0xee, 0x6f, 0x62, 0xb9, 0xbf, 0x8d, 0x67, 0x8f, 0x91, 0x69, 0x7a, 0xbc, 0x91, 0x69, 0x3a, 0x87, 0x91, 0xe9, 0x6, 0x56, 0x2e, 0x27, 0x80, 0x23, 0x68, 0x2e, 0x67, 0x66, 0xeb, 0xa6, 0x9d, 0xaf, 0x0, 0x43, 0xe3, 0x45, 0x2c, 0x9d, 0x9f, 0x57, 0x33, 0xb5, 0xa6, 0xad, 0xa9, 0x35, 0xc1, 0xd4, 0x1a, 0x41, 0xf5, 0x15, 0xb3, 0xf5, 0x76, 0xdf, 0xd8, 0x1c, 0xb0, 0x76, 0xff, 0xae, 0x8a, 0xe7, 0x43, 0x98, 0xdb, 0xb, 0xb0, 0xf7, 0x17, 0x70, 0xe0, 0x50, 0xc0, 0x89, 0x47, 0x1, 0x47, 0x2e, 0x5, 0x9c, 0xf9, 0xac, 0x31, 0xdc, 0x7f, 0xe8, 0x74, 0x42, 0xd6, 0x75, 0xfd, 0xd4, 0xab, 0x47, 0x8f, 0x1e, 0x3d, 0x1e, 0xa, 0x7f, 0x3b, 0x1f, 0x29, 0xf, 0xbf, 0x29, 0x8c, 0x32, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon8Name[] = { 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2d, 0x64, 0x61, 0x72, 0x6b, 0x00 }; -const unsigned char defaultDialogIcon8Length[] = { 0x38, 0x33, 0x30, 0x00 }; -const unsigned char defaultDialogIcon8Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x40, 0x8, 0x3, 0x0, 0x0, 0x0, 0x9d, 0xb7, 0x81, 0xec, 0x0, 0x0, 0x0, 0x78, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xa8, 0xe4, 0xac, 0x0, 0x0, 0x0, 0x27, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x3, 0xfb, 0xa5, 0x7e, 0xc9, 0x8e, 0xeb, 0xb2, 0x1c, 0x13, 0xc, 0x7b, 0xa4, 0x43, 0x92, 0xf6, 0xe1, 0xa0, 0x77, 0x47, 0x25, 0x8, 0xc5, 0xf2, 0xdc, 0xd6, 0xd4, 0x88, 0x6b, 0x51, 0x29, 0x27, 0xe, 0xbe, 0x37, 0x36, 0xbf, 0x58, 0xbe, 0xe, 0x1c, 0x70,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 0xb, 0x98, 0x17, 0xff, 0x39, 0x68, 0xce, 0x0, 0xcd, 0x9, 0xa0, 0xa9, 0xa1, 0xae, 0xa, 0xdb, 0x22, 0xee, 0xab, 0x81, 0x43, 0x8c, 0x3c, 0x62, 0xe8, 0x12, 0x63, 0x9f, 0x16, 0x3c, 0x8f, 0xae, 0x7, 0x37, 0xe7, 0x62, 0x42, 0xa9, 0x5c, 0xc2, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon9Name[] = { 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2d, 0x64, 0x61, 0x72, 0x6b, 0x32, 0x78, 0x00 }; -const unsigned char defaultDialogIcon9Length[] = { 0x31, 0x32, 0x37, 0x34, 0x00 }; -const unsigned char defaultDialogIcon9Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x8, 0x3, 0x0, 0x0, 0x0, 0xf4, 0xe0, 0x91, 0xf9, 0x0, 0x0, 0x0, 0x96, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x25, 0xc5, 0xa8, 0x0, 0x0, 0x0, 0x31, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x55, 0xfb, 0x3, 0xe3, 0xc, 0x43, 0x92, 0x8a, 0xd7, 0xb7, 0x82, 0x62, 0x40, 0x19, 0x48, 0x4e, 0x2b, 0xee, 0xe7, 0x39, 0xbf, 0x21, 0x97, 0x67, 0xb4, 0x33, 0xd0, 0x6c, 0x9, 0xcb, 0xf, 0xc5, 0xb1, 0xf6, 0xc2, 0xbc, 0xa8, 0x71, 0x26, 0x25, 0x14, 0x7, 0xc6, 0x3b, 0x7c, 0x5d, 0x11, 0x7b, 0x95, 0x98, 0x75, 0x67, 0x0, 0x0, 0x3, 0xe2, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xec, 0x96, 0xd9, 0x8e, 0xb3, 0x30, 0xc, 0x85, 0x5d, 0x2, 0x94, 0xb2, 0xb7, 0x65, 0x69, 0xe9, 0xbe, 0x4f, 0xb7, 0x91, 0xf2, 0xfe, 0x2f, 0xf7, 0x4b, 0xbf, 0x46, 0xc2, 0x50, 0x1a, 0x13, 0x12, 0x46, 0x73, 0xd1, 0xef, 0xda, 0xa2, 0x27, 0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0x22, 0xa1, 0xe8, 0x24, 0x54, 0xbd, 0x92, 0x34, 0x4d, 0x9e, 0x55, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0xaf, 0xc5, 0x7a, 0x0, 0xb3, 0x43, 0xaa, 0xfb, 0xee, 0x9f, 0xf1, 0x9c, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon10Name[] = { 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2d, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x00 }; -const unsigned char defaultDialogIcon10Length[] = { 0x37, 0x32, 0x30, 0x00 }; -const unsigned char defaultDialogIcon10Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x40, 0x8, 0x3, 0x0, 0x0, 0x0, 0x9d, 0xb7, 0x81, 0xec, 0x0, 0x0, 0x0, 0x75, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 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0x23, 0xf7, 0xff, 0x47, 0xd7, 0xdd, 0xf7, 0xbe, 0xb2, 0xa4, 0xfc, 0x1, 0xb3, 0x34, 0x7e, 0xa8, 0x9d, 0x48, 0x16, 0xe7, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char defaultDialogIcon11Name[] = { 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2d, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x32, 0x78, 0x00 }; -const unsigned char defaultDialogIcon11Length[] = { 0x31, 0x32, 0x36, 0x32, 0x00 }; -const unsigned char defaultDialogIcon11Data[] = { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x8, 0x3, 0x0, 0x0, 0x0, 0xf4, 0xe0, 0x91, 0xf9, 0x0, 0x0, 0x0, 0x93, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 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0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00 }; -const unsigned char *defaultDialogIcons[] = { defaultDialogIcon0Name, defaultDialogIcon0Length, defaultDialogIcon0Data, defaultDialogIcon1Name, defaultDialogIcon1Length, defaultDialogIcon1Data, defaultDialogIcon2Name, defaultDialogIcon2Length, defaultDialogIcon2Data, defaultDialogIcon3Name, defaultDialogIcon3Length, defaultDialogIcon3Data, defaultDialogIcon4Name, defaultDialogIcon4Length, defaultDialogIcon4Data, defaultDialogIcon5Name, defaultDialogIcon5Length, defaultDialogIcon5Data, defaultDialogIcon6Name, defaultDialogIcon6Length, defaultDialogIcon6Data, defaultDialogIcon7Name, defaultDialogIcon7Length, defaultDialogIcon7Data, defaultDialogIcon8Name, defaultDialogIcon8Length, defaultDialogIcon8Data, defaultDialogIcon9Name, defaultDialogIcon9Length, defaultDialogIcon9Data, defaultDialogIcon10Name, defaultDialogIcon10Length, defaultDialogIcon10Data, defaultDialogIcon11Name, defaultDialogIcon11Length, defaultDialogIcon11Data, 0x00 }; diff --git a/v2/internal/ffenestri/effectstructs_windows.h b/v2/internal/ffenestri/effectstructs_windows.h deleted file mode 100644 index 8313c4538..000000000 --- a/v2/internal/ffenestri/effectstructs_windows.h +++ /dev/null @@ -1,64 +0,0 @@ -// Credit: https://gist.github.com/ysc3839/b08d2bff1c7dacde529bed1d37e85ccf -#pragma once - -typedef enum _WINDOWCOMPOSITIONATTRIB -{ - WCA_UNDEFINED = 0, - WCA_NCRENDERING_ENABLED = 1, - WCA_NCRENDERING_POLICY = 2, - WCA_TRANSITIONS_FORCEDISABLED = 3, - WCA_ALLOW_NCPAINT = 4, - WCA_CAPTION_BUTTON_BOUNDS = 5, - WCA_NONCLIENT_RTL_LAYOUT = 6, - WCA_FORCE_ICONIC_REPRESENTATION = 7, - WCA_EXTENDED_FRAME_BOUNDS = 8, - WCA_HAS_ICONIC_BITMAP = 9, - WCA_THEME_ATTRIBUTES = 10, - WCA_NCRENDERING_EXILED = 11, - WCA_NCADORNMENTINFO = 12, - WCA_EXCLUDED_FROM_LIVEPREVIEW = 13, - WCA_VIDEO_OVERLAY_ACTIVE = 14, - WCA_FORCE_ACTIVEWINDOW_APPEARANCE = 15, - WCA_DISALLOW_PEEK = 16, - WCA_CLOAK = 17, - WCA_CLOAKED = 18, - WCA_ACCENT_POLICY = 19, - WCA_FREEZE_REPRESENTATION = 20, - WCA_EVER_UNCLOAKED = 21, - WCA_VISUAL_OWNER = 22, - WCA_HOLOGRAPHIC = 23, - WCA_EXCLUDED_FROM_DDA = 24, - WCA_PASSIVEUPDATEMODE = 25, - WCA_USEDARKMODECOLORS = 26, - WCA_LAST = 27 -} WINDOWCOMPOSITIONATTRIB; - -typedef struct _WINDOWCOMPOSITIONATTRIBDATA -{ - WINDOWCOMPOSITIONATTRIB Attrib; - PVOID pvData; - SIZE_T cbData; -} WINDOWCOMPOSITIONATTRIBDATA; - -typedef enum _ACCENT_STATE -{ - ACCENT_DISABLED = 0, - ACCENT_ENABLE_GRADIENT = 1, - ACCENT_ENABLE_TRANSPARENTGRADIENT = 2, - ACCENT_ENABLE_BLURBEHIND = 3, - ACCENT_ENABLE_ACRYLICBLURBEHIND = 4, // RS4 1803 - ACCENT_ENABLE_HOSTBACKDROP = 5, // RS5 1809 - ACCENT_INVALID_STATE = 6 -} ACCENT_STATE; - -typedef struct _ACCENT_POLICY -{ - ACCENT_STATE AccentState; - DWORD AccentFlags; - DWORD GradientColor; - DWORD AnimationId; -} ACCENT_POLICY; - -typedef BOOL (WINAPI *pfnGetWindowCompositionAttribute)(HWND, WINDOWCOMPOSITIONATTRIBDATA*); - -typedef BOOL (WINAPI *pfnSetWindowCompositionAttribute)(HWND, WINDOWCOMPOSITIONATTRIBDATA*); \ No newline at end of file diff --git a/v2/internal/ffenestri/ffenestri.go b/v2/internal/ffenestri/ffenestri.go deleted file mode 100644 index 15205b727..000000000 --- a/v2/internal/ffenestri/ffenestri.go +++ /dev/null @@ -1,178 +0,0 @@ -package ffenestri - -import ( - "runtime" - "strings" - "unsafe" - - "github.com/wailsapp/wails/v2/internal/menumanager" - - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/messagedispatcher" - "github.com/wailsapp/wails/v2/pkg/options" -) - -/* -#cgo linux CFLAGS: -DFFENESTRI_LINUX=1 -#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 - -#cgo darwin CFLAGS: -DFFENESTRI_DARWIN=1 -#cgo darwin LDFLAGS: -framework WebKit -lobjc - -#cgo windows CXXFLAGS: -std=c++11 -#cgo windows,amd64 LDFLAGS: -L./windows/x64 -lWebView2Loader -lgdi32 -lole32 -lShlwapi -luser32 -loleaut32 -ldwmapi - -#include -#include "ffenestri.h" -*/ -import "C" - -// Application is our main application object -type Application struct { - config *options.App - memory []unsafe.Pointer - - // This is the main app pointer - app *C.struct_Application - - // Manages menus - menuManager *menumanager.Manager - - // Logger - logger logger.CustomLogger -} - -func (a *Application) saveMemoryReference(mem unsafe.Pointer) { - a.memory = append(a.memory, mem) -} - -func (a *Application) string2CString(str string) *C.char { - result := C.CString(str) - a.saveMemoryReference(unsafe.Pointer(result)) - return result -} - -func init() { - runtime.LockOSThread() -} - -// NewApplicationWithConfig creates a new application based on the given config -func NewApplicationWithConfig(config *options.App, logger *logger.Logger, menuManager *menumanager.Manager) *Application { - return &Application{ - config: config, - logger: logger.CustomLogger("Ffenestri"), - menuManager: menuManager, - } -} - -func (a *Application) freeMemory() { - for _, mem := range a.memory { - // fmt.Printf("Freeing memory: %+v\n", mem) - C.free(mem) - } -} - -// bool2Cint converts a Go boolean to a C integer -func (a *Application) bool2Cint(value bool) C.int { - if value { - return C.int(1) - } - return C.int(0) -} - -// dispatcher is the interface to send messages to -var dispatcher *messagedispatcher.DispatchClient - -// Dispatcher is what we register out client with -type Dispatcher interface { - RegisterClient(client messagedispatcher.Client) *messagedispatcher.DispatchClient -} - -// DispatchClient is the means for passing messages to the backend -type DispatchClient interface { - SendMessage(string) -} - -func intToColour(colour int) (C.int, C.int, C.int, C.int) { - var alpha = C.int(colour & 0xFF) - var blue = C.int((colour >> 8) & 0xFF) - var green = C.int((colour >> 16) & 0xFF) - var red = C.int((colour >> 24) & 0xFF) - return red, green, blue, alpha -} - -// Run the application -func (a *Application) Run(incomingDispatcher Dispatcher, bindings string, debug bool) error { - title := a.string2CString(a.config.Title) - width := C.int(a.config.Width) - height := C.int(a.config.Height) - resizable := a.bool2Cint(!a.config.DisableResize) - devtools := a.bool2Cint(a.config.DevTools) - fullscreen := a.bool2Cint(a.config.Fullscreen) - startHidden := a.bool2Cint(a.config.StartHidden) - logLevel := C.int(a.config.LogLevel) - hideWindowOnClose := a.bool2Cint(a.config.HideWindowOnClose) - app := C.NewApplication(title, width, height, resizable, devtools, fullscreen, startHidden, logLevel, hideWindowOnClose) - - // Save app reference - a.app = (*C.struct_Application)(app) - - // Set Min Window Size - minWidth := C.int(a.config.MinWidth) - minHeight := C.int(a.config.MinHeight) - C.SetMinWindowSize(a.app, minWidth, minHeight) - - // Set Max Window Size - maxWidth := C.int(a.config.MaxWidth) - maxHeight := C.int(a.config.MaxHeight) - C.SetMaxWindowSize(a.app, maxWidth, maxHeight) - - // Set debug if needed - C.SetDebug(app, a.bool2Cint(debug)) - - if a.config.Frameless { - C.DisableFrame(a.app) - } - - if a.config.RGBA != 0 { - r, g, b, alpha := intToColour(a.config.RGBA) - C.SetColour(a.app, r, g, b, alpha) - } - - // Escape bindings so C doesn't freak out - bindings = strings.ReplaceAll(bindings, `"`, `\"`) - - // Set bindings - C.SetBindings(app, a.string2CString(bindings)) - - // save the dispatcher in a package variable so that the C callbacks - // can access it - dispatcher = incomingDispatcher.RegisterClient(newClient(a)) - - // Process platform settings - err := a.processPlatformSettings() - if err != nil { - return err - } - - // Check we could initialise the application - if app != nil { - // Yes - Save memory reference and run app, cleaning up afterwards - a.saveMemoryReference(unsafe.Pointer(app)) - C.Run(app, 0, nil) - } else { - // Oh no! We couldn't initialise the application - a.logger.Fatal("Cannot initialise Application.") - } - //println("\n\n\n\n\n\nhererererer\n\n\n\n") - a.freeMemory() - return nil -} - -// messageFromWindowCallback is called by any messages sent in -// webkit to window.external.invoke. It relays the message on to -// the dispatcher. -//export messageFromWindowCallback -func messageFromWindowCallback(data *C.char) { - dispatcher.DispatchMessage(C.GoString(data)) -} diff --git a/v2/internal/ffenestri/ffenestri.h b/v2/internal/ffenestri/ffenestri.h deleted file mode 100644 index 1bbc9d907..000000000 --- a/v2/internal/ffenestri/ffenestri.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef __FFENESTRI_H__ -#define __FFENESTRI_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -struct Application; - -extern struct Application *NewApplication(const char *title, int width, int height, int resizable, int devtools, int fullscreen, int startHidden, int logLevel, int hideWindowOnClose); -extern void SetMinWindowSize(struct Application*, int minWidth, int minHeight); -extern void SetMaxWindowSize(struct Application*, int maxWidth, int maxHeight); -extern void Run(struct Application*, int argc, char **argv); -extern void DestroyApplication(struct Application*); -extern void SetDebug(struct Application*, int flag); -extern void SetBindings(struct Application*, const char *bindings); -extern void ExecJS(struct Application*, const char *script); -extern void Hide(struct Application*); -extern void Show(struct Application*); -extern void Center(struct Application*); -extern void Maximise(struct Application*); -extern void Unmaximise(struct Application*); -extern void ToggleMaximise(struct Application*); -extern void Minimise(struct Application*); -extern void Unminimise(struct Application*); -extern void ToggleMinimise(struct Application*); -extern void SetColour(struct Application*, int red, int green, int blue, int alpha); -extern void SetSize(struct Application*, int width, int height); -extern void SetPosition(struct Application*, int x, int y); -extern void Quit(struct Application*); -extern void SetTitle(struct Application*, const char *title); -extern void Fullscreen(struct Application*); -extern void UnFullscreen(struct Application*); -extern void ToggleFullscreen(struct Application*); -extern void DisableFrame(struct Application*); -extern void OpenDialog(struct Application*, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int allowFiles, int allowDirs, int allowMultiple, int showHiddenFiles, int canCreateDirectories, int resolvesAliases, int treatPackagesAsDirectories); -extern void SaveDialog(struct Application*, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int showHiddenFiles, int canCreateDirectories, int treatPackagesAsDirectories); -extern void MessageDialog(struct Application*, char *callbackID, char *type, char *title, char *message, char *icon, char *button1, char *button2, char *button3, char *button4, char *defaultButton, char *cancelButton); -extern void DarkModeEnabled(struct Application*, char *callbackID); -extern void SetApplicationMenu(struct Application*, const char *); -extern void AddTrayMenu(struct Application*, const char *menuTrayJSON); -extern void SetTrayMenu(struct Application*, const char *menuTrayJSON); -extern void DeleteTrayMenuByID(struct Application*, const char *id); -extern void UpdateTrayMenuLabel(struct Application*, const char* JSON); -extern void AddContextMenu(struct Application*, char *contextMenuJSON); -extern void UpdateContextMenu(struct Application*, char *contextMenuJSON); -extern void WebviewIsTransparent(struct Application*); -extern void WindowIsTranslucent(struct Application*); -extern void* GetWindowHandle(struct Application*); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/v2/internal/ffenestri/ffenestri_client.go b/v2/internal/ffenestri/ffenestri_client.go deleted file mode 100644 index 73344754e..000000000 --- a/v2/internal/ffenestri/ffenestri_client.go +++ /dev/null @@ -1,268 +0,0 @@ -//go:build !windows -// +build !windows - -package ffenestri - -/* -#include "ffenestri.h" -*/ -import "C" - -import ( - goruntime "runtime" - "strconv" - "strings" - - "github.com/wailsapp/wails/v2/pkg/runtime" - - "github.com/wailsapp/wails/v2/internal/logger" -) - -// Client is our implementation of messageDispatcher.Client -type Client struct { - app *Application - logger logger.CustomLogger -} - -func newClient(app *Application) *Client { - return &Client{ - app: app, - logger: app.logger, - } -} - -// Quit the application -func (c *Client) Quit() { - c.app.logger.Trace("Got shutdown message") - C.Quit(c.app.app) -} - -// NotifyEvent will pass on the event message to the frontend -func (c *Client) NotifyEvent(message string) { - eventMessage := `window.wails._.Notify(` + strconv.Quote(message) + `);` - c.app.logger.Trace("eventMessage = %+v", eventMessage) - C.ExecJS(c.app.app, c.app.string2CString(eventMessage)) -} - -// CallResult contains the result of the call from JS -func (c *Client) CallResult(message string) { - callbackMessage := `window.wails._.Callback(` + strconv.Quote(message) + `);` - c.app.logger.Trace("callbackMessage = %+v", callbackMessage) - C.ExecJS(c.app.app, c.app.string2CString(callbackMessage)) -} - -// WindowSetTitle sets the window title to the given string -func (c *Client) WindowSetTitle(title string) { - C.SetTitle(c.app.app, c.app.string2CString(title)) -} - -// WindowFullscreen will set the window to be fullscreen -func (c *Client) WindowFullscreen() { - C.Fullscreen(c.app.app) -} - -// WindowUnfullscreen will unfullscreen the window -func (c *Client) WindowUnfullscreen() { - C.UnFullscreen(c.app.app) -} - -// WindowShow will show the window -func (c *Client) WindowShow() { - C.Show(c.app.app) -} - -// WindowHide will hide the window -func (c *Client) WindowHide() { - C.Hide(c.app.app) -} - -// WindowCenter will hide the window -func (c *Client) WindowCenter() { - C.Center(c.app.app) -} - -// WindowMaximise will maximise the window -func (c *Client) WindowMaximise() { - C.Maximise(c.app.app) -} - -// WindowMinimise will minimise the window -func (c *Client) WindowMinimise() { - C.Minimise(c.app.app) -} - -// WindowUnmaximise will unmaximise the window -func (c *Client) WindowUnmaximise() { - C.Unmaximise(c.app.app) -} - -// WindowUnminimise will unminimise the window -func (c *Client) WindowUnminimise() { - C.Unminimise(c.app.app) -} - -// WindowPosition will position the window to x,y on the -// monitor that the window is mostly on -func (c *Client) WindowPosition(x int, y int) { - C.SetPosition(c.app.app, C.int(x), C.int(y)) -} - -// WindowSize will resize the window to the given -// width and height -func (c *Client) WindowSize(width int, height int) { - C.SetSize(c.app.app, C.int(width), C.int(height)) -} - -func (c *Client) WindowSetMinSize(width int, height int) { - C.SetMinWindowSize(c.app.app, C.int(width), C.int(height)) -} - -func (c *Client) WindowSetMaxSize(width int, height int) { - C.SetMaxWindowSize(c.app.app, C.int(width), C.int(height)) -} - -// WindowSetColour sets the window colour -func (c *Client) WindowSetColour(colour int) { - r, g, b, a := intToColour(colour) - C.SetColour(c.app.app, r, g, b, a) -} - -// OpenFileDialog will open a dialog with the given title and filter -func (c *Client) OpenFileDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) { - filters := []string{} - if goruntime.GOOS == "darwin" { - for _, filter := range dialogOptions.Filters { - filters = append(filters, strings.Split(filter.Pattern, ",")...) - } - } - C.OpenDialog(c.app.app, - c.app.string2CString(callbackID), - c.app.string2CString(dialogOptions.Title), - c.app.string2CString(strings.Join(filters, ";")), - c.app.string2CString(dialogOptions.DefaultFilename), - c.app.string2CString(dialogOptions.DefaultDirectory), - c.app.bool2Cint(false), - c.app.bool2Cint(dialogOptions.ShowHiddenFiles), - c.app.bool2Cint(dialogOptions.CanCreateDirectories), - c.app.bool2Cint(dialogOptions.ResolvesAliases), - c.app.bool2Cint(dialogOptions.TreatPackagesAsDirectories), - ) -} - -// OpenDirectoryDialog will open a dialog with the given title and filter -func (c *Client) OpenDirectoryDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) { - filters := []string{} - if goruntime.GOOS == "darwin" { - for _, filter := range dialogOptions.Filters { - filters = append(filters, strings.Split(filter.Pattern, ",")...) - } - } - C.OpenDialog(c.app.app, - c.app.string2CString(callbackID), - c.app.string2CString(dialogOptions.Title), - c.app.string2CString(strings.Join(filters, ";")), - c.app.string2CString(dialogOptions.DefaultFilename), - c.app.string2CString(dialogOptions.DefaultDirectory), - c.app.bool2Cint(false), // Files - c.app.bool2Cint(true), // Directories - c.app.bool2Cint(false), // Multiple - c.app.bool2Cint(dialogOptions.ShowHiddenFiles), - c.app.bool2Cint(dialogOptions.CanCreateDirectories), - c.app.bool2Cint(dialogOptions.ResolvesAliases), - c.app.bool2Cint(dialogOptions.TreatPackagesAsDirectories), - ) -} - -// OpenMultipleFilesDialog will open a dialog with the given title and filter -func (c *Client) OpenMultipleFilesDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) { - filters := []string{} - if goruntime.GOOS == "darwin" { - for _, filter := range dialogOptions.Filters { - filters = append(filters, strings.Split(filter.Pattern, ",")...) - } - } - C.OpenDialog(c.app.app, - c.app.string2CString(callbackID), - c.app.string2CString(dialogOptions.Title), - c.app.string2CString(strings.Join(filters, ";")), - c.app.string2CString(dialogOptions.DefaultFilename), - c.app.string2CString(dialogOptions.DefaultDirectory), - c.app.bool2Cint(true), - c.app.bool2Cint(dialogOptions.ShowHiddenFiles), - c.app.bool2Cint(dialogOptions.CanCreateDirectories), - c.app.bool2Cint(dialogOptions.ResolvesAliases), - c.app.bool2Cint(dialogOptions.TreatPackagesAsDirectories), - ) -} - -// SaveDialog will open a dialog with the given title and filter -func (c *Client) SaveDialog(dialogOptions *runtime.SaveDialogOptions, callbackID string) { - filters := []string{} - if goruntime.GOOS == "darwin" { - for _, filter := range dialogOptions.Filters { - filters = append(filters, strings.Split(filter.Pattern, ",")...) - } - } - C.SaveDialog(c.app.app, - c.app.string2CString(callbackID), - c.app.string2CString(dialogOptions.Title), - c.app.string2CString(strings.Join(filters, ";")), - c.app.string2CString(dialogOptions.DefaultFilename), - c.app.string2CString(dialogOptions.DefaultDirectory), - c.app.bool2Cint(dialogOptions.ShowHiddenFiles), - c.app.bool2Cint(dialogOptions.CanCreateDirectories), - c.app.bool2Cint(dialogOptions.TreatPackagesAsDirectories), - ) -} - -// MessageDialog will open a message dialog with the given options -func (c *Client) MessageDialog(dialogOptions runtime.MessageDialogOptions, callbackID string) { - - // Sanity check button length - if len(dialogOptions.Buttons) > 4 { - c.app.logger.Error("Given %d message dialog buttons. Maximum is 4", len(dialogOptions.Buttons)) - return - } - - // Process buttons - buttons := []string{"", "", "", ""} - for i, button := range dialogOptions.Buttons { - buttons[i] = button - } - - C.MessageDialog(c.app.app, - c.app.string2CString(callbackID), - c.app.string2CString(string(dialogOptions.Type)), - c.app.string2CString(dialogOptions.Title), - c.app.string2CString(dialogOptions.Message), - c.app.string2CString(buttons[0]), - c.app.string2CString(buttons[1]), - c.app.string2CString(buttons[2]), - c.app.string2CString(buttons[3]), - c.app.string2CString(dialogOptions.DefaultButton), - c.app.string2CString(dialogOptions.CancelButton)) -} - -func (c *Client) DarkModeEnabled(callbackID string) { - C.DarkModeEnabled(c.app.app, c.app.string2CString(callbackID)) -} - -func (c *Client) SetApplicationMenu(applicationMenuJSON string) { - C.SetApplicationMenu(c.app.app, c.app.string2CString(applicationMenuJSON)) -} - -func (c *Client) SetTrayMenu(trayMenuJSON string) { - C.SetTrayMenu(c.app.app, c.app.string2CString(trayMenuJSON)) -} - -func (c *Client) UpdateTrayMenuLabel(JSON string) { - C.UpdateTrayMenuLabel(c.app.app, c.app.string2CString(JSON)) -} - -func (c *Client) UpdateContextMenu(contextMenuJSON string) { - C.UpdateContextMenu(c.app.app, c.app.string2CString(contextMenuJSON)) -} - -func (c *Client) DeleteTrayMenuByID(id string) { - C.DeleteTrayMenuByID(c.app.app, c.app.string2CString(id)) -} diff --git a/v2/internal/ffenestri/ffenestri_client_windows.go b/v2/internal/ffenestri/ffenestri_client_windows.go deleted file mode 100644 index a9a6cf042..000000000 --- a/v2/internal/ffenestri/ffenestri_client_windows.go +++ /dev/null @@ -1,310 +0,0 @@ -//go:build windows -// +build windows - -package ffenestri - -/* -#include "ffenestri.h" -*/ -import "C" - -import ( - "encoding/json" - "log" - "strconv" - "syscall" - - "github.com/wailsapp/wails/v2/internal/go-common-file-dialog/cfd" - "github.com/wailsapp/wails/v2/pkg/runtime" - "golang.org/x/sys/windows" - - "github.com/wailsapp/wails/v2/internal/logger" -) - -// Client is our implementation of messageDispatcher.Client -type Client struct { - app *Application - logger logger.CustomLogger -} - -func newClient(app *Application) *Client { - return &Client{ - app: app, - logger: app.logger, - } -} - -// Quit the application -func (c *Client) Quit() { - c.app.logger.Trace("Got shutdown message") - C.Quit(c.app.app) -} - -// NotifyEvent will pass on the event message to the frontend -func (c *Client) NotifyEvent(message string) { - eventMessage := `window.wails._.Notify(` + strconv.Quote(message) + `);` - c.app.logger.Trace("eventMessage = %+v", eventMessage) - C.ExecJS(c.app.app, c.app.string2CString(eventMessage)) -} - -// CallResult contains the result of the call from JS -func (c *Client) CallResult(message string) { - callbackMessage := `window.wails._.Callback(` + strconv.Quote(message) + `);` - c.app.logger.Trace("callbackMessage = %+v", callbackMessage) - C.ExecJS(c.app.app, c.app.string2CString(callbackMessage)) -} - -// WindowSetTitle sets the window title to the given string -func (c *Client) WindowSetTitle(title string) { - C.SetTitle(c.app.app, c.app.string2CString(title)) -} - -// WindowFullscreen will set the window to be fullscreen -func (c *Client) WindowFullscreen() { - C.Fullscreen(c.app.app) -} - -// WindowUnfullscreen will unfullscreen the window -func (c *Client) WindowUnfullscreen() { - C.UnFullscreen(c.app.app) -} - -// WindowShow will show the window -func (c *Client) WindowShow() { - C.Show(c.app.app) -} - -// WindowHide will hide the window -func (c *Client) WindowHide() { - C.Hide(c.app.app) -} - -// WindowCenter will hide the window -func (c *Client) WindowCenter() { - C.Center(c.app.app) -} - -// WindowMaximise will maximise the window -func (c *Client) WindowMaximise() { - C.Maximise(c.app.app) -} - -// WindowMinimise will minimise the window -func (c *Client) WindowMinimise() { - C.Minimise(c.app.app) -} - -// WindowUnmaximise will unmaximise the window -func (c *Client) WindowUnmaximise() { - C.Unmaximise(c.app.app) -} - -// WindowUnminimise will unminimise the window -func (c *Client) WindowUnminimise() { - C.Unminimise(c.app.app) -} - -// WindowPosition will position the window to x,y on the -// monitor that the window is mostly on -func (c *Client) WindowPosition(x int, y int) { - C.SetPosition(c.app.app, C.int(x), C.int(y)) -} - -// WindowSize will resize the window to the given -// width and height -func (c *Client) WindowSize(width int, height int) { - C.SetSize(c.app.app, C.int(width), C.int(height)) -} - -// WindowSetMinSize sets the minimum window size -func (c *Client) WindowSetMinSize(width int, height int) { - C.SetMinWindowSize(c.app.app, C.int(width), C.int(height)) -} - -// WindowSetMaxSize sets the maximum window size -func (c *Client) WindowSetMaxSize(width int, height int) { - C.SetMaxWindowSize(c.app.app, C.int(width), C.int(height)) -} - -// WindowSetColour sets the window colour -func (c *Client) WindowSetColour(colour int) { - r, g, b, a := intToColour(colour) - C.SetColour(c.app.app, r, g, b, a) -} - -func convertFilters(filters []runtime.FileFilter) []cfd.FileFilter { - var result []cfd.FileFilter - for _, filter := range filters { - result = append(result, cfd.FileFilter(filter)) - } - return result -} - -// OpenFileDialog will open a dialog with the given title and filter -func (c *Client) OpenFileDialog(options runtime.OpenDialogOptions, callbackID string) { - config := cfd.DialogConfig{ - Folder: options.DefaultDirectory, - FileFilters: convertFilters(options.Filters), - FileName: options.DefaultFilename, - } - thisdialog, err := cfd.NewOpenFileDialog(config) - if err != nil { - log.Fatal(err) - } - thisdialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app))) - defer func(thisdialog cfd.OpenFileDialog) { - err := thisdialog.Release() - if err != nil { - log.Fatal(err) - } - }(thisdialog) - result, err := thisdialog.ShowAndGetResult() - if err != nil && err != cfd.ErrorCancelled { - log.Fatal(err) - } - - dispatcher.DispatchMessage("DO" + callbackID + "|" + result) -} - -// OpenDirectoryDialog will open a dialog with the given title and filter -func (c *Client) OpenDirectoryDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) { - config := cfd.DialogConfig{ - Title: dialogOptions.Title, - Role: "PickFolder", - Folder: dialogOptions.DefaultDirectory, - } - thisDialog, err := cfd.NewSelectFolderDialog(config) - if err != nil { - log.Fatal() - } - thisDialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app))) - defer func(thisDialog cfd.SelectFolderDialog) { - err := thisDialog.Release() - if err != nil { - log.Fatal(err) - } - }(thisDialog) - result, err := thisDialog.ShowAndGetResult() - if err != nil && err != cfd.ErrorCancelled { - log.Fatal(err) - } - dispatcher.DispatchMessage("DD" + callbackID + "|" + result) -} - -// OpenMultipleFilesDialog will open a dialog with the given title and filter -func (c *Client) OpenMultipleFilesDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) { - config := cfd.DialogConfig{ - Title: dialogOptions.Title, - Role: "OpenMultipleFiles", - FileFilters: convertFilters(dialogOptions.Filters), - FileName: dialogOptions.DefaultFilename, - Folder: dialogOptions.DefaultDirectory, - } - thisdialog, err := cfd.NewOpenMultipleFilesDialog(config) - if err != nil { - log.Fatal(err) - } - thisdialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app))) - defer func(thisdialog cfd.OpenMultipleFilesDialog) { - err := thisdialog.Release() - if err != nil { - log.Fatal(err) - } - }(thisdialog) - result, err := thisdialog.ShowAndGetResults() - if err != nil && err != cfd.ErrorCancelled { - log.Fatal(err) - } - resultJSON, err := json.Marshal(result) - if err != nil { - log.Fatal(err) - } - dispatcher.DispatchMessage("D*" + callbackID + "|" + string(resultJSON)) -} - -// SaveDialog will open a dialog with the given title and filter -func (c *Client) SaveDialog(dialogOptions runtime.SaveDialogOptions, callbackID string) { - saveDialog, err := cfd.NewSaveFileDialog(cfd.DialogConfig{ - Title: dialogOptions.Title, - Role: "SaveFile", - FileFilters: convertFilters(dialogOptions.Filters), - FileName: dialogOptions.DefaultFilename, - Folder: dialogOptions.DefaultDirectory, - }) - if err != nil { - log.Fatal(err) - } - saveDialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app))) - err = saveDialog.Show() - if err != nil { - log.Fatal(err) - } - result, err := saveDialog.GetResult() - if err != nil && err != cfd.ErrorCancelled { - log.Fatal(err) - } - dispatcher.DispatchMessage("DS" + callbackID + "|" + result) -} - -// MessageDialog will open a message dialog with the given options -func (c *Client) MessageDialog(options runtime.MessageDialogOptions, callbackID string) { - - title, err := syscall.UTF16PtrFromString(options.Title) - if err != nil { - log.Fatal(err) - } - message, err := syscall.UTF16PtrFromString(options.Message) - if err != nil { - log.Fatal(err) - } - var flags uint32 - switch options.Type { - case runtime.InfoDialog: - flags = windows.MB_OK | windows.MB_ICONINFORMATION - case runtime.ErrorDialog: - flags = windows.MB_ICONERROR | windows.MB_OK - case runtime.QuestionDialog: - flags = windows.MB_YESNO - case runtime.WarningDialog: - flags = windows.MB_OK | windows.MB_ICONWARNING - } - - button, _ := windows.MessageBox(windows.HWND(C.GetWindowHandle(c.app.app)), message, title, flags|windows.MB_SYSTEMMODAL) - // This maps MessageBox return values to strings - responses := []string{"", "Ok", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No", "", "", "Try Again", "Continue"} - result := "Error" - if int(button) < len(responses) { - result = responses[button] - } - dispatcher.DispatchMessage("DM" + callbackID + "|" + result) -} - -// DarkModeEnabled sets the application to use dark mode -func (c *Client) DarkModeEnabled(callbackID string) { - C.DarkModeEnabled(c.app.app, c.app.string2CString(callbackID)) -} - -// SetApplicationMenu sets the application menu -func (c *Client) SetApplicationMenu(_ string) { - c.updateApplicationMenu() -} - -// SetTrayMenu sets the tray menu -func (c *Client) SetTrayMenu(trayMenuJSON string) { - C.SetTrayMenu(c.app.app, c.app.string2CString(trayMenuJSON)) -} - -// UpdateTrayMenuLabel updates a tray menu label -func (c *Client) UpdateTrayMenuLabel(JSON string) { - C.UpdateTrayMenuLabel(c.app.app, c.app.string2CString(JSON)) -} - -// UpdateContextMenu will update the current context menu -func (c *Client) UpdateContextMenu(contextMenuJSON string) { - C.UpdateContextMenu(c.app.app, c.app.string2CString(contextMenuJSON)) -} - -// DeleteTrayMenuByID will remove a tray menu based on the given id -func (c *Client) DeleteTrayMenuByID(id string) { - C.DeleteTrayMenuByID(c.app.app, c.app.string2CString(id)) -} diff --git a/v2/internal/ffenestri/ffenestri_darwin.c b/v2/internal/ffenestri/ffenestri_darwin.c deleted file mode 100644 index 1bdb49176..000000000 --- a/v2/internal/ffenestri/ffenestri_darwin.c +++ /dev/null @@ -1,1817 +0,0 @@ - -#ifdef FFENESTRI_DARWIN - -#include "ffenestri_darwin.h" -#include "menu_darwin.h" -#include "contextmenus_darwin.h" -#include "traymenustore_darwin.h" -#include "traymenu_darwin.h" - -// References to assets -#include "assets.h" -extern const unsigned char runtime; - -// Dialog icons -extern const unsigned char *defaultDialogIcons[]; -#include "userdialogicons.h" - -// MAIN DEBUG FLAG -int debug; - -// A cache for all our dialog icons -struct hashmap_s dialogIconCache; - -// Dispatch Method -typedef void (^dispatchMethod)(void); - -// Message Dialog -void MessageDialog(struct Application *app, char *callbackID, char *type, char *title, char *message, char *icon, char *button1, char *button2, char *button3, char *button4, char *defaultButton, char *cancelButton); - -TrayMenuStore *TrayMenuStoreSingleton; - -// dispatch will execute the given `func` pointer -void dispatch(dispatchMethod func) { - dispatch_async(dispatch_get_main_queue(), func); -} -// yes command simply returns YES! -BOOL yes(id self, SEL cmd) -{ - return YES; -} - -// no command simply returns NO! -BOOL no(id self, SEL cmd) -{ - return NO; -} - -// Prints a hashmap entry -int hashmap_log(void *const context, struct hashmap_element_s *const e) { - printf("%s: %p ", (char*)e->key, e->data); - return 0; -} - -void filelog(const char *message) { - FILE *fp = fopen("/tmp/wailslog.txt", "ab"); - if (fp != NULL) - { - fputs(message, fp); - fclose(fp); - } -} - -// The delegate class for tray menus -Class trayMenuDelegateClass; - -// Utility function to visualise a hashmap -void dumpHashmap(const char *name, struct hashmap_s *hashmap) { - printf("%s = { ", name); - if (0!=hashmap_iterate_pairs(hashmap, hashmap_log, NULL)) { - fprintf(stderr, "Failed to dump hashmap entries\n"); - } - printf("}\n"); -} - -extern void messageFromWindowCallback(const char *); -typedef void (*ffenestriCallback)(const char *); - -void HideMouse() { - msg_reg(c("NSCursor"), s("hide")); -} - -void ShowMouse() { - msg_reg(c("NSCursor"), s("unhide")); -} - -OSVersion getOSVersion() { - id processInfo = msg_reg(c("NSProcessInfo"), s("processInfo")); - return GET_OSVERSION(processInfo); -} - -struct Application { - - // Cocoa data - id application; - id delegate; - id windowDelegate; - id mainWindow; - id wkwebview; - id manager; - id config; - id mouseEvent; - id mouseDownMonitor; - id mouseUpMonitor; - int activationPolicy; - id pool; - - // Window Data - const char *title; - int width; - int height; - int minWidth; - int minHeight; - int maxWidth; - int maxHeight; - int resizable; - int devtools; - int fullscreen; - CGFloat red; - CGFloat green; - CGFloat blue; - CGFloat alpha; - int webviewIsTranparent; - const char *appearance; - int decorations; - int logLevel; - int hideWindowOnClose; - - // Features - int frame; - int startHidden; - int maximised; - int titlebarAppearsTransparent; - int hideTitle; - int hideTitleBar; - int fullSizeContent; - int useToolBar; - int hideToolbarSeparator; - int WindowIsTranslucent; - int hasURLHandlers; - const char *startupURL; - - // Menu - Menu *applicationMenu; - - // Context Menus - ContextMenuStore *contextMenuStore; - - // Callback - ffenestriCallback sendMessageToBackend; - - // Bindings - const char *bindings; - - // shutting down flag - bool shuttingDown; - - // Running flag - bool running; - -}; - -// Debug works like sprintf but mutes if the global debug flag is true -// Credit: https://stackoverflow.com/a/20639708 - -#define MAXMESSAGE 1024*10 -char logbuffer[MAXMESSAGE]; - -void Debug(struct Application *app, const char *message, ... ) { - if ( debug ) { - const char *temp = concat("LTFfenestri (C) | ", message); - va_list args; - va_start(args, message); - vsnprintf(logbuffer, MAXMESSAGE, temp, args); - app->sendMessageToBackend(&logbuffer[0]); - MEMFREE(temp); - va_end(args); - } -} - -void Error(struct Application *app, const char *message, ... ) { - const char *temp = concat("LEFfenestri (C) | ", message); - va_list args; - va_start(args, message); - vsnprintf(logbuffer, MAXMESSAGE, temp, args); - app->sendMessageToBackend(&logbuffer[0]); - MEMFREE(temp); - va_end(args); -} - -void Fatal(struct Application *app, const char *message, ... ) { - const char *temp = concat("LFFfenestri (C) | ", message); - va_list args; - va_start(args, message); - vsnprintf(logbuffer, MAXMESSAGE, temp, args); - app->sendMessageToBackend(&logbuffer[0]); - MEMFREE(temp); - va_end(args); -} - -// Requires NSString input EG lookupStringConstant(str("NSFontAttributeName")) -void* lookupStringConstant(id constantName) { - void ** dataPtr = CFBundleGetDataPointerForName(CFBundleGetBundleWithIdentifier((CFStringRef)str("com.apple.AppKit")), (CFStringRef) constantName); - return (dataPtr ? *dataPtr : nil); -} - -bool isRetina(struct Application *app) { - CGFloat scale = GET_BACKINGSCALEFACTOR(app->mainWindow); - if( (int)scale == 1 ) { - return false; - } - return true; -} - -void TitlebarAppearsTransparent(struct Application* app) { - app->titlebarAppearsTransparent = 1; -} - -void HideTitle(struct Application *app) { - app->hideTitle = 1; -} - -void HideTitleBar(struct Application *app) { - app->hideTitleBar = 1; -} - -void HideToolbarSeparator(struct Application *app) { - app->hideToolbarSeparator = 1; -} - -void UseToolbar(struct Application *app) { - app->useToolBar = 1; -} - -// WebviewIsTransparent will make the webview transparent -// revealing the Cocoa window underneath -void WebviewIsTransparent(struct Application *app) { - app->webviewIsTranparent = 1; -} - -// SetAppearance will set the window's Appearance to the -// given value -void SetAppearance(struct Application *app, const char *appearance) { - app->appearance = appearance; -} - - -void applyWindowColour(struct Application *app) { - // Apply the colour only if the window has been created - if( app->mainWindow != NULL ) { - ON_MAIN_THREAD( - id colour = ((id(*)(id, SEL, CGFloat, CGFloat, CGFloat, CGFloat))objc_msgSend)(c("NSColor"), s("colorWithCalibratedRed:green:blue:alpha:"), - (CGFloat)app->red / (CGFloat)255.0, - (CGFloat)app->green / (CGFloat)255.0, - (CGFloat)app->blue / (CGFloat)255.0, - (CGFloat)app->alpha / (CGFloat)255.0); - msg_id(app->mainWindow, s("setBackgroundColor:"), colour); - ); - } -} - -void SetColour(struct Application *app, int red, int green, int blue, int alpha) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - app->red = (CGFloat)red; - app->green = (CGFloat)green; - app->blue = (CGFloat)blue; - app->alpha = (CGFloat)alpha; - - applyWindowColour(app); -} - -void FullSizeContent(struct Application *app) { - app->fullSizeContent = 1; -} - -void Hide(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - msg_reg(app->mainWindow, s("orderOut:")); - ); -} - -void Show(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - msg_id(app->mainWindow, s("makeKeyAndOrderFront:"), NULL); - msg_bool(app->application, s("activateIgnoringOtherApps:"), YES); - ); -} - -void WindowIsTranslucent(struct Application *app) { - app->WindowIsTranslucent = 1; -} - -// Sends messages to the backend -void messageHandler(id self, SEL cmd, id contentController, id message) { - struct Application *app = (struct Application *)objc_getAssociatedObject( - self, "application"); - const char *name = (const char *)msg_reg(msg_reg(message, s("name")), s("UTF8String")); - if( strcmp(name, "error") == 0 ) { - printf("There was a Javascript error. Please open the devtools for more information.\n"); - // Show app if we are in debug mode - if( debug ) { - Show(app); - MessageDialog(app, "", "error", "Javascript Error", "There was a Javascript error. Please open the devtools for more information.", "", "", "", "","","",""); - } - } else if( strcmp(name, "completed") == 0) { - // Delete handler - msg_id(app->manager, s("removeScriptMessageHandlerForName:"), str("completed")); - - // TODO: Notify backend we're ready and get them to call back for the Show() - if (app->startHidden == 0) { - Show(app); - } - - // TODO: Check this actually does reduce flicker - ((id(*)(id, SEL, id, id))objc_msgSend)(app->config, s("setValue:forKey:"), msg_bool(c("NSNumber"), s("numberWithBool:"), 0), str("suppressesIncrementalRendering")); - - // We are now running! - app->running = true; - - - // Notify backend we are ready (system startup) - const char *readyMessage = "SS"; - if( app->startupURL == NULL ) { - app->sendMessageToBackend("SS"); - return; - } - readyMessage = concat("SS", app->startupURL); - app->sendMessageToBackend(readyMessage); - MEMFREE(readyMessage); - - } else if( strcmp(name, "windowDrag") == 0 ) { - // Guard against null events - if( app->mouseEvent != NULL ) { - HideMouse(); - ON_MAIN_THREAD( - msg_id(app->mainWindow, s("performWindowDragWithEvent:"), app->mouseEvent); - ); - } - } else if( strcmp(name, "contextMenu") == 0 ) { - - // Did we get a context menu selector? - if( message == NULL) { - return; - } - - const char *contextMenuMessage = cstr(msg_reg(message, s("body"))); - - if( contextMenuMessage == NULL ) { - Debug(app, "EMPTY CONTEXT MENU MESSAGE!!\n"); - return; - } - - // Parse the message - JsonNode *contextMenuMessageJSON = json_decode(contextMenuMessage); - if( contextMenuMessageJSON == NULL ) { - Debug(app, "Error decoding context menu message: %s", contextMenuMessage); - return; - } - - // Get menu ID - JsonNode *contextMenuIDNode = json_find_member(contextMenuMessageJSON, "id"); - if( contextMenuIDNode == NULL ) { - Debug(app, "Error decoding context menu ID: %s", contextMenuMessage); - json_delete(contextMenuMessageJSON); - return; - } - if( contextMenuIDNode->tag != JSON_STRING ) { - Debug(app, "Error decoding context menu ID (Not a string): %s", contextMenuMessage); - json_delete(contextMenuMessageJSON); - return; - } - - // Get menu Data - JsonNode *contextMenuDataNode = json_find_member(contextMenuMessageJSON, "data"); - if( contextMenuDataNode == NULL ) { - Debug(app, "Error decoding context menu data: %s", contextMenuMessage); - json_delete(contextMenuMessageJSON); - return; - } - if( contextMenuDataNode->tag != JSON_STRING ) { - Debug(app, "Error decoding context menu data (Not a string): %s", contextMenuMessage); - json_delete(contextMenuMessageJSON); - return; - } - - // We need to copy these as the JSON node will be destroyed on this thread and the - // string data will become corrupt. These need to be freed by the context menu code. - const char* contextMenuID = STRCOPY(contextMenuIDNode->string_); - const char* contextMenuData = STRCOPY(contextMenuDataNode->string_); - - ON_MAIN_THREAD( - ShowContextMenu(app->contextMenuStore, app->mainWindow, contextMenuID, contextMenuData); - ); - - json_delete(contextMenuMessageJSON); - - } else { - // const char *m = (const char *)msg(msg(message, s("body")), s("UTF8String")); - const char *m = cstr(msg_reg(message, s("body"))); - app->sendMessageToBackend(m); - } -} - -// closeWindow is called when the close button is pressed -void closeWindow(id self, SEL cmd, id sender) { - struct Application *app = (struct Application *) objc_getAssociatedObject(self, "application"); - app->sendMessageToBackend("WC"); -} - -bool isDarkMode(struct Application *app) { - id userDefaults = msg_reg(c("NSUserDefaults"), s("standardUserDefaults")); - const char *mode = cstr(msg_id(userDefaults, s("stringForKey:"), str("AppleInterfaceStyle"))); - return ( mode != NULL && strcmp(mode, "Dark") == 0 ); -} - -void ExecJS(struct Application *app, const char *js) { - ON_MAIN_THREAD( - ((id(*)(id, SEL, id, id))objc_msgSend)(app->wkwebview, - s("evaluateJavaScript:completionHandler:"), - str(js), - NULL); - ); -} - -void willFinishLaunching(id self, SEL cmd, id sender) { - struct Application *app = (struct Application *) objc_getAssociatedObject(self, "application"); - // If there are URL Handlers, register a listener for them - if( app->hasURLHandlers ) { - id eventManager = msg_reg(c("NSAppleEventManager"), s("sharedAppleEventManager")); - ((id(*)(id, SEL, id, SEL, int, int))objc_msgSend)(eventManager, s("setEventHandler:andSelector:forEventClass:andEventID:"), self, s("getUrl:withReplyEvent:"), kInternetEventClass, kAEGetURL); - } - messageFromWindowCallback("Ej{\"name\":\"wails:launched\",\"data\":[]}"); -} - -void emitThemeChange(struct Application *app) { - bool currentThemeIsDark = isDarkMode(app); - if (currentThemeIsDark) { - messageFromWindowCallback("Ej{\"name\":\"wails:system:themechange\",\"data\":[true]}"); - } else { - messageFromWindowCallback("Ej{\"name\":\"wails:system:themechange\",\"data\":[false]}"); - } -} - -void themeChanged(id self, SEL cmd, id sender) { - struct Application *app = (struct Application *)objc_getAssociatedObject( - self, "application"); -// emitThemeChange(app); - bool currentThemeIsDark = isDarkMode(app); - if ( currentThemeIsDark ) { - ExecJS(app, "window.wails.Events.Emit( 'wails:system:themechange', true );"); - } else { - ExecJS(app, "window.wails.Events.Emit( 'wails:system:themechange', false );"); - } -} - -int releaseNSObject(void *const context, struct hashmap_element_s *const e) { - msg_reg(e->data, s("release")); - return -1; -} - -void destroyContextMenus(struct Application *app) { - DeleteContextMenuStore(app->contextMenuStore); -} - -void freeDialogIconCache(struct Application *app) { - // Release the dialog cache images - if( hashmap_num_entries(&dialogIconCache) > 0 ) { - if (0!=hashmap_iterate_pairs(&dialogIconCache, releaseNSObject, NULL)) { - Fatal(app, "failed to release hashmap entries!"); - } - } - - //Free radio groups hashmap - hashmap_destroy(&dialogIconCache); -} - -void DestroyApplication(struct Application *app) { - app->shuttingDown = true; - Debug(app, "Destroying Application"); - - // Free the bindings - if (app->bindings != NULL) { - MEMFREE(app->bindings); - } else { - Debug(app, "Almost a double free for app->bindings"); - } - - if( app->startupURL != NULL ) { - MEMFREE(app->startupURL); - } - - // Remove mouse monitors - if( app->mouseDownMonitor != NULL ) { - msg_id( c("NSEvent"), s("removeMonitor:"), app->mouseDownMonitor); - } - if( app->mouseUpMonitor != NULL ) { - msg_id( c("NSEvent"), s("removeMonitor:"), app->mouseUpMonitor); - } - - // Delete the application menu if we have one - if( app->applicationMenu != NULL ) { - DeleteMenu(app->applicationMenu); - } - - // Delete the tray menu store - DeleteTrayMenuStore(TrayMenuStoreSingleton); - - // Delete the context menu store - DeleteContextMenuStore(app->contextMenuStore); - - // Destroy the context menus - destroyContextMenus(app); - - // Free dialog icon cache - freeDialogIconCache(app); - - // Unload the tray Icons - UnloadTrayIcons(); - - // Remove script handlers - msg_id(app->manager, s("removeScriptMessageHandlerForName:"), str("contextMenu")); - msg_id(app->manager, s("removeScriptMessageHandlerForName:"), str("windowDrag")); - msg_id(app->manager, s("removeScriptMessageHandlerForName:"), str("external")); - msg_id(app->manager, s("removeScriptMessageHandlerForName:"), str("error")); - - // Close main window - if( app->windowDelegate != NULL ) { - msg_reg(app->windowDelegate, s("release")); - msg_id(app->mainWindow, s("setDelegate:"), NULL); - } - -// msg(app->mainWindow, s("close")); - - - Debug(app, "Finished Destroying Application"); -} - -// SetTitle sets the main window title to the given string -void SetTitle(struct Application *app, const char *title) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - Debug(app, "SetTitle Called"); - ON_MAIN_THREAD( - msg_id(app->mainWindow, s("setTitle:"), str(title)); - ); -} - -void ToggleFullscreen(struct Application *app) { - ON_MAIN_THREAD( - app->fullscreen = !app->fullscreen; - MAIN_WINDOW_CALL("toggleFullScreen:"); - ); -} - -bool isFullScreen(struct Application *app) { - long mask = (long)msg_reg(app->mainWindow, s("styleMask")); - bool result = (mask & NSWindowStyleMaskFullscreen) == NSWindowStyleMaskFullscreen; - return result; -} - -// Fullscreen sets the main window to be fullscreen -void Fullscreen(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - Debug(app, "Fullscreen Called"); - if( ! isFullScreen(app) ) { - ToggleFullscreen(app); - } -} - -// UnFullscreen resets the main window after a fullscreen -void UnFullscreen(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - Debug(app, "UnFullscreen Called"); - if( isFullScreen(app) ) { - ToggleFullscreen(app); - } -} - -void Center(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - Debug(app, "Center Called"); - ON_MAIN_THREAD( - MAIN_WINDOW_CALL("center"); - ); -} - -void ToggleMaximise(struct Application *app) { - ON_MAIN_THREAD( - app->maximised = !app->maximised; - MAIN_WINDOW_CALL("zoom:"); - ); -} - -void Maximise(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - if( app->maximised == 0) { - ToggleMaximise(app); - } -} - -void Unmaximise(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - if( app->maximised == 1) { - ToggleMaximise(app); - } -} - -void Minimise(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - MAIN_WINDOW_CALL("miniaturize:"); - ); - } -void Unminimise(struct Application *app) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - MAIN_WINDOW_CALL("deminiaturize:"); - ); -} - -id getCurrentScreen(struct Application *app) { - id screen = NULL; - screen = msg_reg(app->mainWindow, s("screen")); - if( screen == NULL ) { - screen = msg_reg(c("NSScreen"), u("mainScreen")); - } - return screen; -} - -void dumpFrame(struct Application *app, const char *message, CGRect frame) { - Debug(app, message); - Debug(app, "origin.x %f", frame.origin.x); - Debug(app, "origin.y %f", frame.origin.y); - Debug(app, "size.width %f", frame.size.width); - Debug(app, "size.height %f", frame.size.height); -} - -void SetSize(struct Application *app, int width, int height) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - id screen = getCurrentScreen(app); - - // Get the rect for the window - CGRect frame = GET_FRAME(app->mainWindow); - - // Credit: https://github.com/patr0nus/DeskGap/blob/73c0ac9f2c73f55b6e81f64f6673a7962b5719cd/lib/src/platform/mac/util/NSScreen%2BGeometry.m - frame.origin.y = (frame.origin.y + frame.size.height) - (float)height; - frame.size.width = (float)width; - frame.size.height = (float)height; - - ((id(*)(id, SEL, CGRect, BOOL, BOOL))objc_msgSend)(app->mainWindow, s("setFrame:display:animate:"), frame, 1, 0); - ); -} - -void SetPosition(struct Application *app, int x, int y) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - id screen = getCurrentScreen(app); - CGRect screenFrame = GET_FRAME(screen); - CGRect windowFrame = GET_FRAME(app->mainWindow); - - windowFrame.origin.x = screenFrame.origin.x + (float)x; - windowFrame.origin.y = (screenFrame.origin.y + screenFrame.size.height) - windowFrame.size.height - (float)y; - ((id(*)(id, SEL, CGRect, BOOL, BOOL))objc_msgSend)(app->mainWindow, s("setFrame:display:animate:"), windowFrame, 1, 0); - ); -} - -void processDialogButton(id alert, char *buttonTitle, char *cancelButton, char *defaultButton) { - // If this button is set - if( STR_HAS_CHARS(buttonTitle) ) { - id button = msg_id(alert, s("addButtonWithTitle:"), str(buttonTitle)); - if ( STREQ( buttonTitle, defaultButton) ) { - msg_id(button, s("setKeyEquivalent:"), str("\r")); - } - if ( STREQ( buttonTitle, cancelButton) ) { - msg_id(button, s("setKeyEquivalent:"), str("\033")); - } - } -} - -void MessageDialog(struct Application *app, char *callbackID, char *type, char *title, char *message, char *icon, char *button1, char *button2, char *button3, char *button4, char *defaultButton, char *cancelButton) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - id alert = ALLOC_INIT("NSAlert"); - char *dialogType = type; - char *dialogIcon = type; - - // Default to info type - if( dialogType == NULL ) { - dialogType = "info"; - } - - // Set the dialog style - if( STREQ(dialogType, "info") || STREQ(dialogType, "question") ) { - msg_uint(alert, s("setAlertStyle:"), NSAlertStyleInformational); - } else if( STREQ(dialogType, "warning") ) { - msg_uint(alert, s("setAlertStyle:"), NSAlertStyleWarning); - } else if( STREQ(dialogType, "error") ) { - msg_uint(alert, s("setAlertStyle:"), NSAlertStyleCritical); - } - - // Set title if given - if( strlen(title) > 0 ) { - msg_id(alert, s("setMessageText:"), str(title)); - } - - // Set message if given - if( strlen(message) > 0) { - msg_id(alert, s("setInformativeText:"), str(message)); - } - - // Process buttons - processDialogButton(alert, button1, cancelButton, defaultButton); - processDialogButton(alert, button2, cancelButton, defaultButton); - processDialogButton(alert, button3, cancelButton, defaultButton); - processDialogButton(alert, button4, cancelButton, defaultButton); - - // Check for custom dialog icon - if( strlen(icon) > 0 ) { - dialogIcon = icon; - } - - // TODO: move dialog icons + methods to own file - - // Determine what dialog icon we are looking for - id dialogImage = NULL; - // Look for `name-theme2x` first - char *themeIcon = concat(dialogIcon, (isDarkMode(app) ? "-dark" : "-light") ); - if( isRetina(app) ) { - char *dialogIcon2x = concat(themeIcon, "2x"); - dialogImage = hashmap_get(&dialogIconCache, dialogIcon2x, strlen(dialogIcon2x)); -// if (dialogImage != NULL ) printf("Using %s\n", dialogIcon2x); - MEMFREE(dialogIcon2x); - - // Now look for non-themed icon `name2x` - if ( dialogImage == NULL ) { - dialogIcon2x = concat(dialogIcon, "2x"); - dialogImage = hashmap_get(&dialogIconCache, dialogIcon2x, strlen(dialogIcon2x)); -// if (dialogImage != NULL ) printf("Using %s\n", dialogIcon2x); - MEMFREE(dialogIcon2x); - } - } - - // If we don't have a retina icon, try the 1x name-theme icon - if( dialogImage == NULL ) { - dialogImage = hashmap_get(&dialogIconCache, themeIcon, strlen(themeIcon)); -// if (dialogImage != NULL ) printf("Using %s\n", themeIcon); - } - - // Free the theme icon memory - MEMFREE(themeIcon); - - // Finally try the name itself - if( dialogImage == NULL ) { - dialogImage = hashmap_get(&dialogIconCache, dialogIcon, strlen(dialogIcon)); -// if (dialogImage != NULL ) printf("Using %s\n", dialogIcon); - } - - if (dialogImage != NULL ) { - msg_id(alert, s("setIcon:"), dialogImage); - } - - // Run modal - char *buttonPressed; - long response = (long)msg_reg(alert, s("runModal")); - if( response == NSAlertFirstButtonReturn ) { - buttonPressed = button1; - } - else if( response == NSAlertSecondButtonReturn ) { - buttonPressed = button2; - } - else if( response == NSAlertThirdButtonReturn ) { - buttonPressed = button3; - } - else { - buttonPressed = button4; - } - - if ( STR_HAS_CHARS(callbackID) ) { - // Construct callback message. Format "DM|" - const char *callback = concat("DM", callbackID); - const char *header = concat(callback, "|"); - const char *responseMessage = concat(header, buttonPressed); - - // Send message to backend - app->sendMessageToBackend(responseMessage); - - // Free memory - MEMFREE(header); - MEMFREE(callback); - MEMFREE(responseMessage); - } - ); -} - -// OpenDialog opens a dialog to select files/directories -void OpenDialog(struct Application *app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int allowFiles, int allowDirs, int allowMultiple, int showHiddenFiles, int canCreateDirectories, int resolvesAliases, int treatPackagesAsDirectories) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - Debug(app, "OpenDialog Called with callback id: %s", callbackID); - - // Create an open panel - ON_MAIN_THREAD( - - // Create the dialog - id dialog = msg_reg(c("NSOpenPanel"), s("openPanel")); - - // Valid but appears to do nothing.... :/ - msg_id(dialog, s("setTitle:"), str(title)); - - // Filters - if( filters != NULL && strlen(filters) > 0) { - id filterString = msg_id_id(str(filters), s("stringByReplacingOccurrencesOfString:withString:"), str("*."), str("")); - filterString = msg_id_id(filterString, s("stringByReplacingOccurrencesOfString:withString:"), str(" "), str("")); - id filterList = msg_id(filterString, s("componentsSeparatedByString:"), str(",")); - msg_id(dialog, s("setAllowedFileTypes:"), filterList); - } else { - msg_bool(dialog, s("setAllowsOtherFileTypes:"), YES); - } - - // Default Directory - if( defaultDir != NULL && strlen(defaultDir) > 0 ) { - msg_id(dialog, s("setDirectoryURL:"), url(defaultDir)); - } - - // Default Filename - if( defaultFilename != NULL && strlen(defaultFilename) > 0 ) { - msg_id(dialog, s("setNameFieldStringValue:"), str(defaultFilename)); - } - - // Setup Options - msg_bool(dialog, s("setCanChooseFiles:"), allowFiles); - msg_bool(dialog, s("setCanChooseDirectories:"), allowDirs); - msg_bool(dialog, s("setAllowsMultipleSelection:"), allowMultiple); - msg_bool(dialog, s("setShowsHiddenFiles:"), showHiddenFiles); - msg_bool(dialog, s("setCanCreateDirectories:"), canCreateDirectories); - msg_bool(dialog, s("setResolvesAliases:"), resolvesAliases); - msg_bool(dialog, s("setTreatsFilePackagesAsDirectories:"), treatPackagesAsDirectories); - - // Setup callback handler - ((id(*)(id, SEL, id, void (^)(id)))objc_msgSend)(dialog, s("beginSheetModalForWindow:completionHandler:"), app->mainWindow, ^(id result) { - - // Create the response JSON object - JsonNode *response = json_mkarray(); - - // If the user selected some files - if( result == (id)1 ) { - // Grab the URLs returned - id urls = msg_reg(dialog, s("URLs")); - - // Iterate over all the selected files - long noOfResults = (long)msg_reg(urls, s("count")); - for( int index = 0; index < noOfResults; index++ ) { - - // Extract the filename - id url = msg_int(urls, s("objectAtIndex:"), index); - const char *filename = (const char *)msg_reg(msg_reg(url, s("path")), s("UTF8String")); - - // Add the the response array - json_append_element(response, json_mkstring(filename)); - } - } - - // Create JSON string and free json memory - char *encoded = json_stringify(response, ""); - json_delete(response); - - // Construct callback message. Format "D|" - const char *callback = concat("DO", callbackID); - const char *header = concat(callback, "|"); - const char *responseMessage = concat(header, encoded); - - // Send message to backend - app->sendMessageToBackend(responseMessage); - - // Free memory - MEMFREE(header); - MEMFREE(callback); - MEMFREE(responseMessage); - }); - - msg_id( c("NSApp"), s("runModalForWindow:"), app->mainWindow); - ); -} - -// SaveDialog opens a dialog to select files/directories -void SaveDialog(struct Application *app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int showHiddenFiles, int canCreateDirectories, int treatPackagesAsDirectories) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - Debug(app, "SaveDialog Called with callback id: %s", callbackID); - - // Create an open panel - ON_MAIN_THREAD( - - // Create the dialog - id dialog = msg_reg(c("NSSavePanel"), s("savePanel")); - - // Valid but appears to do nothing.... :/ - msg_id(dialog, s("setTitle:"), str(title)); - - // Filters - if( filters != NULL && strlen(filters) > 0) { - id filterString = msg_id_id(str(filters), s("stringByReplacingOccurrencesOfString:withString:"), str("*."), str("")); - filterString = msg_id_id(filterString, s("stringByReplacingOccurrencesOfString:withString:"), str(" "), str("")); - id filterList = msg_id(filterString, s("componentsSeparatedByString:"), str(",")); - msg_id(dialog, s("setAllowedFileTypes:"), filterList); - } else { - msg_bool(dialog, s("setAllowsOtherFileTypes:"), YES); - } - - // Default Directory - if( defaultDir != NULL && strlen(defaultDir) > 0 ) { - msg_id(dialog, s("setDirectoryURL:"), url(defaultDir)); - } - - // Default Filename - if( defaultFilename != NULL && strlen(defaultFilename) > 0 ) { - msg_id(dialog, s("setNameFieldStringValue:"), str(defaultFilename)); - } - - // Setup Options - msg_bool(dialog, s("setShowsHiddenFiles:"), showHiddenFiles); - msg_bool(dialog, s("setCanCreateDirectories:"), canCreateDirectories); - msg_bool(dialog, s("setTreatsFilePackagesAsDirectories:"), treatPackagesAsDirectories); - - // Setup callback handler - ((id(*)(id, SEL, id, void (^)(id)))objc_msgSend)(dialog, s("beginSheetModalForWindow:completionHandler:"), app->mainWindow, ^(id result) { - - // Default is blank - const char *filename = ""; - - // If the user selected some files - if( result == (id)1 ) { - // Grab the URL returned - id url = msg_reg(dialog, s("URL")); - filename = (const char *)msg_reg(msg_reg(url, s("path")), s("UTF8String")); - } - - // Construct callback message. Format "DS|" - const char *callback = concat("DS", callbackID); - const char *header = concat(callback, "|"); - const char *responseMessage = concat(header, filename); - - // Send message to backend - app->sendMessageToBackend(responseMessage); - - // Free memory - MEMFREE(header); - MEMFREE(callback); - MEMFREE(responseMessage); - }); - - msg_id( c("NSApp"), s("runModalForWindow:"), app->mainWindow); - ); -} - -const char *invoke = "window.wailsInvoke=function(message){window.webkit.messageHandlers.external.postMessage(message);};window.wailsDrag=function(message){window.webkit.messageHandlers.windowDrag.postMessage(message);};window.wailsContextMenuMessage=function(message){window.webkit.messageHandlers.contextMenu.postMessage(message);};"; - -// DisableFrame disables the window frame -void DisableFrame(struct Application *app) -{ - app->frame = 0; -} - -void setMinMaxSize(struct Application *app) -{ - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - if (app->maxHeight > 0 && app->maxWidth > 0) - { - ((id(*)(id, SEL, CGSize))objc_msgSend)(app->mainWindow, s("setMaxSize:"), CGSizeMake(app->maxWidth, app->maxHeight)); - } - if (app->minHeight > 0 && app->minWidth > 0) - { - ((id(*)(id, SEL, CGSize))objc_msgSend)(app->mainWindow, s("setMinSize:"), CGSizeMake(app->minWidth, app->minHeight)); - } - - // Calculate if window needs resizing - int newWidth = app->width; - int newHeight = app->height; - - if (app->maxWidth > 0 && app->width > app->maxWidth) newWidth = app->maxWidth; - if (app->minWidth > 0 && app->width < app->minWidth) newWidth = app->minWidth; - if (app->maxHeight > 0 && app->height > app->maxHeight ) newHeight = app->maxHeight; - if (app->minHeight > 0 && app->height < app->minHeight ) newHeight = app->minHeight; - - // If we have any change, resize window - if ( newWidth != app->width || newHeight != app->height ) { - SetSize(app, newWidth, newHeight); - } -} - -void SetMinWindowSize(struct Application *app, int minWidth, int minHeight) -{ - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - app->minWidth = minWidth; - app->minHeight = minHeight; - - // Apply if the window is created - if( app->mainWindow != NULL ) { - ON_MAIN_THREAD( - setMinMaxSize(app); - ); - } -} - -void SetMaxWindowSize(struct Application *app, int maxWidth, int maxHeight) -{ - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - app->maxWidth = maxWidth; - app->maxHeight = maxHeight; - - // Apply if the window is created - if( app->mainWindow != NULL ) { - ON_MAIN_THREAD( - setMinMaxSize(app); - ); - } -} - - -void SetDebug(void *applicationPointer, int flag) { - debug = flag; -} - - - -// AddContextMenu sets the context menu map for this application -void AddContextMenu(struct Application *app, const char *contextMenuJSON) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - ON_MAIN_THREAD ( - AddContextMenuToStore(app->contextMenuStore, contextMenuJSON); - ); -} - -void UpdateContextMenu(struct Application *app, const char* contextMenuJSON) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - ON_MAIN_THREAD( - UpdateContextMenuInStore(app->contextMenuStore, contextMenuJSON); - ); -} - -void AddTrayMenu(struct Application *app, const char *trayMenuJSON) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - AddTrayMenuToStore(TrayMenuStoreSingleton, trayMenuJSON); - ); -} - -void SetTrayMenu(struct Application *app, const char* trayMenuJSON) { - - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - UpdateTrayMenuInStore(TrayMenuStoreSingleton, trayMenuJSON); - ); -} - -void DeleteTrayMenuByID(struct Application *app, const char *id) { - ON_MAIN_THREAD( - DeleteTrayMenuInStore(TrayMenuStoreSingleton, id); - ); -} - -void UpdateTrayMenuLabel(struct Application* app, const char* JSON) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - UpdateTrayMenuLabelInStore(TrayMenuStoreSingleton, JSON); - ); -} - - -void SetBindings(struct Application *app, const char *bindings) { - const char* temp = concat("window.wailsbindings = \"", bindings); - const char* jscall = concat(temp, "\";"); - MEMFREE(temp); - app->bindings = jscall; -} - -void makeWindowBackgroundTranslucent(struct Application *app) { - id contentView = msg_reg(app->mainWindow, s("contentView")); - id effectView = msg_reg(c("NSVisualEffectView"), s("alloc")); - CGRect bounds = GET_BOUNDS(contentView); - effectView = ((id(*)(id, SEL, CGRect))objc_msgSend)(effectView, s("initWithFrame:"), bounds); - - msg_int(effectView, s("setAutoresizingMask:"), NSViewWidthSizable | NSViewHeightSizable); - msg_int(effectView, s("setBlendingMode:"), NSVisualEffectBlendingModeBehindWindow); - msg_int(effectView, s("setState:"), NSVisualEffectStateActive); - ((id(*)(id, SEL, id, int, id))objc_msgSend)(contentView, s("addSubview:positioned:relativeTo:"), effectView, NSWindowBelow, NULL); -} - -void enableBoolConfig(id config, const char *setting) { - ((id(*)(id, SEL, id, id))objc_msgSend)(msg_reg(config, s("preferences")), s("setValue:forKey:"), msg_bool(c("NSNumber"), s("numberWithBool:"), 1), str(setting)); -} - -void disableBoolConfig(id config, const char *setting) { - ((id(*)(id, SEL, id, id))objc_msgSend)(msg_reg(config, s("preferences")), s("setValue:forKey:"), msg_bool(c("NSNumber"), s("numberWithBool:"), 0), str(setting)); -} - -void processDecorations(struct Application *app) { - - int decorations = 0; - - if (app->frame == 1 ) { - if( app->hideTitleBar == 0) { - decorations |= NSWindowStyleMaskTitled; - } - decorations |= NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable; - } - - if (app->resizable) { - decorations |= NSWindowStyleMaskResizable; - } - - if (app->fullscreen) { - decorations |= NSWindowStyleMaskFullscreen; - } - - if( app->fullSizeContent || app->frame == 0) { - decorations |= NSWindowStyleMaskFullSizeContentView; - } - - app->decorations = decorations; -} - -void createApplication(struct Application *app) { - id application = msg_reg(c("NSApplication"), s("sharedApplication")); - app->application = application; - msg_int(application, s("setActivationPolicy:"), app->activationPolicy); -} - -void DarkModeEnabled(struct Application *app, const char *callbackID) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - ON_MAIN_THREAD( - const char *result = isDarkMode(app) ? "T" : "F"; - - // Construct callback message. Format "SD|" - const char *callback = concat("SD", callbackID); - const char *header = concat(callback, "|"); - const char *responseMessage = concat(header, result); - // Send message to backend - app->sendMessageToBackend(responseMessage); - - // Free memory - MEMFREE(header); - MEMFREE(callback); - MEMFREE(responseMessage); - ); -} - -void getURL(id self, SEL selector, id event, id replyEvent) { - struct Application *app = (struct Application *)objc_getAssociatedObject(self, "application"); - id desc = msg_int(event, s("paramDescriptorForKeyword:"), keyDirectObject); - id url = msg_reg(desc, s("stringValue")); - const char* curl = cstr(url); - if( curl == NULL ) { - return; - } - - // If this was an incoming URL, but we aren't running yet - // save it to return when we complete - if( app->running != true ) { - app->startupURL = STRCOPY(curl); - return; - } - - const char* message = concat("UC", curl); - messageFromWindowCallback(message); - MEMFREE(message); -} - -void openURLs(id self, SEL selector, id event) { - filelog("\n\nI AM HERE!!!!!\n\n"); -} - - -void createDelegate(struct Application *app) { - - // Define delegate - Class appDelegate = objc_allocateClassPair((Class) c("NSResponder"), "AppDelegate", 0); - class_addProtocol(appDelegate, objc_getProtocol("NSTouchBarProvider")); - - class_addMethod(appDelegate, s("applicationShouldTerminateAfterLastWindowClosed:"), (IMP) no, "c@:@"); - class_addMethod(appDelegate, s("applicationWillFinishLaunching:"), (IMP) willFinishLaunching, "v@:@"); - - // All Menu Items use a common callback - class_addMethod(appDelegate, s("menuItemCallback:"), (IMP)menuItemCallback, "v@:@"); - - // If there are URL Handlers, register the callback method - if( app->hasURLHandlers ) { - class_addMethod(appDelegate, s("getUrl:withReplyEvent:"), (IMP) getURL, "i@:@@"); - } - - // Script handler - class_addMethod(appDelegate, s("userContentController:didReceiveScriptMessage:"), (IMP) messageHandler, "v@:@@"); - objc_registerClassPair(appDelegate); - - // Create delegate - id delegate = msg_reg((id)appDelegate, s("new")); - objc_setAssociatedObject(delegate, "application", (id)app, OBJC_ASSOCIATION_ASSIGN); - - // Theme change listener - class_addMethod(appDelegate, s("themeChanged:"), (IMP) themeChanged, "v@:@@"); - - // Get defaultCenter - id defaultCenter = msg_reg(c("NSDistributedNotificationCenter"), s("defaultCenter")); - ((id(*)(id, SEL, id, SEL, id, id))objc_msgSend)(defaultCenter, s("addObserver:selector:name:object:"), delegate, s("themeChanged:"), str("AppleInterfaceThemeChangedNotification"), NULL); - - app->delegate = delegate; - - msg_id(app->application, s("setDelegate:"), delegate); -} - -bool windowShouldClose(id self, SEL cmd, id sender) { - msg_reg(sender, s("orderOut:")); - return false; -} - -bool windowShouldExit(id self, SEL cmd, id sender) { - msg_reg(sender, s("orderOut:")); - messageFromWindowCallback("WC"); - return false; -} - -void createMainWindow(struct Application *app) { - // Create main window - id mainWindow = ALLOC("NSWindow"); - mainWindow = ((id(*)(id, SEL, CGRect, int, int, BOOL))objc_msgSend)(mainWindow, s("initWithContentRect:styleMask:backing:defer:"), - CGRectMake(0, 0, app->width, app->height), app->decorations, NSBackingStoreBuffered, NO); - msg_reg(mainWindow, s("autorelease")); - - // Set Appearance - if( app->appearance != NULL ) { - msg_id(mainWindow, s("setAppearance:"), - msg_id(c("NSAppearance"), s("appearanceNamed:"), str(app->appearance)) - ); - } - - // Set Title appearance - msg_bool(mainWindow, s("setTitlebarAppearsTransparent:"), app->titlebarAppearsTransparent ? YES : NO); - msg_int(mainWindow, s("setTitleVisibility:"), app->hideTitle); - - // Create window delegate to override windowShouldClose - Class delegateClass = objc_allocateClassPair((Class) c("NSObject"), "WindowDelegate", 0); - bool resultAddProtoc = class_addProtocol(delegateClass, objc_getProtocol("NSWindowDelegate")); - if( app->hideWindowOnClose ) { - class_replaceMethod(delegateClass, s("windowShouldClose:"), (IMP) windowShouldClose, "v@:@"); - } else { - class_replaceMethod(delegateClass, s("windowShouldClose:"), (IMP) windowShouldExit, "v@:@"); - } - app->windowDelegate = msg_reg((id)delegateClass, s("new")); - msg_id(mainWindow, s("setDelegate:"), app->windowDelegate); - - app->mainWindow = mainWindow; -} - -const char* getInitialState(struct Application *app) { - const char *result = ""; - if( isDarkMode(app) ) { - result = "window.wails.System.IsDarkMode.set(true);"; - } else { - result = "window.wails.System.IsDarkMode.set(false);"; - } - char buffer[999]; - snprintf(&buffer[0], sizeof(buffer), "window.wails.System.LogLevel.set(%d);", app->logLevel); - result = concat(result, &buffer[0]); - Debug(app, "initialstate = %s", result); - return result; -} - -void parseMenuRole(struct Application *app, id parentMenu, JsonNode *item) { - const char *roleName = item->string_; - - if ( STREQ(roleName, "appMenu") ) { - createDefaultAppMenu(parentMenu); - return; - } - if ( STREQ(roleName, "editMenu")) { - createDefaultEditMenu(parentMenu); - return; - } - if ( STREQ(roleName, "hide")) { - addMenuItem(parentMenu, "Hide Window", "hide:", "h", FALSE); - return; - } - if ( STREQ(roleName, "hideothers")) { - id hideOthers = addMenuItem(parentMenu, "Hide Others", "hideOtherApplications:", "h", FALSE); - msg_int(hideOthers, s("setKeyEquivalentModifierMask:"), (NSEventModifierFlagOption | NSEventModifierFlagCommand)); - return; - } - if ( STREQ(roleName, "unhide")) { - addMenuItem(parentMenu, "Show All", "unhideAllApplications:", "", FALSE); - return; - } - if ( STREQ(roleName, "front")) { - addMenuItem(parentMenu, "Bring All to Front", "arrangeInFront:", "", FALSE); - return; - } - if ( STREQ(roleName, "undo")) { - addMenuItem(parentMenu, "Undo", "undo:", "z", FALSE); - return; - } - if ( STREQ(roleName, "redo")) { - addMenuItem(parentMenu, "Redo", "redo:", "y", FALSE); - return; - } - if ( STREQ(roleName, "cut")) { - addMenuItem(parentMenu, "Cut", "cut:", "x", FALSE); - return; - } - if ( STREQ(roleName, "copy")) { - addMenuItem(parentMenu, "Copy", "copy:", "c", FALSE); - return; - } - if ( STREQ(roleName, "paste")) { - addMenuItem(parentMenu, "Paste", "paste:", "v", FALSE); - return; - } - if ( STREQ(roleName, "delete")) { - addMenuItem(parentMenu, "Delete", "delete:", "", FALSE); - return; - } - if( STREQ(roleName, "pasteandmatchstyle")) { - id pasteandmatchstyle = addMenuItem(parentMenu, "Paste and Match Style", "pasteandmatchstyle:", "v", FALSE); - msg_int(pasteandmatchstyle, s("setKeyEquivalentModifierMask:"), (NSEventModifierFlagOption | NSEventModifierFlagShift | NSEventModifierFlagCommand)); - } - if ( STREQ(roleName, "selectall")) { - addMenuItem(parentMenu, "Select All", "selectAll:", "a", FALSE); - return; - } - if ( STREQ(roleName, "minimize")) { - addMenuItem(parentMenu, "Minimize", "miniaturize:", "m", FALSE); - return; - } - if ( STREQ(roleName, "zoom")) { - addMenuItem(parentMenu, "Zoom", "performZoom:", "", FALSE); - return; - } - if ( STREQ(roleName, "quit")) { - addMenuItem(parentMenu, "Quit", "terminate:", "q", FALSE); - return; - } - if ( STREQ(roleName, "togglefullscreen")) { - addMenuItem(parentMenu, "Toggle Full Screen", "toggleFullScreen:", "f", FALSE); - return; - } - -} - -void dumpMemberList(const char *name, id *memberList) { - void *member = memberList[0]; - int count = 0; - printf("%s = %p -> [ ", name, memberList); - while( member != NULL ) { - printf("%p ", member); - count = count + 1; - member = memberList[count]; - } - printf("]\n"); -} - -// updateMenu replaces the current menu with the given one -void updateMenu(struct Application *app, const char *menuAsJSON) { - Debug(app, "Menu is now: %s", menuAsJSON); - ON_MAIN_THREAD ( - DeleteMenu(app->applicationMenu); - Menu* newMenu = NewApplicationMenu(menuAsJSON); - id menu = GetMenu(newMenu); - app->applicationMenu = newMenu; - msg_id(msg_reg(c("NSApplication"), s("sharedApplication")), s("setMainMenu:"), menu); - ); -} - -// SetApplicationMenu sets the initial menu for the application -void SetApplicationMenu(struct Application *app, const char *menuAsJSON) { - // Guard against calling during shutdown - if( app->shuttingDown ) return; - - if ( app->applicationMenu == NULL ) { - app->applicationMenu = NewApplicationMenu(menuAsJSON); - return; - } - - // Update menu - ON_MAIN_THREAD ( - updateMenu(app, menuAsJSON); - ); -} - -void processDialogIcons(struct hashmap_s *hashmap, const unsigned char *dialogIcons[]) { - - unsigned int count = 0; - while( 1 ) { - const unsigned char *name = dialogIcons[count++]; - if( name == 0x00 ) { - break; - } - const unsigned char *lengthAsString = dialogIcons[count++]; - if( name == 0x00 ) { - break; - } - const unsigned char *data = dialogIcons[count++]; - if( data == 0x00 ) { - break; - } - int length = atoi((const char *)lengthAsString); - - // Create the icon and add to the hashmap - id imageData = ((id(*)(id, SEL, const unsigned char *, int))objc_msgSend)(c("NSData"), s("dataWithBytes:length:"), data, length); - id dialogImage = ALLOC("NSImage"); - msg_reg(dialogImage, s("autorelease")); - msg_id(dialogImage, s("initWithData:"), imageData); - hashmap_put(hashmap, (const char *)name, strlen((const char *)name), dialogImage); - } - -} - -void processUserDialogIcons(struct Application *app) { - - // Allocate the Dialog icon hashmap - if( 0 != hashmap_create((const unsigned)4, &dialogIconCache)) { - // Couldn't allocate map - Fatal(app, "Not enough memory to allocate dialogIconCache!"); - return; - } - - processDialogIcons(&dialogIconCache, defaultDialogIcons); - processDialogIcons(&dialogIconCache, userDialogIcons); - -} - -void TrayMenuWillOpen(id self, SEL selector, id menu) { - // Extract tray menu id from menu - id trayMenuIDStr = objc_getAssociatedObject(menu, "trayMenuID"); - const char* trayMenuID = cstr(trayMenuIDStr); - const char *message = concat("Mo", trayMenuID); - messageFromWindowCallback(message); - MEMFREE(message); -} - -void TrayMenuDidClose(id self, SEL selector, id menu) { - // Extract tray menu id from menu - id trayMenuIDStr = objc_getAssociatedObject(menu, "trayMenuID"); - const char* trayMenuID = cstr(trayMenuIDStr); - const char *message = concat("Mc", trayMenuID); - messageFromWindowCallback(message); - MEMFREE(message); -} - -void createTrayMenuDelegate() { - // Define delegate - trayMenuDelegateClass = objc_allocateClassPair((Class) c("NSObject"), "MenuDelegate", 0); - class_addProtocol(trayMenuDelegateClass, objc_getProtocol("NSMenuDelegate")); - class_addMethod(trayMenuDelegateClass, s("menuWillOpen:"), (IMP) TrayMenuWillOpen, "v@:@"); - class_addMethod(trayMenuDelegateClass, s("menuDidClose:"), (IMP) TrayMenuDidClose, "v@:@"); - - // Script handler - objc_registerClassPair(trayMenuDelegateClass); -} - - -void Run(struct Application *app, int argc, char **argv) { - - // Process window decorations - processDecorations(app); - - // Create the application - createApplication(app); - - // Define delegate - createDelegate(app); - - // Define tray delegate - createTrayMenuDelegate(); - - // Create the main window - createMainWindow(app); - - // Create Content View - id contentView = msg_reg( ALLOC("NSView"), s("init") ); - msg_id(app->mainWindow, s("setContentView:"), contentView); - - // Set the main window title - SetTitle(app, app->title); - - // Center Window - Center(app); - - // Set Colour - applyWindowColour(app); - - // Process translucency - if (app->WindowIsTranslucent) { - makeWindowBackgroundTranslucent(app); - } - - // We set it to be invisible by default. It will become visible when everything has initialised - msg_bool(app->mainWindow, s("setIsVisible:"), NO); - - // Setup webview - id config = msg_reg(c("WKWebViewConfiguration"), s("new")); - ((id(*)(id, SEL, id, id))objc_msgSend)(config, s("setValue:forKey:"), msg_bool(c("NSNumber"), s("numberWithBool:"), 1), str("suppressesIncrementalRendering")); - if (app->devtools) { - Debug(app, "Enabling devtools"); - enableBoolConfig(config, "developerExtrasEnabled"); - } - app->config = config; - - id manager = msg_reg(config, s("userContentController")); - msg_id_id(manager, s("addScriptMessageHandler:name:"), app->delegate, str("external")); - msg_id_id(manager, s("addScriptMessageHandler:name:"), app->delegate, str("completed")); - msg_id_id(manager, s("addScriptMessageHandler:name:"), app->delegate, str("error")); - app->manager = manager; - - id wkwebview = msg_reg(c("WKWebView"), s("alloc")); - app->wkwebview = wkwebview; - - ((id(*)(id, SEL, CGRect, id))objc_msgSend)(wkwebview, s("initWithFrame:configuration:"), CGRectMake(0, 0, 0, 0), config); - - msg_id(contentView, s("addSubview:"), wkwebview); - msg_int(wkwebview, s("setAutoresizingMask:"), NSViewWidthSizable | NSViewHeightSizable); - CGRect contentViewBounds = GET_BOUNDS(contentView); - ((id(*)(id, SEL, CGRect))objc_msgSend)(wkwebview, s("setFrame:"), contentViewBounds ); - - // Disable damn smart quotes - // Credit: https://stackoverflow.com/a/31640511 - id userDefaults = msg_reg(c("NSUserDefaults"), s("standardUserDefaults")); - ((id(*)(id, SEL, BOOL, id))objc_msgSend)(userDefaults, s("setBool:forKey:"), false, str("NSAutomaticQuoteSubstitutionEnabled")); - - // Setup drag message handler - msg_id_id(manager, s("addScriptMessageHandler:name:"), app->delegate, str("windowDrag")); - // Add mouse event hooks - app->mouseDownMonitor = ((id(*)(id, SEL, int, id (^)(id)))objc_msgSend)(c("NSEvent"), u("addLocalMonitorForEventsMatchingMask:handler:"), NSEventMaskLeftMouseDown, ^(id incomingEvent) { - // Make sure the mouse click was in the window, not the tray - id window = msg_reg(incomingEvent, s("window")); - if (window == app->mainWindow) { - app->mouseEvent = incomingEvent; - } - return incomingEvent; - }); - app->mouseUpMonitor = ((id(*)(id, SEL, int, id (^)(id)))objc_msgSend)(c("NSEvent"), u("addLocalMonitorForEventsMatchingMask:handler:"), NSEventMaskLeftMouseUp, ^(id incomingEvent) { - app->mouseEvent = NULL; - ShowMouse(); - return incomingEvent; - }); - - // Setup context menu message handler - msg_id_id(manager, s("addScriptMessageHandler:name:"), app->delegate, str("contextMenu")); - - // Toolbar - if( app->useToolBar ) { - Debug(app, "Setting Toolbar"); - id toolbar = msg_reg(c("NSToolbar"),s("alloc")); - msg_id(toolbar, s("initWithIdentifier:"), str("wails.toolbar")); - msg_reg(toolbar, s("autorelease")); - - // Separator - if( app->hideToolbarSeparator ) { - msg_bool(toolbar, s("setShowsBaselineSeparator:"), NO); - } - - msg_id(app->mainWindow, s("setToolbar:"), toolbar); - } - - // Fix up resizing - if (app->resizable == 0) { - app->minHeight = app->maxHeight = app->height; - app->minWidth = app->maxWidth = app->width; - } - setMinMaxSize(app); - - // Load HTML - id html = msg_id(c("NSURL"), s("URLWithString:"), str((const char*)assets[0])); - msg_id(wkwebview, s("loadRequest:"), msg_id(c("NSURLRequest"), s("requestWithURL:"), html)); - - Debug(app, "Loading Internal Code"); - // We want to evaluate the internal code plus runtime before the assets - const char *temp = concat(invoke, app->bindings); - const char *internalCode = concat(temp, (const char*)&runtime); - MEMFREE(temp); - - // Add code that sets up the initial state, EG: State Stores. - const char *initialState = getInitialState(app); - temp = concat(internalCode, initialState); - MEMFREE(initialState); - MEMFREE(internalCode); - internalCode = temp; - - // Loop over assets and build up one giant Mother Of All Evals - int index = 1; - while(1) { - // Get next asset pointer - const unsigned char *asset = assets[index]; - - // If we have no more assets, break - if (asset == 0x00) { - break; - } - - temp = concat(internalCode, (const char *)asset); - MEMFREE(internalCode); - internalCode = temp; - index++; - }; - - // Disable context menu if not in debug mode - if( debug != 1 ) { - temp = concat(internalCode, "wails._.DisableDefaultContextMenu();"); - MEMFREE(internalCode); - internalCode = temp; - } - - // class_addMethod(delegateClass, s("applicationWillFinishLaunching:"), (IMP) willFinishLaunching, "@@:@"); - // Include callback after evaluation - temp = concat(internalCode, "webkit.messageHandlers.completed.postMessage(true);"); - MEMFREE(internalCode); - internalCode = temp; - - // const char *viewportScriptString = "var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); meta.setAttribute('initial-scale', '1.0'); meta.setAttribute('maximum-scale', '1.0'); meta.setAttribute('minimum-scale', '1.0'); meta.setAttribute('user-scalable', 'no'); document.getElementsByTagName('head')[0].appendChild(meta);"; - // ExecJS(app, viewportScriptString); - - - // This evaluates the MOAE once the Dom has finished loading - msg_id(manager, - s("addUserScript:"), - ((id(*)(id, SEL, id, int, int))objc_msgSend)(msg_reg(c("WKUserScript"), s("alloc")), - s("initWithSource:injectionTime:forMainFrameOnly:"), - str(internalCode), - 1, - 1)); - - - // Emit theme change event to notify of current system them - emitThemeChange(app); - - // If we want the webview to be transparent... - if( app->webviewIsTranparent == 1 ) { - ((id(*)(id, SEL, id, id))objc_msgSend)(wkwebview, s("setValue:forKey:"), msg_bool(c("NSNumber"), s("numberWithBool:"), 0), str("drawsBackground")); - } - - // If we have an application menu, process it - if( app->applicationMenu != NULL ) { - id menu = GetMenu(app->applicationMenu); - msg_id(msg_reg(c("NSApplication"), s("sharedApplication")), s("setMainMenu:"), menu); - } - - // Setup initial trays - ShowTrayMenusInStore(TrayMenuStoreSingleton); - - // Process dialog icons - processUserDialogIcons(app); - - // Finally call run - Debug(app, "Run called"); - msg_reg(app->application, s("run")); - - DestroyApplication(app); - - MEMFREE(internalCode); -} - -void SetActivationPolicy(struct Application* app, int policy) { - app->activationPolicy = policy; -} - -void HasURLHandlers(struct Application* app) { - app->hasURLHandlers = 1; -} - -// Quit will stop the cocoa application and free up all the memory -// used by the application -void Quit(struct Application *app) { - Debug(app, "Quit Called"); - msg_id(app->application, s("stop:"), NULL); -} - -id createImageFromBase64Data(const char *data, bool isTemplateImage) { - id nsdata = ALLOC("NSData"); - id imageData = ((id(*)(id, SEL, id, int))objc_msgSend)(nsdata, s("initWithBase64EncodedString:options:"), str(data), 0); - - // If it's not valid base64 data, use the broken image - if ( imageData == NULL ) { - imageData = ((id(*)(id, SEL, id, int))objc_msgSend)(nsdata, s("initWithBase64EncodedString:options:"), str(BrokenImage), 0); - } - id result = ALLOC("NSImage"); - msg_reg(result, s("autorelease")); - msg_id(result, s("initWithData:"), imageData); - msg_reg(nsdata, s("release")); - msg_reg(imageData, s("release")); - - if( isTemplateImage ) { - msg_bool(result, s("setTemplate:"), YES); - } - - return result; -} - -void* NewApplication(const char *title, int width, int height, int resizable, int devtools, int fullscreen, int startHidden, int logLevel, int hideWindowOnClose) { - - // Load the tray icons - LoadTrayIcons(); - - // Setup main application struct - struct Application *result = malloc(sizeof(struct Application)); - result->title = title; - result->width = width; - result->height = height; - result->minWidth = 0; - result->minHeight = 0; - result->maxWidth = 0; - result->maxHeight = 0; - result->resizable = resizable; - result->devtools = devtools; - result->fullscreen = fullscreen; - result->maximised = 0; - result->startHidden = startHidden; - result->decorations = 0; - result->logLevel = logLevel; - result->hideWindowOnClose = hideWindowOnClose; - - result->mainWindow = NULL; - result->mouseEvent = NULL; - result->mouseDownMonitor = NULL; - result->mouseUpMonitor = NULL; - - // Features - result->frame = 1; - result->hideTitle = 0; - result->hideTitleBar = 0; - result->fullSizeContent = 0; - result->useToolBar = 0; - result->hideToolbarSeparator = 0; - result->appearance = NULL; - result->WindowIsTranslucent = 0; - - // Window data - result->delegate = NULL; - - // Menu - result->applicationMenu = NULL; - - // Tray - TrayMenuStoreSingleton = NewTrayMenuStore(); - - // Context Menus - result->contextMenuStore = NewContextMenuStore(); - - // Window delegate - result->windowDelegate = NULL; - - // Window Appearance - result->titlebarAppearsTransparent = 0; - result->webviewIsTranparent = 0; - - result->sendMessageToBackend = (ffenestriCallback) messageFromWindowCallback; - - result->shuttingDown = false; - - result->activationPolicy = NSApplicationActivationPolicyRegular; - - result->hasURLHandlers = 0; - - result->startupURL = NULL; - - result->running = false; - - result->pool = msg_reg(c("NSAutoreleasePool"), s("new")); - - return (void*) result; -} - - -#endif diff --git a/v2/internal/ffenestri/ffenestri_darwin.go b/v2/internal/ffenestri/ffenestri_darwin.go deleted file mode 100644 index 02d7471b1..000000000 --- a/v2/internal/ffenestri/ffenestri_darwin.go +++ /dev/null @@ -1,99 +0,0 @@ -package ffenestri - -/* -#cgo darwin CFLAGS: -DFFENESTRI_DARWIN=1 -#cgo darwin LDFLAGS: -framework WebKit -framework CoreFoundation -lobjc - -#include "ffenestri.h" -#include "ffenestri_darwin.h" - -*/ -import "C" - -func (a *Application) processPlatformSettings() error { - - mac := a.config.Mac - titlebar := mac.TitleBar - - // HideTitle - if titlebar.HideTitle { - C.HideTitle(a.app) - } - - // HideTitleBar - if titlebar.HideTitleBar { - C.HideTitleBar(a.app) - } - - // Full Size Content - if titlebar.FullSizeContent { - C.FullSizeContent(a.app) - } - - // Toolbar - if titlebar.UseToolbar { - C.UseToolbar(a.app) - } - - if titlebar.HideToolbarSeparator { - C.HideToolbarSeparator(a.app) - } - - if titlebar.TitlebarAppearsTransparent { - C.TitlebarAppearsTransparent(a.app) - } - - // Process window Appearance - if mac.Appearance != "" { - C.SetAppearance(a.app, a.string2CString(string(mac.Appearance))) - } - - // Set activation policy - C.SetActivationPolicy(a.app, C.int(mac.ActivationPolicy)) - - // Check if the webview should be transparent - if mac.WebviewIsTransparent { - C.WebviewIsTransparent(a.app) - } - - // Check if window should be translucent - if mac.WindowIsTranslucent { - C.WindowIsTranslucent(a.app) - } - - // Process menu - //applicationMenu := options.GetApplicationMenu(a.config) - applicationMenu := a.menuManager.GetApplicationMenuJSON() - if applicationMenu != "" { - C.SetApplicationMenu(a.app, a.string2CString(applicationMenu)) - } - - // Process tray - trays, err := a.menuManager.GetTrayMenus() - if err != nil { - return err - } - if trays != nil { - for _, tray := range trays { - C.AddTrayMenu(a.app, a.string2CString(tray)) - } - } - - // Process context menus - contextMenus, err := a.menuManager.GetContextMenus() - if err != nil { - return err - } - if contextMenus != nil { - for _, contextMenu := range contextMenus { - C.AddContextMenu(a.app, a.string2CString(contextMenu)) - } - } - - // Process URL Handlers - if a.config.Mac.URLHandlers != nil { - C.HasURLHandlers(a.app) - } - - return nil -} diff --git a/v2/internal/ffenestri/ffenestri_darwin.h b/v2/internal/ffenestri/ffenestri_darwin.h deleted file mode 100644 index fd00338a4..000000000 --- a/v2/internal/ffenestri/ffenestri_darwin.h +++ /dev/null @@ -1,154 +0,0 @@ - -#ifndef FFENESTRI_DARWIN_H -#define FFENESTRI_DARWIN_H - - -#define OBJC_OLD_DISPATCH_PROTOTYPES 1 -#include -#include -#include -#include "json.h" -#include "hashmap.h" -#include "stdlib.h" - -typedef struct { - long maj; - long min; - long patch; -} OSVersion; - -// Macros to make it slightly more sane -#define msg objc_msgSend -#define msg_reg ((id(*)(id, SEL))objc_msgSend) -#define msg_id ((id(*)(id, SEL, id))objc_msgSend) -#define msg_id_id ((id(*)(id, SEL, id, id))objc_msgSend) -#define msg_bool ((id(*)(id, SEL, BOOL))objc_msgSend) -#define msg_int ((id(*)(id, SEL, int))objc_msgSend) -#define msg_uint ((id(*)(id, SEL, unsigned int))objc_msgSend) -#define msg_float ((id(*)(id, SEL, float))objc_msgSend) -#define kInternetEventClass 'GURL' -#define kAEGetURL 'GURL' -#define keyDirectObject '----' - -#define c(str) (id)objc_getClass(str) -#define s(str) sel_registerName(str) -#define u(str) sel_getUid(str) -#define str(input) ((id(*)(id, SEL, const char *))objc_msgSend)(c("NSString"), s("stringWithUTF8String:"), input) -#define strunicode(input) ((id(*)(id, SEL, id, unsigned short))objc_msgSend)(c("NSString"), s("stringWithFormat:"), str("%C"), (unsigned short)input) -#define cstr(input) (const char *)msg_reg(input, s("UTF8String")) -#define url(input) msg_id(c("NSURL"), s("fileURLWithPath:"), str(input)) -#define ALLOC(classname) msg_reg(c(classname), s("alloc")) -#define ALLOC_INIT(classname) msg_reg(msg_reg(c(classname), s("alloc")), s("init")) - -#if defined (__aarch64__) -#define GET_FRAME(receiver) ((CGRect(*)(id, SEL))objc_msgSend)(receiver, s("frame")) -#define GET_BOUNDS(receiver) ((CGRect(*)(id, SEL))objc_msgSend)(receiver, s("bounds")) -#define GET_OSVERSION(receiver) ((OSVersion(*)(id, SEL))objc_msgSend)(processInfo, s("operatingSystemVersion")); -#endif - -#if defined (__x86_64__) -#define GET_FRAME(receiver) ((CGRect(*)(id, SEL))objc_msgSend_stret)(receiver, s("frame")) -#define GET_BOUNDS(receiver) ((CGRect(*)(id, SEL))objc_msgSend_stret)(receiver, s("bounds")) -#define GET_OSVERSION(receiver) ((OSVersion(*)(id, SEL))objc_msgSend_stret)(processInfo, s("operatingSystemVersion")); -#endif - -#define GET_BACKINGSCALEFACTOR(receiver) ((CGFloat(*)(id, SEL))objc_msgSend)(receiver, s("backingScaleFactor")) - -#define ON_MAIN_THREAD(str) dispatch( ^{ str; } ) -#define MAIN_WINDOW_CALL(str) msg_reg(app->mainWindow, s((str))) - -#define NSBackingStoreBuffered 2 - -#define NSWindowStyleMaskBorderless 0 -#define NSWindowStyleMaskTitled 1 -#define NSWindowStyleMaskClosable 2 -#define NSWindowStyleMaskMiniaturizable 4 -#define NSWindowStyleMaskResizable 8 -#define NSWindowStyleMaskFullscreen 1 << 14 - -#define NSVisualEffectMaterialWindowBackground 12 -#define NSVisualEffectBlendingModeBehindWindow 0 -#define NSVisualEffectStateFollowsWindowActiveState 0 -#define NSVisualEffectStateActive 1 -#define NSVisualEffectStateInactive 2 - -#define NSViewWidthSizable 2 -#define NSViewHeightSizable 16 - -#define NSWindowBelow -1 -#define NSWindowAbove 1 - -#define NSSquareStatusItemLength -2.0 -#define NSVariableStatusItemLength -1.0 - -#define NSWindowTitleHidden 1 -#define NSWindowStyleMaskFullSizeContentView 1 << 15 - -#define NSEventModifierFlagCommand 1 << 20 -#define NSEventModifierFlagOption 1 << 19 -#define NSEventModifierFlagControl 1 << 18 -#define NSEventModifierFlagShift 1 << 17 - -#define NSControlStateValueMixed -1 -#define NSControlStateValueOff 0 -#define NSControlStateValueOn 1 - -#define NSApplicationActivationPolicyRegular 0 -#define NSApplicationActivationPolicyAccessory 1 -#define NSApplicationActivationPolicyProhibited 2 - -// Unbelievably, if the user swaps their button preference -// then right buttons are reported as left buttons -#define NSEventMaskLeftMouseDown 1 << 1 -#define NSEventMaskLeftMouseUp 1 << 2 -#define NSEventMaskRightMouseDown 1 << 3 -#define NSEventMaskRightMouseUp 1 << 4 - -#define NSEventTypeLeftMouseDown 1 -#define NSEventTypeLeftMouseUp 2 -#define NSEventTypeRightMouseDown 3 -#define NSEventTypeRightMouseUp 4 - -#define NSNoImage 0 -#define NSImageOnly 1 -#define NSImageLeft 2 -#define NSImageRight 3 -#define NSImageBelow 4 -#define NSImageAbove 5 -#define NSImageOverlaps 6 - -#define NSAlertStyleWarning 0 -#define NSAlertStyleInformational 1 -#define NSAlertStyleCritical 2 - -#define NSAlertFirstButtonReturn 1000 -#define NSAlertSecondButtonReturn 1001 -#define NSAlertThirdButtonReturn 1002 - -#define BrokenImage "iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAMAAABl5a5YAAABj1BMVEWopan///+koqSWk5P9/v3///////////+AgACMiovz8/PB0fG9z+3i4+WysbGBfX1Erh80rACLiYqBxolEsDhHlDEbqQDDx+CNho7W1tj4+/bw+O3P5Mn4/f/W1tbK6sX////b2dn////////////8/Pz6+vro6Ojj4+P////G1PL////EzNydmp2cmZnd3eDF1PHs8v/o8P/Q3vrS3vfE0vCdmpqZkpr19/3N2vXI1vPH1fOgnqDg6frP3PbCytvHx8irqq6HhIZtuGtjnlZetU1Xs0NWskBNsi7w9v/d6P7w9P3S4Pzr8Pvl7PrY5PrU4PjQ3fjD1Ozo6Om30NjGzNi7ubm34K+UxKmbnaWXlJeUjpSPi4tppF1TtjxSsTf2+f7L2PTr7e3H2+3V7+q+0uXg4OPg4eLR1uG7z+Hg4ODGzODV2N7V1trP5dmxzs65vcfFxMWq0cKxxr+/vr+0s7apxbWaxrCv2qao05+dlp2Uuo2Dn4F8vIB6xnyAoHmAym9zqGpctENLryNFsgoblJpnAAAAKnRSTlP+hP7+5ZRmYgL+/f39/f39/f38/Pz8/Pv69+7j083My8GocnBPTTMWEgjxeITOAAABEklEQVQY0y3KZXuCYBiG4ceYuu7u3nyVAaKOMBBQ7O5Yd3f3fvheDnd9u8/jBkGwNxP6sjOWVQvY/ftrzfT6bd3yEhCnYZqiaYoKiwX/gXkFiHySTcUTLJMsZ9v8nQvgssWYOEKedKpcOO6CUXD5IlGEY5hLUbyDAAZ6HRf1bnkoavOsFQibg+Q4nuNYL+ON5PHD5nBaraRVyxnzGf6BJzUi2QQCQgMyk8tleL7dg1owpJ17D5IkvV100EingeOopPyo6vfAuXF+9hbDTknZCIaUoeK4efKwG4iT6xDewd7imGlid7gGwv37b6Oh9jwaTdOf/Tc1qH7UZVmuP6G5qZfBr9cAGNy4KiDd4tXIs7tS+QO9aUKvPAIKuQAAAABJRU5ErkJggg==" - -struct Application; -int releaseNSObject(void *const context, struct hashmap_element_s *const e); -void TitlebarAppearsTransparent(struct Application* app); -void HideTitle(struct Application* app); -void HideTitleBar(struct Application* app); -void FullSizeContent(struct Application* app); -void UseToolbar(struct Application* app); -void HideToolbarSeparator(struct Application* app); -void DisableFrame(struct Application* app); -void SetAppearance(struct Application* app, const char *); -void WebviewIsTransparent(struct Application* app); -void WindowIsTranslucent(struct Application* app); -void SetTray(struct Application* app, const char *, const char *, const char *); -//void SetContextMenus(struct Application* app, const char *); -void AddTrayMenu(struct Application* app, const char *); - -void SetActivationPolicy(struct Application* app, int policy); - -void* lookupStringConstant(id constantName); - -void HasURLHandlers(struct Application* app); - -id createImageFromBase64Data(const char *data, bool isTemplateImage); - -#endif \ No newline at end of file diff --git a/v2/internal/ffenestri/ffenestri_linux.c b/v2/internal/ffenestri/ffenestri_linux.c deleted file mode 100644 index ab6b6032b..000000000 --- a/v2/internal/ffenestri/ffenestri_linux.c +++ /dev/null @@ -1,995 +0,0 @@ - -#ifndef __FFENESTRI_LINUX_H__ -#define __FFENESTRI_LINUX_H__ - -#include "common.h" -#include "gtk/gtk.h" -#include "webkit2/webkit2.h" -#include -#include -#include -#include -#include - -// References to assets -extern const unsigned char runtime; - -#include "icon.h" -#include "assets.h" - -// Constants -#define PRIMARY_MOUSE_BUTTON 1 -#define MIDDLE_MOUSE_BUTTON 2 -#define SECONDARY_MOUSE_BUTTON 3 - -// MAIN DEBUG FLAG -int debug; - -// Debug works like sprintf but mutes if the global debug flag is true -// Credit: https://stackoverflow.com/a/20639708 -void Debug(char *message, ...) -{ - if (debug) - { - char *temp = concat("TRACE | Ffenestri (C) | ", message); - message = concat(temp, "\n"); - free(temp); - va_list args; - va_start(args, message); - vprintf(message, args); - free(message); - va_end(args); - } -} - -extern void messageFromWindowCallback(const char *); -typedef void (*ffenestriCallback)(const char *); - -struct Application -{ - - // Gtk Data - GtkApplication *application; - GtkWindow *mainWindow; - GtkWidget *webView; - int signalInvoke; - int signalWindowDrag; - int signalButtonPressed; - int signalButtonReleased; - int signalLoadChanged; - - // Saves the events for the drag mouse button - GdkEventButton *dragButtonEvent; - - // The number of the default drag button - int dragButton; - - // Window Data - const char *title; - char *id; - int width; - int height; - int resizable; - int devtools; - int startHidden; - int fullscreen; - int minWidth; - int minHeight; - int maxWidth; - int maxHeight; - int frame; - - // User Data - char *HTML; - - // Callback - ffenestriCallback sendMessageToBackend; - - // Bindings - const char *bindings; - - // Lock - used for sync operations (Should we be using g_mutex?) - int lock; -}; - -void *NewApplication(const char *title, int width, int height, int resizable, int devtools, int fullscreen, int startHidden) -{ - // Setup main application struct - struct Application *result = malloc(sizeof(struct Application)); - result->title = title; - result->width = width; - result->height = height; - result->resizable = resizable; - result->devtools = devtools; - result->fullscreen = fullscreen; - result->minWidth = 0; - result->minHeight = 0; - result->maxWidth = 0; - result->maxHeight = 0; - result->frame = 1; - result->startHidden = startHidden; - - // Default drag button is PRIMARY - result->dragButton = PRIMARY_MOUSE_BUTTON; - - result->sendMessageToBackend = (ffenestriCallback)messageFromWindowCallback; - - // Create a unique ID based on the current unix timestamp - char temp[11]; - sprintf(&temp[0], "%d", (int)time(NULL)); - result->id = concat("wails.app", &temp[0]); - - // Create the main GTK application - GApplicationFlags flags = G_APPLICATION_FLAGS_NONE; - result->application = gtk_application_new(result->id, flags); - - // Return the application struct - return (void *)result; -} - -void DestroyApplication(struct Application *app) -{ - Debug("Destroying Application"); - - g_application_quit(G_APPLICATION(app->application)); - - // Release the GTK ID string - if (app->id != NULL) - { - free(app->id); - app->id = NULL; - } - else - { - Debug("Almost a double free for app->id"); - } - - // Free the bindings - if (app->bindings != NULL) - { - free((void *)app->bindings); - app->bindings = NULL; - } - else - { - Debug("Almost a double free for app->bindings"); - } - - // Disconnect signal handlers - WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager((WebKitWebView *)app->webView); - g_signal_handler_disconnect(manager, app->signalInvoke); - if( app->frame == 0) { - g_signal_handler_disconnect(manager, app->signalWindowDrag); - g_signal_handler_disconnect(app->webView, app->signalButtonPressed); - g_signal_handler_disconnect(app->webView, app->signalButtonReleased); - } - g_signal_handler_disconnect(app->webView, app->signalLoadChanged); - - // Release the main GTK Application - if (app->application != NULL) - { - g_object_unref(app->application); - app->application = NULL; - } - else - { - Debug("Almost a double free for app->application"); - } - Debug("Finished Destroying Application"); -} - -// Quit will stop the gtk application and free up all the memory -// used by the application -void Quit(struct Application *app) -{ - Debug("Quit Called"); - gtk_window_close((GtkWindow *)app->mainWindow); - g_application_quit((GApplication *)app->application); - DestroyApplication(app); -} - -// SetTitle sets the main window title to the given string -void SetTitle(struct Application *app, const char *title) -{ - gtk_window_set_title(app->mainWindow, title); -} - -// Fullscreen sets the main window to be fullscreen -void Fullscreen(struct Application *app) -{ - gtk_window_fullscreen(app->mainWindow); -} - -// UnFullscreen resets the main window after a fullscreen -void UnFullscreen(struct Application *app) -{ - gtk_window_unfullscreen(app->mainWindow); -} - -void setMinMaxSize(struct Application *app) -{ - GdkGeometry size; - size.min_width = size.min_height = size.max_width = size.max_height = 0; - int flags = 0; - if (app->maxHeight > 0 && app->maxWidth > 0) - { - size.max_height = app->maxHeight; - size.max_width = app->maxWidth; - flags |= GDK_HINT_MAX_SIZE; - } - if (app->minHeight > 0 && app->minWidth > 0) - { - size.min_height = app->minHeight; - size.min_width = app->minWidth; - flags |= GDK_HINT_MIN_SIZE; - } - gtk_window_set_geometry_hints(app->mainWindow, NULL, &size, flags); -} - -char *fileDialogInternal(struct Application *app, GtkFileChooserAction chooserAction, char **args) { - GtkFileChooserNative *native; - GtkFileChooserAction action = chooserAction; - gint res; - char *filename; - - char *title = args[0]; - char *filter = args[1]; - - native = gtk_file_chooser_native_new(title, - app->mainWindow, - action, - "_Open", - "_Cancel"); - - GtkFileChooser *chooser = GTK_FILE_CHOOSER(native); - - // If we have filters, process them - if (filter[0] != '\0') { - GtkFileFilter *file_filter = gtk_file_filter_new(); - gchar **filters = g_strsplit(filter, ",", -1); - gint i; - for(i = 0; filters && filters[i]; i++) { - gtk_file_filter_add_pattern(file_filter, filters[i]); - // Debug("Adding filter pattern: %s\n", filters[i]); - } - gtk_file_filter_set_name(file_filter, filter); - gtk_file_chooser_add_filter(chooser, file_filter); - g_strfreev(filters); - } - - res = gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)); - if (res == GTK_RESPONSE_ACCEPT) - { - filename = gtk_file_chooser_get_filename(chooser); - } - - g_object_unref(native); - - return filename; -} - -// openFileDialogInternal opens a dialog to select a file -// NOTE: The result is a string that will need to be freed! -char *openFileDialogInternal(struct Application *app, char **args) -{ - return fileDialogInternal(app, GTK_FILE_CHOOSER_ACTION_OPEN, args); -} - -// saveFileDialogInternal opens a dialog to select a file -// NOTE: The result is a string that will need to be freed! -char *saveFileDialogInternal(struct Application *app, char **args) -{ - return fileDialogInternal(app, GTK_FILE_CHOOSER_ACTION_SAVE, args); -} - - -// openDirectoryDialogInternal opens a dialog to select a directory -// NOTE: The result is a string that will need to be freed! -char *openDirectoryDialogInternal(struct Application *app, char **args) -{ - return fileDialogInternal(app, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, args); -} - -void SetMinWindowSize(struct Application *app, int minWidth, int minHeight) -{ - app->minWidth = minWidth; - app->minHeight = minHeight; -} - -void SetMaxWindowSize(struct Application *app, int maxWidth, int maxHeight) -{ - app->maxWidth = maxWidth; - app->maxHeight = maxHeight; -} - -// SetColour sets the colour of the webview to the given colour string -void SetColour(struct Application *app, int red, int green, int blue, int alpha) -{ -// GdkRGBA rgba; -// rgba. -// gboolean result = gdk_rgba_parse(&rgba, colourString); -// if (result == FALSE) -// { -// return 0; -// } -// // Debug("Setting webview colour to: %s", colourString); -// webkit_web_view_get_background_color((WebKitWebView *)(app->webView), &rgba); -} - -// DisableFrame disables the window frame -void DisableFrame(struct Application *app) -{ - app->frame = 0; -} - -void syncCallback(GObject *source_object, - GAsyncResult *res, - void *data) -{ - struct Application *app = (struct Application *)data; - app->lock = 0; -} - -void syncEval(struct Application *app, const gchar *script) -{ - - WebKitWebView *webView = (WebKitWebView *)(app->webView); - - // wait for lock to free - while (app->lock == 1) - { - g_main_context_iteration(0, true); - } - // Set lock - app->lock = 1; - - webkit_web_view_run_javascript( - webView, - script, - NULL, syncCallback, (void*)app); - - while (app->lock == 1) - { - g_main_context_iteration(0, true); - } -} - -void asyncEval(WebKitWebView *webView, const gchar *script) -{ - webkit_web_view_run_javascript( - webView, - script, - NULL, NULL, NULL); -} - -typedef void (*dispatchMethod)(struct Application *app, void *); - -struct dispatchData -{ - struct Application *app; - dispatchMethod method; - void *args; -}; - -gboolean executeMethod(gpointer data) -{ - struct dispatchData *d = (struct dispatchData *)data; - (d->method)(d->app, d->args); - g_free(d); - return FALSE; -} - -void ExecJS(struct Application *app, char *js) -{ - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)syncEval; - data->args = js; - data->app = app; - - gdk_threads_add_idle(executeMethod, data); -} - -typedef char *(*dialogMethod)(struct Application *app, void *); - -struct dialogCall -{ - struct Application *app; - dialogMethod method; - void *args; - void *filter; - char *result; - int done; -}; - -gboolean executeMethodWithReturn(gpointer data) -{ - struct dialogCall *d = (struct dialogCall *)data; - - d->result = (d->method)(d->app, d->args); - d->done = 1; - return FALSE; -} - -char *OpenFileDialog(struct Application *app, char *title, char *filter) -{ - struct dialogCall *data = (struct dialogCall *)g_new(struct dialogCall, 1); - data->result = NULL; - data->done = 0; - data->method = (dialogMethod)openFileDialogInternal; - const char* dialogArgs[]={ title, filter }; - data->args = dialogArgs; - data->app = app; - - gdk_threads_add_idle(executeMethodWithReturn, data); - - while (data->done == 0) - { - usleep(100000); - } - g_free(data); - return data->result; -} - -char *SaveFileDialog(struct Application *app, char *title, char *filter) -{ - struct dialogCall *data = (struct dialogCall *)g_new(struct dialogCall, 1); - data->result = NULL; - data->done = 0; - data->method = (dialogMethod)saveFileDialogInternal; - const char* dialogArgs[]={ title, filter }; - data->args = dialogArgs; - data->app = app; - - gdk_threads_add_idle(executeMethodWithReturn, data); - - while (data->done == 0) - { - usleep(100000); - } - Debug("Dialog done"); - Debug("Result = %s\n", data->result); - - g_free(data); - // Fingers crossed this wasn't freed by g_free above - return data->result; -} - -char *OpenDirectoryDialog(struct Application *app, char *title, char *filter) -{ - struct dialogCall *data = (struct dialogCall *)g_new(struct dialogCall, 1); - data->result = NULL; - data->done = 0; - data->method = (dialogMethod)openDirectoryDialogInternal; - const char* dialogArgs[]={ title, filter }; - data->args = dialogArgs; - data->app = app; - - gdk_threads_add_idle(executeMethodWithReturn, data); - - while (data->done == 0) - { - usleep(100000); - } - Debug("Directory Dialog done"); - Debug("Result = %s\n", data->result); - g_free(data); - // Fingers crossed this wasn't freed by g_free above - return data->result; -} - -// Sets the icon to the XPM stored in icon -void setIcon(struct Application *app) -{ - GdkPixbuf *appIcon = gdk_pixbuf_new_from_xpm_data((const char **)icon); - gtk_window_set_icon(app->mainWindow, appIcon); -} - -static void load_finished_cb(WebKitWebView *webView, - WebKitLoadEvent load_event, - struct Application *app) -{ - switch (load_event) - { - // case WEBKIT_LOAD_STARTED: - // /* New load, we have now a provisional URI */ - // // printf("Start downloading %s\n", webkit_web_view_get_uri(web_view)); - // /* Here we could start a spinner or update the - // * location bar with the provisional URI */ - // break; - // case WEBKIT_LOAD_REDIRECTED: - // // printf("Redirected to: %s\n", webkit_web_view_get_uri(web_view)); - // break; - // case WEBKIT_LOAD_COMMITTED: - // /* The load is being performed. Current URI is - // * the final one and it won't change unless a new - // * load is requested or a navigation within the - // * same page is performed */ - // // printf("Loading: %s\n", webkit_web_view_get_uri(web_view)); - // break; - case WEBKIT_LOAD_FINISHED: - /* Load finished, we can now stop the spinner */ - // printf("Finished loading: %s\n", webkit_web_view_get_uri(web_view)); - - // Bindings - Debug("Binding Methods"); - syncEval(app, app->bindings); - - // Setup IPC commands - Debug("Setting up IPC methods"); - const char *invoke = "window.wailsInvoke=function(message){window.webkit.messageHandlers.external.postMessage(message);};window.wailsDrag=function(message){window.webkit.messageHandlers.windowDrag.postMessage(message);};window.wailsContextMenuMessage=function(message){window.webkit.messageHandlers.contextMenu.postMessage(message);};"; - syncEval(app, invoke); - - // Runtime - Debug("Setting up Wails runtime"); - syncEval(app, &runtime); - - // Loop over assets - int index = 1; - while (1) - { - // Get next asset pointer - const char *asset = assets[index]; - - // If we have no more assets, break - if (asset == 0x00) - { - break; - } - - // sync eval the asset - syncEval(app, asset); - index++; - }; - - // Set the icon - setIcon(app); - - // Setup fullscreen - if (app->fullscreen) - { - Debug("Going fullscreen"); - Fullscreen(app); - } - - // Setup resize - gtk_window_resize(GTK_WINDOW(app->mainWindow), app->width, app->height); - - if (app->resizable) - { - gtk_window_set_default_size(GTK_WINDOW(app->mainWindow), app->width, app->height); - } - else - { - gtk_widget_set_size_request(GTK_WIDGET(app->mainWindow), app->width, app->height); - gtk_window_resize(GTK_WINDOW(app->mainWindow), app->width, app->height); - // Fix the min/max to the window size for good measure - app->minHeight = app->maxHeight = app->height; - app->minWidth = app->maxWidth = app->width; - } - gtk_window_set_resizable(GTK_WINDOW(app->mainWindow), app->resizable ? TRUE : FALSE); - setMinMaxSize(app); - - // Centre by default - gtk_window_set_position(app->mainWindow, GTK_WIN_POS_CENTER); - - // Show window and focus - if( app->startHidden == 0) { - gtk_widget_show_all(GTK_WIDGET(app->mainWindow)); - gtk_widget_grab_focus(app->webView); - } - break; - } -} - -static gboolean disable_context_menu_cb( - WebKitWebView *web_view, - WebKitContextMenu *context_menu, - GdkEvent *event, - WebKitHitTestResult *hit_test_result, - gpointer user_data) -{ - return TRUE; -} - -static void printEvent(const char *message, GdkEventButton *event) -{ - Debug("%s: [button:%d] [x:%f] [y:%f] [time:%d]", - message, - event->button, - event->x_root, - event->y_root, - event->time); -} - - -static void dragWindow(WebKitUserContentManager *contentManager, - WebKitJavascriptResult *result, - struct Application *app) -{ - // If we get this message erroneously, ignore - if (app->dragButtonEvent == NULL) - { - return; - } - - // Ignore non-toplevel widgets - GtkWidget *window = gtk_widget_get_toplevel(GTK_WIDGET(app->webView)); - if (!GTK_IS_WINDOW(window)) - { - return; - } - - // Initiate the drag - printEvent("Starting drag with event", app->dragButtonEvent); - - gtk_window_begin_move_drag(app->mainWindow, - app->dragButton, - app->dragButtonEvent->x_root, - app->dragButtonEvent->y_root, - app->dragButtonEvent->time); - // Clear the event - app->dragButtonEvent = NULL; - - return; -} - -gboolean buttonPress(GtkWidget *widget, GdkEventButton *event, struct Application *app) -{ - if (event->type == GDK_BUTTON_PRESS && event->button == app->dragButton) - { - app->dragButtonEvent = event; - } - return FALSE; -} - -gboolean buttonRelease(GtkWidget *widget, GdkEventButton *event, struct Application *app) -{ - if (event->type == GDK_BUTTON_RELEASE && event->button == app->dragButton) - { - app->dragButtonEvent = NULL; - } - return FALSE; -} - -static void sendMessageToBackend(WebKitUserContentManager *contentManager, - WebKitJavascriptResult *result, - struct Application *app) -{ -#if WEBKIT_MAJOR_VERSION >= 2 && WEBKIT_MINOR_VERSION >= 22 - JSCValue *value = webkit_javascript_result_get_js_value(result); - char *message = jsc_value_to_string(value); -#else - JSGlobalContextRef context = webkit_javascript_result_get_global_context(result); - JSValueRef value = webkit_javascript_result_get_value(result); - JSStringRef js = JSValueToStringCopy(context, value, NULL); - size_t messageSize = JSStringGetMaximumUTF8CStringSize(js); - char *message = g_new(char, messageSize); - JSStringGetUTF8CString(js, message, messageSize); - JSStringRelease(js); -#endif - app->sendMessageToBackend(message); - g_free(message); -} - -void SetDebug(struct Application *app, int flag) -{ - debug = flag; -} - -// getCurrentMonitorGeometry gets the geometry of the monitor -// that the window is mostly on. -GdkRectangle getCurrentMonitorGeometry(GtkWindow *window) { - // Get the monitor that the window is currently on - GdkDisplay *display = gtk_widget_get_display(GTK_WIDGET(window)); - GdkWindow *gdk_window = gtk_widget_get_window(GTK_WIDGET(window)); - GdkMonitor *monitor = gdk_display_get_monitor_at_window (display, gdk_window); - - // Get the geometry of the monitor - GdkRectangle result; - gdk_monitor_get_geometry (monitor,&result); - - return result; -} - -/******************* - * Window Position * - *******************/ - -// Position holds an x/y corrdinate -struct Position { - int x; - int y; -}; - -// Internal call for setting the position of the window. -void setPositionInternal(struct Application *app, struct Position *pos) { - - // Get the monitor geometry - GdkRectangle m = getCurrentMonitorGeometry(app->mainWindow); - - // Move the window relative to the monitor - gtk_window_move(app->mainWindow, m.x + pos->x, m.y + pos->y); - - // Free memory - free(pos); -} - -// SetPosition sets the position of the window to the given x/y -// coordinates. The x/y values are relative to the monitor -// the window is mostly on. -void SetPosition(struct Application *app, int x, int y) { - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)setPositionInternal; - struct Position *pos = malloc(sizeof(struct Position)); - pos->x = x; - pos->y = y; - data->args = pos; - data->app = app; - - gdk_threads_add_idle(executeMethod, data); -} - -/*************** - * Window Size * - ***************/ - -// Size holds a width/height -struct Size { - int width; - int height; -}; - -// Internal call for setting the size of the window. -void setSizeInternal(struct Application *app, struct Size *size) { - gtk_window_resize(app->mainWindow, size->width, size->height); - free(size); -} - -// SetSize sets the size of the window to the given width/height -void SetSize(struct Application *app, int width, int height) { - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)setSizeInternal; - struct Size *size = malloc(sizeof(struct Size)); - size->width = width; - size->height = height; - data->args = size; - data->app = app; - - gdk_threads_add_idle(executeMethod, data); -} - - -// centerInternal will center the main window on the monitor it is mostly in -void centerInternal(struct Application *app) -{ - // Get the geometry of the monitor - GdkRectangle m = getCurrentMonitorGeometry(app->mainWindow); - - // Get the window width/height - int windowWidth, windowHeight; - gtk_window_get_size(app->mainWindow, &windowWidth, &windowHeight); - - // Place the window at the center of the monitor - gtk_window_move(app->mainWindow, ((m.width - windowWidth) / 2) + m.x, ((m.height - windowHeight) / 2) + m.y); -} - -// Center the window -void Center(struct Application *app) { - - // Setup a call to centerInternal on the main thread - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)centerInternal; - data->app = app; - - // Add call to main thread - gdk_threads_add_idle(executeMethod, data); -} - -// hideInternal hides the main window -void hideInternal(struct Application *app) { - gtk_widget_hide (GTK_WIDGET(app->mainWindow)); -} - -// Hide places the hideInternal method onto the main thread for execution -void Hide(struct Application *app) { - - // Setup a call to hideInternal on the main thread - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)hideInternal; - data->app = app; - - // Add call to main thread - gdk_threads_add_idle(executeMethod, data); -} - -// showInternal shows the main window -void showInternal(struct Application *app) { - gtk_widget_show_all(GTK_WIDGET(app->mainWindow)); - gtk_widget_grab_focus(app->webView); -} - -// Show places the showInternal method onto the main thread for execution -void Show(struct Application *app) { - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)showInternal; - data->app = app; - - gdk_threads_add_idle(executeMethod, data); -} - - -// maximiseInternal maximises the main window -void maximiseInternal(struct Application *app) { - gtk_window_maximize(GTK_WINDOW(app->mainWindow)); -} - -// Maximise places the maximiseInternal method onto the main thread for execution -void Maximise(struct Application *app) { - - // Setup a call to maximiseInternal on the main thread - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)maximiseInternal; - data->app = app; - - // Add call to main thread - gdk_threads_add_idle(executeMethod, data); -} - -// unmaximiseInternal unmaximises the main window -void unmaximiseInternal(struct Application *app) { - gtk_window_unmaximize(GTK_WINDOW(app->mainWindow)); -} - -// Unmaximise places the unmaximiseInternal method onto the main thread for execution -void Unmaximise(struct Application *app) { - - // Setup a call to unmaximiseInternal on the main thread - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)unmaximiseInternal; - data->app = app; - - // Add call to main thread - gdk_threads_add_idle(executeMethod, data); -} - - -void DarkModeEnabled(struct Application* app, char *callbackID) {} -void SetApplicationMenu(struct Application* app, const char *menuJSON) {} -void AddTrayMenu(struct Application* app, const char *menuTrayJSON) {} -void SetTrayMenu(struct Application* app, const char *menuTrayJSON) {} -void DeleteTrayMenuByID(struct Application* app, const char *id) {} -void UpdateTrayMenuLabel(struct Application* app, const char* JSON) {} -void AddContextMenu(struct Application* app, char *contextMenuJSON) {} -void UpdateContextMenu(struct Application* app, char *contextMenuJSON) {} -void WebviewIsTransparent(struct Application* app) {} -void WindowIsTranslucent(struct Application* app) {} -void OpenDialog(struct Application* app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int allowFiles, int allowDirs, int allowMultiple, int showHiddenFiles, int canCreateDirectories, int resolvesAliases, int treatPackagesAsDirectories) {} -void SaveDialog(struct Application* app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int showHiddenFiles, int canCreateDirectories, int treatPackagesAsDirectories) {} -void MessageDialog(struct Application* app, char *callbackID, char *type, char *title, char *message, char *icon, char *button1, char *button2, char *button3, char *button4, char *defaultButton, char *cancelButton) {} - - -// minimiseInternal minimises the main window -void minimiseInternal(struct Application *app) { - gtk_window_iconify(app->mainWindow); -} - -// Minimise places the minimiseInternal method onto the main thread for execution -void Minimise(struct Application *app) { - - // Setup a call to minimiseInternal on the main thread - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)minimiseInternal; - data->app = app; - - // Add call to main thread - gdk_threads_add_idle(executeMethod, data); -} - -// unminimiseInternal unminimises the main window -void unminimiseInternal(struct Application *app) { - gtk_window_present(app->mainWindow); -} - -// Unminimise places the unminimiseInternal method onto the main thread for execution -void Unminimise(struct Application *app) { - - // Setup a call to unminimiseInternal on the main thread - struct dispatchData *data = (struct dispatchData *)g_new(struct dispatchData, 1); - data->method = (dispatchMethod)unminimiseInternal; - data->app = app; - - // Add call to main thread - gdk_threads_add_idle(executeMethod, data); -} - - -void SetBindings(struct Application *app, const char *bindings) -{ - const char *temp = concat("window.wailsbindings = \"", bindings); - const char *jscall = concat(temp, "\";"); - free((void *)temp); - app->bindings = jscall; -} - -// This is called when the close button on the window is pressed -gboolean close_button_pressed(GtkWidget *widget, - GdkEvent *event, - struct Application *app) -{ - app->sendMessageToBackend("WC"); // Window Close - return TRUE; -} - -static void setupWindow(struct Application *app) -{ - - // Create the window - GtkWidget *mainWindow = gtk_application_window_new(app->application); - // Save reference - app->mainWindow = GTK_WINDOW(mainWindow); - - // Setup frame - gtk_window_set_decorated((GtkWindow *)mainWindow, app->frame); - - // Setup title - gtk_window_set_title(GTK_WINDOW(mainWindow), app->title); - - // Setup script handler - WebKitUserContentManager *contentManager = webkit_user_content_manager_new(); - - // Setup the invoke handler - webkit_user_content_manager_register_script_message_handler(contentManager, "external"); - app->signalInvoke = g_signal_connect(contentManager, "script-message-received::external", G_CALLBACK(sendMessageToBackend), app); - - // Setup the window drag handler if this is a frameless app - if ( app->frame == 0 ) { - webkit_user_content_manager_register_script_message_handler(contentManager, "windowDrag"); - app->signalWindowDrag = g_signal_connect(contentManager, "script-message-received::windowDrag", G_CALLBACK(dragWindow), app); - // Setup the mouse handlers - app->signalButtonPressed = g_signal_connect(app->webView, "button-press-event", G_CALLBACK(buttonPress), app); - app->signalButtonReleased = g_signal_connect(app->webView, "button-release-event", G_CALLBACK(buttonRelease), app); - } - GtkWidget *webView = webkit_web_view_new_with_user_content_manager(contentManager); - - // Save reference - app->webView = webView; - - // Add the webview to the window - gtk_container_add(GTK_CONTAINER(mainWindow), webView); - - - // Load default HTML - app->signalLoadChanged = g_signal_connect(G_OBJECT(webView), "load-changed", G_CALLBACK(load_finished_cb), app); - - // Load the user's HTML - // assets[0] is the HTML because the asset array is bundled like that by convention - webkit_web_view_load_uri(WEBKIT_WEB_VIEW(webView), assets[0]); - - // Check if we want to enable the dev tools - if (app->devtools) - { - WebKitSettings *settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView)); - // webkit_settings_set_enable_write_console_messages_to_stdout(settings, true); - webkit_settings_set_enable_developer_extras(settings, true); - } - else - { - g_signal_connect(G_OBJECT(webView), "context-menu", G_CALLBACK(disable_context_menu_cb), app); - } - - // Listen for close button signal - g_signal_connect(GTK_WIDGET(mainWindow), "delete-event", G_CALLBACK(close_button_pressed), app); -} - -static void activate(GtkApplication* _, struct Application *app) -{ - setupWindow(app); -} - -void Run(struct Application *app, int argc, char **argv) -{ - g_signal_connect(app->application, "activate", G_CALLBACK(activate), app); - g_application_run(G_APPLICATION(app->application), argc, argv); -} - -#endif diff --git a/v2/internal/ffenestri/ffenestri_linux.go b/v2/internal/ffenestri/ffenestri_linux.go deleted file mode 100644 index ca7abe7a1..000000000 --- a/v2/internal/ffenestri/ffenestri_linux.go +++ /dev/null @@ -1,17 +0,0 @@ -package ffenestri - -/* -#cgo linux CFLAGS: -DFFENESTRI_LINUX=1 -#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 - - -#include "ffenestri.h" -#include "ffenestri_linux.h" - -*/ -import "C" - -func (a *Application) processPlatformSettings() error { - - return nil -} diff --git a/v2/internal/ffenestri/ffenestri_linux.h b/v2/internal/ffenestri/ffenestri_linux.h deleted file mode 100644 index 26902d334..000000000 --- a/v2/internal/ffenestri/ffenestri_linux.h +++ /dev/null @@ -1,6 +0,0 @@ - -#ifndef FFENESTRI_LINUX_H -#define FFENESTRI_LINUX_H - - -#endif \ No newline at end of file diff --git a/v2/internal/ffenestri/ffenestri_windows.cpp b/v2/internal/ffenestri/ffenestri_windows.cpp deleted file mode 100644 index 91500774f..000000000 --- a/v2/internal/ffenestri/ffenestri_windows.cpp +++ /dev/null @@ -1,906 +0,0 @@ -// Some code may be inspired by or directly used from Webview (c) zserge. -// License included in README.md - -#include "ffenestri_windows.h" -#include "shellscalingapi.h" -#include "wv2ComHandler_windows.h" -#include -#include -#include -#include -#include -#include "windows/WebView2.h" -#include -#include "effectstructs_windows.h" -#include - -int debug = 0; -DWORD mainThread; - -#define WS_EX_NOREDIRECTIONBITMAP 0x00200000L - -// --- Assets -extern const unsigned char runtime; -extern const unsigned char *defaultDialogIcons[]; - -// dispatch will execute the given `func` pointer -void dispatch(dispatchFunction func) { - PostThreadMessage(mainThread, WM_APP, 0, (LPARAM) new dispatchFunction(func)); -} - -void processKeyPress(UINT key) { - // Get state of Control - bool controlPressed = GetKeyState(VK_CONTROL) >> 15 != 0; - bool altPressed = GetKeyState(VK_MENU) >> 15 != 0; - bool shiftPressed = GetKeyState(VK_SHIFT) >> 15 != 0; - - // Save the modifier keys - BYTE modState = 0; - if ( GetKeyState(VK_CONTROL) >> 15 != 0 ) { modState |= 1; } - if ( GetKeyState(VK_MENU) >> 15 != 0 ) { modState |= 2; } - if ( GetKeyState(VK_SHIFT) >> 15 != 0 ) { modState |= 4; } - if ( GetKeyState(VK_LWIN) >> 15 != 0 ) { modState |= 8; } - if ( GetKeyState(VK_RWIN) >> 15 != 0 ) { modState |= 8; } - - // Notify app of keypress - handleKeypressInGo(key, modState); -} - - -LPWSTR cstrToLPWSTR(const char *cstr) { - int wchars_num = MultiByteToWideChar( CP_UTF8 , 0 , cstr , -1, NULL , 0 ); - wchar_t* wstr = new wchar_t[wchars_num+1]; - MultiByteToWideChar( CP_UTF8 , 0 , cstr , -1, wstr , wchars_num ); - return wstr; -} - -// Credit: https://stackoverflow.com/a/9842450 -char* LPWSTRToCstr(LPWSTR input) { - int length = WideCharToMultiByte(CP_UTF8, 0, input, -1, 0, 0, NULL, NULL); - char* output = new char[length]; - WideCharToMultiByte(CP_UTF8, 0, input, -1, output , length, NULL, NULL); - return output; -} - - -// Credit: https://building.enlyze.com/posts/writing-win32-apps-like-its-2020-part-3/ -typedef int (__cdecl *PGetDpiForMonitor)(HMONITOR, MONITOR_DPI_TYPE,UINT*,UINT*); -void getDPIForWindow(struct Application *app) -{ - HMODULE hShcore = LoadLibraryW(L"shcore"); - if (hShcore) - { - PGetDpiForMonitor pGetDpiForMonitor = reinterpret_cast(GetProcAddress(hShcore, "GetDpiForMonitor")); - if (pGetDpiForMonitor) - { - HMONITOR hMonitor = MonitorFromWindow(app->window, MONITOR_DEFAULTTOPRIMARY); - pGetDpiForMonitor(hMonitor, (MONITOR_DPI_TYPE)0, &app->dpix, &app->dpiy); - } - } else { - // We couldn't get the window's DPI above, so get the DPI of the primary monitor - // using an API that is available in all Windows versions. - HDC hScreenDC = GetDC(0); - app->dpix = GetDeviceCaps(hScreenDC, LOGPIXELSX); - app->dpiy = GetDeviceCaps(hScreenDC, LOGPIXELSY); - ReleaseDC(0, hScreenDC); - } -} - -struct Application *NewApplication(const char *title, int width, int height, int resizable, int devtools, int fullscreen, int startHidden, int logLevel, int hideWindowOnClose) { - - // Create application - struct Application *result = (struct Application*)malloc(sizeof(struct Application)); - - result->window = nullptr; - result->webview = nullptr; - result->webviewController = nullptr; - - result->title = title; - result->width = width; - result->height = height; - result->resizable = resizable; - result->devtools = devtools; - result->fullscreen = fullscreen; - result->startHidden = startHidden; - result->logLevel = logLevel; - result->hideWindowOnClose = hideWindowOnClose; - result->webviewIsTranparent = false; - result->WindowIsTranslucent = false; - result->disableWindowIcon = false; - - // Min/Max Width/Height - result->minWidth = 0; - result->minHeight = 0; - result->maxWidth = 0; - result->maxHeight = 0; - - // Default colour - result->backgroundColour.R = 255; - result->backgroundColour.G = 255; - result->backgroundColour.B = 255; - result->backgroundColour.A = 255; - - // Have a frame by default - result->frame = 1; - - // Capture Main Thread - mainThread = GetCurrentThreadId(); - - // Startup url - result->startupURL = nullptr; - - // Used to remember the window location when going fullscreen - result->previousPlacement = { sizeof(result->previousPlacement) }; - - // DPI - result->dpix = result->dpiy = 0; - - return result; -} - -void* GetWindowHandle(struct Application *app) { - return (void*)app->window; -} - -void SetMinWindowSize(struct Application* app, int minWidth, int minHeight) { - app->minWidth = (LONG)minWidth; - app->minHeight = (LONG)minHeight; -} - -void SetMaxWindowSize(struct Application* app, int maxWidth, int maxHeight) { - app->maxWidth = (LONG)maxWidth; - app->maxHeight = (LONG)maxHeight; -} - -void SetBindings(struct Application *app, const char *bindings) { - std::string temp = std::string("window.wailsbindings = \"") + std::string(bindings) + std::string("\";"); - app->bindings = new char[temp.length()+1]; - memcpy(app->bindings, temp.c_str(), temp.length()+1); -} - -void performShutdown(struct Application *app) { - if( app->startupURL != nullptr ) { - delete[] app->startupURL; - } - messageFromWindowCallback("WC"); -} - -// Credit: https://gist.github.com/ysc3839/b08d2bff1c7dacde529bed1d37e85ccf -void enableTranslucentBackground(struct Application *app) { - HMODULE hUser = GetModuleHandleA("user32.dll"); - if (hUser) - { - pfnSetWindowCompositionAttribute setWindowCompositionAttribute = (pfnSetWindowCompositionAttribute)GetProcAddress(hUser, "SetWindowCompositionAttribute"); - if (setWindowCompositionAttribute) - { - ACCENT_POLICY accent = { ACCENT_ENABLE_BLURBEHIND, 0, 0, 0 }; - WINDOWCOMPOSITIONATTRIBDATA data; - data.Attrib = WCA_ACCENT_POLICY; - data.pvData = &accent; - data.cbData = sizeof(accent); - setWindowCompositionAttribute(app->window, &data); - } - } -} - -LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - - struct Application *app = (struct Application *)GetWindowLongPtr(hwnd, GWLP_USERDATA); - - switch(msg) { - - case WM_CREATE: { - createApplicationMenu(hwnd); - break; - } - case WM_COMMAND: - menuClicked(LOWORD(wParam)); - break; - - case WM_CLOSE: { - DestroyWindow( app->window ); - break; - } - case WM_DESTROY: { - if( app->hideWindowOnClose ) { - Hide(app); - } else { - PostQuitMessage(0); - } - break; - } - case WM_SIZE: { - if ( app == NULL ) { - return 0; - } - if( app->webviewController != nullptr) { - RECT bounds; - GetClientRect(app->window, &bounds); - app->webviewController->put_Bounds(bounds); - } - break; - } - case WM_KEYDOWN: - // This is needed because webview2 is sometimes not in focus - // https://github.com/MicrosoftEdge/WebView2Feedback/issues/1541 - processKeyPress(wParam); - break; - case WM_GETMINMAXINFO: { - // Exit early if this is called before the window is created. - if ( app == NULL ) { - return 0; - } - - // update DPI - getDPIForWindow(app); - double DPIScaleX = app->dpix/96.0; - double DPIScaleY = app->dpiy/96.0; - - RECT rcWind; - POINT ptDiff; - GetWindowRect(hwnd, &rcWind); - - int widthExtra = (rcWind.right - rcWind.left); - int heightExtra = (rcWind.bottom - rcWind.top); - - LPMINMAXINFO mmi = (LPMINMAXINFO) lParam; - if (app->minWidth > 0 && app->minHeight > 0) { - mmi->ptMinTrackSize.x = app->minWidth * DPIScaleX; - mmi->ptMinTrackSize.y = app->minHeight * DPIScaleY; - } - if (app->maxWidth > 0 && app->maxHeight > 0) { - mmi->ptMaxSize.x = app->maxWidth * DPIScaleX; - mmi->ptMaxSize.y = app->maxHeight * DPIScaleY; - mmi->ptMaxTrackSize.x = app->maxWidth * DPIScaleX; - mmi->ptMaxTrackSize.y = app->maxHeight * DPIScaleY; - } - return 0; - } - default: - return DefWindowProc(hwnd, msg, wParam, lParam); - } - return 0; -} - -void init(struct Application *app, const char* js) { - LPCWSTR wjs = cstrToLPWSTR(js); - app->webview->AddScriptToExecuteOnDocumentCreated(wjs, nullptr); - delete[] wjs; -} - -void execJS(struct Application* app, const char *script) { - LPWSTR s = cstrToLPWSTR(script); - app->webview->ExecuteScript(s, nullptr); - delete[] s; -} - -void loadAssets(struct Application* app) { - - // setup window.wailsInvoke - std::string initialCode = std::string("window.wailsInvoke=function(m){window.chrome.webview.postMessage(m)};"); - - // Load bindings - initialCode += std::string(app->bindings); - delete[] app->bindings; - - // Load runtime - initialCode += std::string((const char*)&runtime); - - int index = 1; - while(1) { - // Get next asset pointer - const unsigned char *asset = assets[index]; - - // If we have no more assets, break - if (asset == 0x00) { - break; - } - - initialCode += std::string((const char*)asset); - index++; - }; - - // Disable context menu if not in debug mode - if( debug != 1 ) { - initialCode += std::string("wails._.DisableDefaultContextMenu();"); - } - - initialCode += std::string("window.wailsInvoke('completed');"); - - // Keep a copy of the code - app->initialCode = new char[initialCode.length()+1]; - memcpy(app->initialCode, initialCode.c_str(), initialCode.length()+1); - - execJS(app, app->initialCode); - - // Show app if we need to - if( app->startHidden == false ) { - Show(app); - } -} - -// This is called when all our assets are loaded into the DOM -void completed(struct Application* app) { - delete[] app->initialCode; - app->initialCode = nullptr; - - // Process whether window should show by default - int startVisibility = SW_SHOWNORMAL; - if ( app->startHidden == 1 ) { - startVisibility = SW_HIDE; - } - - // Fix for webview2 bug: https://github.com/MicrosoftEdge/WebView2Feedback/issues/1077 - // Will be fixed in next stable release - app->webviewController->put_IsVisible(false); - app->webviewController->put_IsVisible(true); - - // Private setTitle as we're on the main thread - if( app->frame == 1) { - setTitle(app, app->title); - } - - ShowWindow(app->window, startVisibility); - UpdateWindow(app->window); - SetFocus(app->window); - - if( app->startupURL == nullptr ) { - messageFromWindowCallback("SS"); - return; - } - std::string readyMessage = std::string("SS") + std::string(app->startupURL); - messageFromWindowCallback(readyMessage.c_str()); -} - -// -bool initWebView2(struct Application *app, int debugEnabled, messageCallback cb) { - - debug = debugEnabled; - - CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - std::atomic_flag flag = ATOMIC_FLAG_INIT; - flag.test_and_set(); - - char currentExePath[MAX_PATH]; - GetModuleFileNameA(NULL, currentExePath, MAX_PATH); - char *currentExeName = PathFindFileNameA(currentExePath); - - std::wstring_convert> wideCharConverter; - std::wstring userDataFolder = - wideCharConverter.from_bytes(std::getenv("APPDATA")); - std::wstring currentExeNameW = wideCharConverter.from_bytes(currentExeName); - - ICoreWebView2Controller *controller; - ICoreWebView2* webview; - - HRESULT res = CreateCoreWebView2EnvironmentWithOptions( - nullptr, (userDataFolder + L"/" + currentExeNameW).c_str(), nullptr, - new wv2ComHandler(app, app->window, cb, - [&](ICoreWebView2Controller *webviewController) { - controller = webviewController; - controller->get_CoreWebView2(&webview); - webview->AddRef(); - ICoreWebView2Settings* settings; - webview->get_Settings(&settings); - if ( debugEnabled == 0 ) { - settings->put_AreDefaultContextMenusEnabled(FALSE); - } - // Fix for invisible webview - if( app->startHidden ) {} - controller->MoveFocus(COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC); - flag.clear(); - })); - if (!SUCCEEDED(res)) - { - switch (res) - { - case HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND): - { - MessageBox( - app->window, - L"Couldn't find Edge installation. " - "Do you have a version installed that's compatible with this " - "WebView2 SDK version?", - nullptr, MB_OK); - } - break; - case HRESULT_FROM_WIN32(ERROR_FILE_EXISTS): - { - MessageBox( - app->window, L"User data folder cannot be created because a file with the same name already exists.", nullptr, MB_OK); - } - break; - case E_ACCESSDENIED: - { - MessageBox( - app->window, L"Unable to create user data folder, Access Denied.", nullptr, MB_OK); - } - break; - case E_FAIL: - { - MessageBox( - app->window, L"Edge runtime unable to start", nullptr, MB_OK); - } - break; - default: - { - MessageBox(app->window, L"Failed to create WebView2 environment", nullptr, MB_OK); - } - } - } - - if (res != S_OK) { - CoUninitialize(); - return false; - } - - MSG msg = {}; - while (flag.test_and_set() && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - app->webviewController = controller; - app->webview = webview; - - // Resize WebView to fit the bounds of the parent window - RECT bounds; - GetClientRect(app->window, &bounds); - app->webviewController->put_Bounds(bounds); - - // Let the backend know we have initialised - app->webview->AddScriptToExecuteOnDocumentCreated(L"window.chrome.webview.postMessage('initialised');", nullptr); - // Load the HTML - LPCWSTR html = (LPCWSTR) cstrToLPWSTR((char*)assets[0]); - app->webview->Navigate(html); - - if( app->webviewIsTranparent ) { - wchar_t szBuff[64]; - ICoreWebView2Controller2 *wc2; - wc2 = nullptr; - app->webviewController->QueryInterface(IID_ICoreWebView2Controller2, (void**)&wc2); - - COREWEBVIEW2_COLOR wvColor; - wvColor.R = app->backgroundColour.R; - wvColor.G = app->backgroundColour.G; - wvColor.B = app->backgroundColour.B; - wvColor.A = app->backgroundColour.A == 0 ? 0 : 255; - if( app->WindowIsTranslucent ) { - wvColor.A = 0; - } - HRESULT result = wc2->put_DefaultBackgroundColor(wvColor); - if (!SUCCEEDED(result)) - { - switch (result) - { - case HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND): - { - MessageBox( - app->window, - L"Couldn't find Edge installation. " - "Do you have a version installed that's compatible with this " - "WebView2 SDK version?", - nullptr, MB_OK); - } - break; - case HRESULT_FROM_WIN32(ERROR_FILE_EXISTS): - { - MessageBox( - app->window, L"User data folder cannot be created because a file with the same name already exists.", nullptr, MB_OK); - } - break; - case E_ACCESSDENIED: - { - MessageBox( - app->window, L"Unable to create user data folder, Access Denied.", nullptr, MB_OK); - } - break; - case E_FAIL: - { - MessageBox( - app->window, L"Edge runtime unable to start", nullptr, MB_OK); - } - break; - default: - { - MessageBox(app->window, L"Failed to create WebView2 environment", nullptr, MB_OK); - } - } - } - - } - - messageFromWindowCallback("Ej{\"name\":\"wails:launched\",\"data\":[]}"); - - return true; -} - -void initialCallback(std::string message) { - printf("MESSAGE=%s\n", message); -} - -void Run(struct Application* app, int argc, char **argv) { - - // Register the window class. - const wchar_t CLASS_NAME[] = L"Ffenestri"; - - WNDCLASSEX wc = { }; - - wc.cbSize = sizeof(WNDCLASSEX); - wc.lpfnWndProc = WndProc; - wc.hInstance = GetModuleHandle(NULL); - wc.lpszClassName = CLASS_NAME; - - if( app->disableWindowIcon == false ) { - wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(100)); - wc.hIconSm = LoadIcon(wc.hInstance, MAKEINTRESOURCE(100)); - } - - // Configure translucency - DWORD dwExStyle = 0; - if ( app->WindowIsTranslucent) { - dwExStyle = WS_EX_NOREDIRECTIONBITMAP; - wc.hbrBackground = CreateSolidBrush(RGB(255,255,255)); - } - - RegisterClassEx(&wc); - - // Process window style - DWORD windowStyle = WS_OVERLAPPEDWINDOW | WS_THICKFRAME | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; - - if (app->resizable == 0) { - windowStyle &= ~WS_MAXIMIZEBOX; - windowStyle &= ~WS_THICKFRAME; - } - if ( app->frame == 0 ) { - windowStyle &= ~WS_OVERLAPPEDWINDOW; - windowStyle &= ~WS_CAPTION; - windowStyle |= WS_POPUP; - } - - // Create the window. - app->window = CreateWindowEx( - dwExStyle, // Optional window styles. - CLASS_NAME, // Window class - L"", // Window text - windowStyle, // Window style - - // Size and position - CW_USEDEFAULT, CW_USEDEFAULT, app->width, app->height, - - NULL, // Parent window - NULL, // Menu - wc.hInstance, // Instance handle - NULL // Additional application data - ); - - if (app->window == NULL) - { - return; - } - - if ( app->fullscreen ) { - fullscreen(app); - } - - // Credit: https://stackoverflow.com/a/35482689 - if( app->disableWindowIcon && app->frame == 1 ) { - int extendedStyle = GetWindowLong(app->window, GWL_EXSTYLE); - SetWindowLong(app->window, GWL_EXSTYLE, extendedStyle | WS_EX_DLGMODALFRAME); - SetWindowPos(nullptr, nullptr, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); - } - - if ( app->WindowIsTranslucent ) { - - // Enable the translucent background effect - enableTranslucentBackground(app); - - // Setup transparency of main window. This allows the blur to show through. - SetLayeredWindowAttributes(app->window,RGB(255,255,255),0,LWA_COLORKEY); - } - - // Store application pointer in window handle - SetWindowLongPtr(app->window, GWLP_USERDATA, (LONG_PTR)app); - - // private center() as we are on main thread - center(app); - - // Add webview2 - initWebView2(app, debug, initialCallback); - - - // Main event loop - MSG msg; - BOOL res; - while ((res = GetMessage(&msg, NULL, 0, 0)) != -1) { - if (msg.hwnd) { - TranslateMessage(&msg); - DispatchMessage(&msg); - continue; - } - if (msg.message == WM_APP) { - dispatchFunction *f = (dispatchFunction*) msg.lParam; - (*f)(); - delete(f); - } else if (msg.message == WM_QUIT) { - performShutdown(app); - return; - } - } -} - -void SetDebug(struct Application* app, int flag) { - debug = flag; -} - -void ExecJS(struct Application* app, const char *script) { - ON_MAIN_THREAD( - execJS(app, script); - ); -} - -void hide(struct Application* app) { - ShowWindow(app->window, SW_HIDE); -} - -void Hide(struct Application* app) { - ON_MAIN_THREAD( - hide(app); - ); -} - -void show(struct Application* app) { - ShowWindow(app->window, SW_SHOW); -} - -void Show(struct Application* app) { - ON_MAIN_THREAD( - show(app); - ); -} - -void DisableWindowIcon(struct Application* app) { - app->disableWindowIcon = true; -} - -void center(struct Application* app) { - - HMONITOR currentMonitor = MonitorFromWindow(app->window, MONITOR_DEFAULTTONEAREST); - MONITORINFO info = {0}; - info.cbSize = sizeof(info); - GetMonitorInfoA(currentMonitor, &info); - RECT workRect = info.rcWork; - LONG screenMiddleW = (workRect.right - workRect.left) / 2; - LONG screenMiddleH = (workRect.bottom - workRect.top) / 2; - RECT winRect; - if (app->frame == 1) { - GetWindowRect(app->window, &winRect); - } else { - GetClientRect(app->window, &winRect); - } - LONG winWidth = winRect.right - winRect.left; - LONG winHeight = winRect.bottom - winRect.top; - - LONG windowX = screenMiddleW - (winWidth / 2); - LONG windowY = screenMiddleH - (winHeight / 2); - - SetWindowPos(app->window, HWND_TOP, windowX, windowY, winWidth, winHeight, SWP_NOSIZE); -} - -void Center(struct Application* app) { - ON_MAIN_THREAD( - center(app); - ); -} - -UINT getWindowPlacement(struct Application* app) { - WINDOWPLACEMENT lpwndpl; - lpwndpl.length = sizeof(WINDOWPLACEMENT); - BOOL result = GetWindowPlacement(app->window, &lpwndpl); - if( result == 0 ) { - // TODO: Work out what this call failing means - return -1; - } - return lpwndpl.showCmd; -} - -int isMaximised(struct Application* app) { - return getWindowPlacement(app) == SW_SHOWMAXIMIZED; -} - -void maximise(struct Application* app) { - ShowWindow(app->window, SW_MAXIMIZE); -} - -void Maximise(struct Application* app) { - ON_MAIN_THREAD( - maximise(app); - ); -} - -void unmaximise(struct Application* app) { - ShowWindow(app->window, SW_RESTORE); -} - -void Unmaximise(struct Application* app) { - ON_MAIN_THREAD( - unmaximise(app); - ); -} - - -void ToggleMaximise(struct Application* app) { - if(isMaximised(app)) { - return Unmaximise(app); - } - return Maximise(app); -} - -int isMinimised(struct Application* app) { - return getWindowPlacement(app) == SW_SHOWMINIMIZED; -} - -void minimise(struct Application* app) { - ShowWindow(app->window, SW_MINIMIZE); -} - -void Minimise(struct Application* app) { - ON_MAIN_THREAD( - minimise(app); - ); -} - -void unminimise(struct Application* app) { - ShowWindow(app->window, SW_RESTORE); -} - -void Unminimise(struct Application* app) { - ON_MAIN_THREAD( - unminimise(app); - ); -} - -void ToggleMinimise(struct Application* app) { - if(isMinimised(app)) { - return Unminimise(app); - } - return Minimise(app); -} - -void SetColour(struct Application* app, int red, int green, int blue, int alpha) { - app->backgroundColour.R = red; - app->backgroundColour.G = green; - app->backgroundColour.B = blue; - app->backgroundColour.A = alpha; -} - -void SetSize(struct Application* app, int width, int height) { - if( app->maxWidth > 0 && width > app->maxWidth ) { - width = app->maxWidth; - } - if ( app->maxHeight > 0 && height > app->maxHeight ) { - height = app->maxHeight; - } - SetWindowPos(app->window, nullptr, 0, 0, width, height, SWP_NOMOVE); -} - -void setPosition(struct Application* app, int x, int y) { - HMONITOR currentMonitor = MonitorFromWindow(app->window, MONITOR_DEFAULTTONEAREST); - MONITORINFO info = {0}; - info.cbSize = sizeof(info); - GetMonitorInfoA(currentMonitor, &info); - RECT workRect = info.rcWork; - LONG newX = workRect.left + x; - LONG newY = workRect.top + y; - - SetWindowPos(app->window, HWND_TOP, newX, newY, 0, 0, SWP_NOSIZE); -} - -void SetPosition(struct Application* app, int x, int y) { - ON_MAIN_THREAD( - setPosition(app, x, y); - ); -} - -void Quit(struct Application* app) { - // Override the hide window on close flag - app->hideWindowOnClose = 0; - ON_MAIN_THREAD( - DestroyWindow(app->window); - ); -} - - -// Credit: https://stackoverflow.com/a/6693107 -void setTitle(struct Application* app, const char *title) { - LPCTSTR text = cstrToLPWSTR(title); - SetWindowText(app->window, text); - delete[] text; -} - -void SetTitle(struct Application* app, const char *title) { - ON_MAIN_THREAD( - setTitle(app, title); - ); -} - -void fullscreen(struct Application* app) { - - // Ensure we aren't in fullscreen - if (app->isFullscreen) return; - - app->isFullscreen = true; - app->previousWindowStyle = GetWindowLong(app->window, GWL_STYLE); - MONITORINFO mi = { sizeof(mi) }; - if (GetWindowPlacement(app->window, &(app->previousPlacement)) && GetMonitorInfo(MonitorFromWindow(app->window, MONITOR_DEFAULTTOPRIMARY), &mi)) { - SetWindowLong(app->window, GWL_STYLE, app->previousWindowStyle & ~WS_OVERLAPPEDWINDOW); - SetWindowPos(app->window, HWND_TOP, - mi.rcMonitor.left, - mi.rcMonitor.top, - mi.rcMonitor.right - mi.rcMonitor.left, - mi.rcMonitor.bottom - mi.rcMonitor.top, - SWP_NOOWNERZORDER | SWP_FRAMECHANGED); - } -} - -void Fullscreen(struct Application* app) { - ON_MAIN_THREAD( - fullscreen(app); - show(app); - ); -} - -void unfullscreen(struct Application* app) { - if (app->isFullscreen) { - SetWindowLong(app->window, GWL_STYLE, app->previousWindowStyle); - SetWindowPlacement(app->window, &(app->previousPlacement)); - SetWindowPos(app->window, NULL, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | - SWP_NOOWNERZORDER | SWP_FRAMECHANGED); - app->isFullscreen = false; - } -} - -void UnFullscreen(struct Application* app) { - ON_MAIN_THREAD( - unfullscreen(app); - ); -} - -void DisableFrame(struct Application* app) { - app->frame = 0; -} - -// WebviewIsTransparent will make the webview transparent -// revealing the window underneath -void WebviewIsTransparent(struct Application *app) { - app->webviewIsTranparent = true; -} - -void WindowIsTranslucent(struct Application *app) { - app->WindowIsTranslucent = true; -} - - -void OpenDialog(struct Application* app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int allowFiles, int allowDirs, int allowMultiple, int showHiddenFiles, int canCreateDirectories, int resolvesAliases, int treatPackagesAsDirectories) { -} -void SaveDialog(struct Application* app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int showHiddenFiles, int canCreateDirectories, int treatPackagesAsDirectories) { -} -void MessageDialog(struct Application* app, char *callbackID, char *type, char *title, char *message, char *icon, char *button1, char *button2, char *button3, char *button4, char *defaultButton, char *cancelButton) { -} -void DarkModeEnabled(struct Application* app, char *callbackID) { -} -void SetApplicationMenu(struct Application* app, const char *applicationMenuJSON) { -} -void AddTrayMenu(struct Application* app, const char *menuTrayJSON) { -} -void SetTrayMenu(struct Application* app, const char *menuTrayJSON) { -} -void DeleteTrayMenuByID(struct Application* app, const char *id) { -} -void UpdateTrayMenuLabel(struct Application* app, const char* JSON) { -} -void AddContextMenu(struct Application* app, char *contextMenuJSON) { -} -void UpdateContextMenu(struct Application* app, char *contextMenuJSON) { -} \ No newline at end of file diff --git a/v2/internal/ffenestri/ffenestri_windows.go b/v2/internal/ffenestri/ffenestri_windows.go deleted file mode 100644 index ce5d821f3..000000000 --- a/v2/internal/ffenestri/ffenestri_windows.go +++ /dev/null @@ -1,198 +0,0 @@ -package ffenestri - -import "C" - -/* - -#cgo windows CXXFLAGS: -std=c++11 -#cgo windows,amd64 LDFLAGS: -lgdi32 -lole32 -lShlwapi -luser32 -loleaut32 -ldwmapi - -#include "ffenestri.h" - -extern void DisableWindowIcon(struct Application* app); - -*/ -import "C" -import ( - "github.com/ztrue/tracerr" - "os" - - "github.com/wailsapp/wails/v2/pkg/menu" -) - -// Setup the global caches -var globalCheckboxCache = NewCheckboxCache() -var globalRadioGroupCache = NewRadioGroupCache() -var globalRadioGroupMap = NewRadioGroupMap() -var globalApplicationMenu *Menu - -type menuType string - -const ( - appMenuType menuType = "ApplicationMenu" - contextMenuType - trayMenuType -) - -func (a *Application) processPlatformSettings() error { - - menuManager = a.menuManager - config := a.config.Windows - if config == nil { - return nil - } - - // Check if the webview should be transparent - if config.WebviewIsTransparent { - C.WebviewIsTransparent(a.app) - } - - if config.WindowIsTranslucent { - C.WindowIsTranslucent(a.app) - } - - if config.DisableWindowIcon { - C.DisableWindowIcon(a.app) - } - - // Unfortunately, we need to store this in the package variable so the C callback can see it - applicationMenu = a.menuManager.GetProcessedApplicationMenu() - - // - //// Process tray - //trays, err := a.menuManager.GetTrayMenus() - //if err != nil { - // return err - //} - //if trays != nil { - // for _, tray := range trays { - // C.AddTrayMenu(a.app, a.string2CString(tray)) - // } - //} - // - //// Process context menus - //contextMenus, err := a.menuManager.GetContextMenus() - //if err != nil { - // return err - //} - //if contextMenus != nil { - // for _, contextMenu := range contextMenus { - // C.AddContextMenu(a.app, a.string2CString(contextMenu)) - // } - //} - // - //// Process URL Handlers - //if a.config.Mac.URLHandlers != nil { - // C.HasURLHandlers(a.app) - //} - - return nil -} - -func (c *Client) updateApplicationMenu() { - applicationMenu = c.app.menuManager.GetProcessedApplicationMenu() - createApplicationMenu(uintptr(C.GetWindowHandle(c.app.app))) -} - -/* --------------------------------------------------------------------------------- - -Application Menu ----------------- -There's only 1 application menu and this is where we create it. This method -is called from C after the window is created and the WM_CREATE message has -been sent. - -*/ - -func checkFatal(err error) { - if err != nil { - tracerr.PrintSourceColor(err) - globalRadioGroupCache.Dump() - globalRadioGroupMap.Dump() - os.Exit(1) - } -} - -//export createApplicationMenu -func createApplicationMenu(hwnd uintptr) { - - if applicationMenu == nil { - return - } - - var err error - window := win32Window(hwnd) - - if globalApplicationMenu != nil { - checkFatal(globalApplicationMenu.Destroy()) - } - - globalApplicationMenu, err = createMenu(applicationMenu, appMenuType) - checkFatal(err) - - err = setWindowMenu(window, globalApplicationMenu.menu) - checkFatal(err) -} - -//export handleKeypressInGo -func handleKeypressInGo(keycode uint16, modifiers uint8) { - //fmt.Printf("Key code: %#x\n", keycode) - menuID, menuType := getCallbackForKeyPress(keycode, modifiers) - if menuID == "" { - return - } - err := menuManager.ProcessClick(menuID, "", string(menuType), "") - if err != nil { - println(err.Error()) - } -} - -/* -This method is called by C when a menu item is pressed -*/ - -//export menuClicked -func menuClicked(id uint32) { - win32MenuID := win32MenuItemID(id) - //println("Got click from menu id", win32MenuID) - - // Get the menu from the cache - menuItemDetails := getMenuCacheEntry(win32MenuID) - wailsMenuID := wailsMenuItemID(menuItemDetails.item.ID) - - //println("Got click from menu id", win32MenuID, "- wails menu ID", wailsMenuID) - //spew.Dump(menuItemDetails) - - switch menuItemDetails.item.Type { - case menu.CheckboxType: - - // Determine if the menu is set or not - res, _, err := win32GetMenuState.Call(uintptr(menuItemDetails.parent), uintptr(id), uintptr(MF_BYCOMMAND)) - if int(res) == -1 { - checkFatal(err) - } - - flag := MF_CHECKED - if uint32(res) == MF_CHECKED { - flag = MF_UNCHECKED - } - - for _, menuid := range globalCheckboxCache.win32MenuIDsForWailsMenuID(wailsMenuID) { - //println("setting menuid", menuid, "with flag", flag) - menuItemDetails := getMenuCacheEntry(menuid) - res, _, err = win32CheckMenuItem.Call(uintptr(menuItemDetails.parent), uintptr(menuid), uintptr(flag)) - if int(res) == -1 { - checkFatal(err) - } - } - case menu.RadioType: - err := selectRadioItemFromWailsMenuID(wailsMenuID, win32MenuID) - checkFatal(err) - } - - // Print the click error - it's not fatal - err := menuManager.ProcessClick(menuItemDetails.item.ID, "", string(menuItemDetails.menuType), "") - if err != nil { - println(err.Error()) - } -} diff --git a/v2/internal/ffenestri/ffenestri_windows.h b/v2/internal/ffenestri/ffenestri_windows.h deleted file mode 100644 index 1e39bea10..000000000 --- a/v2/internal/ffenestri/ffenestri_windows.h +++ /dev/null @@ -1,95 +0,0 @@ - -#ifndef _FFENESTRI_WINDOWS_H -#define _FFENESTRI_WINDOWS_H - -#define WIN32_LEAN_AND_MEAN -#define UNICODE 1 - -#include "ffenestri.h" -#include -#include -#include -#include -#include "windows/WebView2.h" - -#include "assets.h" - -// TODO: -//#include "userdialogicons.h" - - -struct Application{ - // Window specific - HWND window; - ICoreWebView2 *webview; - ICoreWebView2Controller* webviewController; - - // Application - const char *title; - int width; - int height; - int resizable; - int devtools; - int fullscreen; - int startHidden; - int logLevel; - int hideWindowOnClose; - int minSizeSet; - LONG minWidth; - LONG minHeight; - int maxSizeSet; - LONG maxWidth; - LONG maxHeight; - int frame; - char *startupURL; - bool webviewIsTranparent; - bool WindowIsTranslucent; - COREWEBVIEW2_COLOR backgroundColour; - bool disableWindowIcon; - - // Used by fullscreen/unfullscreen - bool isFullscreen; - WINDOWPLACEMENT previousPlacement; - DWORD previousWindowStyle; - - // placeholders - char* bindings; - char* initialCode; - - // DPI - UINT dpix; - UINT dpiy; -}; - -#define ON_MAIN_THREAD(code) dispatch( [=]{ code; } ) - -typedef std::function dispatchFunction; -typedef std::function messageCallback; -typedef std::function comHandlerCallback; - -void center(struct Application*); -void setTitle(struct Application* app, const char *title); -void fullscreen(struct Application* app); -void unfullscreen(struct Application* app); -char* LPWSTRToCstr(LPWSTR input); - -// called when the DOM is ready -void loadAssets(struct Application* app); - -// called when the application assets have been loaded into the DOM -void completed(struct Application* app); - -// Processes the given keycode -void processKeyPress(UINT key); - -// Callback -extern "C" { - void DisableWindowIcon(struct Application* app); - void messageFromWindowCallback(const char *); - void* GetWindowHandle(struct Application*); - void createApplicationMenu(HWND hwnd); - void menuClicked(UINT id); - void handleKeypressInGo(UINT, BYTE); -} - -#endif \ No newline at end of file diff --git a/v2/internal/ffenestri/hashmap.h b/v2/internal/ffenestri/hashmap.h deleted file mode 100644 index 0278bc3d6..000000000 --- a/v2/internal/ffenestri/hashmap.h +++ /dev/null @@ -1,518 +0,0 @@ -/* - The latest version of this library is available on GitHub; - https://github.com/sheredom/hashmap.h -*/ - -/* - This is free and unencumbered software released into the public domain. - - Anyone is free to copy, modify, publish, use, compile, sell, or - distribute this software, either in source code form or as a compiled - binary, for any purpose, commercial or non-commercial, and by any - means. - - In jurisdictions that recognize copyright laws, the author or authors - of this software dedicate any and all copyright interest in the - software to the public domain. We make this dedication for the benefit - of the public at large and to the detriment of our heirs and - successors. We intend this dedication to be an overt act of - relinquishment in perpetuity of all present and future rights to this - software under copyright law. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - For more information, please refer to -*/ -#ifndef SHEREDOM_HASHMAP_H_INCLUDED -#define SHEREDOM_HASHMAP_H_INCLUDED - -#if defined(_MSC_VER) -// Workaround a bug in the MSVC runtime where it uses __cplusplus when not -// defined. -#pragma warning(push, 0) -#pragma warning(disable : 4668) -#endif -#include -#include - -#if (defined(_MSC_VER) && defined(__AVX__)) || \ - (!defined(_MSC_VER) && defined(__SSE4_2__)) -#define HASHMAP_SSE42 -#endif - -#if defined(HASHMAP_SSE42) -#include -#endif - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif - -#if defined(_MSC_VER) -#pragma warning(push) -// Stop MSVC complaining about not inlining functions. -#pragma warning(disable : 4710) -// Stop MSVC complaining about inlining functions! -#pragma warning(disable : 4711) -#elif defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-function" -#endif - -#if defined(_MSC_VER) -#define HASHMAP_USED -#elif defined(__GNUC__) -#define HASHMAP_USED __attribute__((used)) -#else -#define HASHMAP_USED -#endif - -/* We need to keep keys and values. */ -struct hashmap_element_s { - const char *key; - unsigned key_len; - int in_use; - void *data; -}; - -/* A hashmap has some maximum size and current size, as well as the data to - * hold. */ -struct hashmap_s { - unsigned table_size; - unsigned size; - struct hashmap_element_s *data; -}; - -#define HASHMAP_MAX_CHAIN_LENGTH (8) - -#if defined(__cplusplus) -extern "C" { -#endif - -/// @brief Create a hashmap. -/// @param initial_size The initial size of the hashmap. Must be a power of two. -/// @param out_hashmap The storage for the created hashmap. -/// @return On success 0 is returned. -/// -/// Note that the initial size of the hashmap must be a power of two, and -/// creation of the hashmap will fail if this is not the case. -static int hashmap_create(const unsigned initial_size, - struct hashmap_s *const out_hashmap) HASHMAP_USED; - -/// @brief Put an element into the hashmap. -/// @param hashmap The hashmap to insert into. -/// @param key The string key to use. -/// @param len The length of the string key. -/// @param value The value to insert. -/// @return On success 0 is returned. -/// -/// The key string slice is not copied when creating the hashmap entry, and thus -/// must remain a valid pointer until the hashmap entry is removed or the -/// hashmap is destroyed. -static int hashmap_put(struct hashmap_s *const hashmap, const char *const key, - const unsigned len, void *const value) HASHMAP_USED; - -/// @brief Get an element from the hashmap. -/// @param hashmap The hashmap to get from. -/// @param key The string key to use. -/// @param len The length of the string key. -/// @return The previously set element, or NULL if none exists. -static void *hashmap_get(const struct hashmap_s *const hashmap, - const char *const key, - const unsigned len) HASHMAP_USED; - -/// @brief Remove an element from the hashmap. -/// @param hashmap The hashmap to remove from. -/// @param key The string key to use. -/// @param len The length of the string key. -/// @return On success 0 is returned. -static int hashmap_remove(struct hashmap_s *const hashmap, - const char *const key, - const unsigned len) HASHMAP_USED; - -/// @brief Iterate over all the elements in a hashmap. -/// @param hashmap The hashmap to iterate over. -/// @param f The function pointer to call on each element. -/// @param context The context to pass as the first argument to f. -/// @return If the entire hashmap was iterated then 0 is returned. Otherwise if -/// the callback function f returned non-zero then non-zero is returned. -static int hashmap_iterate(const struct hashmap_s *const hashmap, - int (*f)(void *const context, void *const value), - void *const context) HASHMAP_USED; - -/// @brief Iterate over all the elements in a hashmap. -/// @param hashmap The hashmap to iterate over. -/// @param f The function pointer to call on each element. -/// @param context The context to pass as the first argument to f. -/// @return If the entire hashmap was iterated then 0 is returned. -/// Otherwise if the callback function f returned positive then the positive -/// value is returned. If the callback function returns -1, the current item -/// is removed and iteration continues. -static int hashmap_iterate_pairs(struct hashmap_s *const hashmap, - int (*f)(void *const, struct hashmap_element_s *const), - void *const context) HASHMAP_USED; - -/// @brief Get the size of the hashmap. -/// @param hashmap The hashmap to get the size of. -/// @return The size of the hashmap. -static unsigned -hashmap_num_entries(const struct hashmap_s *const hashmap) HASHMAP_USED; - -/// @brief Destroy the hashmap. -/// @param hashmap The hashmap to destroy. -static void hashmap_destroy(struct hashmap_s *const hashmap) HASHMAP_USED; - -static unsigned hashmap_crc32_helper(const char *const s, - const unsigned len) HASHMAP_USED; -static unsigned -hashmap_hash_helper_int_helper(const struct hashmap_s *const m, - const char *const keystring, - const unsigned len) HASHMAP_USED; -static int hashmap_match_helper(const struct hashmap_element_s *const element, - const char *const key, - const unsigned len) HASHMAP_USED; -static int hashmap_hash_helper(const struct hashmap_s *const m, - const char *const key, const unsigned len, - unsigned *const out_index) HASHMAP_USED; -static int hashmap_rehash_iterator(void *const new_hash, - struct hashmap_element_s *const e) HASHMAP_USED; -static int hashmap_rehash_helper(struct hashmap_s *const m) HASHMAP_USED; - -#if defined(__cplusplus) -} -#endif - -#if defined(__cplusplus) -#define HASHMAP_CAST(type, x) static_cast(x) -#define HASHMAP_PTR_CAST(type, x) reinterpret_cast(x) -#define HASHMAP_NULL NULL -#else -#define HASHMAP_CAST(type, x) ((type)x) -#define HASHMAP_PTR_CAST(type, x) ((type)x) -#define HASHMAP_NULL 0 -#endif - -int hashmap_create(const unsigned initial_size, - struct hashmap_s *const out_hashmap) { - if (0 == initial_size || 0 != (initial_size & (initial_size - 1))) { - return 1; - } - - out_hashmap->data = - HASHMAP_CAST(struct hashmap_element_s *, - calloc(initial_size, sizeof(struct hashmap_element_s))); - if (!out_hashmap->data) { - return 1; - } - - out_hashmap->table_size = initial_size; - out_hashmap->size = 0; - - return 0; -} - -int hashmap_put(struct hashmap_s *const m, const char *const key, - const unsigned len, void *const value) { - unsigned int index; - - /* Find a place to put our value. */ - while (!hashmap_hash_helper(m, key, len, &index)) { - if (hashmap_rehash_helper(m)) { - return 1; - } - } - - /* Set the data. */ - m->data[index].data = value; - m->data[index].key = key; - m->data[index].key_len = len; - m->data[index].in_use = 1; - m->size++; - - return 0; -} - -void *hashmap_get(const struct hashmap_s *const m, const char *const key, - const unsigned len) { - unsigned int curr; - unsigned int i; - - /* Find data location */ - curr = hashmap_hash_helper_int_helper(m, key, len); - - /* Linear probing, if necessary */ - for (i = 0; i < HASHMAP_MAX_CHAIN_LENGTH; i++) { - if (m->data[curr].in_use) { - if (hashmap_match_helper(&m->data[curr], key, len)) { - return m->data[curr].data; - } - } - - curr = (curr + 1) % m->table_size; - } - - /* Not found */ - return HASHMAP_NULL; -} - -int hashmap_remove(struct hashmap_s *const m, const char *const key, - const unsigned len) { - unsigned int i; - unsigned int curr; - - /* Find key */ - curr = hashmap_hash_helper_int_helper(m, key, len); - - /* Linear probing, if necessary */ - for (i = 0; i < HASHMAP_MAX_CHAIN_LENGTH; i++) { - if (m->data[curr].in_use) { - if (hashmap_match_helper(&m->data[curr], key, len)) { - /* Blank out the fields including in_use */ - memset(&m->data[curr], 0, sizeof(struct hashmap_element_s)); - - /* Reduce the size */ - m->size--; - return 0; - } - } - curr = (curr + 1) % m->table_size; - } - - return 1; -} - -int hashmap_iterate(const struct hashmap_s *const m, - int (*f)(void *const, void *const), void *const context) { - unsigned int i; - - /* Linear probing */ - for (i = 0; i < m->table_size; i++) { - if (m->data[i].in_use) { - if (!f(context, m->data[i].data)) { - return 1; - } - } - } - return 0; -} - -int hashmap_iterate_pairs(struct hashmap_s *const hashmap, - int (*f)(void *const, struct hashmap_element_s *const), - void *const context) { - unsigned int i; - struct hashmap_element_s *p; - int r; - - /* Linear probing */ - for (i = 0; i < hashmap->table_size; i++) { - p=&hashmap->data[i]; - if (p->in_use) { - r=f(context, p); - switch (r) - { - case -1: /* remove item */ - memset(p, 0, sizeof(struct hashmap_element_s)); - hashmap->size--; - break; - case 0: /* continue iterating */ - break; - default: /* early exit */ - return 1; - } - } - } - return 0; -} - -void hashmap_destroy(struct hashmap_s *const m) { - free(m->data); - memset(m, 0, sizeof(struct hashmap_s)); -} - -unsigned hashmap_num_entries(const struct hashmap_s *const m) { - return m->size; -} - -unsigned hashmap_crc32_helper(const char *const s, const unsigned len) { - unsigned i; - unsigned crc32val = 0; - -#if defined(HASHMAP_SSE42) - for (i = 0; i < len; i++) { - crc32val = _mm_crc32_u8(crc32val, HASHMAP_CAST(unsigned char, s[i])); - } - - return crc32val; -#else - // Using polynomial 0x11EDC6F41 to match SSE 4.2's crc function. - static const unsigned crc32_tab[] = { - 0x00000000U, 0xF26B8303U, 0xE13B70F7U, 0x1350F3F4U, 0xC79A971FU, - 0x35F1141CU, 0x26A1E7E8U, 0xD4CA64EBU, 0x8AD958CFU, 0x78B2DBCCU, - 0x6BE22838U, 0x9989AB3BU, 0x4D43CFD0U, 0xBF284CD3U, 0xAC78BF27U, - 0x5E133C24U, 0x105EC76FU, 0xE235446CU, 0xF165B798U, 0x030E349BU, - 0xD7C45070U, 0x25AFD373U, 0x36FF2087U, 0xC494A384U, 0x9A879FA0U, - 0x68EC1CA3U, 0x7BBCEF57U, 0x89D76C54U, 0x5D1D08BFU, 0xAF768BBCU, - 0xBC267848U, 0x4E4DFB4BU, 0x20BD8EDEU, 0xD2D60DDDU, 0xC186FE29U, - 0x33ED7D2AU, 0xE72719C1U, 0x154C9AC2U, 0x061C6936U, 0xF477EA35U, - 0xAA64D611U, 0x580F5512U, 0x4B5FA6E6U, 0xB93425E5U, 0x6DFE410EU, - 0x9F95C20DU, 0x8CC531F9U, 0x7EAEB2FAU, 0x30E349B1U, 0xC288CAB2U, - 0xD1D83946U, 0x23B3BA45U, 0xF779DEAEU, 0x05125DADU, 0x1642AE59U, - 0xE4292D5AU, 0xBA3A117EU, 0x4851927DU, 0x5B016189U, 0xA96AE28AU, - 0x7DA08661U, 0x8FCB0562U, 0x9C9BF696U, 0x6EF07595U, 0x417B1DBCU, - 0xB3109EBFU, 0xA0406D4BU, 0x522BEE48U, 0x86E18AA3U, 0x748A09A0U, - 0x67DAFA54U, 0x95B17957U, 0xCBA24573U, 0x39C9C670U, 0x2A993584U, - 0xD8F2B687U, 0x0C38D26CU, 0xFE53516FU, 0xED03A29BU, 0x1F682198U, - 0x5125DAD3U, 0xA34E59D0U, 0xB01EAA24U, 0x42752927U, 0x96BF4DCCU, - 0x64D4CECFU, 0x77843D3BU, 0x85EFBE38U, 0xDBFC821CU, 0x2997011FU, - 0x3AC7F2EBU, 0xC8AC71E8U, 0x1C661503U, 0xEE0D9600U, 0xFD5D65F4U, - 0x0F36E6F7U, 0x61C69362U, 0x93AD1061U, 0x80FDE395U, 0x72966096U, - 0xA65C047DU, 0x5437877EU, 0x4767748AU, 0xB50CF789U, 0xEB1FCBADU, - 0x197448AEU, 0x0A24BB5AU, 0xF84F3859U, 0x2C855CB2U, 0xDEEEDFB1U, - 0xCDBE2C45U, 0x3FD5AF46U, 0x7198540DU, 0x83F3D70EU, 0x90A324FAU, - 0x62C8A7F9U, 0xB602C312U, 0x44694011U, 0x5739B3E5U, 0xA55230E6U, - 0xFB410CC2U, 0x092A8FC1U, 0x1A7A7C35U, 0xE811FF36U, 0x3CDB9BDDU, - 0xCEB018DEU, 0xDDE0EB2AU, 0x2F8B6829U, 0x82F63B78U, 0x709DB87BU, - 0x63CD4B8FU, 0x91A6C88CU, 0x456CAC67U, 0xB7072F64U, 0xA457DC90U, - 0x563C5F93U, 0x082F63B7U, 0xFA44E0B4U, 0xE9141340U, 0x1B7F9043U, - 0xCFB5F4A8U, 0x3DDE77ABU, 0x2E8E845FU, 0xDCE5075CU, 0x92A8FC17U, - 0x60C37F14U, 0x73938CE0U, 0x81F80FE3U, 0x55326B08U, 0xA759E80BU, - 0xB4091BFFU, 0x466298FCU, 0x1871A4D8U, 0xEA1A27DBU, 0xF94AD42FU, - 0x0B21572CU, 0xDFEB33C7U, 0x2D80B0C4U, 0x3ED04330U, 0xCCBBC033U, - 0xA24BB5A6U, 0x502036A5U, 0x4370C551U, 0xB11B4652U, 0x65D122B9U, - 0x97BAA1BAU, 0x84EA524EU, 0x7681D14DU, 0x2892ED69U, 0xDAF96E6AU, - 0xC9A99D9EU, 0x3BC21E9DU, 0xEF087A76U, 0x1D63F975U, 0x0E330A81U, - 0xFC588982U, 0xB21572C9U, 0x407EF1CAU, 0x532E023EU, 0xA145813DU, - 0x758FE5D6U, 0x87E466D5U, 0x94B49521U, 0x66DF1622U, 0x38CC2A06U, - 0xCAA7A905U, 0xD9F75AF1U, 0x2B9CD9F2U, 0xFF56BD19U, 0x0D3D3E1AU, - 0x1E6DCDEEU, 0xEC064EEDU, 0xC38D26C4U, 0x31E6A5C7U, 0x22B65633U, - 0xD0DDD530U, 0x0417B1DBU, 0xF67C32D8U, 0xE52CC12CU, 0x1747422FU, - 0x49547E0BU, 0xBB3FFD08U, 0xA86F0EFCU, 0x5A048DFFU, 0x8ECEE914U, - 0x7CA56A17U, 0x6FF599E3U, 0x9D9E1AE0U, 0xD3D3E1ABU, 0x21B862A8U, - 0x32E8915CU, 0xC083125FU, 0x144976B4U, 0xE622F5B7U, 0xF5720643U, - 0x07198540U, 0x590AB964U, 0xAB613A67U, 0xB831C993U, 0x4A5A4A90U, - 0x9E902E7BU, 0x6CFBAD78U, 0x7FAB5E8CU, 0x8DC0DD8FU, 0xE330A81AU, - 0x115B2B19U, 0x020BD8EDU, 0xF0605BEEU, 0x24AA3F05U, 0xD6C1BC06U, - 0xC5914FF2U, 0x37FACCF1U, 0x69E9F0D5U, 0x9B8273D6U, 0x88D28022U, - 0x7AB90321U, 0xAE7367CAU, 0x5C18E4C9U, 0x4F48173DU, 0xBD23943EU, - 0xF36E6F75U, 0x0105EC76U, 0x12551F82U, 0xE03E9C81U, 0x34F4F86AU, - 0xC69F7B69U, 0xD5CF889DU, 0x27A40B9EU, 0x79B737BAU, 0x8BDCB4B9U, - 0x988C474DU, 0x6AE7C44EU, 0xBE2DA0A5U, 0x4C4623A6U, 0x5F16D052U, - 0xAD7D5351U}; - - for (i = 0; i < len; i++) { - crc32val = crc32_tab[(HASHMAP_CAST(unsigned char, crc32val) ^ - HASHMAP_CAST(unsigned char, s[i]))] ^ - (crc32val >> 8); - } - return crc32val; -#endif -} - -unsigned hashmap_hash_helper_int_helper(const struct hashmap_s *const m, - const char *const keystring, - const unsigned len) { - unsigned key = hashmap_crc32_helper(keystring, len); - - /* Robert Jenkins' 32 bit Mix Function */ - key += (key << 12); - key ^= (key >> 22); - key += (key << 4); - key ^= (key >> 9); - key += (key << 10); - key ^= (key >> 2); - key += (key << 7); - key ^= (key >> 12); - - /* Knuth's Multiplicative Method */ - key = (key >> 3) * 2654435761; - - return key % m->table_size; -} - -int hashmap_match_helper(const struct hashmap_element_s *const element, - const char *const key, const unsigned len) { - return (element->key_len == len) && (0 == memcmp(element->key, key, len)); -} - -int hashmap_hash_helper(const struct hashmap_s *const m, const char *const key, - const unsigned len, unsigned *const out_index) { - unsigned int curr; - unsigned int i; - - /* If full, return immediately */ - if (m->size >= m->table_size) { - return 0; - } - - /* Find the best index */ - curr = hashmap_hash_helper_int_helper(m, key, len); - - /* Linear probing */ - for (i = 0; i < HASHMAP_MAX_CHAIN_LENGTH; i++) { - if (!m->data[curr].in_use) { - *out_index = curr; - return 1; - } - - if (m->data[curr].in_use && - hashmap_match_helper(&m->data[curr], key, len)) { - *out_index = curr; - return 1; - } - - curr = (curr + 1) % m->table_size; - } - - return 0; -} - -int hashmap_rehash_iterator(void *const new_hash, - struct hashmap_element_s *const e) { - int temp=hashmap_put(HASHMAP_PTR_CAST(struct hashmap_s *, new_hash), - e->key, e->key_len, e->data); - if (0table_size; - - struct hashmap_s new_hash; - - int flag = hashmap_create(new_size, &new_hash); - if (0!=flag) { - return flag; - } - - /* copy the old elements to the new table */ - flag = hashmap_iterate_pairs(m, hashmap_rehash_iterator, HASHMAP_PTR_CAST(void *, &new_hash)); - if (0!=flag) { - return flag; - } - - hashmap_destroy(m); - /* put new hash into old hash structure by copying */ - memcpy(m, &new_hash, sizeof(struct hashmap_s)); - - return 0; -} - -#if defined(_MSC_VER) -#pragma warning(pop) -#elif defined(__clang__) -#pragma clang diagnostic pop -#endif - -#endif \ No newline at end of file diff --git a/v2/internal/ffenestri/json.c b/v2/internal/ffenestri/json.c deleted file mode 100644 index d62ff9a03..000000000 --- a/v2/internal/ffenestri/json.c +++ /dev/null @@ -1,1403 +0,0 @@ -// +build !windows - -/* - Copyright (C) 2011 Joseph A. Adams (joeyadams3.14159@gmail.com) - All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - Source: http://git.ozlabs.org/?p=ccan;a=tree;f=ccan/json;hb=HEAD -*/ - -#include "json.h" - -#include -#include -#include -#include -#include - -#define out_of_memory() do { \ - fprintf(stderr, "Out of memory.\n"); \ - exit(EXIT_FAILURE); \ - } while (0) - -/* Sadly, strdup is not portable. */ -static char *json_strdup(const char *str) -{ - char *ret = (char*) malloc(strlen(str) + 1); - if (ret == NULL) - out_of_memory(); - strcpy(ret, str); - return ret; -} - -/* String buffer */ - -typedef struct -{ - char *cur; - char *end; - char *start; -} SB; - -static void sb_init(SB *sb) -{ - sb->start = (char*) malloc(17); - if (sb->start == NULL) - out_of_memory(); - sb->cur = sb->start; - sb->end = sb->start + 16; -} - -/* sb and need may be evaluated multiple times. */ -#define sb_need(sb, need) do { \ - if ((sb)->end - (sb)->cur < (need)) \ - sb_grow(sb, need); \ - } while (0) - -static void sb_grow(SB *sb, int need) -{ - size_t length = sb->cur - sb->start; - size_t alloc = sb->end - sb->start; - - do { - alloc *= 2; - } while (alloc < length + need); - - sb->start = (char*) realloc(sb->start, alloc + 1); - if (sb->start == NULL) - out_of_memory(); - sb->cur = sb->start + length; - sb->end = sb->start + alloc; -} - -static void sb_put(SB *sb, const char *bytes, int count) -{ - sb_need(sb, count); - memcpy(sb->cur, bytes, count); - sb->cur += count; -} - -#define sb_putc(sb, c) do { \ - if ((sb)->cur >= (sb)->end) \ - sb_grow(sb, 1); \ - *(sb)->cur++ = (c); \ - } while (0) - -static void sb_puts(SB *sb, const char *str) -{ - sb_put(sb, str, strlen(str)); -} - -static char *sb_finish(SB *sb) -{ - *sb->cur = 0; - assert(sb->start <= sb->cur && strlen(sb->start) == (size_t)(sb->cur - sb->start)); - return sb->start; -} - -static void sb_free(SB *sb) -{ - free(sb->start); -} - -/* - * Unicode helper functions - * - * These are taken from the ccan/charset module and customized a bit. - * Putting them here means the compiler can (choose to) inline them, - * and it keeps ccan/json from having a dependency. - */ - -/* - * Type for Unicode codepoints. - * We need our own because wchar_t might be 16 bits. - */ -typedef uint32_t uchar_t; - -/* - * Validate a single UTF-8 character starting at @s. - * The string must be null-terminated. - * - * If it's valid, return its length (1 thru 4). - * If it's invalid or clipped, return 0. - * - * This function implements the syntax given in RFC3629, which is - * the same as that given in The Unicode Standard, Version 6.0. - * - * It has the following properties: - * - * * All codepoints U+0000..U+10FFFF may be encoded, - * except for U+D800..U+DFFF, which are reserved - * for UTF-16 surrogate pair encoding. - * * UTF-8 byte sequences longer than 4 bytes are not permitted, - * as they exceed the range of Unicode. - * * The sixty-six Unicode "non-characters" are permitted - * (namely, U+FDD0..U+FDEF, U+xxFFFE, and U+xxFFFF). - */ -static int utf8_validate_cz(const char *s) -{ - unsigned char c = *s++; - - if (c <= 0x7F) { /* 00..7F */ - return 1; - } else if (c <= 0xC1) { /* 80..C1 */ - /* Disallow overlong 2-byte sequence. */ - return 0; - } else if (c <= 0xDF) { /* C2..DF */ - /* Make sure subsequent byte is in the range 0x80..0xBF. */ - if (((unsigned char)*s++ & 0xC0) != 0x80) - return 0; - - return 2; - } else if (c <= 0xEF) { /* E0..EF */ - /* Disallow overlong 3-byte sequence. */ - if (c == 0xE0 && (unsigned char)*s < 0xA0) - return 0; - - /* Disallow U+D800..U+DFFF. */ - if (c == 0xED && (unsigned char)*s > 0x9F) - return 0; - - /* Make sure subsequent bytes are in the range 0x80..0xBF. */ - if (((unsigned char)*s++ & 0xC0) != 0x80) - return 0; - if (((unsigned char)*s++ & 0xC0) != 0x80) - return 0; - - return 3; - } else if (c <= 0xF4) { /* F0..F4 */ - /* Disallow overlong 4-byte sequence. */ - if (c == 0xF0 && (unsigned char)*s < 0x90) - return 0; - - /* Disallow codepoints beyond U+10FFFF. */ - if (c == 0xF4 && (unsigned char)*s > 0x8F) - return 0; - - /* Make sure subsequent bytes are in the range 0x80..0xBF. */ - if (((unsigned char)*s++ & 0xC0) != 0x80) - return 0; - if (((unsigned char)*s++ & 0xC0) != 0x80) - return 0; - if (((unsigned char)*s++ & 0xC0) != 0x80) - return 0; - - return 4; - } else { /* F5..FF */ - return 0; - } -} - -/* Validate a null-terminated UTF-8 string. */ -static bool utf8_validate(const char *s) -{ - int len; - - for (; *s != 0; s += len) { - len = utf8_validate_cz(s); - if (len == 0) - return false; - } - - return true; -} - -/* - * Read a single UTF-8 character starting at @s, - * returning the length, in bytes, of the character read. - * - * This function assumes input is valid UTF-8, - * and that there are enough characters in front of @s. - */ -static int utf8_read_char(const char *s, uchar_t *out) -{ - const unsigned char *c = (const unsigned char*) s; - - assert(utf8_validate_cz(s)); - - if (c[0] <= 0x7F) { - /* 00..7F */ - *out = c[0]; - return 1; - } else if (c[0] <= 0xDF) { - /* C2..DF (unless input is invalid) */ - *out = ((uchar_t)c[0] & 0x1F) << 6 | - ((uchar_t)c[1] & 0x3F); - return 2; - } else if (c[0] <= 0xEF) { - /* E0..EF */ - *out = ((uchar_t)c[0] & 0xF) << 12 | - ((uchar_t)c[1] & 0x3F) << 6 | - ((uchar_t)c[2] & 0x3F); - return 3; - } else { - /* F0..F4 (unless input is invalid) */ - *out = ((uchar_t)c[0] & 0x7) << 18 | - ((uchar_t)c[1] & 0x3F) << 12 | - ((uchar_t)c[2] & 0x3F) << 6 | - ((uchar_t)c[3] & 0x3F); - return 4; - } -} - -/* - * Write a single UTF-8 character to @s, - * returning the length, in bytes, of the character written. - * - * @unicode must be U+0000..U+10FFFF, but not U+D800..U+DFFF. - * - * This function will write up to 4 bytes to @out. - */ -static int utf8_write_char(uchar_t unicode, char *out) -{ - unsigned char *o = (unsigned char*) out; - - assert(unicode <= 0x10FFFF && !(unicode >= 0xD800 && unicode <= 0xDFFF)); - - if (unicode <= 0x7F) { - /* U+0000..U+007F */ - *o++ = unicode; - return 1; - } else if (unicode <= 0x7FF) { - /* U+0080..U+07FF */ - *o++ = 0xC0 | unicode >> 6; - *o++ = 0x80 | (unicode & 0x3F); - return 2; - } else if (unicode <= 0xFFFF) { - /* U+0800..U+FFFF */ - *o++ = 0xE0 | unicode >> 12; - *o++ = 0x80 | (unicode >> 6 & 0x3F); - *o++ = 0x80 | (unicode & 0x3F); - return 3; - } else { - /* U+10000..U+10FFFF */ - *o++ = 0xF0 | unicode >> 18; - *o++ = 0x80 | (unicode >> 12 & 0x3F); - *o++ = 0x80 | (unicode >> 6 & 0x3F); - *o++ = 0x80 | (unicode & 0x3F); - return 4; - } -} - -/* - * Compute the Unicode codepoint of a UTF-16 surrogate pair. - * - * @uc should be 0xD800..0xDBFF, and @lc should be 0xDC00..0xDFFF. - * If they aren't, this function returns false. - */ -static bool from_surrogate_pair(uint16_t uc, uint16_t lc, uchar_t *unicode) -{ - if (uc >= 0xD800 && uc <= 0xDBFF && lc >= 0xDC00 && lc <= 0xDFFF) { - *unicode = 0x10000 + ((((uchar_t)uc & 0x3FF) << 10) | (lc & 0x3FF)); - return true; - } else { - return false; - } -} - -/* - * Construct a UTF-16 surrogate pair given a Unicode codepoint. - * - * @unicode must be U+10000..U+10FFFF. - */ -static void to_surrogate_pair(uchar_t unicode, uint16_t *uc, uint16_t *lc) -{ - uchar_t n; - - assert(unicode >= 0x10000 && unicode <= 0x10FFFF); - - n = unicode - 0x10000; - *uc = ((n >> 10) & 0x3FF) | 0xD800; - *lc = (n & 0x3FF) | 0xDC00; -} - -#define is_space(c) ((c) == '\t' || (c) == '\n' || (c) == '\r' || (c) == ' ') -#define is_digit(c) ((c) >= '0' && (c) <= '9') - -static bool parse_value (const char **sp, JsonNode **out); -static bool parse_string (const char **sp, char **out); -static bool parse_number (const char **sp, double *out); -static bool parse_array (const char **sp, JsonNode **out); -static bool parse_object (const char **sp, JsonNode **out); -static bool parse_hex16 (const char **sp, uint16_t *out); - -static bool expect_literal (const char **sp, const char *str); -static void skip_space (const char **sp); - -static void emit_value (SB *out, const JsonNode *node); -static void emit_value_indented (SB *out, const JsonNode *node, const char *space, int indent_level); -static void emit_string (SB *out, const char *str); -static void emit_number (SB *out, double num); -static void emit_array (SB *out, const JsonNode *array); -static void emit_array_indented (SB *out, const JsonNode *array, const char *space, int indent_level); -static void emit_object (SB *out, const JsonNode *object); -static void emit_object_indented (SB *out, const JsonNode *object, const char *space, int indent_level); - -static int write_hex16(char *out, uint16_t val); - -static JsonNode *mknode(JsonTag tag); -static void append_node(JsonNode *parent, JsonNode *child); -static void prepend_node(JsonNode *parent, JsonNode *child); -static void append_member(JsonNode *object, char *key, JsonNode *value); - -/* Assertion-friendly validity checks */ -static bool tag_is_valid(unsigned int tag); -static bool number_is_valid(const char *num); - -JsonNode *json_decode(const char *json) -{ - const char *s = json; - JsonNode *ret; - - skip_space(&s); - if (!parse_value(&s, &ret)) - return NULL; - - skip_space(&s); - if (*s != 0) { - json_delete(ret); - return NULL; - } - - return ret; -} - -char *json_encode(const JsonNode *node) -{ - return json_stringify(node, NULL); -} - -char *json_encode_string(const char *str) -{ - SB sb; - sb_init(&sb); - - emit_string(&sb, str); - - return sb_finish(&sb); -} - -char *json_stringify(const JsonNode *node, const char *space) -{ - SB sb; - sb_init(&sb); - - if (space != NULL) - emit_value_indented(&sb, node, space, 0); - else - emit_value(&sb, node); - - return sb_finish(&sb); -} - -void json_delete(JsonNode *node) -{ - if (node != NULL) { - json_remove_from_parent(node); - - switch (node->tag) { - case JSON_STRING: - free(node->string_); - break; - case JSON_ARRAY: - case JSON_OBJECT: - { - JsonNode *child, *next; - for (child = node->children.head; child != NULL; child = next) { - next = child->next; - json_delete(child); - } - break; - } - default:; - } - - free(node); - } -} - -bool json_validate(const char *json) -{ - const char *s = json; - - skip_space(&s); - if (!parse_value(&s, NULL)) - return false; - - skip_space(&s); - if (*s != 0) - return false; - - return true; -} - -// We return the number of elements or -1 if there was a problem -int json_array_length(JsonNode *array) { - - int result = 0; - - // The node should not be null and it should be an array - if (array == NULL || array->tag != JSON_ARRAY) - return -1; - - // Loop and count! - JsonNode *element; - json_foreach(element, array) { - result++; - } - - return result; -} - -JsonNode *json_find_element(JsonNode *array, int index) -{ - JsonNode *element; - int i = 0; - - if (array == NULL || array->tag != JSON_ARRAY) - return NULL; - - json_foreach(element, array) { - if (i == index) - return element; - i++; - } - - return NULL; -} - -JsonNode *json_find_member(JsonNode *object, const char *name) -{ - JsonNode *member; - - if (object == NULL || object->tag != JSON_OBJECT) - return NULL; - - json_foreach(member, object) - if (strcmp(member->key, name) == 0) - return member; - - return NULL; -} - -JsonNode *json_first_child(const JsonNode *node) -{ - if (node != NULL && (node->tag == JSON_ARRAY || node->tag == JSON_OBJECT)) - return node->children.head; - return NULL; -} - -static JsonNode *mknode(JsonTag tag) -{ - JsonNode *ret = (JsonNode*) calloc(1, sizeof(JsonNode)); - if (ret == NULL) - out_of_memory(); - ret->tag = tag; - return ret; -} - -JsonNode *json_mknull(void) -{ - return mknode(JSON_NULL); -} - -JsonNode *json_mkbool(bool b) -{ - JsonNode *ret = mknode(JSON_BOOL); - ret->bool_ = b; - return ret; -} - -static JsonNode *mkstring(char *s) -{ - JsonNode *ret = mknode(JSON_STRING); - ret->string_ = s; - return ret; -} - -JsonNode *json_mkstring(const char *s) -{ - return mkstring(json_strdup(s)); -} - -JsonNode *json_mknumber(double n) -{ - JsonNode *node = mknode(JSON_NUMBER); - node->number_ = n; - return node; -} - -JsonNode *json_mkarray(void) -{ - return mknode(JSON_ARRAY); -} - -JsonNode *json_mkobject(void) -{ - return mknode(JSON_OBJECT); -} - -static void append_node(JsonNode *parent, JsonNode *child) -{ - child->parent = parent; - child->prev = parent->children.tail; - child->next = NULL; - - if (parent->children.tail != NULL) - parent->children.tail->next = child; - else - parent->children.head = child; - parent->children.tail = child; -} - -static void prepend_node(JsonNode *parent, JsonNode *child) -{ - child->parent = parent; - child->prev = NULL; - child->next = parent->children.head; - - if (parent->children.head != NULL) - parent->children.head->prev = child; - else - parent->children.tail = child; - parent->children.head = child; -} - -static void append_member(JsonNode *object, char *key, JsonNode *value) -{ - value->key = key; - append_node(object, value); -} - -void json_append_element(JsonNode *array, JsonNode *element) -{ - assert(array->tag == JSON_ARRAY); - assert(element->parent == NULL); - - append_node(array, element); -} - -void json_prepend_element(JsonNode *array, JsonNode *element) -{ - assert(array->tag == JSON_ARRAY); - assert(element->parent == NULL); - - prepend_node(array, element); -} - -void json_append_member(JsonNode *object, const char *key, JsonNode *value) -{ - assert(object->tag == JSON_OBJECT); - assert(value->parent == NULL); - - append_member(object, json_strdup(key), value); -} - -void json_prepend_member(JsonNode *object, const char *key, JsonNode *value) -{ - assert(object->tag == JSON_OBJECT); - assert(value->parent == NULL); - - value->key = json_strdup(key); - prepend_node(object, value); -} - -void json_remove_from_parent(JsonNode *node) -{ - JsonNode *parent = node->parent; - - if (parent != NULL) { - if (node->prev != NULL) - node->prev->next = node->next; - else - parent->children.head = node->next; - if (node->next != NULL) - node->next->prev = node->prev; - else - parent->children.tail = node->prev; - - free(node->key); - - node->parent = NULL; - node->prev = node->next = NULL; - node->key = NULL; - } -} - -static bool parse_value(const char **sp, JsonNode **out) -{ - const char *s = *sp; - - switch (*s) { - case 'n': - if (expect_literal(&s, "null")) { - if (out) - *out = json_mknull(); - *sp = s; - return true; - } - return false; - - case 'f': - if (expect_literal(&s, "false")) { - if (out) - *out = json_mkbool(false); - *sp = s; - return true; - } - return false; - - case 't': - if (expect_literal(&s, "true")) { - if (out) - *out = json_mkbool(true); - *sp = s; - return true; - } - return false; - - case '"': { - char *str; - if (parse_string(&s, out ? &str : NULL)) { - if (out) - *out = mkstring(str); - *sp = s; - return true; - } - return false; - } - - case '[': - if (parse_array(&s, out)) { - *sp = s; - return true; - } - return false; - - case '{': - if (parse_object(&s, out)) { - *sp = s; - return true; - } - return false; - - default: { - double num; - if (parse_number(&s, out ? &num : NULL)) { - if (out) - *out = json_mknumber(num); - *sp = s; - return true; - } - return false; - } - } -} - -static bool parse_array(const char **sp, JsonNode **out) -{ - const char *s = *sp; - JsonNode *ret = out ? json_mkarray() : NULL; - JsonNode *element; - - if (*s++ != '[') - goto failure; - skip_space(&s); - - if (*s == ']') { - s++; - goto success; - } - - for (;;) { - if (!parse_value(&s, out ? &element : NULL)) - goto failure; - skip_space(&s); - - if (out) - json_append_element(ret, element); - - if (*s == ']') { - s++; - goto success; - } - - if (*s++ != ',') - goto failure; - skip_space(&s); - } - -success: - *sp = s; - if (out) - *out = ret; - return true; - -failure: - json_delete(ret); - return false; -} - -static bool parse_object(const char **sp, JsonNode **out) -{ - const char *s = *sp; - JsonNode *ret = out ? json_mkobject() : NULL; - char *key; - JsonNode *value; - - if (*s++ != '{') - goto failure; - skip_space(&s); - - if (*s == '}') { - s++; - goto success; - } - - for (;;) { - if (!parse_string(&s, out ? &key : NULL)) - goto failure; - skip_space(&s); - - if (*s++ != ':') - goto failure_free_key; - skip_space(&s); - - if (!parse_value(&s, out ? &value : NULL)) - goto failure_free_key; - skip_space(&s); - - if (out) - append_member(ret, key, value); - - if (*s == '}') { - s++; - goto success; - } - - if (*s++ != ',') - goto failure; - skip_space(&s); - } - -success: - *sp = s; - if (out) - *out = ret; - return true; - -failure_free_key: - if (out) - free(key); -failure: - json_delete(ret); - return false; -} - -bool parse_string(const char **sp, char **out) -{ - const char *s = *sp; - SB sb; - char throwaway_buffer[4]; - /* enough space for a UTF-8 character */ - char *b; - - if (*s++ != '"') - return false; - - if (out) { - sb_init(&sb); - sb_need(&sb, 4); - b = sb.cur; - } else { - b = throwaway_buffer; - } - - while (*s != '"') { - unsigned char c = *s++; - - /* Parse next character, and write it to b. */ - if (c == '\\') { - c = *s++; - switch (c) { - case '"': - case '\\': - case '/': - *b++ = c; - break; - case 'b': - *b++ = '\b'; - break; - case 'f': - *b++ = '\f'; - break; - case 'n': - *b++ = '\n'; - break; - case 'r': - *b++ = '\r'; - break; - case 't': - *b++ = '\t'; - break; - case 'u': - { - uint16_t uc, lc; - uchar_t unicode; - - if (!parse_hex16(&s, &uc)) - goto failed; - - if (uc >= 0xD800 && uc <= 0xDFFF) { - /* Handle UTF-16 surrogate pair. */ - if (*s++ != '\\' || *s++ != 'u' || !parse_hex16(&s, &lc)) - goto failed; /* Incomplete surrogate pair. */ - if (!from_surrogate_pair(uc, lc, &unicode)) - goto failed; /* Invalid surrogate pair. */ - } else if (uc == 0) { - /* Disallow "\u0000". */ - goto failed; - } else { - unicode = uc; - } - - b += utf8_write_char(unicode, b); - break; - } - default: - /* Invalid escape */ - goto failed; - } - } else if (c <= 0x1F) { - /* Control characters are not allowed in string literals. */ - goto failed; - } else { - /* Validate and echo a UTF-8 character. */ - int len; - - s--; - len = utf8_validate_cz(s); - if (len == 0) - goto failed; /* Invalid UTF-8 character. */ - - while (len--) - *b++ = *s++; - } - - /* - * Update sb to know about the new bytes, - * and set up b to write another character. - */ - if (out) { - sb.cur = b; - sb_need(&sb, 4); - b = sb.cur; - } else { - b = throwaway_buffer; - } - } - s++; - - if (out) - *out = sb_finish(&sb); - *sp = s; - return true; - -failed: - if (out) - sb_free(&sb); - return false; -} - -/* - * The JSON spec says that a number shall follow this precise pattern - * (spaces and quotes added for readability): - * '-'? (0 | [1-9][0-9]*) ('.' [0-9]+)? ([Ee] [+-]? [0-9]+)? - * - * However, some JSON parsers are more liberal. For instance, PHP accepts - * '.5' and '1.'. JSON.parse accepts '+3'. - * - * This function takes the strict approach. - */ -bool parse_number(const char **sp, double *out) -{ - const char *s = *sp; - - /* '-'? */ - if (*s == '-') - s++; - - /* (0 | [1-9][0-9]*) */ - if (*s == '0') { - s++; - } else { - if (!is_digit(*s)) - return false; - do { - s++; - } while (is_digit(*s)); - } - - /* ('.' [0-9]+)? */ - if (*s == '.') { - s++; - if (!is_digit(*s)) - return false; - do { - s++; - } while (is_digit(*s)); - } - - /* ([Ee] [+-]? [0-9]+)? */ - if (*s == 'E' || *s == 'e') { - s++; - if (*s == '+' || *s == '-') - s++; - if (!is_digit(*s)) - return false; - do { - s++; - } while (is_digit(*s)); - } - - if (out) - *out = strtod(*sp, NULL); - - *sp = s; - return true; -} - -static void skip_space(const char **sp) -{ - const char *s = *sp; - while (is_space(*s)) - s++; - *sp = s; -} - -static void emit_value(SB *out, const JsonNode *node) -{ - assert(tag_is_valid(node->tag)); - switch (node->tag) { - case JSON_NULL: - sb_puts(out, "null"); - break; - case JSON_BOOL: - sb_puts(out, node->bool_ ? "true" : "false"); - break; - case JSON_STRING: - emit_string(out, node->string_); - break; - case JSON_NUMBER: - emit_number(out, node->number_); - break; - case JSON_ARRAY: - emit_array(out, node); - break; - case JSON_OBJECT: - emit_object(out, node); - break; - default: - assert(false); - } -} - -void emit_value_indented(SB *out, const JsonNode *node, const char *space, int indent_level) -{ - assert(tag_is_valid(node->tag)); - switch (node->tag) { - case JSON_NULL: - sb_puts(out, "null"); - break; - case JSON_BOOL: - sb_puts(out, node->bool_ ? "true" : "false"); - break; - case JSON_STRING: - emit_string(out, node->string_); - break; - case JSON_NUMBER: - emit_number(out, node->number_); - break; - case JSON_ARRAY: - emit_array_indented(out, node, space, indent_level); - break; - case JSON_OBJECT: - emit_object_indented(out, node, space, indent_level); - break; - default: - assert(false); - } -} - -static void emit_array(SB *out, const JsonNode *array) -{ - const JsonNode *element; - - sb_putc(out, '['); - json_foreach(element, array) { - emit_value(out, element); - if (element->next != NULL) - sb_putc(out, ','); - } - sb_putc(out, ']'); -} - -static void emit_array_indented(SB *out, const JsonNode *array, const char *space, int indent_level) -{ - const JsonNode *element = array->children.head; - int i; - - if (element == NULL) { - sb_puts(out, "[]"); - return; - } - - sb_puts(out, "[\n"); - while (element != NULL) { - for (i = 0; i < indent_level + 1; i++) - sb_puts(out, space); - emit_value_indented(out, element, space, indent_level + 1); - - element = element->next; - sb_puts(out, element != NULL ? ",\n" : "\n"); - } - for (i = 0; i < indent_level; i++) - sb_puts(out, space); - sb_putc(out, ']'); -} - -static void emit_object(SB *out, const JsonNode *object) -{ - const JsonNode *member; - - sb_putc(out, '{'); - json_foreach(member, object) { - emit_string(out, member->key); - sb_putc(out, ':'); - emit_value(out, member); - if (member->next != NULL) - sb_putc(out, ','); - } - sb_putc(out, '}'); -} - -static void emit_object_indented(SB *out, const JsonNode *object, const char *space, int indent_level) -{ - const JsonNode *member = object->children.head; - int i; - - if (member == NULL) { - sb_puts(out, "{}"); - return; - } - - sb_puts(out, "{\n"); - while (member != NULL) { - for (i = 0; i < indent_level + 1; i++) - sb_puts(out, space); - emit_string(out, member->key); - sb_puts(out, ": "); - emit_value_indented(out, member, space, indent_level + 1); - - member = member->next; - sb_puts(out, member != NULL ? ",\n" : "\n"); - } - for (i = 0; i < indent_level; i++) - sb_puts(out, space); - sb_putc(out, '}'); -} - -void emit_string(SB *out, const char *str) -{ - bool escape_unicode = false; - const char *s = str; - char *b; - - assert(utf8_validate(str)); - - /* - * 14 bytes is enough space to write up to two - * \uXXXX escapes and two quotation marks. - */ - sb_need(out, 14); - b = out->cur; - - *b++ = '"'; - while (*s != 0) { - unsigned char c = *s++; - - /* Encode the next character, and write it to b. */ - switch (c) { - case '"': - *b++ = '\\'; - *b++ = '"'; - break; - case '\\': - *b++ = '\\'; - *b++ = '\\'; - break; - case '\b': - *b++ = '\\'; - *b++ = 'b'; - break; - case '\f': - *b++ = '\\'; - *b++ = 'f'; - break; - case '\n': - *b++ = '\\'; - *b++ = 'n'; - break; - case '\r': - *b++ = '\\'; - *b++ = 'r'; - break; - case '\t': - *b++ = '\\'; - *b++ = 't'; - break; - default: { - int len; - - s--; - len = utf8_validate_cz(s); - - if (len == 0) { - /* - * Handle invalid UTF-8 character gracefully in production - * by writing a replacement character (U+FFFD) - * and skipping a single byte. - * - * This should never happen when assertions are enabled - * due to the assertion at the beginning of this function. - */ - assert(false); - if (escape_unicode) { - strcpy(b, "\\uFFFD"); - b += 6; - } else { - *b++ = 0xEF; - *b++ = 0xBF; - *b++ = 0xBD; - } - s++; - } else if (c < 0x1F || (c >= 0x80 && escape_unicode)) { - /* Encode using \u.... */ - uint32_t unicode; - - s += utf8_read_char(s, &unicode); - - if (unicode <= 0xFFFF) { - *b++ = '\\'; - *b++ = 'u'; - b += write_hex16(b, unicode); - } else { - /* Produce a surrogate pair. */ - uint16_t uc, lc; - assert(unicode <= 0x10FFFF); - to_surrogate_pair(unicode, &uc, &lc); - *b++ = '\\'; - *b++ = 'u'; - b += write_hex16(b, uc); - *b++ = '\\'; - *b++ = 'u'; - b += write_hex16(b, lc); - } - } else { - /* Write the character directly. */ - while (len--) - *b++ = *s++; - } - - break; - } - } - - /* - * Update *out to know about the new bytes, - * and set up b to write another encoded character. - */ - out->cur = b; - sb_need(out, 14); - b = out->cur; - } - *b++ = '"'; - - out->cur = b; -} - -static void emit_number(SB *out, double num) -{ - /* - * This isn't exactly how JavaScript renders numbers, - * but it should produce valid JSON for reasonable numbers - * preserve precision well enough, and avoid some oddities - * like 0.3 -> 0.299999999999999988898 . - */ - char buf[64]; - sprintf(buf, "%.16g", num); - - if (number_is_valid(buf)) - sb_puts(out, buf); - else - sb_puts(out, "null"); -} - -static bool tag_is_valid(unsigned int tag) -{ - return (/* tag >= JSON_NULL && */ tag <= JSON_OBJECT); -} - -static bool number_is_valid(const char *num) -{ - return (parse_number(&num, NULL) && *num == '\0'); -} - -static bool expect_literal(const char **sp, const char *str) -{ - const char *s = *sp; - - while (*str != '\0') - if (*s++ != *str++) - return false; - - *sp = s; - return true; -} - -/* - * Parses exactly 4 hex characters (capital or lowercase). - * Fails if any input chars are not [0-9A-Fa-f]. - */ -static bool parse_hex16(const char **sp, uint16_t *out) -{ - const char *s = *sp; - uint16_t ret = 0; - uint16_t i; - uint16_t tmp; - char c; - - for (i = 0; i < 4; i++) { - c = *s++; - if (c >= '0' && c <= '9') - tmp = c - '0'; - else if (c >= 'A' && c <= 'F') - tmp = c - 'A' + 10; - else if (c >= 'a' && c <= 'f') - tmp = c - 'a' + 10; - else - return false; - - ret <<= 4; - ret += tmp; - } - - if (out) - *out = ret; - *sp = s; - return true; -} - -/* - * Encodes a 16-bit number into hexadecimal, - * writing exactly 4 hex chars. - */ -static int write_hex16(char *out, uint16_t val) -{ - const char *hex = "0123456789ABCDEF"; - - *out++ = hex[(val >> 12) & 0xF]; - *out++ = hex[(val >> 8) & 0xF]; - *out++ = hex[(val >> 4) & 0xF]; - *out++ = hex[ val & 0xF]; - - return 4; -} - -bool json_check(const JsonNode *node, char errmsg[256]) -{ - #define problem(...) do { \ - if (errmsg != NULL) \ - snprintf(errmsg, 256, __VA_ARGS__); \ - return false; \ - } while (0) - - if (node->key != NULL && !utf8_validate(node->key)) - problem("key contains invalid UTF-8"); - - if (!tag_is_valid(node->tag)) - problem("tag is invalid (%u)", node->tag); - - if (node->tag == JSON_BOOL) { - if (node->bool_ != false && node->bool_ != true) - problem("bool_ is neither false (%d) nor true (%d)", (int)false, (int)true); - } else if (node->tag == JSON_STRING) { - if (node->string_ == NULL) - problem("string_ is NULL"); - if (!utf8_validate(node->string_)) - problem("string_ contains invalid UTF-8"); - } else if (node->tag == JSON_ARRAY || node->tag == JSON_OBJECT) { - JsonNode *head = node->children.head; - JsonNode *tail = node->children.tail; - - if (head == NULL || tail == NULL) { - if (head != NULL) - problem("tail is NULL, but head is not"); - if (tail != NULL) - problem("head is NULL, but tail is not"); - } else { - JsonNode *child; - JsonNode *last = NULL; - - if (head->prev != NULL) - problem("First child's prev pointer is not NULL"); - - for (child = head; child != NULL; last = child, child = child->next) { - if (child == node) - problem("node is its own child"); - if (child->next == child) - problem("child->next == child (cycle)"); - if (child->next == head) - problem("child->next == head (cycle)"); - - if (child->parent != node) - problem("child does not point back to parent"); - if (child->next != NULL && child->next->prev != child) - problem("child->next does not point back to child"); - - if (node->tag == JSON_ARRAY && child->key != NULL) - problem("Array element's key is not NULL"); - if (node->tag == JSON_OBJECT && child->key == NULL) - problem("Object member's key is NULL"); - - if (!json_check(child, errmsg)) - return false; - } - - if (last != tail) - problem("tail does not match pointer found by starting at head and following next links"); - } - } - - return true; - - #undef problem -} \ No newline at end of file diff --git a/v2/internal/ffenestri/json.h b/v2/internal/ffenestri/json.h deleted file mode 100644 index aaf711f8a..000000000 --- a/v2/internal/ffenestri/json.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright (C) 2011 Joseph A. Adams (joeyadams3.14159@gmail.com) - All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - Source: http://git.ozlabs.org/?p=ccan;a=tree;f=ccan/json;hb=HEAD -*/ - -#ifndef CCAN_JSON_H -#define CCAN_JSON_H - -#include -#include - -typedef enum { - JSON_NULL, - JSON_BOOL, - JSON_STRING, - JSON_NUMBER, - JSON_ARRAY, - JSON_OBJECT, -} JsonTag; - -typedef struct JsonNode JsonNode; - -struct JsonNode -{ - /* only if parent is an object or array (NULL otherwise) */ - JsonNode *parent; - JsonNode *prev, *next; - - /* only if parent is an object (NULL otherwise) */ - char *key; /* Must be valid UTF-8. */ - - JsonTag tag; - union { - /* JSON_BOOL */ - bool bool_; - - /* JSON_STRING */ - char *string_; /* Must be valid UTF-8. */ - - /* JSON_NUMBER */ - double number_; - - /* JSON_ARRAY */ - /* JSON_OBJECT */ - struct { - JsonNode *head, *tail; - } children; - }; -}; - -/*** Encoding, decoding, and validation ***/ - -JsonNode *json_decode (const char *json); -char *json_encode (const JsonNode *node); -char *json_encode_string (const char *str); -char *json_stringify (const JsonNode *node, const char *space); -void json_delete (JsonNode *node); - -bool json_validate (const char *json); - -/*** Lookup and traversal ***/ - -JsonNode *json_find_element (JsonNode *array, int index); -JsonNode *json_find_member (JsonNode *object, const char *key); - -JsonNode *json_first_child (const JsonNode *node); - -#define json_foreach(i, object_or_array) \ - for ((i) = json_first_child(object_or_array); \ - (i) != NULL; \ - (i) = (i)->next) - -/*** Construction and manipulation ***/ - -JsonNode *json_mknull(void); -JsonNode *json_mkbool(bool b); -JsonNode *json_mkstring(const char *s); -JsonNode *json_mknumber(double n); -JsonNode *json_mkarray(void); -JsonNode *json_mkobject(void); - -void json_append_element(JsonNode *array, JsonNode *element); -void json_prepend_element(JsonNode *array, JsonNode *element); -void json_append_member(JsonNode *object, const char *key, JsonNode *value); -void json_prepend_member(JsonNode *object, const char *key, JsonNode *value); - -void json_remove_from_parent(JsonNode *node); - -/*** Debugging ***/ - -/* - * Look for structure and encoding problems in a JsonNode or its descendents. - * - * If a problem is detected, return false, writing a description of the problem - * to errmsg (unless errmsg is NULL). - */ -bool json_check(const JsonNode *node, char errmsg[256]); - -// Added by Lea Anthony 28/11/2020 -int json_array_length(JsonNode *array); - -#endif \ No newline at end of file diff --git a/v2/internal/ffenestri/menu_darwin.c b/v2/internal/ffenestri/menu_darwin.c deleted file mode 100644 index 282d3331e..000000000 --- a/v2/internal/ffenestri/menu_darwin.c +++ /dev/null @@ -1,1001 +0,0 @@ -// -// Created by Lea Anthony on 6/1/21. -// - -#include "ffenestri_darwin.h" -#include "menu_darwin.h" -#include "contextmenus_darwin.h" -#include "common.h" - -// NewMenu creates a new Menu struct, saving the given menu structure as JSON -Menu* NewMenu(JsonNode *menuData) { - - Menu *result = malloc(sizeof(Menu)); - - result->processedMenu = menuData; - - // No title by default - result->title = ""; - - // Initialise menuCallbackDataCache - vec_init(&result->callbackDataCache); - - // Allocate MenuItem Map - if( 0 != hashmap_create((const unsigned)16, &result->menuItemMap)) { - ABORT("[NewMenu] Not enough memory to allocate menuItemMap!"); - } - // Allocate the Radio Group Map - if( 0 != hashmap_create((const unsigned)4, &result->radioGroupMap)) { - ABORT("[NewMenu] Not enough memory to allocate radioGroupMap!"); - } - - // Init other members - result->menu = NULL; - result->parentData = NULL; - - return result; -} - -Menu* NewApplicationMenu(const char *menuAsJSON) { - - // Parse the menu json - JsonNode *processedMenu = json_decode(menuAsJSON); - if( processedMenu == NULL ) { - // Parse error! - ABORT("Unable to parse Menu JSON: %s", menuAsJSON); - } - - Menu *result = NewMenu(processedMenu); - result->menuType = ApplicationMenuType; - return result; -} - -MenuItemCallbackData* CreateMenuItemCallbackData(Menu *menu, id menuItem, const char *menuID, enum MenuItemType menuItemType) { - MenuItemCallbackData* result = malloc(sizeof(MenuItemCallbackData)); - - result->menu = menu; - result->menuID = menuID; - result->menuItem = menuItem; - result->menuItemType = menuItemType; - - // Store reference to this so we can destroy later - vec_push(&menu->callbackDataCache, result); - - return result; -} - -void DeleteMenu(Menu *menu) { - - // Free menu item hashmap - hashmap_destroy(&menu->menuItemMap); - - // Free radio group members - if( hashmap_num_entries(&menu->radioGroupMap) > 0 ) { - if (0 != hashmap_iterate_pairs(&menu->radioGroupMap, freeHashmapItem, NULL)) { - ABORT("[DeleteMenu] Failed to release radioGroupMap entries!"); - } - } - - // Free radio groups hashmap - hashmap_destroy(&menu->radioGroupMap); - - // Free up the processed menu memory - if (menu->processedMenu != NULL) { - json_delete(menu->processedMenu); - menu->processedMenu = NULL; - } - - // Release the callback data memory + vector - int i; MenuItemCallbackData* callbackData; - vec_foreach(&menu->callbackDataCache, callbackData, i) { - free(callbackData); - } - vec_deinit(&menu->callbackDataCache); - - free(menu); -} - -// Creates a JSON message for the given menuItemID and data -const char* createMenuClickedMessage(const char *menuItemID, const char *data, enum MenuType menuType, const char *parentID) { - - JsonNode *jsonObject = json_mkobject(); - if (menuItemID == NULL ) { - ABORT("Item ID NULL for menu!!\n"); - } - json_append_member(jsonObject, "menuItemID", json_mkstring(menuItemID)); - json_append_member(jsonObject, "menuType", json_mkstring(MenuTypeAsString[(int)menuType])); - if (data != NULL) { - json_append_member(jsonObject, "data", json_mkstring(data)); - } - if (parentID != NULL) { - json_append_member(jsonObject, "parentID", json_mkstring(parentID)); - } - const char *payload = json_encode(jsonObject); - json_delete(jsonObject); - const char *result = concat("MC", payload); - MEMFREE(payload); - return result; -} - -// Callback for text menu items -void menuItemCallback(id self, SEL cmd, id sender) { - MenuItemCallbackData *callbackData = (MenuItemCallbackData *)msg_reg(msg_reg(sender, s("representedObject")), s("pointerValue")); - const char *message; - - // Update checkbox / radio item - if( callbackData->menuItemType == Checkbox) { - // Toggle state - bool state = msg_reg(callbackData->menuItem, s("state")); - msg_int(callbackData->menuItem, s("setState:"), (state? NSControlStateValueOff : NSControlStateValueOn)); - } else if( callbackData->menuItemType == Radio ) { - // Check the menu items' current state - bool selected = (bool)msg_reg(callbackData->menuItem, s("state")); - - // If it's already selected, exit early - if (selected) return; - - // Get this item's radio group members and turn them off - id *members = (id*)hashmap_get(&(callbackData->menu->radioGroupMap), (char*)callbackData->menuID, strlen(callbackData->menuID)); - - // Uncheck all members of the group - id thisMember = members[0]; - int count = 0; - while(thisMember != NULL) { - msg_int(thisMember, s("setState:"), NSControlStateValueOff); - count = count + 1; - thisMember = members[count]; - } - - // check the selected menu item - msg_int(callbackData->menuItem, s("setState:"), NSControlStateValueOn); - } - - const char *menuID = callbackData->menuID; - const char *data = NULL; - enum MenuType menuType = callbackData->menu->menuType; - const char *parentID = NULL; - - // Generate message to send to backend - if( menuType == ContextMenuType ) { - // Get the context menu data from the menu - ContextMenu* contextMenu = (ContextMenu*) callbackData->menu->parentData; - data = contextMenu->contextMenuData; - parentID = contextMenu->ID; - } else if ( menuType == TrayMenuType ) { - parentID = (const char*) callbackData->menu->parentData; - } - - message = createMenuClickedMessage(menuID, data, menuType, parentID); - - // Notify the backend - messageFromWindowCallback(message); - MEMFREE(message); -} - -id processAcceleratorKey(const char *key) { - - // Guard against no accelerator key - if( key == NULL ) { - return str(""); - } - - if( STREQ(key, "backspace") ) { - return strunicode(0x0008); - } - if( STREQ(key, "tab") ) { - return strunicode(0x0009); - } - if( STREQ(key, "return") ) { - return strunicode(0x000d); - } - if( STREQ(key, "enter") ) { - return strunicode(0x000d); - } - if( STREQ(key, "escape") ) { - return strunicode(0x001b); - } - if( STREQ(key, "left") ) { - return strunicode(0x001c); - } - if( STREQ(key, "right") ) { - return strunicode(0x001d); - } - if( STREQ(key, "up") ) { - return strunicode(0x001e); - } - if( STREQ(key, "down") ) { - return strunicode(0x001f); - } - if( STREQ(key, "space") ) { - return strunicode(0x0020); - } - if( STREQ(key, "delete") ) { - return strunicode(0x007f); - } - if( STREQ(key, "home") ) { - return strunicode(0x2196); - } - if( STREQ(key, "end") ) { - return strunicode(0x2198); - } - if( STREQ(key, "page up") ) { - return strunicode(0x21de); - } - if( STREQ(key, "page down") ) { - return strunicode(0x21df); - } - if( STREQ(key, "f1") ) { - return strunicode(0xf704); - } - if( STREQ(key, "f2") ) { - return strunicode(0xf705); - } - if( STREQ(key, "f3") ) { - return strunicode(0xf706); - } - if( STREQ(key, "f4") ) { - return strunicode(0xf707); - } - if( STREQ(key, "f5") ) { - return strunicode(0xf708); - } - if( STREQ(key, "f6") ) { - return strunicode(0xf709); - } - if( STREQ(key, "f7") ) { - return strunicode(0xf70a); - } - if( STREQ(key, "f8") ) { - return strunicode(0xf70b); - } - if( STREQ(key, "f9") ) { - return strunicode(0xf70c); - } - if( STREQ(key, "f10") ) { - return strunicode(0xf70d); - } - if( STREQ(key, "f11") ) { - return strunicode(0xf70e); - } - if( STREQ(key, "f12") ) { - return strunicode(0xf70f); - } - if( STREQ(key, "f13") ) { - return strunicode(0xf710); - } - if( STREQ(key, "f14") ) { - return strunicode(0xf711); - } - if( STREQ(key, "f15") ) { - return strunicode(0xf712); - } - if( STREQ(key, "f16") ) { - return strunicode(0xf713); - } - if( STREQ(key, "f17") ) { - return strunicode(0xf714); - } - if( STREQ(key, "f18") ) { - return strunicode(0xf715); - } - if( STREQ(key, "f19") ) { - return strunicode(0xf716); - } - if( STREQ(key, "f20") ) { - return strunicode(0xf717); - } - if( STREQ(key, "f21") ) { - return strunicode(0xf718); - } - if( STREQ(key, "f22") ) { - return strunicode(0xf719); - } - if( STREQ(key, "f23") ) { - return strunicode(0xf71a); - } - if( STREQ(key, "f24") ) { - return strunicode(0xf71b); - } - if( STREQ(key, "f25") ) { - return strunicode(0xf71c); - } - if( STREQ(key, "f26") ) { - return strunicode(0xf71d); - } - if( STREQ(key, "f27") ) { - return strunicode(0xf71e); - } - if( STREQ(key, "f28") ) { - return strunicode(0xf71f); - } - if( STREQ(key, "f29") ) { - return strunicode(0xf720); - } - if( STREQ(key, "f30") ) { - return strunicode(0xf721); - } - if( STREQ(key, "f31") ) { - return strunicode(0xf722); - } - if( STREQ(key, "f32") ) { - return strunicode(0xf723); - } - if( STREQ(key, "f33") ) { - return strunicode(0xf724); - } - if( STREQ(key, "f34") ) { - return strunicode(0xf725); - } - if( STREQ(key, "f35") ) { - return strunicode(0xf726); - } -// if( STREQ(key, "Insert") ) { -// return strunicode(0xf727); -// } -// if( STREQ(key, "PrintScreen") ) { -// return strunicode(0xf72e); -// } -// if( STREQ(key, "ScrollLock") ) { -// return strunicode(0xf72f); -// } - if( STREQ(key, "numLock") ) { - return strunicode(0xf739); - } - - return str(key); -} - - -void addSeparator(id menu) { - id item = msg_reg(c("NSMenuItem"), s("separatorItem")); - msg_id(menu, s("addItem:"), item); -} - -id createMenuItemNoAutorelease( id title, const char *action, const char *key) { - id item = ALLOC("NSMenuItem"); - ((id(*)(id, SEL, id, SEL, id))objc_msgSend)(item, s("initWithTitle:action:keyEquivalent:"), title, s(action), str(key)); - return item; -} - -id createMenuItem(id title, const char *action, const char *key) { - id item = ALLOC("NSMenuItem"); - ((id(*)(id, SEL, id, SEL, id))objc_msgSend)(item, s("initWithTitle:action:keyEquivalent:"), title, s(action), str(key)); - msg_reg(item, s("autorelease")); - return item; -} - -id addMenuItem(id menu, const char *title, const char *action, const char *key, bool disabled) { - id item = createMenuItem(str(title), action, key); - msg_bool(item, s("setEnabled:"), !disabled); - msg_id(menu, s("addItem:"), item); - return item; -} - -id createMenu(id title) { - id menu = ALLOC("NSMenu"); - msg_id(menu, s("initWithTitle:"), title); - msg_bool(menu, s("setAutoenablesItems:"), NO); - msg_reg(menu, s("autorelease")); - return menu; -} - -void createDefaultAppMenu(id parentMenu) { -// App Menu - id appName = msg_reg(msg_reg(c("NSProcessInfo"), s("processInfo")), s("processName")); - id appMenuItem = createMenuItemNoAutorelease(appName, NULL, ""); - id appMenu = createMenu(appName); - - msg_id(appMenuItem, s("setSubmenu:"), appMenu); - msg_id(parentMenu, s("addItem:"), appMenuItem); - - id title = msg_id(str("Hide "), s("stringByAppendingString:"), appName); - id item = createMenuItem(title, "hide:", "h"); - msg_id(appMenu, s("addItem:"), item); - - id hideOthers = addMenuItem(appMenu, "Hide Others", "hideOtherApplications:", "h", FALSE); - msg_int(hideOthers, s("setKeyEquivalentModifierMask:"), (NSEventModifierFlagOption | NSEventModifierFlagCommand)); - - addMenuItem(appMenu, "Show All", "unhideAllApplications:", "", FALSE); - - addSeparator(appMenu); - - title = msg_id(str("Quit "), s("stringByAppendingString:"), appName); - item = createMenuItem(title, "terminate:", "q"); - msg_id(appMenu, s("addItem:"), item); -} - -void createDefaultEditMenu(id parentMenu) { - // Edit Menu - id editMenuItem = createMenuItemNoAutorelease(str("Edit"), NULL, ""); - id editMenu = createMenu(str("Edit")); - - msg_id(editMenuItem, s("setSubmenu:"), editMenu); - msg_id(parentMenu, s("addItem:"), editMenuItem); - - addMenuItem(editMenu, "Undo", "undo:", "z", FALSE); - addMenuItem(editMenu, "Redo", "redo:", "y", FALSE); - addSeparator(editMenu); - addMenuItem(editMenu, "Cut", "cut:", "x", FALSE); - addMenuItem(editMenu, "Copy", "copy:", "c", FALSE); - addMenuItem(editMenu, "Paste", "paste:", "v", FALSE); - addMenuItem(editMenu, "Select All", "selectAll:", "a", FALSE); -} - -void processMenuRole(Menu *menu, id parentMenu, JsonNode *item) { - const char *roleName = item->string_; - - if ( STREQ(roleName, "appMenu") ) { - createDefaultAppMenu(parentMenu); - return; - } - if ( STREQ(roleName, "editMenu")) { - createDefaultEditMenu(parentMenu); - return; - } - if ( STREQ(roleName, "hide")) { - addMenuItem(parentMenu, "Hide Window", "hide:", "h", FALSE); - return; - } - if ( STREQ(roleName, "hideothers")) { - id hideOthers = addMenuItem(parentMenu, "Hide Others", "hideOtherApplications:", "h", FALSE); - msg_int(hideOthers, s("setKeyEquivalentModifierMask:"), (NSEventModifierFlagOption | NSEventModifierFlagCommand)); - return; - } - if ( STREQ(roleName, "unhide")) { - addMenuItem(parentMenu, "Show All", "unhideAllApplications:", "", FALSE); - return; - } - if ( STREQ(roleName, "front")) { - addMenuItem(parentMenu, "Bring All to Front", "arrangeInFront:", "", FALSE); - return; - } - if ( STREQ(roleName, "undo")) { - addMenuItem(parentMenu, "Undo", "undo:", "z", FALSE); - return; - } - if ( STREQ(roleName, "redo")) { - addMenuItem(parentMenu, "Redo", "redo:", "y", FALSE); - return; - } - if ( STREQ(roleName, "cut")) { - addMenuItem(parentMenu, "Cut", "cut:", "x", FALSE); - return; - } - if ( STREQ(roleName, "copy")) { - addMenuItem(parentMenu, "Copy", "copy:", "c", FALSE); - return; - } - if ( STREQ(roleName, "paste")) { - addMenuItem(parentMenu, "Paste", "paste:", "v", FALSE); - return; - } - if ( STREQ(roleName, "delete")) { - addMenuItem(parentMenu, "Delete", "delete:", "", FALSE); - return; - } - if( STREQ(roleName, "pasteandmatchstyle")) { - id pasteandmatchstyle = addMenuItem(parentMenu, "Paste and Match Style", "pasteandmatchstyle:", "v", FALSE); - msg_int(pasteandmatchstyle, s("setKeyEquivalentModifierMask:"), (NSEventModifierFlagOption | NSEventModifierFlagShift | NSEventModifierFlagCommand)); - } - if ( STREQ(roleName, "selectall")) { - addMenuItem(parentMenu, "Select All", "selectAll:", "a", FALSE); - return; - } - if ( STREQ(roleName, "minimize")) { - addMenuItem(parentMenu, "Minimize", "miniaturize:", "m", FALSE); - return; - } - if ( STREQ(roleName, "zoom")) { - addMenuItem(parentMenu, "Zoom", "performZoom:", "", FALSE); - return; - } - if ( STREQ(roleName, "quit")) { - addMenuItem(parentMenu, "Quit (More work TBD)", "terminate:", "q", FALSE); - return; - } - if ( STREQ(roleName, "togglefullscreen")) { - addMenuItem(parentMenu, "Toggle Full Screen", "toggleFullScreen:", "f", FALSE); - return; - } - -} - -// This converts a string array of modifiers into the -// equivalent MacOS Modifier Flags -unsigned long parseModifiers(const char **modifiers) { - - // Our result is a modifier flag list - unsigned long result = 0; - - const char *thisModifier = modifiers[0]; - int count = 0; - while( thisModifier != NULL ) { - - // Determine flags - if( STREQ(thisModifier, "cmdorctrl") ) { - result |= NSEventModifierFlagCommand; - } - if( STREQ(thisModifier, "optionoralt") ) { - result |= NSEventModifierFlagOption; - } - if( STREQ(thisModifier, "shift") ) { - result |= NSEventModifierFlagShift; - } - if( STREQ(thisModifier, "super") ) { - result |= NSEventModifierFlagCommand; - } - if( STREQ(thisModifier, "ctrl") ) { - result |= NSEventModifierFlagControl; - } - count++; - thisModifier = modifiers[count]; - } - return result; -} - -id processRadioMenuItem(Menu *menu, id parentmenu, const char *title, const char *menuid, bool disabled, bool checked, const char *acceleratorkey) { - id item = ALLOC("NSMenuItem"); - - // Store the item in the menu item map - hashmap_put(&menu->menuItemMap, (char*)menuid, strlen(menuid), item); - - // Create a MenuItemCallbackData - MenuItemCallbackData *callback = CreateMenuItemCallbackData(menu, item, menuid, Radio); - - id wrappedId = msg_id(c("NSValue"), s("valueWithPointer:"), (id)callback); - msg_id(item, s("setRepresentedObject:"), wrappedId); - - id key = processAcceleratorKey(acceleratorkey); - - ((id(*)(id, SEL, id, SEL, id))objc_msgSend)(item, s("initWithTitle:action:keyEquivalent:"), str(title), s("menuItemCallback:"), key); - - msg_bool(item, s("setEnabled:"), !disabled); - msg_reg(item, s("autorelease")); - msg_int(item, s("setState:"), (checked ? NSControlStateValueOn : NSControlStateValueOff)); - - msg_id(parentmenu, s("addItem:"), item); - return item; - -} - -id processCheckboxMenuItem(Menu *menu, id parentmenu, const char *title, const char *menuid, bool disabled, bool checked, const char *key) { - - id item = ALLOC("NSMenuItem"); - msg_reg(item, s("autorelease")); - - // Store the item in the menu item map - hashmap_put(&menu->menuItemMap, (char*)menuid, strlen(menuid), item); - - // Create a MenuItemCallbackData - MenuItemCallbackData *callback = CreateMenuItemCallbackData(menu, item, menuid, Checkbox); - - id wrappedId = msg_id(c("NSValue"), s("valueWithPointer:"), (id)callback); - msg_id(item, s("setRepresentedObject:"), wrappedId); - ((id(*)(id, SEL, id, SEL, id))objc_msgSend)(item, s("initWithTitle:action:keyEquivalent:"), str(title), s("menuItemCallback:"), str(key)); - msg_bool(item, s("setEnabled:"), !disabled); - msg_int(item, s("setState:"), (checked ? NSControlStateValueOn : NSControlStateValueOff)); - msg_id(parentmenu, s("addItem:"), item); - return item; -} - -// getColour returns the colour from a styledLabel based on the key -const char* getColour(JsonNode *styledLabelEntry, const char* key) { - JsonNode* colEntry = getJSONObject(styledLabelEntry, key); - if( colEntry == NULL ) { - return NULL; - } - return getJSONString(colEntry, "hex"); -} - -id createAttributedStringFromStyledLabel(JsonNode *styledLabel, const char* fontName, int fontSize) { - - // Create result - id attributedString = ALLOC_INIT("NSMutableAttributedString"); - msg_reg(attributedString, s("autorelease")); - - // Create new Dictionary - id dictionary = ALLOC_INIT("NSMutableDictionary"); - msg_reg(dictionary, s("autorelease")); - - // Use default font - CGFloat fontSizeFloat = (CGFloat)fontSize; - id font = ((id(*)(id, SEL, CGFloat))objc_msgSend)(c("NSFont"), s("menuBarFontOfSize:"), fontSizeFloat); - - // Check user supplied font - if( STR_HAS_CHARS(fontName) ) { - id fontNameAsNSString = str(fontName); - id userFont = ((id(*)(id, SEL, id, CGFloat))objc_msgSend)(c("NSFont"), s("fontWithName:size:"), fontNameAsNSString, fontSizeFloat); - if( userFont != NULL ) { - font = userFont; - } - } - - id fan = lookupStringConstant(str("NSFontAttributeName")); - id NSForegroundColorAttributeName = lookupStringConstant(str("NSForegroundColorAttributeName")); - id NSBackgroundColorAttributeName = lookupStringConstant(str("NSBackgroundColorAttributeName")); - - // Loop over styled text creating NSAttributedText and appending to result - JsonNode *styledLabelEntry; - json_foreach(styledLabelEntry, styledLabel) { - - // Clear dictionary - msg_reg(dictionary, s("removeAllObjects")); - - // Add font to dictionary - msg_id_id(dictionary, s("setObject:forKey:"), font, fan); - - // Get Text - const char* thisLabel = mustJSONString(styledLabelEntry, "Label"); - - // Get foreground colour - const char *hexColour = getColour(styledLabelEntry, "FgCol"); - if( hexColour != NULL) { - unsigned short r, g, b, a; - - // white by default - r = g = b = a = 255; - int count = sscanf(hexColour, "#%02hx%02hx%02hx%02hx", &r, &g, &b, &a); - if (count > 0) { - id colour = ((id(*)(id, SEL, CGFloat, CGFloat, CGFloat, CGFloat))objc_msgSend)(c("NSColor"), s("colorWithCalibratedRed:green:blue:alpha:"), - (CGFloat)r / (CGFloat)255.0, - (CGFloat)g / (CGFloat)255.0, - (CGFloat)b / (CGFloat)255.0, - (CGFloat)a / (CGFloat)255.0); - msg_id_id(dictionary, s("setObject:forKey:"), colour, NSForegroundColorAttributeName); - } - } - - // Get background colour - hexColour = getColour(styledLabelEntry, "BgCol"); - if( hexColour != NULL) { - unsigned short r, g, b, a; - - // white by default - r = g = b = a = 255; - int count = sscanf(hexColour, "#%02hx%02hx%02hx%02hx", &r, &g, &b, &a); - if (count > 0) { - id colour = ((id(*)(id, SEL, CGFloat, CGFloat, CGFloat, CGFloat))objc_msgSend)(c("NSColor"), s("colorWithCalibratedRed:green:blue:alpha:"), - (CGFloat)r / (CGFloat)255.0, - (CGFloat)g / (CGFloat)255.0, - (CGFloat)b / (CGFloat)255.0, - (CGFloat)a / (CGFloat)255.0); - msg_id_id(dictionary, s("setObject:forKey:"), colour, NSForegroundColorAttributeName); - } - } - - // Create AttributedText - id thisString = ALLOC("NSMutableAttributedString"); - msg_reg(thisString, s("autorelease")); - msg_id_id(thisString, s("initWithString:attributes:"), str(thisLabel), dictionary); - - // Append text to result - msg_id(attributedString, s("appendAttributedString:"), thisString); - } - - return attributedString; - -} - - -id createAttributedString(const char* title, const char* fontName, int fontSize, const char* RGBA) { - - // Create new Dictionary - id dictionary = ALLOC_INIT("NSMutableDictionary"); - CGFloat fontSizeFloat = (CGFloat)fontSize; - - // Use default font - id font = ((id(*)(id, SEL, CGFloat))objc_msgSend)(c("NSFont"), s("menuBarFontOfSize:"), fontSizeFloat); - - // Check user supplied font - if( STR_HAS_CHARS(fontName) ) { - id fontNameAsNSString = str(fontName); - id userFont = ((id(*)(id, SEL, id, CGFloat))objc_msgSend)(c("NSFont"), s("fontWithName:size:"), fontNameAsNSString, fontSizeFloat); - if( userFont != NULL ) { - font = userFont; - } - } - - // Add font to dictionary - id fan = lookupStringConstant(str("NSFontAttributeName")); - msg_id_id(dictionary, s("setObject:forKey:"), font, fan); - - // RGBA - if( RGBA != NULL && strlen(RGBA) > 0) { - unsigned short r, g, b, a; - - // white by default - r = g = b = a = 255; - int count = sscanf(RGBA, "#%02hx%02hx%02hx%02hx", &r, &g, &b, &a); - if (count > 0) { - id colour = ((id(*)(id, SEL, CGFloat, CGFloat, CGFloat, CGFloat))objc_msgSend)(c("NSColor"), s("colorWithCalibratedRed:green:blue:alpha:"), - (CGFloat)r / (CGFloat)255.0, - (CGFloat)g / (CGFloat)255.0, - (CGFloat)b / (CGFloat)255.0, - (CGFloat)a / (CGFloat)255.0); - id NSForegroundColorAttributeName = lookupStringConstant(str("NSForegroundColorAttributeName")); - msg_id_id(dictionary, s("setObject:forKey:"), colour, NSForegroundColorAttributeName); - } - } - - id attributedString = ALLOC("NSMutableAttributedString"); - msg_id_id(attributedString, s("initWithString:attributes:"), str(title), dictionary); - msg_reg(attributedString, s("autorelease")); - msg_reg(dictionary, s("autorelease")); - return attributedString; -} - -id processTextMenuItem(Menu *menu, id parentMenu, const char *title, const char *menuid, bool disabled, const char *acceleratorkey, const char **modifiers, const char* tooltip, const char* image, const char* fontName, int fontSize, const char* RGBA, bool templateImage, bool alternate, JsonNode* styledLabel) { - id item = ALLOC("NSMenuItem"); - msg_reg(item, s("autorelease")); - - // Create a MenuItemCallbackData - MenuItemCallbackData *callback = CreateMenuItemCallbackData(menu, item, menuid, Text); - - id wrappedId = msg_id(c("NSValue"), s("valueWithPointer:"), (id)callback); - msg_id(item, s("setRepresentedObject:"), wrappedId); - - if( !alternate ) { - id key = processAcceleratorKey(acceleratorkey); - ((id(*)(id, SEL, id, SEL, id))objc_msgSend)(item, s("initWithTitle:action:keyEquivalent:"), str(title), - s("menuItemCallback:"), key); - } else { - ((id(*)(id, SEL, id, SEL, id))objc_msgSend)(item, s("initWithTitle:action:keyEquivalent:"), str(title), s("menuItemCallback:"), str("")); - } - - if( tooltip != NULL ) { - msg_id(item, s("setToolTip:"), str(tooltip)); - } - - // Process image - if( image != NULL && strlen(image) > 0) { - id nsimage = createImageFromBase64Data(image, templateImage); - msg_id(item, s("setImage:"), nsimage); - } - - id attributedString = NULL; - if( styledLabel != NULL) { - attributedString = createAttributedStringFromStyledLabel(styledLabel, fontName, fontSize); - } else { - attributedString = createAttributedString(title, fontName, fontSize, RGBA); - } - msg_id(item, s("setAttributedTitle:"), attributedString); - -//msg_id(item, s("setTitle:"), str(title)); - - msg_bool(item, s("setEnabled:"), !disabled); - - // Process modifiers - if( modifiers != NULL && !alternate) { - unsigned long modifierFlags = parseModifiers(modifiers); - ((id(*)(id, SEL, unsigned long))objc_msgSend)(item, s("setKeyEquivalentModifierMask:"), modifierFlags); - } - - // alternate - if( alternate ) { - msg_bool(item, s("setAlternate:"), true); - msg_int(item, s("setKeyEquivalentModifierMask:"), NSEventModifierFlagOption); - } - msg_id(parentMenu, s("addItem:"), item); - - return item; -} - -void processMenuItem(Menu *menu, id parentMenu, JsonNode *item) { - - // Check if this item is hidden and if so, exit early! - bool hidden = false; - getJSONBool(item, "Hidden", &hidden); - if( hidden ) { - return; - } - - // Get the role - JsonNode *role = json_find_member(item, "Role"); - if( role != NULL ) { - processMenuRole(menu, parentMenu, role); - return; - } - - // This is a user menu. Get the common data - // Get the label - const char *label = getJSONString(item, "Label"); - if ( label == NULL) { - label = "(empty)"; - } - - // Check for a styled label - JsonNode *styledLabel = getJSONObject(item, "StyledLabel"); - - // Is this an alternate menu item? - bool alternate = false; - getJSONBool(item, "MacAlternate", &alternate); - - const char *menuid = getJSONString(item, "ID"); - if ( menuid == NULL) { - menuid = ""; - } - - bool disabled = false; - getJSONBool(item, "Disabled", &disabled); - - // Get the Accelerator - JsonNode *accelerator = json_find_member(item, "Accelerator"); - const char *acceleratorkey = NULL; - const char **modifiers = NULL; - - const char *tooltip = getJSONString(item, "Tooltip"); - const char *image = getJSONString(item, "Image"); - const char *fontName = getJSONString(item, "FontName"); - const char *RGBA = getJSONString(item, "RGBA"); - bool templateImage = false; - getJSONBool(item, "MacTemplateImage", &templateImage); - - int fontSize = 0; - getJSONInt(item, "FontSize", &fontSize); - - // If we have an accelerator - if( accelerator != NULL ) { - // Get the key - acceleratorkey = getJSONString(accelerator, "Key"); - // Check if there are modifiers - JsonNode *modifiersList = json_find_member(accelerator, "Modifiers"); - if ( modifiersList != NULL ) { - // Allocate an array of strings - int noOfModifiers = json_array_length(modifiersList); - - // Do we have any? - if (noOfModifiers > 0) { - modifiers = malloc(sizeof(const char *) * (noOfModifiers + 1)); - JsonNode *modifier; - int count = 0; - // Iterate the modifiers and save a reference to them in our new array - json_foreach(modifier, modifiersList) { - // Get modifier name - modifiers[count] = modifier->string_; - count++; - } - // Null terminate the modifier list - modifiers[count] = NULL; - } - } - } - - // Get the Type - JsonNode *type = json_find_member(item, "Type"); - if( type != NULL ) { - if( STREQ(type->string_, "Text") || STREQ(type->string_, "Submenu")) { - id thisMenuItem = processTextMenuItem(menu, parentMenu, label, menuid, disabled, acceleratorkey, modifiers, tooltip, image, fontName, fontSize, RGBA, templateImage, alternate, styledLabel); - - // Check if this node has a submenu - JsonNode *submenu = json_find_member(item, "SubMenu"); - if( submenu != NULL ) { - // Get the label - JsonNode *menuNameNode = json_find_member(item, "Label"); - const char *name = ""; - if ( menuNameNode != NULL) { - name = menuNameNode->string_; - } - - id thisMenu = createMenu(str(name)); - - msg_id(thisMenuItem, s("setSubmenu:"), thisMenu); - - JsonNode *submenuItems = json_find_member(submenu, "Items"); - // If we have no items, just return - if ( submenuItems == NULL ) { - return; - } - - // Loop over submenu items - JsonNode *item; - json_foreach(item, submenuItems) { - // Get item label - processMenuItem(menu, thisMenu, item); - } - } - } - else if ( STREQ(type->string_, "Separator")) { - addSeparator(parentMenu); - } - else if ( STREQ(type->string_, "Checkbox")) { - // Get checked state - bool checked = false; - getJSONBool(item, "Checked", &checked); - - processCheckboxMenuItem(menu, parentMenu, label, menuid, disabled, checked, ""); - } - else if ( STREQ(type->string_, "Radio")) { - // Get checked state - bool checked = false; - getJSONBool(item, "Checked", &checked); - - processRadioMenuItem(menu, parentMenu, label, menuid, disabled, checked, ""); - } - } - - if ( modifiers != NULL ) { - free(modifiers); - } - - return; -} - -void processMenuData(Menu *menu, JsonNode *menuData) { - JsonNode *items = json_find_member(menuData, "Items"); - if( items == NULL ) { - // Parse error! - ABORT("Unable to find 'Items' in menu JSON!"); - } - - // Iterate items - JsonNode *item; - json_foreach(item, items) { - // Process each menu item - processMenuItem(menu, menu->menu, item); - } -} - -void processRadioGroupJSON(Menu *menu, JsonNode *radioGroup) { - - int groupLength; - getJSONInt(radioGroup, "Length", &groupLength); - JsonNode *members = json_find_member(radioGroup, "Members"); - JsonNode *member; - - // Allocate array - size_t arrayLength = sizeof(id)*(groupLength+1); - id memberList[arrayLength]; - - // Build the radio group items - int count=0; - json_foreach(member, members) { - // Get menu by id - id menuItem = (id)hashmap_get(&menu->menuItemMap, (char*)member->string_, strlen(member->string_)); - // Save Member - memberList[count] = menuItem; - count = count + 1; - } - // Null terminate array - memberList[groupLength] = 0; - - // Store the members - json_foreach(member, members) { - // Copy the memberList - char *newMemberList = (char *)malloc(arrayLength); - memcpy(newMemberList, memberList, arrayLength); - // add group to each member of group - hashmap_put(&menu->radioGroupMap, member->string_, strlen(member->string_), newMemberList); - } - -} - -id GetMenu(Menu *menu) { - - // Pull out the menu data - JsonNode *menuData = json_find_member(menu->processedMenu, "Menu"); - if( menuData == NULL ) { - ABORT("Unable to find Menu data: %s", menu->processedMenu); - } - - menu->menu = createMenu(str("")); - - // Process the menu data - processMenuData(menu, menuData); - - // Create the radiogroup cache - JsonNode *radioGroups = json_find_member(menu->processedMenu, "RadioGroups"); - if( radioGroups == NULL ) { - // Parse error! - ABORT("Unable to find RadioGroups data: %s", menu->processedMenu); - } - - // Iterate radio groups - JsonNode *radioGroup; - json_foreach(radioGroup, radioGroups) { - // Get item label - processRadioGroupJSON(menu, radioGroup); - } - - return menu->menu; -} - diff --git a/v2/internal/ffenestri/menu_darwin.h b/v2/internal/ffenestri/menu_darwin.h deleted file mode 100644 index a68c483bd..000000000 --- a/v2/internal/ffenestri/menu_darwin.h +++ /dev/null @@ -1,117 +0,0 @@ -// -// Created by Lea Anthony on 6/1/21. -// - -#ifndef MENU_DARWIN_H -#define MENU_DARWIN_H - -#include "common.h" -#include "ffenestri_darwin.h" - -enum MenuItemType {Text = 0, Checkbox = 1, Radio = 2}; -enum MenuType {ApplicationMenuType = 0, ContextMenuType = 1, TrayMenuType = 2}; -static const char *MenuTypeAsString[] = { - "ApplicationMenu", "ContextMenu", "TrayMenu", -}; - -typedef struct _NSRange { - unsigned long location; - unsigned long length; -} NSRange; - -#define NSFontWeightUltraLight -0.8 -#define NSFontWeightThin -0.6 -#define NSFontWeightLight -0.4 -#define NSFontWeightRegular 0.0 -#define NSFontWeightMedium 0.23 -#define NSFontWeightSemibold 0.3 -#define NSFontWeightBold 0.4 -#define NSFontWeightHeavy 0.56 -#define NSFontWeightBlack 0.62 - -extern void messageFromWindowCallback(const char *); - -typedef struct { - - const char *title; - - /*** Internal ***/ - - // The decoded version of the Menu JSON - JsonNode *processedMenu; - - struct hashmap_s menuItemMap; - struct hashmap_s radioGroupMap; - - // Vector to keep track of callback data memory - vec_void_t callbackDataCache; - - // The NSMenu for this menu - id menu; - - // The parent data, eg ContextMenuStore or Tray - void *parentData; - - // The commands for the menu callbacks - const char *callbackCommand; - - // This indicates if we are an Application Menu, tray menu or context menu - enum MenuType menuType; - - -} Menu; - - -typedef struct { - id menuItem; - Menu *menu; - const char *menuID; - enum MenuItemType menuItemType; -} MenuItemCallbackData; - - - -// NewMenu creates a new Menu struct, saving the given menu structure as JSON -Menu* NewMenu(JsonNode *menuData); - -Menu* NewApplicationMenu(const char *menuAsJSON); -MenuItemCallbackData* CreateMenuItemCallbackData(Menu *menu, id menuItem, const char *menuID, enum MenuItemType menuItemType); - -void DeleteMenu(Menu *menu); - -// Creates a JSON message for the given menuItemID and data -const char* createMenuClickedMessage(const char *menuItemID, const char *data, enum MenuType menuType, const char *parentID); -// Callback for text menu items -void menuItemCallback(id self, SEL cmd, id sender); -id processAcceleratorKey(const char *key); - - -void addSeparator(id menu); -id createMenuItemNoAutorelease( id title, const char *action, const char *key); - -id createMenuItem(id title, const char *action, const char *key); - -id addMenuItem(id menu, const char *title, const char *action, const char *key, bool disabled); - -id createMenu(id title); -void createDefaultAppMenu(id parentMenu); -void createDefaultEditMenu(id parentMenu); - -void processMenuRole(Menu *menu, id parentMenu, JsonNode *item); -// This converts a string array of modifiers into the -// equivalent MacOS Modifier Flags -unsigned long parseModifiers(const char **modifiers); -id processRadioMenuItem(Menu *menu, id parentmenu, const char *title, const char *menuid, bool disabled, bool checked, const char *acceleratorkey); - -id processCheckboxMenuItem(Menu *menu, id parentmenu, const char *title, const char *menuid, bool disabled, bool checked, const char *key); - -id processTextMenuItem(Menu *menu, id parentMenu, const char *title, const char *menuid, bool disabled, const char *acceleratorkey, const char **modifiers, const char* tooltip, const char* image, const char* fontName, int fontSize, const char* RGBA, bool templateImage, bool alternate, JsonNode* styledLabel); -void processMenuItem(Menu *menu, id parentMenu, JsonNode *item); -void processMenuData(Menu *menu, JsonNode *menuData); - -void processRadioGroupJSON(Menu *menu, JsonNode *radioGroup); -id GetMenu(Menu *menu); -id createAttributedString(const char* title, const char* fontName, int fontSize, const char* RGBA); -id createAttributedStringFromStyledLabel(JsonNode *styledLabel, const char* fontName, int fontSize); - -#endif //ASSETS_C_MENU_DARWIN_H diff --git a/v2/internal/ffenestri/runtime_darwin.c b/v2/internal/ffenestri/runtime_darwin.c deleted file mode 100644 index 0d733f87a..000000000 --- a/v2/internal/ffenestri/runtime_darwin.c +++ /dev/null @@ -1,5 +0,0 @@ - -// runtime.c (c) 2019-Present Lea Anthony. -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file was auto-generated. DO NOT MODIFY. -const unsigned char runtime[]={0x76, 0x61, 0x72, 0x20, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x28, 0x72, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x74, 0x5b, 0x72, 0x5d, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x5b, 0x72, 0x5d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x74, 0x5b, 0x72, 0x5d, 0x3d, 0x7b, 0x69, 0x3a, 0x72, 0x2c, 0x6c, 0x3a, 0x21, 0x31, 0x2c, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x3a, 0x7b, 0x7d, 0x7d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x5b, 0x72, 0x5d, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2c, 0x69, 0x2c, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2c, 0x65, 0x29, 0x2c, 0x69, 0x2e, 0x6c, 0x3d, 0x21, 0x30, 0x2c, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x2e, 0x6d, 0x3d, 0x6e, 0x2c, 0x65, 0x2e, 0x63, 0x3d, 0x74, 0x2c, 0x65, 0x2e, 0x64, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x72, 0x29, 0x7b, 0x65, 0x2e, 0x6f, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7c, 0x7c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x21, 0x30, 0x2c, 0x67, 0x65, 0x74, 0x3a, 0x72, 0x7d, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x72, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x22, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x22, 0x21, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x26, 0x26, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x26, 0x26, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x2c, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x22, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x7d, 0x29, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x22, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2c, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x21, 0x30, 0x7d, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x31, 0x26, 0x74, 0x26, 0x26, 0x28, 0x6e, 0x3d, 0x65, 0x28, 0x6e, 0x29, 0x29, 0x2c, 0x38, 0x26, 0x74, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x3b, 0x69, 0x66, 0x28, 0x34, 0x26, 0x74, 0x26, 0x26, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3d, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6e, 0x26, 0x26, 0x6e, 0x26, 0x26, 0x6e, 0x2e, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x3b, 0x69, 0x66, 0x28, 0x65, 0x2e, 0x72, 0x28, 0x72, 0x29, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x72, 0x2c, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x2c, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x21, 0x30, 0x2c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x6e, 0x7d, 0x29, 0x2c, 0x32, 0x26, 0x74, 0x26, 0x26, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x21, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6e, 0x29, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x69, 0x6e, 0x20, 0x6e, 0x29, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x69, 0x2c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x5b, 0x74, 0x5d, 0x7d, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x69, 0x29, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x7d, 0x2c, 0x65, 0x2e, 0x6e, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x26, 0x26, 0x6e, 0x2e, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x7d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x7d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x2e, 0x64, 0x28, 0x74, 0x2c, 0x22, 0x61, 0x22, 0x2c, 0x74, 0x29, 0x2c, 0x74, 0x7d, 0x2c, 0x65, 0x2e, 0x6f, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x70, 0x3d, 0x22, 0x22, 0x2c, 0x65, 0x28, 0x65, 0x2e, 0x73, 0x3d, 0x30, 0x29, 0x7d, 0x28, 0x5b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x22, 0x75, 0x73, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x74, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x72, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x44, 0x65, 0x62, 0x75, 0x67, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x79, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x67, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x53, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x45, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x69, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x69, 0x2c, 0x22, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x78, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x6f, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4e, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x54, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6a, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x44, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x49, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x50, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x48, 0x69, 0x64, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x41, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x68, 0x6f, 0x77, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4a, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4c, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x52, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x46, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x55, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x61, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x61, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x42, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x53, 0x61, 0x76, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x48, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x47, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x75, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x75, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x75, 0x2c, 0x22, 0x4e, 0x65, 0x77, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x6e, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x63, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x63, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x63, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x6e, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x3d, 0x7b, 0x41, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x22, 0x2c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0x64, 0x61, 0x72, 0x77, 0x69, 0x6e, 0x22, 0x7d, 0x7d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x73, 0x3d, 0x5b, 0x5d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x28, 0x6e, 0x29, 0x7b, 0x73, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x28, 0x6e, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x28, 0x6e, 0x29, 0x2c, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3e, 0x30, 0x29, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x30, 0x3b, 0x74, 0x3c, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x74, 0x2b, 0x2b, 0x29, 0x73, 0x5b, 0x74, 0x5d, 0x28, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x4c, 0x22, 0x2b, 0x6e, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x54, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x50, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x79, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x44, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x49, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x57, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x45, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x46, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x53, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x76, 0x61, 0x72, 0x20, 0x4f, 0x2c, 0x45, 0x3d, 0x7b, 0x54, 0x52, 0x41, 0x43, 0x45, 0x3a, 0x31, 0x2c, 0x44, 0x45, 0x42, 0x55, 0x47, 0x3a, 0x32, 0x2c, 0x49, 0x4e, 0x46, 0x4f, 0x3a, 0x33, 0x2c, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x3a, 0x34, 0x2c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x3a, 0x35, 0x7d, 0x2c, 0x6b, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x43, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x26, 0x26, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x7c, 0x7c, 0x28, 0x65, 0x3d, 0x30, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x50, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x72, 0x2c, 0x69, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3b, 0x64, 0x6f, 0x7b, 0x6f, 0x3d, 0x6e, 0x2b, 0x22, 0x2d, 0x22, 0x2b, 0x4f, 0x28, 0x29, 0x7d, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x28, 0x6b, 0x5b, 0x6f, 0x5d, 0x29, 0x3b, 0x69, 0x66, 0x28, 0x65, 0x3e, 0x30, 0x29, 0x76, 0x61, 0x72, 0x20, 0x61, 0x3d, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x69, 0x28, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x49, 0x44, 0x3a, 0x20, 0x22, 0x2b, 0x6f, 0x29, 0x29, 0x7d, 0x29, 0x2c, 0x65, 0x29, 0x3b, 0x6b, 0x5b, 0x6f, 0x5d, 0x3d, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x61, 0x2c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x69, 0x2c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x3a, 0x72, 0x7d, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x75, 0x3d, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x6e, 0x2c, 0x61, 0x72, 0x67, 0x73, 0x3a, 0x74, 0x2c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x44, 0x3a, 0x6f, 0x7d, 0x3b, 0x64, 0x28, 0x22, 0x43, 0x22, 0x2b, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x75, 0x29, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6e, 0x29, 0x7d, 0x7d, 0x29, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x57, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x22, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x74, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x22, 0x2e, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x22, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x6e, 0x29, 0x3b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x79, 0x28, 0x65, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x65, 0x29, 0x7d, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x74, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x64, 0x2c, 0x69, 0x3d, 0x6b, 0x5b, 0x72, 0x5d, 0x3b, 0x69, 0x66, 0x28, 0x21, 0x69, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3d, 0x22, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x27, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x72, 0x2c, 0x22, 0x27, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x21, 0x21, 0x21, 0x22, 0x29, 0x3b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6f, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6f, 0x29, 0x7d, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x69, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x2c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x6b, 0x5b, 0x72, 0x5d, 0x2c, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x3f, 0x69, 0x2e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x28, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x29, 0x3a, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x28, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4d, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x31, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x43, 0x28, 0x22, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x22, 0x2b, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x78, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x64, 0x28, 0x22, 0x52, 0x42, 0x4f, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4e, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x63, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x54, 0x28, 0x6e, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x54, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x46, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x44, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x66, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x73, 0x3a, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x3a, 0x22, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x50, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x70, 0x3a, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x3a, 0x22, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x48, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4a, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x53, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x4d, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x52, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x55, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x6d, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x46, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x75, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x55, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x43, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x42, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4d, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x48, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4d, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x47, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4d, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x4f, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x3d, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x31, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x67, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x28, 0x6e, 0x29, 0x5b, 0x30, 0x5d, 0x7d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x39, 0x30, 0x30, 0x37, 0x31, 0x39, 0x39, 0x32, 0x35, 0x34, 0x37, 0x34, 0x30, 0x39, 0x39, 0x31, 0x2a, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x7b, 0x7d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x71, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x28, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x21, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x21, 0x28, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x29, 0x29, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x7d, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x6e, 0x29, 0x2c, 0x65, 0x3d, 0x65, 0x7c, 0x7c, 0x2d, 0x31, 0x2c, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x6e, 0x29, 0x2c, 0x2d, 0x31, 0x21, 0x3d, 0x3d, 0x65, 0x26, 0x26, 0x30, 0x3d, 0x3d, 0x3d, 0x28, 0x65, 0x2d, 0x3d, 0x31, 0x29, 0x7d, 0x7d, 0x2c, 0x7a, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x56, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x7a, 0x5b, 0x6e, 0x5d, 0x3d, 0x7a, 0x5b, 0x6e, 0x5d, 0x7c, 0x7c, 0x5b, 0x5d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x6e, 0x65, 0x77, 0x20, 0x71, 0x28, 0x74, 0x2c, 0x65, 0x29, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x22, 0x50, 0x75, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x20, 0x22, 0x2b, 0x6e, 0x29, 0x2c, 0x7a, 0x5b, 0x6e, 0x5d, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x72, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4b, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x56, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x51, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x56, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x31, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x58, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3b, 0x69, 0x66, 0x28, 0x7a, 0x5b, 0x74, 0x5d, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x7a, 0x5b, 0x74, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x29, 0x2c, 0x72, 0x3d, 0x30, 0x3b, 0x72, 0x3c, 0x7a, 0x5b, 0x74, 0x5d, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x72, 0x2b, 0x3d, 0x31, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x7a, 0x5b, 0x74, 0x5d, 0x5b, 0x72, 0x5d, 0x2c, 0x6f, 0x3d, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3b, 0x69, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x6f, 0x29, 0x26, 0x26, 0x65, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x72, 0x2c, 0x31, 0x29, 0x7d, 0x7a, 0x5b, 0x74, 0x5d, 0x3d, 0x65, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x59, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x74, 0x29, 0x7b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x67, 0x28, 0x22, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x3a, 0x20, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x58, 0x28, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5a, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x6e, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x31, 0x29, 0x7d, 0x3b, 0x58, 0x28, 0x74, 0x29, 0x2c, 0x64, 0x28, 0x22, 0x45, 0x6a, 0x22, 0x2b, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x74, 0x29, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x24, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x29, 0x3b, 0x65, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x6e, 0x2c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x65, 0x29, 0x2c, 0x74, 0x26, 0x26, 0x5a, 0x28, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x74, 0x72, 0x79, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x22, 0x29, 0x3b, 0x74, 0x2e, 0x73, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2c, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x29, 0x2c, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x3f, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x63, 0x73, 0x73, 0x54, 0x65, 0x78, 0x74, 0x3d, 0x6e, 0x3a, 0x74, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x6e, 0x29, 0x29, 0x2c, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x7c, 0x7c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x22, 0x68, 0x65, 0x61, 0x64, 0x22, 0x29, 0x5b, 0x30, 0x5d, 0x29, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x74, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x6e, 0x29, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6e, 0x28, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x3d, 0x21, 0x30, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3b, 0x69, 0x66, 0x28, 0x21, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x29, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x22, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x5b, 0x5d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4f, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x62, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3a, 0x22, 0x2b, 0x6e, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x3b, 0x65, 0x3d, 0x74, 0x2c, 0x72, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x6e, 0x28, 0x65, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x2c, 0x74, 0x26, 0x26, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x28, 0x74, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x22, 0x2b, 0x6e, 0x29, 0x2c, 0x7b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x6e, 0x29, 0x7d, 0x2c, 0x67, 0x65, 0x74, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x7d, 0x2c, 0x73, 0x65, 0x74, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x65, 0x3d, 0x74, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x62, 0x79, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x3a, 0x22, 0x2b, 0x6e, 0x2c, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x65, 0x29, 0x29, 0x2c, 0x72, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x6e, 0x28, 0x65, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x28, 0x65, 0x29, 0x3b, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x28, 0x74, 0x29, 0x7d, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x54, 0x49, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x28, 0x6f, 0x6e, 0x3d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x7c, 0x7c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x31, 0x3b, 0x74, 0x3c, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x74, 0x2b, 0x2b, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x74, 0x5d, 0x3b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x29, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x65, 0x2c, 0x72, 0x29, 0x26, 0x26, 0x28, 0x6e, 0x5b, 0x72, 0x5d, 0x3d, 0x65, 0x5b, 0x72, 0x5d, 0x29, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x7d, 0x29, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x7d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x7b, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3d, 0x7b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3a, 0x6c, 0x2c, 0x4c, 0x6f, 0x67, 0x3a, 0x72, 0x2c, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x3a, 0x69, 0x2c, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x3a, 0x6f, 0x2c, 0x54, 0x72, 0x61, 0x79, 0x3a, 0x63, 0x2c, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x61, 0x2c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x7b, 0x4f, 0x6e, 0x3a, 0x4b, 0x2c, 0x4f, 0x6e, 0x63, 0x65, 0x3a, 0x51, 0x2c, 0x4f, 0x6e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x3a, 0x56, 0x2c, 0x45, 0x6d, 0x69, 0x74, 0x3a, 0x5a, 0x7d, 0x2c, 0x5f, 0x3a, 0x7b, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x57, 0x2c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x3a, 0x59, 0x2c, 0x41, 0x64, 0x64, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3a, 0x24, 0x2c, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x53, 0x53, 0x3a, 0x6e, 0x6e, 0x2c, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x3a, 0x74, 0x6e, 0x2c, 0x41, 0x64, 0x64, 0x49, 0x50, 0x43, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x66, 0x2c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x3a, 0x4d, 0x2c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x64, 0x7d, 0x2c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3d, 0x7b, 0x49, 0x73, 0x44, 0x61, 0x72, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x69, 0x73, 0x64, 0x61, 0x72, 0x6b, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x29, 0x2c, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x6c, 0x6f, 0x67, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x29, 0x2c, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x61, 0x70, 0x70, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x29, 0x7d, 0x2c, 0x6f, 0x6e, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2c, 0x6c, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x22, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3b, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x26, 0x26, 0x21, 0x74, 0x2e, 0x68, 0x61, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x6e, 0x6f, 0x2d, 0x64, 0x72, 0x61, 0x67, 0x22, 0x29, 0x3b, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x74, 0x2e, 0x68, 0x61, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x64, 0x72, 0x61, 0x67, 0x22, 0x29, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x72, 0x61, 0x67, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x3b, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x7d, 0x74, 0x3d, 0x74, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x7d, 0x29, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x2c, 0x65, 0x3d, 0x6e, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3b, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x26, 0x26, 0x6e, 0x75, 0x6c, 0x6c, 0x3d, 0x3d, 0x28, 0x74, 0x3d, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5b, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x6d, 0x65, 0x6e, 0x75, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x29, 0x3b, 0x29, 0x65, 0x3d, 0x65, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3b, 0x69, 0x66, 0x28, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x7c, 0x7c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x29, 0x26, 0x26, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x2c, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x7b, 0x69, 0x64, 0x3a, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5b, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x6d, 0x65, 0x6e, 0x75, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x7c, 0x7c, 0x22, 0x22, 0x7d, 0x3b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x72, 0x29, 0x29, 0x7d, 0x7d, 0x29, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x26, 0x26, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x74, 0x72, 0x79, 0x7b, 0x6e, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6e, 0x29, 0x7d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x5b, 0x74, 0x5d, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x5b, 0x6e, 0x5d, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x30, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x43, 0x28, 0x5b, 0x74, 0x2c, 0x65, 0x2c, 0x6e, 0x5d, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x22, 0x2e, 0x22, 0x29, 0x2c, 0x69, 0x2c, 0x72, 0x29, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x3d, 0x6e, 0x7d, 0x2c, 0x69, 0x2e, 0x67, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x7d, 0x2c, 0x69, 0x7d, 0x28, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x22, 0x29, 0x7d, 0x5d, 0x29, 0x3b, 0x00}; \ No newline at end of file diff --git a/v2/internal/ffenestri/runtime_linux.c b/v2/internal/ffenestri/runtime_linux.c deleted file mode 100644 index a8eb668be..000000000 --- a/v2/internal/ffenestri/runtime_linux.c +++ /dev/null @@ -1,5 +0,0 @@ - -// runtime.c (c) 2019-Present Lea Anthony. -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file was auto-generated. DO NOT MODIFY. -const unsigned char runtime[]={0x76, 0x61, 0x72, 0x20, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x28, 0x72, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x74, 0x5b, 0x72, 0x5d, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x5b, 0x72, 0x5d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x74, 0x5b, 0x72, 0x5d, 0x3d, 0x7b, 0x69, 0x3a, 0x72, 0x2c, 0x6c, 0x3a, 0x21, 0x31, 0x2c, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x3a, 0x7b, 0x7d, 0x7d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x5b, 0x72, 0x5d, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2c, 0x69, 0x2c, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2c, 0x65, 0x29, 0x2c, 0x69, 0x2e, 0x6c, 0x3d, 0x21, 0x30, 0x2c, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x2e, 0x6d, 0x3d, 0x6e, 0x2c, 0x65, 0x2e, 0x63, 0x3d, 0x74, 0x2c, 0x65, 0x2e, 0x64, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x72, 0x29, 0x7b, 0x65, 0x2e, 0x6f, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7c, 0x7c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x21, 0x30, 0x2c, 0x67, 0x65, 0x74, 0x3a, 0x72, 0x7d, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x72, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x22, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x22, 0x21, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x26, 0x26, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x26, 0x26, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x2c, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x22, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x7d, 0x29, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x22, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2c, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x21, 0x30, 0x7d, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x31, 0x26, 0x74, 0x26, 0x26, 0x28, 0x6e, 0x3d, 0x65, 0x28, 0x6e, 0x29, 0x29, 0x2c, 0x38, 0x26, 0x74, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x3b, 0x69, 0x66, 0x28, 0x34, 0x26, 0x74, 0x26, 0x26, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3d, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6e, 0x26, 0x26, 0x6e, 0x26, 0x26, 0x6e, 0x2e, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x3b, 0x69, 0x66, 0x28, 0x65, 0x2e, 0x72, 0x28, 0x72, 0x29, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x72, 0x2c, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x2c, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x21, 0x30, 0x2c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x6e, 0x7d, 0x29, 0x2c, 0x32, 0x26, 0x74, 0x26, 0x26, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x21, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6e, 0x29, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x69, 0x6e, 0x20, 0x6e, 0x29, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x69, 0x2c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x5b, 0x74, 0x5d, 0x7d, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x69, 0x29, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x7d, 0x2c, 0x65, 0x2e, 0x6e, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x26, 0x26, 0x6e, 0x2e, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x7d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x7d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x2e, 0x64, 0x28, 0x74, 0x2c, 0x22, 0x61, 0x22, 0x2c, 0x74, 0x29, 0x2c, 0x74, 0x7d, 0x2c, 0x65, 0x2e, 0x6f, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x70, 0x3d, 0x22, 0x22, 0x2c, 0x65, 0x28, 0x65, 0x2e, 0x73, 0x3d, 0x30, 0x29, 0x7d, 0x28, 0x5b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x22, 0x75, 0x73, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x74, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x72, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x44, 0x65, 0x62, 0x75, 0x67, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x79, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x67, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x53, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x45, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x69, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x69, 0x2c, 0x22, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4d, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x6f, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4e, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x54, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6a, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x44, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x49, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x50, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x48, 0x69, 0x64, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x41, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x68, 0x6f, 0x77, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4a, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4c, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x52, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x46, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x55, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x61, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x61, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x42, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x53, 0x61, 0x76, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x48, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x47, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x75, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x75, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x75, 0x2c, 0x22, 0x4e, 0x65, 0x77, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x6e, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x63, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x63, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x63, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x6e, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x3d, 0x7b, 0x41, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x22, 0x2c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x22, 0x7d, 0x7d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x73, 0x3d, 0x5b, 0x5d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x28, 0x6e, 0x29, 0x7b, 0x73, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x28, 0x6e, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x28, 0x6e, 0x29, 0x2c, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3e, 0x30, 0x29, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x30, 0x3b, 0x74, 0x3c, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x74, 0x2b, 0x2b, 0x29, 0x73, 0x5b, 0x74, 0x5d, 0x28, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x4c, 0x22, 0x2b, 0x6e, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x54, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x50, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x79, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x44, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x49, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x57, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x45, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x46, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x53, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x76, 0x61, 0x72, 0x20, 0x4f, 0x2c, 0x45, 0x3d, 0x7b, 0x54, 0x52, 0x41, 0x43, 0x45, 0x3a, 0x31, 0x2c, 0x44, 0x45, 0x42, 0x55, 0x47, 0x3a, 0x32, 0x2c, 0x49, 0x4e, 0x46, 0x4f, 0x3a, 0x33, 0x2c, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x3a, 0x34, 0x2c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x3a, 0x35, 0x7d, 0x2c, 0x6b, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x43, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x26, 0x26, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x7c, 0x7c, 0x28, 0x65, 0x3d, 0x30, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x50, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x72, 0x2c, 0x69, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3b, 0x64, 0x6f, 0x7b, 0x6f, 0x3d, 0x6e, 0x2b, 0x22, 0x2d, 0x22, 0x2b, 0x4f, 0x28, 0x29, 0x7d, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x28, 0x6b, 0x5b, 0x6f, 0x5d, 0x29, 0x3b, 0x69, 0x66, 0x28, 0x65, 0x3e, 0x30, 0x29, 0x76, 0x61, 0x72, 0x20, 0x61, 0x3d, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x69, 0x28, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x49, 0x44, 0x3a, 0x20, 0x22, 0x2b, 0x6f, 0x29, 0x29, 0x7d, 0x29, 0x2c, 0x65, 0x29, 0x3b, 0x6b, 0x5b, 0x6f, 0x5d, 0x3d, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x61, 0x2c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x69, 0x2c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x3a, 0x72, 0x7d, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x75, 0x3d, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x6e, 0x2c, 0x61, 0x72, 0x67, 0x73, 0x3a, 0x74, 0x2c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x44, 0x3a, 0x6f, 0x7d, 0x3b, 0x64, 0x28, 0x22, 0x43, 0x22, 0x2b, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x75, 0x29, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6e, 0x29, 0x7d, 0x7d, 0x29, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x57, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x22, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x74, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x22, 0x2e, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x22, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x6e, 0x29, 0x3b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x79, 0x28, 0x65, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x65, 0x29, 0x7d, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x74, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x64, 0x2c, 0x69, 0x3d, 0x6b, 0x5b, 0x72, 0x5d, 0x3b, 0x69, 0x66, 0x28, 0x21, 0x69, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3d, 0x22, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x27, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x72, 0x2c, 0x22, 0x27, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x21, 0x21, 0x21, 0x22, 0x29, 0x3b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6f, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6f, 0x29, 0x7d, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x69, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x2c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x6b, 0x5b, 0x72, 0x5d, 0x2c, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x3f, 0x69, 0x2e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x28, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x29, 0x3a, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x28, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x78, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x31, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x43, 0x28, 0x22, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x22, 0x2b, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4d, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x64, 0x28, 0x22, 0x52, 0x42, 0x4f, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4e, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x63, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x54, 0x28, 0x6e, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x54, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x46, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x44, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x66, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x73, 0x3a, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x3a, 0x22, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x50, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x70, 0x3a, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x3a, 0x22, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x48, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4a, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x53, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x4d, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x52, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x55, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x6d, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x46, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x75, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x55, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x43, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x42, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x78, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x48, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x78, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x47, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x78, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x4f, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x3d, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x31, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x67, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x28, 0x6e, 0x29, 0x5b, 0x30, 0x5d, 0x7d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x39, 0x30, 0x30, 0x37, 0x31, 0x39, 0x39, 0x32, 0x35, 0x34, 0x37, 0x34, 0x30, 0x39, 0x39, 0x31, 0x2a, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x7b, 0x7d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x71, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x28, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x21, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x21, 0x28, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x29, 0x29, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x7d, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x6e, 0x29, 0x2c, 0x65, 0x3d, 0x65, 0x7c, 0x7c, 0x2d, 0x31, 0x2c, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x2e, 0x61, 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2c, 0x31, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x58, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3b, 0x69, 0x66, 0x28, 0x7a, 0x5b, 0x74, 0x5d, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x7a, 0x5b, 0x74, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x29, 0x2c, 0x72, 0x3d, 0x30, 0x3b, 0x72, 0x3c, 0x7a, 0x5b, 0x74, 0x5d, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x72, 0x2b, 0x3d, 0x31, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x7a, 0x5b, 0x74, 0x5d, 0x5b, 0x72, 0x5d, 0x2c, 0x6f, 0x3d, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3b, 0x69, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x6f, 0x29, 0x26, 0x26, 0x65, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x72, 0x2c, 0x31, 0x29, 0x7d, 0x7a, 0x5b, 0x74, 0x5d, 0x3d, 0x65, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x59, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x74, 0x29, 0x7b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x67, 0x28, 0x22, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x3a, 0x20, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x58, 0x28, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5a, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x6e, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x31, 0x29, 0x7d, 0x3b, 0x58, 0x28, 0x74, 0x29, 0x2c, 0x64, 0x28, 0x22, 0x45, 0x6a, 0x22, 0x2b, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x74, 0x29, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x24, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x29, 0x3b, 0x65, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x6e, 0x2c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x65, 0x29, 0x2c, 0x74, 0x26, 0x26, 0x5a, 0x28, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x74, 0x72, 0x79, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x22, 0x29, 0x3b, 0x74, 0x2e, 0x73, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2c, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x29, 0x2c, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x3f, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x63, 0x73, 0x73, 0x54, 0x65, 0x78, 0x74, 0x3d, 0x6e, 0x3a, 0x74, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x6e, 0x29, 0x29, 0x2c, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x7c, 0x7c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x22, 0x68, 0x65, 0x61, 0x64, 0x22, 0x29, 0x5b, 0x30, 0x5d, 0x29, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x74, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x6e, 0x29, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6e, 0x28, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x3d, 0x21, 0x30, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3b, 0x69, 0x66, 0x28, 0x21, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x29, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x22, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x5b, 0x5d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4f, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x62, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3a, 0x22, 0x2b, 0x6e, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x3b, 0x65, 0x3d, 0x74, 0x2c, 0x72, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x6e, 0x28, 0x65, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x2c, 0x74, 0x26, 0x26, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x28, 0x74, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x22, 0x2b, 0x6e, 0x29, 0x2c, 0x7b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x6e, 0x29, 0x7d, 0x2c, 0x67, 0x65, 0x74, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x7d, 0x2c, 0x73, 0x65, 0x74, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x65, 0x3d, 0x74, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x62, 0x79, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x3a, 0x22, 0x2b, 0x6e, 0x2c, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x65, 0x29, 0x29, 0x2c, 0x72, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x6e, 0x28, 0x65, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x28, 0x65, 0x29, 0x3b, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x28, 0x74, 0x29, 0x7d, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x54, 0x49, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x28, 0x6f, 0x6e, 0x3d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x7c, 0x7c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x31, 0x3b, 0x74, 0x3c, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x74, 0x2b, 0x2b, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x74, 0x5d, 0x3b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x29, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x65, 0x2c, 0x72, 0x29, 0x26, 0x26, 0x28, 0x6e, 0x5b, 0x72, 0x5d, 0x3d, 0x65, 0x5b, 0x72, 0x5d, 0x29, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x7d, 0x29, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x7d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x7b, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3d, 0x7b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3a, 0x6c, 0x2c, 0x4c, 0x6f, 0x67, 0x3a, 0x72, 0x2c, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x3a, 0x69, 0x2c, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x3a, 0x6f, 0x2c, 0x54, 0x72, 0x61, 0x79, 0x3a, 0x63, 0x2c, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x61, 0x2c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x7b, 0x4f, 0x6e, 0x3a, 0x4b, 0x2c, 0x4f, 0x6e, 0x63, 0x65, 0x3a, 0x51, 0x2c, 0x4f, 0x6e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x3a, 0x56, 0x2c, 0x45, 0x6d, 0x69, 0x74, 0x3a, 0x5a, 0x7d, 0x2c, 0x5f, 0x3a, 0x7b, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x57, 0x2c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x3a, 0x59, 0x2c, 0x41, 0x64, 0x64, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3a, 0x24, 0x2c, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x53, 0x53, 0x3a, 0x6e, 0x6e, 0x2c, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x3a, 0x74, 0x6e, 0x2c, 0x41, 0x64, 0x64, 0x49, 0x50, 0x43, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x66, 0x2c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x3a, 0x78, 0x2c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x64, 0x7d, 0x2c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3d, 0x7b, 0x49, 0x73, 0x44, 0x61, 0x72, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x69, 0x73, 0x64, 0x61, 0x72, 0x6b, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x29, 0x2c, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x6c, 0x6f, 0x67, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x29, 0x2c, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x61, 0x70, 0x70, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x29, 0x7d, 0x2c, 0x6f, 0x6e, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2c, 0x6c, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x22, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3b, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x26, 0x26, 0x21, 0x74, 0x2e, 0x68, 0x61, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x6e, 0x6f, 0x2d, 0x64, 0x72, 0x61, 0x67, 0x22, 0x29, 0x3b, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x74, 0x2e, 0x68, 0x61, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x64, 0x72, 0x61, 0x67, 0x22, 0x29, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x72, 0x61, 0x67, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x3b, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x7d, 0x74, 0x3d, 0x74, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x7d, 0x29, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x2c, 0x65, 0x3d, 0x6e, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3b, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x26, 0x26, 0x6e, 0x75, 0x6c, 0x6c, 0x3d, 0x3d, 0x28, 0x74, 0x3d, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5b, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x6d, 0x65, 0x6e, 0x75, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x29, 0x3b, 0x29, 0x65, 0x3d, 0x65, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3b, 0x69, 0x66, 0x28, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x7c, 0x7c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x29, 0x26, 0x26, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x2c, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x7b, 0x69, 0x64, 0x3a, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5b, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x6d, 0x65, 0x6e, 0x75, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x7c, 0x7c, 0x22, 0x22, 0x7d, 0x3b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x72, 0x29, 0x29, 0x7d, 0x7d, 0x29, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x26, 0x26, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x74, 0x72, 0x79, 0x7b, 0x6e, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6e, 0x29, 0x7d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x5b, 0x74, 0x5d, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x5b, 0x6e, 0x5d, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x30, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x43, 0x28, 0x5b, 0x74, 0x2c, 0x65, 0x2c, 0x6e, 0x5d, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x22, 0x2e, 0x22, 0x29, 0x2c, 0x69, 0x2c, 0x72, 0x29, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x3d, 0x6e, 0x7d, 0x2c, 0x69, 0x2e, 0x67, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x7d, 0x2c, 0x69, 0x7d, 0x28, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x22, 0x29, 0x7d, 0x5d, 0x29, 0x3b, 0x00}; \ No newline at end of file diff --git a/v2/internal/ffenestri/runtime_windows.c b/v2/internal/ffenestri/runtime_windows.c deleted file mode 100644 index e9a3ff705..000000000 --- a/v2/internal/ffenestri/runtime_windows.c +++ /dev/null @@ -1,5 +0,0 @@ - -// runtime.c (c) 2019-Present Lea Anthony. -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file was auto-generated. DO NOT MODIFY. -const unsigned char runtime[]={0x76, 0x61, 0x72, 0x20, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x28, 0x72, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x74, 0x5b, 0x72, 0x5d, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x5b, 0x72, 0x5d, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x74, 0x5b, 0x72, 0x5d, 0x3d, 0x7b, 0x69, 0x3a, 0x72, 0x2c, 0x6c, 0x3a, 0x21, 0x31, 0x2c, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x3a, 0x7b, 0x7d, 0x7d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x5b, 0x72, 0x5d, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2c, 0x69, 0x2c, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2c, 0x65, 0x29, 0x2c, 0x69, 0x2e, 0x6c, 0x3d, 0x21, 0x30, 0x2c, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x2e, 0x6d, 0x3d, 0x6e, 0x2c, 0x65, 0x2e, 0x63, 0x3d, 0x74, 0x2c, 0x65, 0x2e, 0x64, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x72, 0x29, 0x7b, 0x65, 0x2e, 0x6f, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7c, 0x7c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x21, 0x30, 0x2c, 0x67, 0x65, 0x74, 0x3a, 0x72, 0x7d, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x72, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x22, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x22, 0x21, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x26, 0x26, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x26, 0x26, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x2c, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x22, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x7d, 0x29, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6e, 0x2c, 0x22, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2c, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x21, 0x30, 0x7d, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x31, 0x26, 0x74, 0x26, 0x26, 0x28, 0x6e, 0x3d, 0x65, 0x28, 0x6e, 0x29, 0x29, 0x2c, 0x38, 0x26, 0x74, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x3b, 0x69, 0x66, 0x28, 0x34, 0x26, 0x74, 0x26, 0x26, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3d, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6e, 0x26, 0x26, 0x6e, 0x26, 0x26, 0x6e, 0x2e, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x29, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x3b, 0x69, 0x66, 0x28, 0x65, 0x2e, 0x72, 0x28, 0x72, 0x29, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x72, 0x2c, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x2c, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x21, 0x30, 0x2c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x6e, 0x7d, 0x29, 0x2c, 0x32, 0x26, 0x74, 0x26, 0x26, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x21, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6e, 0x29, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x69, 0x6e, 0x20, 0x6e, 0x29, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x69, 0x2c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x5b, 0x74, 0x5d, 0x7d, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x69, 0x29, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x7d, 0x2c, 0x65, 0x2e, 0x6e, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x26, 0x26, 0x6e, 0x2e, 0x5f, 0x5f, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x7d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x7d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x2e, 0x64, 0x28, 0x74, 0x2c, 0x22, 0x61, 0x22, 0x2c, 0x74, 0x29, 0x2c, 0x74, 0x7d, 0x2c, 0x65, 0x2e, 0x6f, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x2c, 0x65, 0x2e, 0x70, 0x3d, 0x22, 0x22, 0x2c, 0x65, 0x28, 0x65, 0x2e, 0x73, 0x3d, 0x30, 0x29, 0x7d, 0x28, 0x5b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x22, 0x75, 0x73, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x74, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x72, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x44, 0x65, 0x62, 0x75, 0x67, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x79, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x67, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x53, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x72, 0x2c, 0x22, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x45, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x69, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x69, 0x2c, 0x22, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x54, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x6f, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6a, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x78, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4d, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x49, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x44, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x50, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x48, 0x69, 0x64, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x41, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x53, 0x68, 0x6f, 0x77, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4a, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4c, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x52, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x55, 0x6e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x69, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x46, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x6f, 0x2c, 0x22, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x55, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x61, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x61, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x42, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x53, 0x61, 0x76, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x48, 0x7d, 0x29, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x61, 0x2c, 0x22, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x47, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x75, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x75, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x75, 0x2c, 0x22, 0x4e, 0x65, 0x77, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x6e, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x63, 0x3d, 0x7b, 0x7d, 0x3b, 0x65, 0x2e, 0x72, 0x28, 0x63, 0x29, 0x2c, 0x65, 0x2e, 0x64, 0x28, 0x63, 0x2c, 0x22, 0x53, 0x65, 0x74, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x6e, 0x7d, 0x29, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x3d, 0x7b, 0x41, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x22, 0x2c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x7d, 0x7d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x73, 0x3d, 0x5b, 0x5d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x28, 0x6e, 0x29, 0x7b, 0x73, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x28, 0x6e, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x28, 0x6e, 0x29, 0x2c, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3e, 0x30, 0x29, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x30, 0x3b, 0x74, 0x3c, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x74, 0x2b, 0x2b, 0x29, 0x73, 0x5b, 0x74, 0x5d, 0x28, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x4c, 0x22, 0x2b, 0x6e, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x54, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x50, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x79, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x44, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x49, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x57, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x45, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x46, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x28, 0x22, 0x53, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x76, 0x61, 0x72, 0x20, 0x4f, 0x2c, 0x45, 0x3d, 0x7b, 0x54, 0x52, 0x41, 0x43, 0x45, 0x3a, 0x31, 0x2c, 0x44, 0x45, 0x42, 0x55, 0x47, 0x3a, 0x32, 0x2c, 0x49, 0x4e, 0x46, 0x4f, 0x3a, 0x33, 0x2c, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x3a, 0x34, 0x2c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x3a, 0x35, 0x7d, 0x2c, 0x6b, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x43, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x26, 0x26, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x7c, 0x7c, 0x28, 0x65, 0x3d, 0x30, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x50, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x72, 0x2c, 0x69, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3b, 0x64, 0x6f, 0x7b, 0x6f, 0x3d, 0x6e, 0x2b, 0x22, 0x2d, 0x22, 0x2b, 0x4f, 0x28, 0x29, 0x7d, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x28, 0x6b, 0x5b, 0x6f, 0x5d, 0x29, 0x3b, 0x69, 0x66, 0x28, 0x65, 0x3e, 0x30, 0x29, 0x76, 0x61, 0x72, 0x20, 0x61, 0x3d, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x69, 0x28, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x49, 0x44, 0x3a, 0x20, 0x22, 0x2b, 0x6f, 0x29, 0x29, 0x7d, 0x29, 0x2c, 0x65, 0x29, 0x3b, 0x6b, 0x5b, 0x6f, 0x5d, 0x3d, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x61, 0x2c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x69, 0x2c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x3a, 0x72, 0x7d, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x75, 0x3d, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x6e, 0x2c, 0x61, 0x72, 0x67, 0x73, 0x3a, 0x74, 0x2c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x44, 0x3a, 0x6f, 0x7d, 0x3b, 0x64, 0x28, 0x22, 0x43, 0x22, 0x2b, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x75, 0x29, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6e, 0x29, 0x7d, 0x7d, 0x29, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x57, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x22, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x74, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x22, 0x2e, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x22, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x6e, 0x29, 0x3b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x79, 0x28, 0x65, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x65, 0x29, 0x7d, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x74, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x64, 0x2c, 0x69, 0x3d, 0x6b, 0x5b, 0x72, 0x5d, 0x3b, 0x69, 0x66, 0x28, 0x21, 0x69, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x3d, 0x22, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x27, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x72, 0x2c, 0x22, 0x27, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x21, 0x21, 0x21, 0x22, 0x29, 0x3b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6f, 0x29, 0x2c, 0x6e, 0x65, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6f, 0x29, 0x7d, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x69, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x2c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x6b, 0x5b, 0x72, 0x5d, 0x2c, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x3f, 0x69, 0x2e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x28, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x29, 0x3a, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x28, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x31, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x43, 0x28, 0x22, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x22, 0x2b, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x54, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x64, 0x28, 0x22, 0x52, 0x42, 0x4f, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x63, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x78, 0x28, 0x6e, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x54, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4d, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x46, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x66, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x44, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x73, 0x3a, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x3a, 0x22, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x50, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x70, 0x3a, 0x22, 0x2b, 0x6e, 0x2b, 0x22, 0x3a, 0x22, 0x2b, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x48, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4a, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x53, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x4d, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x52, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x55, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x6d, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x46, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x75, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x55, 0x28, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x57, 0x43, 0x22, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x42, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4e, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x48, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4e, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x47, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x4e, 0x28, 0x22, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x6e, 0x29, 0x7d, 0x4f, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x3d, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x31, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x67, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x28, 0x6e, 0x29, 0x5b, 0x30, 0x5d, 0x7d, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x39, 0x30, 0x30, 0x37, 0x31, 0x39, 0x39, 0x32, 0x35, 0x34, 0x37, 0x34, 0x30, 0x39, 0x39, 0x31, 0x2a, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x7b, 0x7d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x71, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x28, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x21, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x21, 0x28, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x29, 0x29, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x7d, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x6e, 0x29, 0x2c, 0x65, 0x3d, 0x65, 0x7c, 0x7c, 0x2d, 0x31, 0x2c, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x6e, 0x29, 0x2c, 0x2d, 0x31, 0x21, 0x3d, 0x3d, 0x65, 0x26, 0x26, 0x30, 0x3d, 0x3d, 0x3d, 0x28, 0x65, 0x2d, 0x3d, 0x31, 0x29, 0x7d, 0x7d, 0x2c, 0x7a, 0x3d, 0x7b, 0x7d, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x56, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x65, 0x29, 0x7b, 0x7a, 0x5b, 0x6e, 0x5d, 0x3d, 0x7a, 0x5b, 0x6e, 0x5d, 0x7c, 0x7c, 0x5b, 0x5d, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x6e, 0x65, 0x77, 0x20, 0x71, 0x28, 0x74, 0x2c, 0x65, 0x29, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x22, 0x50, 0x75, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x20, 0x22, 0x2b, 0x6e, 0x29, 0x2c, 0x7a, 0x5b, 0x6e, 0x5d, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x72, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4b, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x56, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x51, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x56, 0x28, 0x6e, 0x2c, 0x74, 0x2c, 0x31, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x58, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3b, 0x69, 0x66, 0x28, 0x7a, 0x5b, 0x74, 0x5d, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x7a, 0x5b, 0x74, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x29, 0x2c, 0x72, 0x3d, 0x30, 0x3b, 0x72, 0x3c, 0x7a, 0x5b, 0x74, 0x5d, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x72, 0x2b, 0x3d, 0x31, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x7a, 0x5b, 0x74, 0x5d, 0x5b, 0x72, 0x5d, 0x2c, 0x6f, 0x3d, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3b, 0x69, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x6f, 0x29, 0x26, 0x26, 0x65, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x72, 0x2c, 0x31, 0x29, 0x7d, 0x7a, 0x5b, 0x74, 0x5d, 0x3d, 0x65, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x59, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3b, 0x74, 0x72, 0x79, 0x7b, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x74, 0x29, 0x7b, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x67, 0x28, 0x22, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x3a, 0x20, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x58, 0x28, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5a, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x6e, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x28, 0x31, 0x29, 0x7d, 0x3b, 0x58, 0x28, 0x74, 0x29, 0x2c, 0x64, 0x28, 0x22, 0x45, 0x6a, 0x22, 0x2b, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x74, 0x29, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x24, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x29, 0x3b, 0x65, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x6e, 0x2c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x65, 0x29, 0x2c, 0x74, 0x26, 0x26, 0x5a, 0x28, 0x74, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x74, 0x72, 0x79, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x22, 0x29, 0x3b, 0x74, 0x2e, 0x73, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2c, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x29, 0x2c, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x3f, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x63, 0x73, 0x73, 0x54, 0x65, 0x78, 0x74, 0x3d, 0x6e, 0x3a, 0x74, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x6e, 0x29, 0x29, 0x2c, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x7c, 0x7c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x22, 0x68, 0x65, 0x61, 0x64, 0x22, 0x29, 0x5b, 0x30, 0x5d, 0x29, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x74, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x6e, 0x29, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6e, 0x28, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x3d, 0x21, 0x30, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x28, 0x6e, 0x2c, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3b, 0x69, 0x66, 0x28, 0x21, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x29, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x22, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x5b, 0x5d, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4f, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x62, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3a, 0x22, 0x2b, 0x6e, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x3b, 0x65, 0x3d, 0x74, 0x2c, 0x72, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x6e, 0x28, 0x65, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x2c, 0x74, 0x26, 0x26, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x28, 0x74, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x22, 0x2b, 0x6e, 0x29, 0x2c, 0x7b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, 0x6e, 0x29, 0x7d, 0x2c, 0x67, 0x65, 0x74, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x7d, 0x2c, 0x73, 0x65, 0x74, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x65, 0x3d, 0x74, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x62, 0x79, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x3a, 0x22, 0x2b, 0x6e, 0x2c, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x65, 0x29, 0x29, 0x2c, 0x72, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x6e, 0x28, 0x65, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x28, 0x65, 0x29, 0x3b, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x28, 0x74, 0x29, 0x7d, 0x7d, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x64, 0x28, 0x22, 0x54, 0x49, 0x22, 0x2b, 0x6e, 0x29, 0x7d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x28, 0x6f, 0x6e, 0x3d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x7c, 0x7c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x31, 0x3b, 0x74, 0x3c, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x74, 0x2b, 0x2b, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x65, 0x3d, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5b, 0x74, 0x5d, 0x3b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x29, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x61, 0x73, 0x4f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x65, 0x2c, 0x72, 0x29, 0x26, 0x26, 0x28, 0x6e, 0x5b, 0x72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0x41, 0x64, 0x64, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3a, 0x24, 0x2c, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x53, 0x53, 0x3a, 0x6e, 0x6e, 0x2c, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x3a, 0x74, 0x6e, 0x2c, 0x41, 0x64, 0x64, 0x49, 0x50, 0x43, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x66, 0x2c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x6c, 0x6c, 0x3a, 0x4e, 0x2c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x64, 0x7d, 0x2c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x75, 0x7d, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3d, 0x7b, 0x49, 0x73, 0x44, 0x61, 0x72, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x69, 0x73, 0x64, 0x61, 0x72, 0x6b, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x29, 0x2c, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x6c, 0x6f, 0x67, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x29, 0x2c, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x65, 0x6e, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x61, 0x70, 0x70, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x29, 0x7d, 0x2c, 0x6f, 0x6e, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2c, 0x6c, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x22, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x3d, 0x6e, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3b, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x26, 0x26, 0x21, 0x74, 0x2e, 0x68, 0x61, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x6e, 0x6f, 0x2d, 0x64, 0x72, 0x61, 0x67, 0x22, 0x29, 0x3b, 0x29, 0x7b, 0x69, 0x66, 0x28, 0x74, 0x2e, 0x68, 0x61, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x22, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x64, 0x72, 0x61, 0x67, 0x22, 0x29, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x64, 0x72, 0x61, 0x67, 0x22, 0x29, 0x3b, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x7d, 0x74, 0x3d, 0x74, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x7d, 0x29, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x2c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x74, 0x2c, 0x65, 0x3d, 0x6e, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3b, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x65, 0x26, 0x26, 0x6e, 0x75, 0x6c, 0x6c, 0x3d, 0x3d, 0x28, 0x74, 0x3d, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5b, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x6d, 0x65, 0x6e, 0x75, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x29, 0x3b, 0x29, 0x65, 0x3d, 0x65, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3b, 0x69, 0x66, 0x28, 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x7c, 0x7c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x61, 0x69, 0x6c, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6e, 0x75, 0x29, 0x26, 0x26, 0x6e, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x2c, 0x6e, 0x75, 0x6c, 0x6c, 0x21, 0x3d, 0x74, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x7b, 0x69, 0x64, 0x3a, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5b, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x6d, 0x65, 0x6e, 0x75, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x7c, 0x7c, 0x22, 0x22, 0x7d, 0x3b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x28, 0x22, 0x43, 0x22, 0x2b, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x28, 0x72, 0x29, 0x29, 0x7d, 0x7d, 0x29, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x26, 0x26, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x74, 0x72, 0x79, 0x7b, 0x6e, 0x3d, 0x4a, 0x53, 0x4f, 0x4e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x29, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x6e, 0x29, 0x7b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x6e, 0x29, 0x7d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x5b, 0x74, 0x5d, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x7c, 0x7c, 0x7b, 0x7d, 0x2c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x28, 0x6e, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x29, 0x2e, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63, 0x68, 0x28, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5b, 0x74, 0x5d, 0x5b, 0x65, 0x5d, 0x5b, 0x6e, 0x5d, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3d, 0x30, 0x3b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x28, 0x29, 0x7b, 0x76, 0x61, 0x72, 0x20, 0x69, 0x3d, 0x5b, 0x5d, 0x2e, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x43, 0x28, 0x5b, 0x74, 0x2c, 0x65, 0x2c, 0x6e, 0x5d, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x22, 0x2e, 0x22, 0x29, 0x2c, 0x69, 0x2c, 0x72, 0x29, 0x7d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x7b, 0x72, 0x3d, 0x6e, 0x7d, 0x2c, 0x69, 0x2e, 0x67, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x7d, 0x2c, 0x69, 0x7d, 0x28, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x29, 0x29, 0x7d, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x29, 0x2c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x69, 0x74, 0x28, 0x22, 0x77, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x22, 0x29, 0x7d, 0x5d, 0x29, 0x3b, 0x00}; \ No newline at end of file diff --git a/v2/internal/ffenestri/traymenu_darwin.c b/v2/internal/ffenestri/traymenu_darwin.c deleted file mode 100644 index 1854d838d..000000000 --- a/v2/internal/ffenestri/traymenu_darwin.c +++ /dev/null @@ -1,266 +0,0 @@ -// -// Created by Lea Anthony on 12/1/21. -// - -#include "common.h" -#include "traymenu_darwin.h" -#include "trayicons.h" - -extern Class trayMenuDelegateClass; - -// A cache for all our tray menu icons -// Global because it's a singleton -struct hashmap_s trayIconCache; - -TrayMenu* NewTrayMenu(const char* menuJSON) { - TrayMenu* result = malloc(sizeof(TrayMenu)); - -/* - {"ID":"0","Label":"Test Tray Label","Icon":"","ProcessedMenu":{"Menu":{"Items":[{"ID":"0","Label":"Show Window","Type":"Text","Disabled":false,"Hidden":false,"Checked":false,"Foreground":0,"Background":0},{"ID":"1","Label":"Hide Window","Type":"Text","Disabled":false,"Hidden":false,"Checked":false,"Foreground":0,"Background":0},{"ID":"2","Label":"Minimise Window","Type":"Text","Disabled":false,"Hidden":false,"Checked":false,"Foreground":0,"Background":0},{"ID":"3","Label":"Unminimise Window","Type":"Text","Disabled":false,"Hidden":false,"Checked":false,"Foreground":0,"Background":0}]},"RadioGroups":null}} -*/ - JsonNode* processedJSON = json_decode(menuJSON); - if( processedJSON == NULL ) { - ABORT("[NewTrayMenu] Unable to parse TrayMenu JSON: %s", menuJSON); - } - - // Save reference to this json - result->processedJSON = processedJSON; - - // TODO: Make this configurable - result->trayIconPosition = NSImageLeft; - - result->ID = mustJSONString(processedJSON, "ID"); - result->label = mustJSONString(processedJSON, "Label"); - result->icon = mustJSONString(processedJSON, "Image"); - result->fontName = getJSONString(processedJSON, "FontName"); - result->RGBA = getJSONString(processedJSON, "RGBA"); - getJSONBool(processedJSON, "MacTemplateImage", &result->templateImage); - result->fontSize = 0; - getJSONInt(processedJSON, "FontSize", &result->fontSize); - result->tooltip = NULL; - result->tooltip = getJSONString(processedJSON, "Tooltip"); - result->disabled = false; - getJSONBool(processedJSON, "Disabled", &result->disabled); - - result->styledLabel = getJSONObject(processedJSON, "StyledLabel"); - - // Create the menu - JsonNode* processedMenu = mustJSONObject(processedJSON, "ProcessedMenu"); - result->menu = NewMenu(processedMenu); - - result->delegate = NULL; - - // Init tray status bar item - result->statusbaritem = NULL; - - // Set the menu type and store the tray ID in the parent data - result->menu->menuType = TrayMenuType; - result->menu->parentData = (void*) result->ID; - - return result; -} - -void DumpTrayMenu(TrayMenu* trayMenu) { - printf(" ['%s':%p] = { label: '%s', icon: '%s', menu: %p, statusbar: %p }\n", trayMenu->ID, trayMenu, trayMenu->label, trayMenu->icon, trayMenu->menu, trayMenu->statusbaritem ); -} - - -void UpdateTrayLabel(TrayMenu *trayMenu, const char *label, const char *fontName, int fontSize, const char *RGBA, const char *tooltip, bool disabled, JsonNode *styledLabel) { - - // Exit early if NULL - if( trayMenu->label == NULL ) { - return; - } - // Update button label - id statusBarButton = msg_reg(trayMenu->statusbaritem, s("button")); - id attributedString = NULL; - if( styledLabel != NULL) { - attributedString = createAttributedStringFromStyledLabel(styledLabel, fontName, fontSize); - } else { - attributedString = createAttributedString(label, fontName, fontSize, RGBA); - } - - if( tooltip != NULL ) { - msg_id(statusBarButton, s("setToolTip:"), str(tooltip)); - } - - msg_bool(statusBarButton, s("setEnabled:"), !disabled); - - msg_id(statusBarButton, s("setAttributedTitle:"), attributedString); -} - -void UpdateTrayIcon(TrayMenu *trayMenu) { - - // Exit early if NULL - if( trayMenu->icon == NULL ) { - return; - } - - id statusBarButton = msg_reg(trayMenu->statusbaritem, s("button")); - - // Empty icon means remove it - if( STREMPTY(trayMenu->icon) ) { - // Remove image - msg_id(statusBarButton, s("setImage:"), NULL); - return; - } - - id trayImage = hashmap_get(&trayIconCache, trayMenu->icon, strlen(trayMenu->icon)); - - // If we don't have the image in the icon cache then assume it's base64 encoded image data - if (trayImage == NULL) { - trayImage = createImageFromBase64Data(trayMenu->icon, trayMenu->templateImage); - } - - msg_int(statusBarButton, s("setImagePosition:"), trayMenu->trayIconPosition); - msg_id(statusBarButton, s("setImage:"), trayImage); - -} - -void ShowTrayMenu(TrayMenu* trayMenu) { - - // Create a status bar item if we don't have one - if( trayMenu->statusbaritem == NULL ) { - id statusBar = msg_reg( c("NSStatusBar"), s("systemStatusBar") ); - trayMenu->statusbaritem = ((id(*)(id, SEL, CGFloat))objc_msgSend)(statusBar, s("statusItemWithLength:"), NSVariableStatusItemLength); - msg_reg(trayMenu->statusbaritem, s("retain")); - } - - id statusBarButton = msg_reg(trayMenu->statusbaritem, s("button")); - msg_uint(statusBarButton, s("setImagePosition:"), trayMenu->trayIconPosition); - // Update the icon if needed - UpdateTrayIcon(trayMenu); - - // Update the label if needed - UpdateTrayLabel(trayMenu, trayMenu->label, trayMenu->fontName, trayMenu->fontSize, trayMenu->RGBA, trayMenu->tooltip, trayMenu->disabled, trayMenu->styledLabel); - - // Update the menu - id menu = GetMenu(trayMenu->menu); - objc_setAssociatedObject(menu, "trayMenuID", str(trayMenu->ID), OBJC_ASSOCIATION_ASSIGN); - - // Create delegate - id trayMenuDelegate = msg_reg((id)trayMenuDelegateClass, s("new")); - msg_id(menu, s("setDelegate:"), trayMenuDelegate); - objc_setAssociatedObject(trayMenuDelegate, "menu", menu, OBJC_ASSOCIATION_ASSIGN); - - // Create menu delegate - trayMenu->delegate = trayMenuDelegate; - - msg_id(trayMenu->statusbaritem, s("setMenu:"), menu); -} - -// UpdateTrayMenuInPlace receives 2 menus. The current menu gets -// updated with the data from the new menu. -void UpdateTrayMenuInPlace(TrayMenu* currentMenu, TrayMenu* newMenu) { - - // Delete the old menu - DeleteMenu(currentMenu->menu); - if( currentMenu->delegate != NULL ) { - msg_reg(currentMenu->delegate, s("release")); - currentMenu->delegate = NULL; - } - - // Set the new one - currentMenu->menu = newMenu->menu; - - // Delete the old JSON - json_delete(currentMenu->processedJSON); - - // Set the new JSON - currentMenu->processedJSON = newMenu->processedJSON; - - // Copy the other data - currentMenu->ID = newMenu->ID; - currentMenu->label = newMenu->label; - currentMenu->styledLabel = newMenu->styledLabel; - currentMenu->trayIconPosition = newMenu->trayIconPosition; - currentMenu->icon = newMenu->icon; - -} - -void DeleteTrayMenu(TrayMenu* trayMenu) { - - // Delete the menu - DeleteMenu(trayMenu->menu); - if( trayMenu->delegate != NULL ) { - msg_reg(trayMenu->delegate, s("release")); - trayMenu->delegate = NULL; - } - - // Free JSON - if (trayMenu->processedJSON != NULL ) { - json_delete(trayMenu->processedJSON); - } - - // Free the status item - if ( trayMenu->statusbaritem != NULL ) { - id statusBar = msg_reg( c("NSStatusBar"), s("systemStatusBar") ); - msg_id(statusBar, s("removeStatusItem:"), trayMenu->statusbaritem); - msg_reg(trayMenu->statusbaritem, s("release")); - trayMenu->statusbaritem = NULL; - } - - // Free the tray menu memory - MEMFREE(trayMenu); -} -void DeleteTrayMenuKeepStatusBarItem(TrayMenu* trayMenu) { - - // Delete the menu - DeleteMenu(trayMenu->menu); - if( trayMenu->delegate != NULL ) { - msg_reg(trayMenu->delegate, s("release")); - trayMenu->delegate = NULL; - } - - // Free JSON - if (trayMenu->processedJSON != NULL ) { - json_delete(trayMenu->processedJSON); - } - - // Free the tray menu memory - MEMFREE(trayMenu); -} - -void LoadTrayIcons() { - - // Allocate the Tray Icons - if( 0 != hashmap_create((const unsigned)4, &trayIconCache)) { - // Couldn't allocate map - ABORT("Not enough memory to allocate trayIconCache!"); - } - - unsigned int count = 0; - while( 1 ) { - const unsigned char *name = trayIcons[count++]; - if( name == 0x00 ) { - break; - } - const unsigned char *lengthAsString = trayIcons[count++]; - if( name == 0x00 ) { - break; - } - const unsigned char *data = trayIcons[count++]; - if( data == 0x00 ) { - break; - } - int length = atoi((const char *)lengthAsString); - - // Create the icon and add to the hashmap - id imageData = ((id(*)(id, SEL, id, int))objc_msgSend)(c("NSData"), s("dataWithBytes:length:"), (id)data, length); - id trayImage = ALLOC("NSImage"); - msg_id(trayImage, s("initWithData:"), imageData); - hashmap_put(&trayIconCache, (const char *)name, strlen((const char *)name), trayImage); - } -} - -void UnloadTrayIcons() { - // Release the tray cache images - if( hashmap_num_entries(&trayIconCache) > 0 ) { - if (0!=hashmap_iterate_pairs(&trayIconCache, releaseNSObject, NULL)) { - ABORT("failed to release hashmap entries!"); - } - } - - //Free radio groups hashmap - hashmap_destroy(&trayIconCache); -} \ No newline at end of file diff --git a/v2/internal/ffenestri/traymenu_darwin.h b/v2/internal/ffenestri/traymenu_darwin.h deleted file mode 100644 index 763b4d63d..000000000 --- a/v2/internal/ffenestri/traymenu_darwin.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// Created by Lea Anthony on 12/1/21. -// - -#ifndef TRAYMENU_DARWIN_H -#define TRAYMENU_DARWIN_H - -#include "common.h" -#include "menu_darwin.h" - -typedef struct { - - const char *label; - const char *icon; - const char *ID; - const char *tooltip; - - bool templateImage; - const char *fontName; - int fontSize; - const char *RGBA; - - bool disabled; - - Menu* menu; - - id statusbaritem; - unsigned int trayIconPosition; - - JsonNode* processedJSON; - - JsonNode* styledLabel; - - id delegate; - -} TrayMenu; - -TrayMenu* NewTrayMenu(const char *trayJSON); -void DumpTrayMenu(TrayMenu* trayMenu); -void ShowTrayMenu(TrayMenu* trayMenu); -void UpdateTrayMenuInPlace(TrayMenu* currentMenu, TrayMenu* newMenu); -void UpdateTrayIcon(TrayMenu *trayMenu); -void UpdateTrayLabel(TrayMenu *trayMenu, const char *label, const char *fontName, int fontSize, const char *RGBA, const char *tooltip, bool disabled, JsonNode *styledLabel); - -void LoadTrayIcons(); -void UnloadTrayIcons(); - -void DeleteTrayMenu(TrayMenu* trayMenu); -void DeleteTrayMenuKeepStatusBarItem(TrayMenu* trayMenu); - -#endif //TRAYMENU_DARWIN_H diff --git a/v2/internal/ffenestri/traymenustore_darwin.c b/v2/internal/ffenestri/traymenustore_darwin.c deleted file mode 100644 index 362c07bf7..000000000 --- a/v2/internal/ffenestri/traymenustore_darwin.c +++ /dev/null @@ -1,173 +0,0 @@ -// -// Created by Lea Anthony on 12/1/21. -// - -#include "common.h" -#include "traymenustore_darwin.h" -#include "traymenu_darwin.h" -#include - -TrayMenuStore* NewTrayMenuStore() { - - TrayMenuStore* result = malloc(sizeof(TrayMenuStore)); - - // Allocate Tray Menu Store - if( 0 != hashmap_create((const unsigned)4, &result->trayMenuMap)) { - ABORT("[NewTrayMenuStore] Not enough memory to allocate trayMenuMap!"); - } - - if (pthread_mutex_init(&result->lock, NULL) != 0) { - printf("\n mutex init has failed\n"); - exit(1); - } - - return result; -} - -int dumpTrayMenu(void *const context, struct hashmap_element_s *const e) { - DumpTrayMenu(e->data); - return 0; -} - -void DumpTrayMenuStore(TrayMenuStore* store) { - pthread_mutex_lock(&store->lock); - hashmap_iterate_pairs(&store->trayMenuMap, dumpTrayMenu, NULL); - pthread_mutex_unlock(&store->lock); -} - -void AddTrayMenuToStore(TrayMenuStore* store, const char* menuJSON) { - - TrayMenu* newMenu = NewTrayMenu(menuJSON); - - pthread_mutex_lock(&store->lock); - //TODO: check if there is already an entry for this menu - hashmap_put(&store->trayMenuMap, newMenu->ID, strlen(newMenu->ID), newMenu); - pthread_mutex_unlock(&store->lock); -} - -int showTrayMenu(void *const context, struct hashmap_element_s *const e) { - ShowTrayMenu(e->data); - // 0 to retain element, -1 to delete. - return 0; -} - -void ShowTrayMenusInStore(TrayMenuStore* store) { - pthread_mutex_lock(&store->lock); - if( hashmap_num_entries(&store->trayMenuMap) > 0 ) { - hashmap_iterate_pairs(&store->trayMenuMap, showTrayMenu, NULL); - } - pthread_mutex_unlock(&store->lock); -} - -int freeTrayMenu(void *const context, struct hashmap_element_s *const e) { - DeleteTrayMenu(e->data); - return -1; -} - -void DeleteTrayMenuStore(TrayMenuStore *store) { - - // Delete context menus - if (hashmap_num_entries(&store->trayMenuMap) > 0) { - if (0 != hashmap_iterate_pairs(&store->trayMenuMap, freeTrayMenu, NULL)) { - ABORT("[DeleteContextMenuStore] Failed to release contextMenuStore entries!"); - } - } - - // Destroy tray menu map - hashmap_destroy(&store->trayMenuMap); - - pthread_mutex_destroy(&store->lock); -} - -TrayMenu* GetTrayMenuFromStore(TrayMenuStore* store, const char* menuID) { - // Get the current menu - pthread_mutex_lock(&store->lock); - TrayMenu* result = hashmap_get(&store->trayMenuMap, menuID, strlen(menuID)); - pthread_mutex_unlock(&store->lock); - return result; -} - -TrayMenu* MustGetTrayMenuFromStore(TrayMenuStore* store, const char* menuID) { - // Get the current menu - pthread_mutex_lock(&store->lock); - TrayMenu* result = hashmap_get(&store->trayMenuMap, menuID, strlen(menuID)); - pthread_mutex_unlock(&store->lock); - - if (result == NULL ) { - ABORT("Unable to find TrayMenu with ID '%s' in the TrayMenuStore!", menuID); - } - return result; -} - -void DeleteTrayMenuInStore(TrayMenuStore* store, const char* ID) { - - TrayMenu *menu = MustGetTrayMenuFromStore(store, ID); - pthread_mutex_lock(&store->lock); - hashmap_remove(&store->trayMenuMap, ID, strlen(ID)); - pthread_mutex_unlock(&store->lock); - DeleteTrayMenu(menu); -} - -void UpdateTrayMenuLabelInStore(TrayMenuStore* store, const char* JSON) { - // Parse the JSON - JsonNode *parsedUpdate = mustParseJSON(JSON); - - // Get the data out - const char* ID = mustJSONString(parsedUpdate, "ID"); - const char* Label = mustJSONString(parsedUpdate, "Label"); - - // Check we have this menu - TrayMenu *menu = MustGetTrayMenuFromStore(store, ID); - - const char *fontName = getJSONString(parsedUpdate, "FontName"); - const char *RGBA = getJSONString(parsedUpdate, "RGBA"); - int fontSize = 0; - getJSONInt(parsedUpdate, "FontSize", &fontSize); - const char *tooltip = getJSONString(parsedUpdate, "Tooltip"); - bool disabled = false; - getJSONBool(parsedUpdate, "Disabled", &disabled); - - JsonNode *styledLabel = getJSONObject(parsedUpdate, "StyledLabel"); - - UpdateTrayLabel(menu, Label, fontName, fontSize, RGBA, tooltip, disabled, styledLabel); - - json_delete(parsedUpdate); -} - -void UpdateTrayMenuInStore(TrayMenuStore* store, const char* menuJSON) { - TrayMenu* newMenu = NewTrayMenu(menuJSON); -// DumpTrayMenu(newMenu); - - // Get the current menu - TrayMenu *currentMenu = GetTrayMenuFromStore(store, newMenu->ID); - - // If we don't have a menu, we create one - if ( currentMenu == NULL ) { - // Store the new menu - pthread_mutex_lock(&store->lock); - hashmap_put(&store->trayMenuMap, newMenu->ID, strlen(newMenu->ID), newMenu); - pthread_mutex_unlock(&store->lock); - - // Show it - ShowTrayMenu(newMenu); - return; - } -// DumpTrayMenu(currentMenu); - - // Save the status bar reference - newMenu->statusbaritem = currentMenu->statusbaritem; - - pthread_mutex_lock(&store->lock); - hashmap_remove(&store->trayMenuMap, newMenu->ID, strlen(newMenu->ID)); - pthread_mutex_unlock(&store->lock); - - // Delete the current menu - DeleteTrayMenuKeepStatusBarItem(currentMenu); - - pthread_mutex_lock(&store->lock); - hashmap_put(&store->trayMenuMap, newMenu->ID, strlen(newMenu->ID), newMenu); - pthread_mutex_unlock(&store->lock); - - // Show the updated menu - ShowTrayMenu(newMenu); -} diff --git a/v2/internal/ffenestri/traymenustore_darwin.h b/v2/internal/ffenestri/traymenustore_darwin.h deleted file mode 100644 index a09a9e004..000000000 --- a/v2/internal/ffenestri/traymenustore_darwin.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Created by Lea Anthony on 7/1/21. -// - -#ifndef TRAYMENUSTORE_DARWIN_H -#define TRAYMENUSTORE_DARWIN_H - -#include "traymenu_darwin.h" - -#include - -typedef struct { - - int dummy; - - // This is our tray menu map - // It maps tray IDs to TrayMenu* - struct hashmap_s trayMenuMap; - - pthread_mutex_t lock; - -} TrayMenuStore; - -TrayMenuStore* NewTrayMenuStore(); - -void AddTrayMenuToStore(TrayMenuStore* store, const char* menuJSON); -void UpdateTrayMenuInStore(TrayMenuStore* store, const char* menuJSON); -void ShowTrayMenusInStore(TrayMenuStore* store); -void DeleteTrayMenuStore(TrayMenuStore* store); - -TrayMenu* GetTrayMenuByID(TrayMenuStore* store, const char* menuID); - -void UpdateTrayMenuLabelInStore(TrayMenuStore* store, const char* JSON); -void DeleteTrayMenuInStore(TrayMenuStore* store, const char* id); - -#endif //TRAYMENUSTORE_DARWIN_H diff --git a/v2/internal/ffenestri/vec.c b/v2/internal/ffenestri/vec.c deleted file mode 100644 index 6ab8bfa96..000000000 --- a/v2/internal/ffenestri/vec.c +++ /dev/null @@ -1,115 +0,0 @@ -// +build !windows - -/** - * Copyright (c) 2014 rxi - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the MIT license. See LICENSE for details. - */ - -#include "vec.h" - - -int vec_expand_(char **data, int *length, int *capacity, int memsz) { - if (*length + 1 > *capacity) { - void *ptr; - int n = (*capacity == 0) ? 1 : *capacity << 1; - ptr = realloc(*data, n * memsz); - if (ptr == NULL) return -1; - *data = ptr; - *capacity = n; - } - return 0; -} - - -int vec_reserve_(char **data, int *length, int *capacity, int memsz, int n) { - (void) length; - if (n > *capacity) { - void *ptr = realloc(*data, n * memsz); - if (ptr == NULL) return -1; - *data = ptr; - *capacity = n; - } - return 0; -} - - -int vec_reserve_po2_( - char **data, int *length, int *capacity, int memsz, int n -) { - int n2 = 1; - if (n == 0) return 0; - while (n2 < n) n2 <<= 1; - return vec_reserve_(data, length, capacity, memsz, n2); -} - - -int vec_compact_(char **data, int *length, int *capacity, int memsz) { - if (*length == 0) { - free(*data); - *data = NULL; - *capacity = 0; - return 0; - } else { - void *ptr; - int n = *length; - ptr = realloc(*data, n * memsz); - if (ptr == NULL) return -1; - *capacity = n; - *data = ptr; - } - return 0; -} - - -int vec_insert_(char **data, int *length, int *capacity, int memsz, - int idx -) { - int err = vec_expand_(data, length, capacity, memsz); - if (err) return err; - memmove(*data + (idx + 1) * memsz, - *data + idx * memsz, - (*length - idx) * memsz); - return 0; -} - - -void vec_splice_(char **data, int *length, int *capacity, int memsz, - int start, int count -) { - (void) capacity; - memmove(*data + start * memsz, - *data + (start + count) * memsz, - (*length - start - count) * memsz); -} - - -void vec_swapsplice_(char **data, int *length, int *capacity, int memsz, - int start, int count -) { - (void) capacity; - memmove(*data + start * memsz, - *data + (*length - count) * memsz, - count * memsz); -} - - -void vec_swap_(char **data, int *length, int *capacity, int memsz, - int idx1, int idx2 -) { - unsigned char *a, *b, tmp; - int count; - (void) length; - (void) capacity; - if (idx1 == idx2) return; - a = (unsigned char*) *data + idx1 * memsz; - b = (unsigned char*) *data + idx2 * memsz; - count = memsz; - while (count--) { - tmp = *a; - *a = *b; - *b = tmp; - a++, b++; - } -} diff --git a/v2/internal/ffenestri/vec.h b/v2/internal/ffenestri/vec.h deleted file mode 100644 index 19362c987..000000000 --- a/v2/internal/ffenestri/vec.h +++ /dev/null @@ -1,181 +0,0 @@ -/** - * Copyright (c) 2014 rxi - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the MIT license. See LICENSE for details. - */ - -#ifndef VEC_H -#define VEC_H - -#include -#include - -#define VEC_VERSION "0.2.1" - - -#define vec_unpack_(v)\ - (char**)&(v)->data, &(v)->length, &(v)->capacity, sizeof(*(v)->data) - - -#define vec_t(T)\ - struct { T *data; int length, capacity; } - - -#define vec_init(v)\ - memset((v), 0, sizeof(*(v))) - - -#define vec_deinit(v)\ - ( free((v)->data),\ - vec_init(v) ) - - -#define vec_push(v, val)\ - ( vec_expand_(vec_unpack_(v)) ? -1 :\ - ((v)->data[(v)->length++] = (val), 0), 0 ) - - -#define vec_pop(v)\ - (v)->data[--(v)->length] - - -#define vec_splice(v, start, count)\ - ( vec_splice_(vec_unpack_(v), start, count),\ - (v)->length -= (count) ) - - -#define vec_swapsplice(v, start, count)\ - ( vec_swapsplice_(vec_unpack_(v), start, count),\ - (v)->length -= (count) ) - - -#define vec_insert(v, idx, val)\ - ( vec_insert_(vec_unpack_(v), idx) ? -1 :\ - ((v)->data[idx] = (val), 0), (v)->length++, 0 ) - - -#define vec_sort(v, fn)\ - qsort((v)->data, (v)->length, sizeof(*(v)->data), fn) - - -#define vec_swap(v, idx1, idx2)\ - vec_swap_(vec_unpack_(v), idx1, idx2) - - -#define vec_truncate(v, len)\ - ((v)->length = (len) < (v)->length ? (len) : (v)->length) - - -#define vec_clear(v)\ - ((v)->length = 0) - - -#define vec_first(v)\ - (v)->data[0] - - -#define vec_last(v)\ - (v)->data[(v)->length - 1] - - -#define vec_reserve(v, n)\ - vec_reserve_(vec_unpack_(v), n) - - -#define vec_compact(v)\ - vec_compact_(vec_unpack_(v)) - - -#define vec_pusharr(v, arr, count)\ - do {\ - int i__, n__ = (count);\ - if (vec_reserve_po2_(vec_unpack_(v), (v)->length + n__) != 0) break;\ - for (i__ = 0; i__ < n__; i__++) {\ - (v)->data[(v)->length++] = (arr)[i__];\ - }\ - } while (0) - - -#define vec_extend(v, v2)\ - vec_pusharr((v), (v2)->data, (v2)->length) - - -#define vec_find(v, val, idx)\ - do {\ - for ((idx) = 0; (idx) < (v)->length; (idx)++) {\ - if ((v)->data[(idx)] == (val)) break;\ - }\ - if ((idx) == (v)->length) (idx) = -1;\ - } while (0) - - -#define vec_remove(v, val)\ - do {\ - int idx__;\ - vec_find(v, val, idx__);\ - if (idx__ != -1) vec_splice(v, idx__, 1);\ - } while (0) - - -#define vec_reverse(v)\ - do {\ - int i__ = (v)->length / 2;\ - while (i__--) {\ - vec_swap((v), i__, (v)->length - (i__ + 1));\ - }\ - } while (0) - - -#define vec_foreach(v, var, iter)\ - if ( (v)->length > 0 )\ - for ( (iter) = 0;\ - (iter) < (v)->length && (((var) = (v)->data[(iter)]), 1);\ - ++(iter)) - - -#define vec_foreach_rev(v, var, iter)\ - if ( (v)->length > 0 )\ - for ( (iter) = (v)->length - 1;\ - (iter) >= 0 && (((var) = (v)->data[(iter)]), 1);\ - --(iter)) - - -#define vec_foreach_ptr(v, var, iter)\ - if ( (v)->length > 0 )\ - for ( (iter) = 0;\ - (iter) < (v)->length && (((var) = &(v)->data[(iter)]), 1);\ - ++(iter)) - - -#define vec_foreach_ptr_rev(v, var, iter)\ - if ( (v)->length > 0 )\ - for ( (iter) = (v)->length - 1;\ - (iter) >= 0 && (((var) = &(v)->data[(iter)]), 1);\ - --(iter)) - - - -int vec_expand_(char **data, int *length, int *capacity, int memsz); -int vec_reserve_(char **data, int *length, int *capacity, int memsz, int n); -int vec_reserve_po2_(char **data, int *length, int *capacity, int memsz, - int n); -int vec_compact_(char **data, int *length, int *capacity, int memsz); -int vec_insert_(char **data, int *length, int *capacity, int memsz, - int idx); -void vec_splice_(char **data, int *length, int *capacity, int memsz, - int start, int count); -void vec_swapsplice_(char **data, int *length, int *capacity, int memsz, - int start, int count); -void vec_swap_(char **data, int *length, int *capacity, int memsz, - int idx1, int idx2); - - -typedef vec_t(void*) vec_void_t; -typedef vec_t(char*) vec_str_t; -typedef vec_t(int) vec_int_t; -typedef vec_t(char) vec_char_t; -typedef vec_t(float) vec_float_t; -typedef vec_t(double) vec_double_t; - -#endif \ No newline at end of file diff --git a/v2/internal/ffenestri/windows/EventToken.h b/v2/internal/ffenestri/windows/EventToken.h deleted file mode 100644 index 885405b6b..000000000 --- a/v2/internal/ffenestri/windows/EventToken.h +++ /dev/null @@ -1,68 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 8.01.0622 */ -/* @@MIDL_FILE_HEADING( ) */ - - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 500 -#endif - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCSAL_H_VERSION__ -#define __REQUIRED_RPCSAL_H_VERSION__ 100 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error this stub requires an updated version of -#endif /* __RPCNDR_H_VERSION__ */ - - -#ifndef __eventtoken_h__ -#define __eventtoken_h__ - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -#pragma once -#endif - -/* Forward Declarations */ - -#ifdef __cplusplus -extern "C"{ -#endif - - -/* interface __MIDL_itf_eventtoken_0000_0000 */ -/* [local] */ - -// Microsoft Windows -// Copyright (c) Microsoft Corporation. All rights reserved. -#pragma once -typedef struct EventRegistrationToken - { - __int64 value; - } EventRegistrationToken; - - - -extern RPC_IF_HANDLE __MIDL_itf_eventtoken_0000_0000_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_eventtoken_0000_0000_v0_0_s_ifspec; - -/* Additional Prototypes for ALL interfaces */ - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/v2/internal/ffenestri/windows/WebView2.h b/v2/internal/ffenestri/windows/WebView2.h deleted file mode 100644 index 44cd67035..000000000 --- a/v2/internal/ffenestri/windows/WebView2.h +++ /dev/null @@ -1,12693 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 8.xx.xxxx */ -/* at a redacted point in time - */ -/* Compiler settings for ../../edge_embedded_browser/client/win/current/webview2.idl: - Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.xx.xxxx - protocol : dce , ms_ext, c_ext, robust - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -/* @@MIDL_FILE_HEADING( ) */ - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 475 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error this stub requires an updated version of -#endif /* __RPCNDR_H_VERSION__ */ - - -#ifndef __webview2_h__ -#define __webview2_h__ - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -#pragma once -#endif - -/* Forward Declarations */ - -#ifndef __ICoreWebView2AcceleratorKeyPressedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2AcceleratorKeyPressedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2AcceleratorKeyPressedEventArgs ICoreWebView2AcceleratorKeyPressedEventArgs; - -#endif /* __ICoreWebView2AcceleratorKeyPressedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2AcceleratorKeyPressedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2AcceleratorKeyPressedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2AcceleratorKeyPressedEventHandler ICoreWebView2AcceleratorKeyPressedEventHandler; - -#endif /* __ICoreWebView2AcceleratorKeyPressedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler; - -#endif /* __ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler ICoreWebView2CallDevToolsProtocolMethodCompletedHandler; - -#endif /* __ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CapturePreviewCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2CapturePreviewCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2CapturePreviewCompletedHandler ICoreWebView2CapturePreviewCompletedHandler; - -#endif /* __ICoreWebView2CapturePreviewCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2_FWD_DEFINED__ -#define __ICoreWebView2_FWD_DEFINED__ -typedef interface ICoreWebView2 ICoreWebView2; - -#endif /* __ICoreWebView2_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2_2_FWD_DEFINED__ -#define __ICoreWebView2_2_FWD_DEFINED__ -typedef interface ICoreWebView2_2 ICoreWebView2_2; - -#endif /* __ICoreWebView2_2_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2_3_FWD_DEFINED__ -#define __ICoreWebView2_3_FWD_DEFINED__ -typedef interface ICoreWebView2_3 ICoreWebView2_3; - -#endif /* __ICoreWebView2_3_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CompositionController_FWD_DEFINED__ -#define __ICoreWebView2CompositionController_FWD_DEFINED__ -typedef interface ICoreWebView2CompositionController ICoreWebView2CompositionController; - -#endif /* __ICoreWebView2CompositionController_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CompositionController2_FWD_DEFINED__ -#define __ICoreWebView2CompositionController2_FWD_DEFINED__ -typedef interface ICoreWebView2CompositionController2 ICoreWebView2CompositionController2; - -#endif /* __ICoreWebView2CompositionController2_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Controller_FWD_DEFINED__ -#define __ICoreWebView2Controller_FWD_DEFINED__ -typedef interface ICoreWebView2Controller ICoreWebView2Controller; - -#endif /* __ICoreWebView2Controller_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Controller2_FWD_DEFINED__ -#define __ICoreWebView2Controller2_FWD_DEFINED__ -typedef interface ICoreWebView2Controller2 ICoreWebView2Controller2; - -#endif /* __ICoreWebView2Controller2_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Controller3_FWD_DEFINED__ -#define __ICoreWebView2Controller3_FWD_DEFINED__ -typedef interface ICoreWebView2Controller3 ICoreWebView2Controller3; - -#endif /* __ICoreWebView2Controller3_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ContentLoadingEventArgs_FWD_DEFINED__ -#define __ICoreWebView2ContentLoadingEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2ContentLoadingEventArgs ICoreWebView2ContentLoadingEventArgs; - -#endif /* __ICoreWebView2ContentLoadingEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ContentLoadingEventHandler_FWD_DEFINED__ -#define __ICoreWebView2ContentLoadingEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2ContentLoadingEventHandler ICoreWebView2ContentLoadingEventHandler; - -#endif /* __ICoreWebView2ContentLoadingEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Cookie_FWD_DEFINED__ -#define __ICoreWebView2Cookie_FWD_DEFINED__ -typedef interface ICoreWebView2Cookie ICoreWebView2Cookie; - -#endif /* __ICoreWebView2Cookie_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CookieList_FWD_DEFINED__ -#define __ICoreWebView2CookieList_FWD_DEFINED__ -typedef interface ICoreWebView2CookieList ICoreWebView2CookieList; - -#endif /* __ICoreWebView2CookieList_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CookieManager_FWD_DEFINED__ -#define __ICoreWebView2CookieManager_FWD_DEFINED__ -typedef interface ICoreWebView2CookieManager ICoreWebView2CookieManager; - -#endif /* __ICoreWebView2CookieManager_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler; - -#endif /* __ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler ICoreWebView2CreateCoreWebView2ControllerCompletedHandler; - -#endif /* __ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler; - -#endif /* __ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ContainsFullScreenElementChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2ContainsFullScreenElementChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2ContainsFullScreenElementChangedEventHandler ICoreWebView2ContainsFullScreenElementChangedEventHandler; - -#endif /* __ICoreWebView2ContainsFullScreenElementChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CursorChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2CursorChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2CursorChangedEventHandler ICoreWebView2CursorChangedEventHandler; - -#endif /* __ICoreWebView2CursorChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2DocumentTitleChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2DocumentTitleChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2DocumentTitleChangedEventHandler ICoreWebView2DocumentTitleChangedEventHandler; - -#endif /* __ICoreWebView2DocumentTitleChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2DOMContentLoadedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2DOMContentLoadedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2DOMContentLoadedEventArgs ICoreWebView2DOMContentLoadedEventArgs; - -#endif /* __ICoreWebView2DOMContentLoadedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2DOMContentLoadedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2DOMContentLoadedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2DOMContentLoadedEventHandler ICoreWebView2DOMContentLoadedEventHandler; - -#endif /* __ICoreWebView2DOMContentLoadedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Deferral_FWD_DEFINED__ -#define __ICoreWebView2Deferral_FWD_DEFINED__ -typedef interface ICoreWebView2Deferral ICoreWebView2Deferral; - -#endif /* __ICoreWebView2Deferral_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2DevToolsProtocolEventReceivedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2DevToolsProtocolEventReceivedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs ICoreWebView2DevToolsProtocolEventReceivedEventArgs; - -#endif /* __ICoreWebView2DevToolsProtocolEventReceivedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2DevToolsProtocolEventReceivedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2DevToolsProtocolEventReceivedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler ICoreWebView2DevToolsProtocolEventReceivedEventHandler; - -#endif /* __ICoreWebView2DevToolsProtocolEventReceivedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2DevToolsProtocolEventReceiver_FWD_DEFINED__ -#define __ICoreWebView2DevToolsProtocolEventReceiver_FWD_DEFINED__ -typedef interface ICoreWebView2DevToolsProtocolEventReceiver ICoreWebView2DevToolsProtocolEventReceiver; - -#endif /* __ICoreWebView2DevToolsProtocolEventReceiver_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment_FWD_DEFINED__ -#define __ICoreWebView2Environment_FWD_DEFINED__ -typedef interface ICoreWebView2Environment ICoreWebView2Environment; - -#endif /* __ICoreWebView2Environment_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment2_FWD_DEFINED__ -#define __ICoreWebView2Environment2_FWD_DEFINED__ -typedef interface ICoreWebView2Environment2 ICoreWebView2Environment2; - -#endif /* __ICoreWebView2Environment2_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment3_FWD_DEFINED__ -#define __ICoreWebView2Environment3_FWD_DEFINED__ -typedef interface ICoreWebView2Environment3 ICoreWebView2Environment3; - -#endif /* __ICoreWebView2Environment3_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment4_FWD_DEFINED__ -#define __ICoreWebView2Environment4_FWD_DEFINED__ -typedef interface ICoreWebView2Environment4 ICoreWebView2Environment4; - -#endif /* __ICoreWebView2Environment4_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2EnvironmentOptions_FWD_DEFINED__ -#define __ICoreWebView2EnvironmentOptions_FWD_DEFINED__ -typedef interface ICoreWebView2EnvironmentOptions ICoreWebView2EnvironmentOptions; - -#endif /* __ICoreWebView2EnvironmentOptions_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ExecuteScriptCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2ExecuteScriptCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2ExecuteScriptCompletedHandler ICoreWebView2ExecuteScriptCompletedHandler; - -#endif /* __ICoreWebView2ExecuteScriptCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2FrameInfo_FWD_DEFINED__ -#define __ICoreWebView2FrameInfo_FWD_DEFINED__ -typedef interface ICoreWebView2FrameInfo ICoreWebView2FrameInfo; - -#endif /* __ICoreWebView2FrameInfo_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2FrameInfoCollection_FWD_DEFINED__ -#define __ICoreWebView2FrameInfoCollection_FWD_DEFINED__ -typedef interface ICoreWebView2FrameInfoCollection ICoreWebView2FrameInfoCollection; - -#endif /* __ICoreWebView2FrameInfoCollection_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2FrameInfoCollectionIterator_FWD_DEFINED__ -#define __ICoreWebView2FrameInfoCollectionIterator_FWD_DEFINED__ -typedef interface ICoreWebView2FrameInfoCollectionIterator ICoreWebView2FrameInfoCollectionIterator; - -#endif /* __ICoreWebView2FrameInfoCollectionIterator_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2FocusChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2FocusChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2FocusChangedEventHandler ICoreWebView2FocusChangedEventHandler; - -#endif /* __ICoreWebView2FocusChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2GetCookiesCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2GetCookiesCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2GetCookiesCompletedHandler ICoreWebView2GetCookiesCompletedHandler; - -#endif /* __ICoreWebView2GetCookiesCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2HistoryChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2HistoryChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2HistoryChangedEventHandler ICoreWebView2HistoryChangedEventHandler; - -#endif /* __ICoreWebView2HistoryChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2HttpHeadersCollectionIterator_FWD_DEFINED__ -#define __ICoreWebView2HttpHeadersCollectionIterator_FWD_DEFINED__ -typedef interface ICoreWebView2HttpHeadersCollectionIterator ICoreWebView2HttpHeadersCollectionIterator; - -#endif /* __ICoreWebView2HttpHeadersCollectionIterator_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2HttpRequestHeaders_FWD_DEFINED__ -#define __ICoreWebView2HttpRequestHeaders_FWD_DEFINED__ -typedef interface ICoreWebView2HttpRequestHeaders ICoreWebView2HttpRequestHeaders; - -#endif /* __ICoreWebView2HttpRequestHeaders_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2HttpResponseHeaders_FWD_DEFINED__ -#define __ICoreWebView2HttpResponseHeaders_FWD_DEFINED__ -typedef interface ICoreWebView2HttpResponseHeaders ICoreWebView2HttpResponseHeaders; - -#endif /* __ICoreWebView2HttpResponseHeaders_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Interop_FWD_DEFINED__ -#define __ICoreWebView2Interop_FWD_DEFINED__ -typedef interface ICoreWebView2Interop ICoreWebView2Interop; - -#endif /* __ICoreWebView2Interop_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2MoveFocusRequestedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2MoveFocusRequestedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2MoveFocusRequestedEventArgs ICoreWebView2MoveFocusRequestedEventArgs; - -#endif /* __ICoreWebView2MoveFocusRequestedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2MoveFocusRequestedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2MoveFocusRequestedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2MoveFocusRequestedEventHandler ICoreWebView2MoveFocusRequestedEventHandler; - -#endif /* __ICoreWebView2MoveFocusRequestedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationCompletedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2NavigationCompletedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2NavigationCompletedEventArgs ICoreWebView2NavigationCompletedEventArgs; - -#endif /* __ICoreWebView2NavigationCompletedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationCompletedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2NavigationCompletedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2NavigationCompletedEventHandler ICoreWebView2NavigationCompletedEventHandler; - -#endif /* __ICoreWebView2NavigationCompletedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationStartingEventArgs_FWD_DEFINED__ -#define __ICoreWebView2NavigationStartingEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2NavigationStartingEventArgs ICoreWebView2NavigationStartingEventArgs; - -#endif /* __ICoreWebView2NavigationStartingEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationStartingEventHandler_FWD_DEFINED__ -#define __ICoreWebView2NavigationStartingEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2NavigationStartingEventHandler ICoreWebView2NavigationStartingEventHandler; - -#endif /* __ICoreWebView2NavigationStartingEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2NewBrowserVersionAvailableEventHandler_FWD_DEFINED__ -#define __ICoreWebView2NewBrowserVersionAvailableEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2NewBrowserVersionAvailableEventHandler ICoreWebView2NewBrowserVersionAvailableEventHandler; - -#endif /* __ICoreWebView2NewBrowserVersionAvailableEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2NewWindowRequestedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2NewWindowRequestedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2NewWindowRequestedEventArgs ICoreWebView2NewWindowRequestedEventArgs; - -#endif /* __ICoreWebView2NewWindowRequestedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2NewWindowRequestedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2NewWindowRequestedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2NewWindowRequestedEventHandler ICoreWebView2NewWindowRequestedEventHandler; - -#endif /* __ICoreWebView2NewWindowRequestedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2PermissionRequestedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2PermissionRequestedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2PermissionRequestedEventArgs ICoreWebView2PermissionRequestedEventArgs; - -#endif /* __ICoreWebView2PermissionRequestedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2PermissionRequestedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2PermissionRequestedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2PermissionRequestedEventHandler ICoreWebView2PermissionRequestedEventHandler; - -#endif /* __ICoreWebView2PermissionRequestedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2PointerInfo_FWD_DEFINED__ -#define __ICoreWebView2PointerInfo_FWD_DEFINED__ -typedef interface ICoreWebView2PointerInfo ICoreWebView2PointerInfo; - -#endif /* __ICoreWebView2PointerInfo_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ProcessFailedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2ProcessFailedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2ProcessFailedEventArgs ICoreWebView2ProcessFailedEventArgs; - -#endif /* __ICoreWebView2ProcessFailedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ProcessFailedEventArgs2_FWD_DEFINED__ -#define __ICoreWebView2ProcessFailedEventArgs2_FWD_DEFINED__ -typedef interface ICoreWebView2ProcessFailedEventArgs2 ICoreWebView2ProcessFailedEventArgs2; - -#endif /* __ICoreWebView2ProcessFailedEventArgs2_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ProcessFailedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2ProcessFailedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2ProcessFailedEventHandler ICoreWebView2ProcessFailedEventHandler; - -#endif /* __ICoreWebView2ProcessFailedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2RasterizationScaleChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2RasterizationScaleChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2RasterizationScaleChangedEventHandler ICoreWebView2RasterizationScaleChangedEventHandler; - -#endif /* __ICoreWebView2RasterizationScaleChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ScriptDialogOpeningEventArgs_FWD_DEFINED__ -#define __ICoreWebView2ScriptDialogOpeningEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2ScriptDialogOpeningEventArgs ICoreWebView2ScriptDialogOpeningEventArgs; - -#endif /* __ICoreWebView2ScriptDialogOpeningEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ScriptDialogOpeningEventHandler_FWD_DEFINED__ -#define __ICoreWebView2ScriptDialogOpeningEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2ScriptDialogOpeningEventHandler ICoreWebView2ScriptDialogOpeningEventHandler; - -#endif /* __ICoreWebView2ScriptDialogOpeningEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Settings_FWD_DEFINED__ -#define __ICoreWebView2Settings_FWD_DEFINED__ -typedef interface ICoreWebView2Settings ICoreWebView2Settings; - -#endif /* __ICoreWebView2Settings_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Settings2_FWD_DEFINED__ -#define __ICoreWebView2Settings2_FWD_DEFINED__ -typedef interface ICoreWebView2Settings2 ICoreWebView2Settings2; - -#endif /* __ICoreWebView2Settings2_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2Settings3_FWD_DEFINED__ -#define __ICoreWebView2Settings3_FWD_DEFINED__ -typedef interface ICoreWebView2Settings3 ICoreWebView2Settings3; - -#endif /* __ICoreWebView2Settings3_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2SourceChangedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2SourceChangedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2SourceChangedEventArgs ICoreWebView2SourceChangedEventArgs; - -#endif /* __ICoreWebView2SourceChangedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2SourceChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2SourceChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2SourceChangedEventHandler ICoreWebView2SourceChangedEventHandler; - -#endif /* __ICoreWebView2SourceChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2TrySuspendCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2TrySuspendCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2TrySuspendCompletedHandler ICoreWebView2TrySuspendCompletedHandler; - -#endif /* __ICoreWebView2TrySuspendCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebMessageReceivedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2WebMessageReceivedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2WebMessageReceivedEventArgs ICoreWebView2WebMessageReceivedEventArgs; - -#endif /* __ICoreWebView2WebMessageReceivedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebMessageReceivedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2WebMessageReceivedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2WebMessageReceivedEventHandler ICoreWebView2WebMessageReceivedEventHandler; - -#endif /* __ICoreWebView2WebMessageReceivedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceRequest_FWD_DEFINED__ -#define __ICoreWebView2WebResourceRequest_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceRequest ICoreWebView2WebResourceRequest; - -#endif /* __ICoreWebView2WebResourceRequest_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceRequestedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2WebResourceRequestedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceRequestedEventArgs ICoreWebView2WebResourceRequestedEventArgs; - -#endif /* __ICoreWebView2WebResourceRequestedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceRequestedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2WebResourceRequestedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceRequestedEventHandler ICoreWebView2WebResourceRequestedEventHandler; - -#endif /* __ICoreWebView2WebResourceRequestedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponse_FWD_DEFINED__ -#define __ICoreWebView2WebResourceResponse_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceResponse ICoreWebView2WebResourceResponse; - -#endif /* __ICoreWebView2WebResourceResponse_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseReceivedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2WebResourceResponseReceivedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceResponseReceivedEventHandler ICoreWebView2WebResourceResponseReceivedEventHandler; - -#endif /* __ICoreWebView2WebResourceResponseReceivedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseReceivedEventArgs_FWD_DEFINED__ -#define __ICoreWebView2WebResourceResponseReceivedEventArgs_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceResponseReceivedEventArgs ICoreWebView2WebResourceResponseReceivedEventArgs; - -#endif /* __ICoreWebView2WebResourceResponseReceivedEventArgs_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseView_FWD_DEFINED__ -#define __ICoreWebView2WebResourceResponseView_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceResponseView ICoreWebView2WebResourceResponseView; - -#endif /* __ICoreWebView2WebResourceResponseView_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_FWD_DEFINED__ -#define __ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_FWD_DEFINED__ -typedef interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler ICoreWebView2WebResourceResponseViewGetContentCompletedHandler; - -#endif /* __ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WindowCloseRequestedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2WindowCloseRequestedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2WindowCloseRequestedEventHandler ICoreWebView2WindowCloseRequestedEventHandler; - -#endif /* __ICoreWebView2WindowCloseRequestedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2WindowFeatures_FWD_DEFINED__ -#define __ICoreWebView2WindowFeatures_FWD_DEFINED__ -typedef interface ICoreWebView2WindowFeatures ICoreWebView2WindowFeatures; - -#endif /* __ICoreWebView2WindowFeatures_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2ZoomFactorChangedEventHandler_FWD_DEFINED__ -#define __ICoreWebView2ZoomFactorChangedEventHandler_FWD_DEFINED__ -typedef interface ICoreWebView2ZoomFactorChangedEventHandler ICoreWebView2ZoomFactorChangedEventHandler; - -#endif /* __ICoreWebView2ZoomFactorChangedEventHandler_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2CompositionControllerInterop_FWD_DEFINED__ -#define __ICoreWebView2CompositionControllerInterop_FWD_DEFINED__ -typedef interface ICoreWebView2CompositionControllerInterop ICoreWebView2CompositionControllerInterop; - -#endif /* __ICoreWebView2CompositionControllerInterop_FWD_DEFINED__ */ - - -#ifndef __ICoreWebView2EnvironmentInterop_FWD_DEFINED__ -#define __ICoreWebView2EnvironmentInterop_FWD_DEFINED__ -typedef interface ICoreWebView2EnvironmentInterop ICoreWebView2EnvironmentInterop; - -#endif /* __ICoreWebView2EnvironmentInterop_FWD_DEFINED__ */ - - -/* header files for imported files */ -#include "objidl.h" -#include "oaidl.h" -#include "EventToken.h" - -#ifdef __cplusplus -extern "C"{ -#endif - - - -#ifndef __WebView2_LIBRARY_DEFINED__ -#define __WebView2_LIBRARY_DEFINED__ - -/* library WebView2 */ -/* [version][uuid] */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT - { - COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG = 0, - COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG = ( COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG + 1 ) - } COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_COOKIE_SAME_SITE_KIND - { - COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE = 0, - COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX = ( COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE + 1 ) , - COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT = ( COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX + 1 ) - } COREWEBVIEW2_COOKIE_SAME_SITE_KIND; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND - { - COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY = 0, - COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW = ( COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY + 1 ) , - COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS = ( COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW + 1 ) - } COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_SCRIPT_DIALOG_KIND - { - COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT = 0, - COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM = ( COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT + 1 ) , - COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT = ( COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM + 1 ) , - COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD = ( COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT + 1 ) - } COREWEBVIEW2_SCRIPT_DIALOG_KIND; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_PROCESS_FAILED_KIND - { - COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED = 0, - COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE = ( COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED = ( COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED + 1 ) - } COREWEBVIEW2_PROCESS_FAILED_KIND; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_PROCESS_FAILED_REASON - { - COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED = 0, - COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE = ( COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED = ( COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED = ( COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED = ( COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED + 1 ) , - COREWEBVIEW2_PROCESS_FAILED_REASON_OUT_OF_MEMORY = ( COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED + 1 ) - } COREWEBVIEW2_PROCESS_FAILED_REASON; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_PERMISSION_KIND - { - COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION = 0, - COREWEBVIEW2_PERMISSION_KIND_MICROPHONE = ( COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION + 1 ) , - COREWEBVIEW2_PERMISSION_KIND_CAMERA = ( COREWEBVIEW2_PERMISSION_KIND_MICROPHONE + 1 ) , - COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION = ( COREWEBVIEW2_PERMISSION_KIND_CAMERA + 1 ) , - COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS = ( COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION + 1 ) , - COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS = ( COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS + 1 ) , - COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ = ( COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS + 1 ) - } COREWEBVIEW2_PERMISSION_KIND; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_PERMISSION_STATE - { - COREWEBVIEW2_PERMISSION_STATE_DEFAULT = 0, - COREWEBVIEW2_PERMISSION_STATE_ALLOW = ( COREWEBVIEW2_PERMISSION_STATE_DEFAULT + 1 ) , - COREWEBVIEW2_PERMISSION_STATE_DENY = ( COREWEBVIEW2_PERMISSION_STATE_ALLOW + 1 ) - } COREWEBVIEW2_PERMISSION_STATE; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_WEB_ERROR_STATUS - { - COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN = 0, - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT = ( COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED = ( COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS = ( COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED = ( COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID = ( COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE = ( COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT = ( COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE = ( COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED = ( COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET = ( COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED = ( COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT = ( COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED = ( COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED = ( COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED = ( COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED + 1 ) , - COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR = ( COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED + 1 ) - } COREWEBVIEW2_WEB_ERROR_STATUS; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_WEB_RESOURCE_CONTEXT - { - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL = 0, - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING + 1 ) , - COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER = ( COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT + 1 ) - } COREWEBVIEW2_WEB_RESOURCE_CONTEXT; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_MOVE_FOCUS_REASON - { - COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC = 0, - COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT = ( COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC + 1 ) , - COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS = ( COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT + 1 ) - } COREWEBVIEW2_MOVE_FOCUS_REASON; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_KEY_EVENT_KIND - { - COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN = 0, - COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP = ( COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN + 1 ) , - COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN = ( COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP + 1 ) , - COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP = ( COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN + 1 ) - } COREWEBVIEW2_KEY_EVENT_KIND; - -typedef struct COREWEBVIEW2_PHYSICAL_KEY_STATUS - { - UINT32 RepeatCount; - UINT32 ScanCode; - BOOL IsExtendedKey; - BOOL IsMenuKeyDown; - BOOL WasKeyDown; - BOOL IsKeyReleased; - } COREWEBVIEW2_PHYSICAL_KEY_STATUS; - -typedef struct COREWEBVIEW2_COLOR - { - BYTE A; - BYTE R; - BYTE G; - BYTE B; - } COREWEBVIEW2_COLOR; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_MOUSE_EVENT_KIND - { - COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL = 0x20e, - COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOUBLE_CLICK = 0x203, - COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOWN = 0x201, - COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_UP = 0x202, - COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE = 0x2a3, - COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOUBLE_CLICK = 0x209, - COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOWN = 0x207, - COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_UP = 0x208, - COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE = 0x200, - COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOUBLE_CLICK = 0x206, - COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOWN = 0x204, - COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_UP = 0x205, - COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL = 0x20a, - COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK = 0x20d, - COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN = 0x20b, - COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP = 0x20c - } COREWEBVIEW2_MOUSE_EVENT_KIND; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS - { - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_NONE = 0, - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_LEFT_BUTTON = 0x1, - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_RIGHT_BUTTON = 0x2, - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_SHIFT = 0x4, - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_CONTROL = 0x8, - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_MIDDLE_BUTTON = 0x10, - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON1 = 0x20, - COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON2 = 0x40 - } COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS; - -DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS); -typedef /* [v1_enum] */ -enum COREWEBVIEW2_POINTER_EVENT_KIND - { - COREWEBVIEW2_POINTER_EVENT_KIND_ACTIVATE = 0x24b, - COREWEBVIEW2_POINTER_EVENT_KIND_DOWN = 0x246, - COREWEBVIEW2_POINTER_EVENT_KIND_ENTER = 0x249, - COREWEBVIEW2_POINTER_EVENT_KIND_LEAVE = 0x24a, - COREWEBVIEW2_POINTER_EVENT_KIND_UP = 0x247, - COREWEBVIEW2_POINTER_EVENT_KIND_UPDATE = 0x245 - } COREWEBVIEW2_POINTER_EVENT_KIND; - -typedef /* [v1_enum] */ -enum COREWEBVIEW2_BOUNDS_MODE - { - COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS = 0, - COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE = ( COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS + 1 ) - } COREWEBVIEW2_BOUNDS_MODE; - -STDAPI CreateCoreWebView2EnvironmentWithOptions(PCWSTR browserExecutableFolder, PCWSTR userDataFolder, ICoreWebView2EnvironmentOptions* environmentOptions, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* environmentCreatedHandler); -STDAPI CreateCoreWebView2Environment(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* environmentCreatedHandler); -STDAPI GetAvailableCoreWebView2BrowserVersionString(PCWSTR browserExecutableFolder, LPWSTR* versionInfo); -STDAPI CompareBrowserVersions(PCWSTR version1, PCWSTR version2, int* result); - -EXTERN_C const IID LIBID_WebView2; - -#ifndef __ICoreWebView2AcceleratorKeyPressedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2AcceleratorKeyPressedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2AcceleratorKeyPressedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2AcceleratorKeyPressedEventArgs = {0x9f760f8a,0xfb79,0x42be,{0x99,0x90,0x7b,0x56,0x90,0x0f,0xa9,0xc7}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("9f760f8a-fb79-42be-9990-7b56900fa9c7") - ICoreWebView2AcceleratorKeyPressedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_KeyEventKind( - /* [retval][out] */ COREWEBVIEW2_KEY_EVENT_KIND *keyEventKind) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_VirtualKey( - /* [retval][out] */ UINT *virtualKey) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_KeyEventLParam( - /* [retval][out] */ INT *lParam) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PhysicalKeyStatus( - /* [retval][out] */ COREWEBVIEW2_PHYSICAL_KEY_STATUS *physicalKeyStatus) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Handled( - /* [retval][out] */ BOOL *handled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Handled( - /* [in] */ BOOL handled) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2AcceleratorKeyPressedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_KeyEventKind )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_KEY_EVENT_KIND *keyEventKind); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_VirtualKey )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This, - /* [retval][out] */ UINT *virtualKey); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_KeyEventLParam )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This, - /* [retval][out] */ INT *lParam); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PhysicalKeyStatus )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_PHYSICAL_KEY_STATUS *physicalKeyStatus); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Handled )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This, - /* [retval][out] */ BOOL *handled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Handled )( - ICoreWebView2AcceleratorKeyPressedEventArgs * This, - /* [in] */ BOOL handled); - - END_INTERFACE - } ICoreWebView2AcceleratorKeyPressedEventArgsVtbl; - - interface ICoreWebView2AcceleratorKeyPressedEventArgs - { - CONST_VTBL struct ICoreWebView2AcceleratorKeyPressedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_get_KeyEventKind(This,keyEventKind) \ - ( (This)->lpVtbl -> get_KeyEventKind(This,keyEventKind) ) - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_get_VirtualKey(This,virtualKey) \ - ( (This)->lpVtbl -> get_VirtualKey(This,virtualKey) ) - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_get_KeyEventLParam(This,lParam) \ - ( (This)->lpVtbl -> get_KeyEventLParam(This,lParam) ) - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_get_PhysicalKeyStatus(This,physicalKeyStatus) \ - ( (This)->lpVtbl -> get_PhysicalKeyStatus(This,physicalKeyStatus) ) - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_get_Handled(This,handled) \ - ( (This)->lpVtbl -> get_Handled(This,handled) ) - -#define ICoreWebView2AcceleratorKeyPressedEventArgs_put_Handled(This,handled) \ - ( (This)->lpVtbl -> put_Handled(This,handled) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2AcceleratorKeyPressedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2AcceleratorKeyPressedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2AcceleratorKeyPressedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2AcceleratorKeyPressedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2AcceleratorKeyPressedEventHandler = {0xb29c7e28,0xfa79,0x41a8,{0x8e,0x44,0x65,0x81,0x1c,0x76,0xdc,0xb2}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("b29c7e28-fa79-41a8-8e44-65811c76dcb2") - ICoreWebView2AcceleratorKeyPressedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ ICoreWebView2AcceleratorKeyPressedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2AcceleratorKeyPressedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2AcceleratorKeyPressedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2AcceleratorKeyPressedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2AcceleratorKeyPressedEventHandler * This, - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ ICoreWebView2AcceleratorKeyPressedEventArgs *args); - - END_INTERFACE - } ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl; - - interface ICoreWebView2AcceleratorKeyPressedEventHandler - { - CONST_VTBL struct ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2AcceleratorKeyPressedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2AcceleratorKeyPressedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2AcceleratorKeyPressedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2AcceleratorKeyPressedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2AcceleratorKeyPressedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler = {0xb99369f3,0x9b11,0x47b5,{0xbc,0x6f,0x8e,0x78,0x95,0xfc,0xea,0x17}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("b99369f3-9b11-47b5-bc6f-8e7895fcea17") - ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ HRESULT errorCode, - /* [in] */ LPCWSTR id) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler * This, - /* [in] */ HRESULT errorCode, - /* [in] */ LPCWSTR id); - - END_INTERFACE - } ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandlerVtbl; - - interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler - { - CONST_VTBL struct ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Invoke(This,errorCode,id) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,id) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CallDevToolsProtocolMethodCompletedHandler = {0x5c4889f0,0x5ef6,0x4c5a,{0x95,0x2c,0xd8,0xf1,0xb9,0x2d,0x05,0x74}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("5c4889f0-5ef6-4c5a-952c-d8f1b92d0574") - ICoreWebView2CallDevToolsProtocolMethodCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ HRESULT errorCode, - /* [in] */ LPCWSTR returnObjectAsJson) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CallDevToolsProtocolMethodCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CallDevToolsProtocolMethodCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CallDevToolsProtocolMethodCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2CallDevToolsProtocolMethodCompletedHandler * This, - /* [in] */ HRESULT errorCode, - /* [in] */ LPCWSTR returnObjectAsJson); - - END_INTERFACE - } ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl; - - interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler - { - CONST_VTBL struct ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Invoke(This,errorCode,returnObjectAsJson) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,returnObjectAsJson) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CapturePreviewCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2CapturePreviewCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CapturePreviewCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CapturePreviewCompletedHandler = {0x697e05e9,0x3d8f,0x45fa,{0x96,0xf4,0x8f,0xfe,0x1e,0xde,0xda,0xf5}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("697e05e9-3d8f-45fa-96f4-8ffe1ededaf5") - ICoreWebView2CapturePreviewCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ HRESULT errorCode) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CapturePreviewCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CapturePreviewCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CapturePreviewCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CapturePreviewCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2CapturePreviewCompletedHandler * This, - /* [in] */ HRESULT errorCode); - - END_INTERFACE - } ICoreWebView2CapturePreviewCompletedHandlerVtbl; - - interface ICoreWebView2CapturePreviewCompletedHandler - { - CONST_VTBL struct ICoreWebView2CapturePreviewCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CapturePreviewCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CapturePreviewCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CapturePreviewCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CapturePreviewCompletedHandler_Invoke(This,errorCode) \ - ( (This)->lpVtbl -> Invoke(This,errorCode) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CapturePreviewCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2_INTERFACE_DEFINED__ -#define __ICoreWebView2_INTERFACE_DEFINED__ - -/* interface ICoreWebView2 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2 = {0x76eceacb,0x0462,0x4d94,{0xac,0x83,0x42,0x3a,0x67,0x93,0x77,0x5e}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("76eceacb-0462-4d94-ac83-423a6793775e") - ICoreWebView2 : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Settings( - /* [retval][out] */ ICoreWebView2Settings **settings) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Source( - /* [retval][out] */ LPWSTR *uri) = 0; - - virtual HRESULT STDMETHODCALLTYPE Navigate( - /* [in] */ LPCWSTR uri) = 0; - - virtual HRESULT STDMETHODCALLTYPE NavigateToString( - /* [in] */ LPCWSTR htmlContent) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_NavigationStarting( - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_NavigationStarting( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_ContentLoading( - /* [in] */ ICoreWebView2ContentLoadingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_ContentLoading( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_SourceChanged( - /* [in] */ ICoreWebView2SourceChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_SourceChanged( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_HistoryChanged( - /* [in] */ ICoreWebView2HistoryChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_HistoryChanged( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_NavigationCompleted( - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_NavigationCompleted( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_FrameNavigationStarting( - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_FrameNavigationStarting( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_FrameNavigationCompleted( - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_FrameNavigationCompleted( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_ScriptDialogOpening( - /* [in] */ ICoreWebView2ScriptDialogOpeningEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_ScriptDialogOpening( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_PermissionRequested( - /* [in] */ ICoreWebView2PermissionRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_PermissionRequested( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_ProcessFailed( - /* [in] */ ICoreWebView2ProcessFailedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_ProcessFailed( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE AddScriptToExecuteOnDocumentCreated( - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler *handler) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveScriptToExecuteOnDocumentCreated( - /* [in] */ LPCWSTR id) = 0; - - virtual HRESULT STDMETHODCALLTYPE ExecuteScript( - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2ExecuteScriptCompletedHandler *handler) = 0; - - virtual HRESULT STDMETHODCALLTYPE CapturePreview( - /* [in] */ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat, - /* [in] */ IStream *imageStream, - /* [in] */ ICoreWebView2CapturePreviewCompletedHandler *handler) = 0; - - virtual HRESULT STDMETHODCALLTYPE Reload( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE PostWebMessageAsJson( - /* [in] */ LPCWSTR webMessageAsJson) = 0; - - virtual HRESULT STDMETHODCALLTYPE PostWebMessageAsString( - /* [in] */ LPCWSTR webMessageAsString) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_WebMessageReceived( - /* [in] */ ICoreWebView2WebMessageReceivedEventHandler *handler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_WebMessageReceived( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE CallDevToolsProtocolMethod( - /* [in] */ LPCWSTR methodName, - /* [in] */ LPCWSTR parametersAsJson, - /* [in] */ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler *handler) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BrowserProcessId( - /* [retval][out] */ UINT32 *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CanGoBack( - /* [retval][out] */ BOOL *canGoBack) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CanGoForward( - /* [retval][out] */ BOOL *canGoForward) = 0; - - virtual HRESULT STDMETHODCALLTYPE GoBack( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GoForward( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDevToolsProtocolEventReceiver( - /* [in] */ LPCWSTR eventName, - /* [retval][out] */ ICoreWebView2DevToolsProtocolEventReceiver **receiver) = 0; - - virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_NewWindowRequested( - /* [in] */ ICoreWebView2NewWindowRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_NewWindowRequested( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_DocumentTitleChanged( - /* [in] */ ICoreWebView2DocumentTitleChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_DocumentTitleChanged( - /* [in] */ EventRegistrationToken token) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DocumentTitle( - /* [retval][out] */ LPWSTR *title) = 0; - - virtual HRESULT STDMETHODCALLTYPE AddHostObjectToScript( - /* [in] */ LPCWSTR name, - /* [in] */ VARIANT *object) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveHostObjectFromScript( - /* [in] */ LPCWSTR name) = 0; - - virtual HRESULT STDMETHODCALLTYPE OpenDevToolsWindow( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_ContainsFullScreenElementChanged( - /* [in] */ ICoreWebView2ContainsFullScreenElementChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_ContainsFullScreenElementChanged( - /* [in] */ EventRegistrationToken token) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ContainsFullScreenElement( - /* [retval][out] */ BOOL *containsFullScreenElement) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_WebResourceRequested( - /* [in] */ ICoreWebView2WebResourceRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_WebResourceRequested( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE AddWebResourceRequestedFilter( - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveWebResourceRequestedFilter( - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_WindowCloseRequested( - /* [in] */ ICoreWebView2WindowCloseRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_WindowCloseRequested( - /* [in] */ EventRegistrationToken token) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Settings )( - ICoreWebView2 * This, - /* [retval][out] */ ICoreWebView2Settings **settings); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( - ICoreWebView2 * This, - /* [retval][out] */ LPWSTR *uri); - - HRESULT ( STDMETHODCALLTYPE *Navigate )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR uri); - - HRESULT ( STDMETHODCALLTYPE *NavigateToString )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR htmlContent); - - HRESULT ( STDMETHODCALLTYPE *add_NavigationStarting )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NavigationStarting )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ContentLoading )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2ContentLoadingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ContentLoading )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_SourceChanged )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2SourceChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_SourceChanged )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_HistoryChanged )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2HistoryChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_HistoryChanged )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_NavigationCompleted )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NavigationCompleted )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_FrameNavigationStarting )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_FrameNavigationStarting )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_FrameNavigationCompleted )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_FrameNavigationCompleted )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ScriptDialogOpening )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2ScriptDialogOpeningEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ScriptDialogOpening )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_PermissionRequested )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2PermissionRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_PermissionRequested )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ProcessFailed )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2ProcessFailedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ProcessFailed )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *AddScriptToExecuteOnDocumentCreated )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *RemoveScriptToExecuteOnDocumentCreated )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR id); - - HRESULT ( STDMETHODCALLTYPE *ExecuteScript )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2ExecuteScriptCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CapturePreview )( - ICoreWebView2 * This, - /* [in] */ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat, - /* [in] */ IStream *imageStream, - /* [in] */ ICoreWebView2CapturePreviewCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *Reload )( - ICoreWebView2 * This); - - HRESULT ( STDMETHODCALLTYPE *PostWebMessageAsJson )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR webMessageAsJson); - - HRESULT ( STDMETHODCALLTYPE *PostWebMessageAsString )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR webMessageAsString); - - HRESULT ( STDMETHODCALLTYPE *add_WebMessageReceived )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2WebMessageReceivedEventHandler *handler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebMessageReceived )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *CallDevToolsProtocolMethod )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR methodName, - /* [in] */ LPCWSTR parametersAsJson, - /* [in] */ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler *handler); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BrowserProcessId )( - ICoreWebView2 * This, - /* [retval][out] */ UINT32 *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanGoBack )( - ICoreWebView2 * This, - /* [retval][out] */ BOOL *canGoBack); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanGoForward )( - ICoreWebView2 * This, - /* [retval][out] */ BOOL *canGoForward); - - HRESULT ( STDMETHODCALLTYPE *GoBack )( - ICoreWebView2 * This); - - HRESULT ( STDMETHODCALLTYPE *GoForward )( - ICoreWebView2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetDevToolsProtocolEventReceiver )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR eventName, - /* [retval][out] */ ICoreWebView2DevToolsProtocolEventReceiver **receiver); - - HRESULT ( STDMETHODCALLTYPE *Stop )( - ICoreWebView2 * This); - - HRESULT ( STDMETHODCALLTYPE *add_NewWindowRequested )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2NewWindowRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NewWindowRequested )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_DocumentTitleChanged )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2DocumentTitleChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_DocumentTitleChanged )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DocumentTitle )( - ICoreWebView2 * This, - /* [retval][out] */ LPWSTR *title); - - HRESULT ( STDMETHODCALLTYPE *AddHostObjectToScript )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR name, - /* [in] */ VARIANT *object); - - HRESULT ( STDMETHODCALLTYPE *RemoveHostObjectFromScript )( - ICoreWebView2 * This, - /* [in] */ LPCWSTR name); - - HRESULT ( STDMETHODCALLTYPE *OpenDevToolsWindow )( - ICoreWebView2 * This); - - HRESULT ( STDMETHODCALLTYPE *add_ContainsFullScreenElementChanged )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2ContainsFullScreenElementChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ContainsFullScreenElementChanged )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ContainsFullScreenElement )( - ICoreWebView2 * This, - /* [retval][out] */ BOOL *containsFullScreenElement); - - HRESULT ( STDMETHODCALLTYPE *add_WebResourceRequested )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2WebResourceRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebResourceRequested )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *AddWebResourceRequestedFilter )( - ICoreWebView2 * This, - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); - - HRESULT ( STDMETHODCALLTYPE *RemoveWebResourceRequestedFilter )( - ICoreWebView2 * This, - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); - - HRESULT ( STDMETHODCALLTYPE *add_WindowCloseRequested )( - ICoreWebView2 * This, - /* [in] */ ICoreWebView2WindowCloseRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WindowCloseRequested )( - ICoreWebView2 * This, - /* [in] */ EventRegistrationToken token); - - END_INTERFACE - } ICoreWebView2Vtbl; - - interface ICoreWebView2 - { - CONST_VTBL struct ICoreWebView2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2_get_Settings(This,settings) \ - ( (This)->lpVtbl -> get_Settings(This,settings) ) - -#define ICoreWebView2_get_Source(This,uri) \ - ( (This)->lpVtbl -> get_Source(This,uri) ) - -#define ICoreWebView2_Navigate(This,uri) \ - ( (This)->lpVtbl -> Navigate(This,uri) ) - -#define ICoreWebView2_NavigateToString(This,htmlContent) \ - ( (This)->lpVtbl -> NavigateToString(This,htmlContent) ) - -#define ICoreWebView2_add_NavigationStarting(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NavigationStarting(This,eventHandler,token) ) - -#define ICoreWebView2_remove_NavigationStarting(This,token) \ - ( (This)->lpVtbl -> remove_NavigationStarting(This,token) ) - -#define ICoreWebView2_add_ContentLoading(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ContentLoading(This,eventHandler,token) ) - -#define ICoreWebView2_remove_ContentLoading(This,token) \ - ( (This)->lpVtbl -> remove_ContentLoading(This,token) ) - -#define ICoreWebView2_add_SourceChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_SourceChanged(This,eventHandler,token) ) - -#define ICoreWebView2_remove_SourceChanged(This,token) \ - ( (This)->lpVtbl -> remove_SourceChanged(This,token) ) - -#define ICoreWebView2_add_HistoryChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_HistoryChanged(This,eventHandler,token) ) - -#define ICoreWebView2_remove_HistoryChanged(This,token) \ - ( (This)->lpVtbl -> remove_HistoryChanged(This,token) ) - -#define ICoreWebView2_add_NavigationCompleted(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NavigationCompleted(This,eventHandler,token) ) - -#define ICoreWebView2_remove_NavigationCompleted(This,token) \ - ( (This)->lpVtbl -> remove_NavigationCompleted(This,token) ) - -#define ICoreWebView2_add_FrameNavigationStarting(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_FrameNavigationStarting(This,eventHandler,token) ) - -#define ICoreWebView2_remove_FrameNavigationStarting(This,token) \ - ( (This)->lpVtbl -> remove_FrameNavigationStarting(This,token) ) - -#define ICoreWebView2_add_FrameNavigationCompleted(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_FrameNavigationCompleted(This,eventHandler,token) ) - -#define ICoreWebView2_remove_FrameNavigationCompleted(This,token) \ - ( (This)->lpVtbl -> remove_FrameNavigationCompleted(This,token) ) - -#define ICoreWebView2_add_ScriptDialogOpening(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ScriptDialogOpening(This,eventHandler,token) ) - -#define ICoreWebView2_remove_ScriptDialogOpening(This,token) \ - ( (This)->lpVtbl -> remove_ScriptDialogOpening(This,token) ) - -#define ICoreWebView2_add_PermissionRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_PermissionRequested(This,eventHandler,token) ) - -#define ICoreWebView2_remove_PermissionRequested(This,token) \ - ( (This)->lpVtbl -> remove_PermissionRequested(This,token) ) - -#define ICoreWebView2_add_ProcessFailed(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ProcessFailed(This,eventHandler,token) ) - -#define ICoreWebView2_remove_ProcessFailed(This,token) \ - ( (This)->lpVtbl -> remove_ProcessFailed(This,token) ) - -#define ICoreWebView2_AddScriptToExecuteOnDocumentCreated(This,javaScript,handler) \ - ( (This)->lpVtbl -> AddScriptToExecuteOnDocumentCreated(This,javaScript,handler) ) - -#define ICoreWebView2_RemoveScriptToExecuteOnDocumentCreated(This,id) \ - ( (This)->lpVtbl -> RemoveScriptToExecuteOnDocumentCreated(This,id) ) - -#define ICoreWebView2_ExecuteScript(This,javaScript,handler) \ - ( (This)->lpVtbl -> ExecuteScript(This,javaScript,handler) ) - -#define ICoreWebView2_CapturePreview(This,imageFormat,imageStream,handler) \ - ( (This)->lpVtbl -> CapturePreview(This,imageFormat,imageStream,handler) ) - -#define ICoreWebView2_Reload(This) \ - ( (This)->lpVtbl -> Reload(This) ) - -#define ICoreWebView2_PostWebMessageAsJson(This,webMessageAsJson) \ - ( (This)->lpVtbl -> PostWebMessageAsJson(This,webMessageAsJson) ) - -#define ICoreWebView2_PostWebMessageAsString(This,webMessageAsString) \ - ( (This)->lpVtbl -> PostWebMessageAsString(This,webMessageAsString) ) - -#define ICoreWebView2_add_WebMessageReceived(This,handler,token) \ - ( (This)->lpVtbl -> add_WebMessageReceived(This,handler,token) ) - -#define ICoreWebView2_remove_WebMessageReceived(This,token) \ - ( (This)->lpVtbl -> remove_WebMessageReceived(This,token) ) - -#define ICoreWebView2_CallDevToolsProtocolMethod(This,methodName,parametersAsJson,handler) \ - ( (This)->lpVtbl -> CallDevToolsProtocolMethod(This,methodName,parametersAsJson,handler) ) - -#define ICoreWebView2_get_BrowserProcessId(This,value) \ - ( (This)->lpVtbl -> get_BrowserProcessId(This,value) ) - -#define ICoreWebView2_get_CanGoBack(This,canGoBack) \ - ( (This)->lpVtbl -> get_CanGoBack(This,canGoBack) ) - -#define ICoreWebView2_get_CanGoForward(This,canGoForward) \ - ( (This)->lpVtbl -> get_CanGoForward(This,canGoForward) ) - -#define ICoreWebView2_GoBack(This) \ - ( (This)->lpVtbl -> GoBack(This) ) - -#define ICoreWebView2_GoForward(This) \ - ( (This)->lpVtbl -> GoForward(This) ) - -#define ICoreWebView2_GetDevToolsProtocolEventReceiver(This,eventName,receiver) \ - ( (This)->lpVtbl -> GetDevToolsProtocolEventReceiver(This,eventName,receiver) ) - -#define ICoreWebView2_Stop(This) \ - ( (This)->lpVtbl -> Stop(This) ) - -#define ICoreWebView2_add_NewWindowRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NewWindowRequested(This,eventHandler,token) ) - -#define ICoreWebView2_remove_NewWindowRequested(This,token) \ - ( (This)->lpVtbl -> remove_NewWindowRequested(This,token) ) - -#define ICoreWebView2_add_DocumentTitleChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_DocumentTitleChanged(This,eventHandler,token) ) - -#define ICoreWebView2_remove_DocumentTitleChanged(This,token) \ - ( (This)->lpVtbl -> remove_DocumentTitleChanged(This,token) ) - -#define ICoreWebView2_get_DocumentTitle(This,title) \ - ( (This)->lpVtbl -> get_DocumentTitle(This,title) ) - -#define ICoreWebView2_AddHostObjectToScript(This,name,object) \ - ( (This)->lpVtbl -> AddHostObjectToScript(This,name,object) ) - -#define ICoreWebView2_RemoveHostObjectFromScript(This,name) \ - ( (This)->lpVtbl -> RemoveHostObjectFromScript(This,name) ) - -#define ICoreWebView2_OpenDevToolsWindow(This) \ - ( (This)->lpVtbl -> OpenDevToolsWindow(This) ) - -#define ICoreWebView2_add_ContainsFullScreenElementChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ContainsFullScreenElementChanged(This,eventHandler,token) ) - -#define ICoreWebView2_remove_ContainsFullScreenElementChanged(This,token) \ - ( (This)->lpVtbl -> remove_ContainsFullScreenElementChanged(This,token) ) - -#define ICoreWebView2_get_ContainsFullScreenElement(This,containsFullScreenElement) \ - ( (This)->lpVtbl -> get_ContainsFullScreenElement(This,containsFullScreenElement) ) - -#define ICoreWebView2_add_WebResourceRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WebResourceRequested(This,eventHandler,token) ) - -#define ICoreWebView2_remove_WebResourceRequested(This,token) \ - ( (This)->lpVtbl -> remove_WebResourceRequested(This,token) ) - -#define ICoreWebView2_AddWebResourceRequestedFilter(This,uri,resourceContext) \ - ( (This)->lpVtbl -> AddWebResourceRequestedFilter(This,uri,resourceContext) ) - -#define ICoreWebView2_RemoveWebResourceRequestedFilter(This,uri,resourceContext) \ - ( (This)->lpVtbl -> RemoveWebResourceRequestedFilter(This,uri,resourceContext) ) - -#define ICoreWebView2_add_WindowCloseRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WindowCloseRequested(This,eventHandler,token) ) - -#define ICoreWebView2_remove_WindowCloseRequested(This,token) \ - ( (This)->lpVtbl -> remove_WindowCloseRequested(This,token) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2_2_INTERFACE_DEFINED__ -#define __ICoreWebView2_2_INTERFACE_DEFINED__ - -/* interface ICoreWebView2_2 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2_2 = {0x9E8F0CF8,0xE670,0x4B5E,{0xB2,0xBC,0x73,0xE0,0x61,0xE3,0x18,0x4C}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("9E8F0CF8-E670-4B5E-B2BC-73E061E3184C") - ICoreWebView2_2 : public ICoreWebView2 - { - public: - virtual HRESULT STDMETHODCALLTYPE add_WebResourceResponseReceived( - /* [in] */ ICoreWebView2WebResourceResponseReceivedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_WebResourceResponseReceived( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE NavigateWithWebResourceRequest( - /* [in] */ ICoreWebView2WebResourceRequest *request) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_DOMContentLoaded( - /* [in] */ ICoreWebView2DOMContentLoadedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_DOMContentLoaded( - /* [in] */ EventRegistrationToken token) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CookieManager( - /* [retval][out] */ ICoreWebView2CookieManager **cookieManager) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Environment( - /* [retval][out] */ ICoreWebView2Environment **environment) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2_2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2_2 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2_2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2_2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Settings )( - ICoreWebView2_2 * This, - /* [retval][out] */ ICoreWebView2Settings **settings); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( - ICoreWebView2_2 * This, - /* [retval][out] */ LPWSTR *uri); - - HRESULT ( STDMETHODCALLTYPE *Navigate )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR uri); - - HRESULT ( STDMETHODCALLTYPE *NavigateToString )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR htmlContent); - - HRESULT ( STDMETHODCALLTYPE *add_NavigationStarting )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NavigationStarting )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ContentLoading )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2ContentLoadingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ContentLoading )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_SourceChanged )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2SourceChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_SourceChanged )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_HistoryChanged )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2HistoryChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_HistoryChanged )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_NavigationCompleted )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NavigationCompleted )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_FrameNavigationStarting )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_FrameNavigationStarting )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_FrameNavigationCompleted )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_FrameNavigationCompleted )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ScriptDialogOpening )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2ScriptDialogOpeningEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ScriptDialogOpening )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_PermissionRequested )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2PermissionRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_PermissionRequested )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ProcessFailed )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2ProcessFailedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ProcessFailed )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *AddScriptToExecuteOnDocumentCreated )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *RemoveScriptToExecuteOnDocumentCreated )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR id); - - HRESULT ( STDMETHODCALLTYPE *ExecuteScript )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2ExecuteScriptCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CapturePreview )( - ICoreWebView2_2 * This, - /* [in] */ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat, - /* [in] */ IStream *imageStream, - /* [in] */ ICoreWebView2CapturePreviewCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *Reload )( - ICoreWebView2_2 * This); - - HRESULT ( STDMETHODCALLTYPE *PostWebMessageAsJson )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR webMessageAsJson); - - HRESULT ( STDMETHODCALLTYPE *PostWebMessageAsString )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR webMessageAsString); - - HRESULT ( STDMETHODCALLTYPE *add_WebMessageReceived )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2WebMessageReceivedEventHandler *handler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebMessageReceived )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *CallDevToolsProtocolMethod )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR methodName, - /* [in] */ LPCWSTR parametersAsJson, - /* [in] */ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler *handler); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BrowserProcessId )( - ICoreWebView2_2 * This, - /* [retval][out] */ UINT32 *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanGoBack )( - ICoreWebView2_2 * This, - /* [retval][out] */ BOOL *canGoBack); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanGoForward )( - ICoreWebView2_2 * This, - /* [retval][out] */ BOOL *canGoForward); - - HRESULT ( STDMETHODCALLTYPE *GoBack )( - ICoreWebView2_2 * This); - - HRESULT ( STDMETHODCALLTYPE *GoForward )( - ICoreWebView2_2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetDevToolsProtocolEventReceiver )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR eventName, - /* [retval][out] */ ICoreWebView2DevToolsProtocolEventReceiver **receiver); - - HRESULT ( STDMETHODCALLTYPE *Stop )( - ICoreWebView2_2 * This); - - HRESULT ( STDMETHODCALLTYPE *add_NewWindowRequested )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2NewWindowRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NewWindowRequested )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_DocumentTitleChanged )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2DocumentTitleChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_DocumentTitleChanged )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DocumentTitle )( - ICoreWebView2_2 * This, - /* [retval][out] */ LPWSTR *title); - - HRESULT ( STDMETHODCALLTYPE *AddHostObjectToScript )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR name, - /* [in] */ VARIANT *object); - - HRESULT ( STDMETHODCALLTYPE *RemoveHostObjectFromScript )( - ICoreWebView2_2 * This, - /* [in] */ LPCWSTR name); - - HRESULT ( STDMETHODCALLTYPE *OpenDevToolsWindow )( - ICoreWebView2_2 * This); - - HRESULT ( STDMETHODCALLTYPE *add_ContainsFullScreenElementChanged )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2ContainsFullScreenElementChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ContainsFullScreenElementChanged )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ContainsFullScreenElement )( - ICoreWebView2_2 * This, - /* [retval][out] */ BOOL *containsFullScreenElement); - - HRESULT ( STDMETHODCALLTYPE *add_WebResourceRequested )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2WebResourceRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebResourceRequested )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *AddWebResourceRequestedFilter )( - ICoreWebView2_2 * This, - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); - - HRESULT ( STDMETHODCALLTYPE *RemoveWebResourceRequestedFilter )( - ICoreWebView2_2 * This, - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); - - HRESULT ( STDMETHODCALLTYPE *add_WindowCloseRequested )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2WindowCloseRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WindowCloseRequested )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_WebResourceResponseReceived )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2WebResourceResponseReceivedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebResourceResponseReceived )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *NavigateWithWebResourceRequest )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2WebResourceRequest *request); - - HRESULT ( STDMETHODCALLTYPE *add_DOMContentLoaded )( - ICoreWebView2_2 * This, - /* [in] */ ICoreWebView2DOMContentLoadedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_DOMContentLoaded )( - ICoreWebView2_2 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CookieManager )( - ICoreWebView2_2 * This, - /* [retval][out] */ ICoreWebView2CookieManager **cookieManager); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Environment )( - ICoreWebView2_2 * This, - /* [retval][out] */ ICoreWebView2Environment **environment); - - END_INTERFACE - } ICoreWebView2_2Vtbl; - - interface ICoreWebView2_2 - { - CONST_VTBL struct ICoreWebView2_2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2_2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2_2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2_2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2_2_get_Settings(This,settings) \ - ( (This)->lpVtbl -> get_Settings(This,settings) ) - -#define ICoreWebView2_2_get_Source(This,uri) \ - ( (This)->lpVtbl -> get_Source(This,uri) ) - -#define ICoreWebView2_2_Navigate(This,uri) \ - ( (This)->lpVtbl -> Navigate(This,uri) ) - -#define ICoreWebView2_2_NavigateToString(This,htmlContent) \ - ( (This)->lpVtbl -> NavigateToString(This,htmlContent) ) - -#define ICoreWebView2_2_add_NavigationStarting(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NavigationStarting(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_NavigationStarting(This,token) \ - ( (This)->lpVtbl -> remove_NavigationStarting(This,token) ) - -#define ICoreWebView2_2_add_ContentLoading(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ContentLoading(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_ContentLoading(This,token) \ - ( (This)->lpVtbl -> remove_ContentLoading(This,token) ) - -#define ICoreWebView2_2_add_SourceChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_SourceChanged(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_SourceChanged(This,token) \ - ( (This)->lpVtbl -> remove_SourceChanged(This,token) ) - -#define ICoreWebView2_2_add_HistoryChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_HistoryChanged(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_HistoryChanged(This,token) \ - ( (This)->lpVtbl -> remove_HistoryChanged(This,token) ) - -#define ICoreWebView2_2_add_NavigationCompleted(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NavigationCompleted(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_NavigationCompleted(This,token) \ - ( (This)->lpVtbl -> remove_NavigationCompleted(This,token) ) - -#define ICoreWebView2_2_add_FrameNavigationStarting(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_FrameNavigationStarting(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_FrameNavigationStarting(This,token) \ - ( (This)->lpVtbl -> remove_FrameNavigationStarting(This,token) ) - -#define ICoreWebView2_2_add_FrameNavigationCompleted(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_FrameNavigationCompleted(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_FrameNavigationCompleted(This,token) \ - ( (This)->lpVtbl -> remove_FrameNavigationCompleted(This,token) ) - -#define ICoreWebView2_2_add_ScriptDialogOpening(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ScriptDialogOpening(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_ScriptDialogOpening(This,token) \ - ( (This)->lpVtbl -> remove_ScriptDialogOpening(This,token) ) - -#define ICoreWebView2_2_add_PermissionRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_PermissionRequested(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_PermissionRequested(This,token) \ - ( (This)->lpVtbl -> remove_PermissionRequested(This,token) ) - -#define ICoreWebView2_2_add_ProcessFailed(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ProcessFailed(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_ProcessFailed(This,token) \ - ( (This)->lpVtbl -> remove_ProcessFailed(This,token) ) - -#define ICoreWebView2_2_AddScriptToExecuteOnDocumentCreated(This,javaScript,handler) \ - ( (This)->lpVtbl -> AddScriptToExecuteOnDocumentCreated(This,javaScript,handler) ) - -#define ICoreWebView2_2_RemoveScriptToExecuteOnDocumentCreated(This,id) \ - ( (This)->lpVtbl -> RemoveScriptToExecuteOnDocumentCreated(This,id) ) - -#define ICoreWebView2_2_ExecuteScript(This,javaScript,handler) \ - ( (This)->lpVtbl -> ExecuteScript(This,javaScript,handler) ) - -#define ICoreWebView2_2_CapturePreview(This,imageFormat,imageStream,handler) \ - ( (This)->lpVtbl -> CapturePreview(This,imageFormat,imageStream,handler) ) - -#define ICoreWebView2_2_Reload(This) \ - ( (This)->lpVtbl -> Reload(This) ) - -#define ICoreWebView2_2_PostWebMessageAsJson(This,webMessageAsJson) \ - ( (This)->lpVtbl -> PostWebMessageAsJson(This,webMessageAsJson) ) - -#define ICoreWebView2_2_PostWebMessageAsString(This,webMessageAsString) \ - ( (This)->lpVtbl -> PostWebMessageAsString(This,webMessageAsString) ) - -#define ICoreWebView2_2_add_WebMessageReceived(This,handler,token) \ - ( (This)->lpVtbl -> add_WebMessageReceived(This,handler,token) ) - -#define ICoreWebView2_2_remove_WebMessageReceived(This,token) \ - ( (This)->lpVtbl -> remove_WebMessageReceived(This,token) ) - -#define ICoreWebView2_2_CallDevToolsProtocolMethod(This,methodName,parametersAsJson,handler) \ - ( (This)->lpVtbl -> CallDevToolsProtocolMethod(This,methodName,parametersAsJson,handler) ) - -#define ICoreWebView2_2_get_BrowserProcessId(This,value) \ - ( (This)->lpVtbl -> get_BrowserProcessId(This,value) ) - -#define ICoreWebView2_2_get_CanGoBack(This,canGoBack) \ - ( (This)->lpVtbl -> get_CanGoBack(This,canGoBack) ) - -#define ICoreWebView2_2_get_CanGoForward(This,canGoForward) \ - ( (This)->lpVtbl -> get_CanGoForward(This,canGoForward) ) - -#define ICoreWebView2_2_GoBack(This) \ - ( (This)->lpVtbl -> GoBack(This) ) - -#define ICoreWebView2_2_GoForward(This) \ - ( (This)->lpVtbl -> GoForward(This) ) - -#define ICoreWebView2_2_GetDevToolsProtocolEventReceiver(This,eventName,receiver) \ - ( (This)->lpVtbl -> GetDevToolsProtocolEventReceiver(This,eventName,receiver) ) - -#define ICoreWebView2_2_Stop(This) \ - ( (This)->lpVtbl -> Stop(This) ) - -#define ICoreWebView2_2_add_NewWindowRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NewWindowRequested(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_NewWindowRequested(This,token) \ - ( (This)->lpVtbl -> remove_NewWindowRequested(This,token) ) - -#define ICoreWebView2_2_add_DocumentTitleChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_DocumentTitleChanged(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_DocumentTitleChanged(This,token) \ - ( (This)->lpVtbl -> remove_DocumentTitleChanged(This,token) ) - -#define ICoreWebView2_2_get_DocumentTitle(This,title) \ - ( (This)->lpVtbl -> get_DocumentTitle(This,title) ) - -#define ICoreWebView2_2_AddHostObjectToScript(This,name,object) \ - ( (This)->lpVtbl -> AddHostObjectToScript(This,name,object) ) - -#define ICoreWebView2_2_RemoveHostObjectFromScript(This,name) \ - ( (This)->lpVtbl -> RemoveHostObjectFromScript(This,name) ) - -#define ICoreWebView2_2_OpenDevToolsWindow(This) \ - ( (This)->lpVtbl -> OpenDevToolsWindow(This) ) - -#define ICoreWebView2_2_add_ContainsFullScreenElementChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ContainsFullScreenElementChanged(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_ContainsFullScreenElementChanged(This,token) \ - ( (This)->lpVtbl -> remove_ContainsFullScreenElementChanged(This,token) ) - -#define ICoreWebView2_2_get_ContainsFullScreenElement(This,containsFullScreenElement) \ - ( (This)->lpVtbl -> get_ContainsFullScreenElement(This,containsFullScreenElement) ) - -#define ICoreWebView2_2_add_WebResourceRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WebResourceRequested(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_WebResourceRequested(This,token) \ - ( (This)->lpVtbl -> remove_WebResourceRequested(This,token) ) - -#define ICoreWebView2_2_AddWebResourceRequestedFilter(This,uri,resourceContext) \ - ( (This)->lpVtbl -> AddWebResourceRequestedFilter(This,uri,resourceContext) ) - -#define ICoreWebView2_2_RemoveWebResourceRequestedFilter(This,uri,resourceContext) \ - ( (This)->lpVtbl -> RemoveWebResourceRequestedFilter(This,uri,resourceContext) ) - -#define ICoreWebView2_2_add_WindowCloseRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WindowCloseRequested(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_WindowCloseRequested(This,token) \ - ( (This)->lpVtbl -> remove_WindowCloseRequested(This,token) ) - - -#define ICoreWebView2_2_add_WebResourceResponseReceived(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WebResourceResponseReceived(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_WebResourceResponseReceived(This,token) \ - ( (This)->lpVtbl -> remove_WebResourceResponseReceived(This,token) ) - -#define ICoreWebView2_2_NavigateWithWebResourceRequest(This,request) \ - ( (This)->lpVtbl -> NavigateWithWebResourceRequest(This,request) ) - -#define ICoreWebView2_2_add_DOMContentLoaded(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_DOMContentLoaded(This,eventHandler,token) ) - -#define ICoreWebView2_2_remove_DOMContentLoaded(This,token) \ - ( (This)->lpVtbl -> remove_DOMContentLoaded(This,token) ) - -#define ICoreWebView2_2_get_CookieManager(This,cookieManager) \ - ( (This)->lpVtbl -> get_CookieManager(This,cookieManager) ) - -#define ICoreWebView2_2_get_Environment(This,environment) \ - ( (This)->lpVtbl -> get_Environment(This,environment) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2_2_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2_3_INTERFACE_DEFINED__ -#define __ICoreWebView2_3_INTERFACE_DEFINED__ - -/* interface ICoreWebView2_3 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2_3 = {0xA0D6DF20,0x3B92,0x416D,{0xAA,0x0C,0x43,0x7A,0x9C,0x72,0x78,0x57}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("A0D6DF20-3B92-416D-AA0C-437A9C727857") - ICoreWebView2_3 : public ICoreWebView2_2 - { - public: - virtual HRESULT STDMETHODCALLTYPE TrySuspend( - /* [in] */ ICoreWebView2TrySuspendCompletedHandler *handler) = 0; - - virtual HRESULT STDMETHODCALLTYPE Resume( void) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsSuspended( - /* [retval][out] */ BOOL *isSuspended) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetVirtualHostNameToFolderMapping( - /* [in] */ LPCWSTR hostName, - /* [in] */ LPCWSTR folderPath, - /* [in] */ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND accessKind) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClearVirtualHostNameToFolderMapping( - /* [in] */ LPCWSTR hostName) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2_3Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2_3 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2_3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2_3 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Settings )( - ICoreWebView2_3 * This, - /* [retval][out] */ ICoreWebView2Settings **settings); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( - ICoreWebView2_3 * This, - /* [retval][out] */ LPWSTR *uri); - - HRESULT ( STDMETHODCALLTYPE *Navigate )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR uri); - - HRESULT ( STDMETHODCALLTYPE *NavigateToString )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR htmlContent); - - HRESULT ( STDMETHODCALLTYPE *add_NavigationStarting )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NavigationStarting )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ContentLoading )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2ContentLoadingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ContentLoading )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_SourceChanged )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2SourceChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_SourceChanged )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_HistoryChanged )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2HistoryChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_HistoryChanged )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_NavigationCompleted )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NavigationCompleted )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_FrameNavigationStarting )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2NavigationStartingEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_FrameNavigationStarting )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_FrameNavigationCompleted )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2NavigationCompletedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_FrameNavigationCompleted )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ScriptDialogOpening )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2ScriptDialogOpeningEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ScriptDialogOpening )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_PermissionRequested )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2PermissionRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_PermissionRequested )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_ProcessFailed )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2ProcessFailedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ProcessFailed )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *AddScriptToExecuteOnDocumentCreated )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *RemoveScriptToExecuteOnDocumentCreated )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR id); - - HRESULT ( STDMETHODCALLTYPE *ExecuteScript )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR javaScript, - /* [in] */ ICoreWebView2ExecuteScriptCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CapturePreview )( - ICoreWebView2_3 * This, - /* [in] */ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat, - /* [in] */ IStream *imageStream, - /* [in] */ ICoreWebView2CapturePreviewCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *Reload )( - ICoreWebView2_3 * This); - - HRESULT ( STDMETHODCALLTYPE *PostWebMessageAsJson )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR webMessageAsJson); - - HRESULT ( STDMETHODCALLTYPE *PostWebMessageAsString )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR webMessageAsString); - - HRESULT ( STDMETHODCALLTYPE *add_WebMessageReceived )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2WebMessageReceivedEventHandler *handler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebMessageReceived )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *CallDevToolsProtocolMethod )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR methodName, - /* [in] */ LPCWSTR parametersAsJson, - /* [in] */ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler *handler); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BrowserProcessId )( - ICoreWebView2_3 * This, - /* [retval][out] */ UINT32 *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanGoBack )( - ICoreWebView2_3 * This, - /* [retval][out] */ BOOL *canGoBack); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanGoForward )( - ICoreWebView2_3 * This, - /* [retval][out] */ BOOL *canGoForward); - - HRESULT ( STDMETHODCALLTYPE *GoBack )( - ICoreWebView2_3 * This); - - HRESULT ( STDMETHODCALLTYPE *GoForward )( - ICoreWebView2_3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetDevToolsProtocolEventReceiver )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR eventName, - /* [retval][out] */ ICoreWebView2DevToolsProtocolEventReceiver **receiver); - - HRESULT ( STDMETHODCALLTYPE *Stop )( - ICoreWebView2_3 * This); - - HRESULT ( STDMETHODCALLTYPE *add_NewWindowRequested )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2NewWindowRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NewWindowRequested )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_DocumentTitleChanged )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2DocumentTitleChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_DocumentTitleChanged )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DocumentTitle )( - ICoreWebView2_3 * This, - /* [retval][out] */ LPWSTR *title); - - HRESULT ( STDMETHODCALLTYPE *AddHostObjectToScript )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR name, - /* [in] */ VARIANT *object); - - HRESULT ( STDMETHODCALLTYPE *RemoveHostObjectFromScript )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR name); - - HRESULT ( STDMETHODCALLTYPE *OpenDevToolsWindow )( - ICoreWebView2_3 * This); - - HRESULT ( STDMETHODCALLTYPE *add_ContainsFullScreenElementChanged )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2ContainsFullScreenElementChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ContainsFullScreenElementChanged )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ContainsFullScreenElement )( - ICoreWebView2_3 * This, - /* [retval][out] */ BOOL *containsFullScreenElement); - - HRESULT ( STDMETHODCALLTYPE *add_WebResourceRequested )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2WebResourceRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebResourceRequested )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *AddWebResourceRequestedFilter )( - ICoreWebView2_3 * This, - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); - - HRESULT ( STDMETHODCALLTYPE *RemoveWebResourceRequestedFilter )( - ICoreWebView2_3 * This, - /* [in] */ const LPCWSTR uri, - /* [in] */ const COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); - - HRESULT ( STDMETHODCALLTYPE *add_WindowCloseRequested )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2WindowCloseRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WindowCloseRequested )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_WebResourceResponseReceived )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2WebResourceResponseReceivedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_WebResourceResponseReceived )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *NavigateWithWebResourceRequest )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2WebResourceRequest *request); - - HRESULT ( STDMETHODCALLTYPE *add_DOMContentLoaded )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2DOMContentLoadedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_DOMContentLoaded )( - ICoreWebView2_3 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CookieManager )( - ICoreWebView2_3 * This, - /* [retval][out] */ ICoreWebView2CookieManager **cookieManager); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Environment )( - ICoreWebView2_3 * This, - /* [retval][out] */ ICoreWebView2Environment **environment); - - HRESULT ( STDMETHODCALLTYPE *TrySuspend )( - ICoreWebView2_3 * This, - /* [in] */ ICoreWebView2TrySuspendCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *Resume )( - ICoreWebView2_3 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsSuspended )( - ICoreWebView2_3 * This, - /* [retval][out] */ BOOL *isSuspended); - - HRESULT ( STDMETHODCALLTYPE *SetVirtualHostNameToFolderMapping )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR hostName, - /* [in] */ LPCWSTR folderPath, - /* [in] */ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND accessKind); - - HRESULT ( STDMETHODCALLTYPE *ClearVirtualHostNameToFolderMapping )( - ICoreWebView2_3 * This, - /* [in] */ LPCWSTR hostName); - - END_INTERFACE - } ICoreWebView2_3Vtbl; - - interface ICoreWebView2_3 - { - CONST_VTBL struct ICoreWebView2_3Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2_3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2_3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2_3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2_3_get_Settings(This,settings) \ - ( (This)->lpVtbl -> get_Settings(This,settings) ) - -#define ICoreWebView2_3_get_Source(This,uri) \ - ( (This)->lpVtbl -> get_Source(This,uri) ) - -#define ICoreWebView2_3_Navigate(This,uri) \ - ( (This)->lpVtbl -> Navigate(This,uri) ) - -#define ICoreWebView2_3_NavigateToString(This,htmlContent) \ - ( (This)->lpVtbl -> NavigateToString(This,htmlContent) ) - -#define ICoreWebView2_3_add_NavigationStarting(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NavigationStarting(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_NavigationStarting(This,token) \ - ( (This)->lpVtbl -> remove_NavigationStarting(This,token) ) - -#define ICoreWebView2_3_add_ContentLoading(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ContentLoading(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_ContentLoading(This,token) \ - ( (This)->lpVtbl -> remove_ContentLoading(This,token) ) - -#define ICoreWebView2_3_add_SourceChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_SourceChanged(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_SourceChanged(This,token) \ - ( (This)->lpVtbl -> remove_SourceChanged(This,token) ) - -#define ICoreWebView2_3_add_HistoryChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_HistoryChanged(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_HistoryChanged(This,token) \ - ( (This)->lpVtbl -> remove_HistoryChanged(This,token) ) - -#define ICoreWebView2_3_add_NavigationCompleted(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NavigationCompleted(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_NavigationCompleted(This,token) \ - ( (This)->lpVtbl -> remove_NavigationCompleted(This,token) ) - -#define ICoreWebView2_3_add_FrameNavigationStarting(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_FrameNavigationStarting(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_FrameNavigationStarting(This,token) \ - ( (This)->lpVtbl -> remove_FrameNavigationStarting(This,token) ) - -#define ICoreWebView2_3_add_FrameNavigationCompleted(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_FrameNavigationCompleted(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_FrameNavigationCompleted(This,token) \ - ( (This)->lpVtbl -> remove_FrameNavigationCompleted(This,token) ) - -#define ICoreWebView2_3_add_ScriptDialogOpening(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ScriptDialogOpening(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_ScriptDialogOpening(This,token) \ - ( (This)->lpVtbl -> remove_ScriptDialogOpening(This,token) ) - -#define ICoreWebView2_3_add_PermissionRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_PermissionRequested(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_PermissionRequested(This,token) \ - ( (This)->lpVtbl -> remove_PermissionRequested(This,token) ) - -#define ICoreWebView2_3_add_ProcessFailed(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ProcessFailed(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_ProcessFailed(This,token) \ - ( (This)->lpVtbl -> remove_ProcessFailed(This,token) ) - -#define ICoreWebView2_3_AddScriptToExecuteOnDocumentCreated(This,javaScript,handler) \ - ( (This)->lpVtbl -> AddScriptToExecuteOnDocumentCreated(This,javaScript,handler) ) - -#define ICoreWebView2_3_RemoveScriptToExecuteOnDocumentCreated(This,id) \ - ( (This)->lpVtbl -> RemoveScriptToExecuteOnDocumentCreated(This,id) ) - -#define ICoreWebView2_3_ExecuteScript(This,javaScript,handler) \ - ( (This)->lpVtbl -> ExecuteScript(This,javaScript,handler) ) - -#define ICoreWebView2_3_CapturePreview(This,imageFormat,imageStream,handler) \ - ( (This)->lpVtbl -> CapturePreview(This,imageFormat,imageStream,handler) ) - -#define ICoreWebView2_3_Reload(This) \ - ( (This)->lpVtbl -> Reload(This) ) - -#define ICoreWebView2_3_PostWebMessageAsJson(This,webMessageAsJson) \ - ( (This)->lpVtbl -> PostWebMessageAsJson(This,webMessageAsJson) ) - -#define ICoreWebView2_3_PostWebMessageAsString(This,webMessageAsString) \ - ( (This)->lpVtbl -> PostWebMessageAsString(This,webMessageAsString) ) - -#define ICoreWebView2_3_add_WebMessageReceived(This,handler,token) \ - ( (This)->lpVtbl -> add_WebMessageReceived(This,handler,token) ) - -#define ICoreWebView2_3_remove_WebMessageReceived(This,token) \ - ( (This)->lpVtbl -> remove_WebMessageReceived(This,token) ) - -#define ICoreWebView2_3_CallDevToolsProtocolMethod(This,methodName,parametersAsJson,handler) \ - ( (This)->lpVtbl -> CallDevToolsProtocolMethod(This,methodName,parametersAsJson,handler) ) - -#define ICoreWebView2_3_get_BrowserProcessId(This,value) \ - ( (This)->lpVtbl -> get_BrowserProcessId(This,value) ) - -#define ICoreWebView2_3_get_CanGoBack(This,canGoBack) \ - ( (This)->lpVtbl -> get_CanGoBack(This,canGoBack) ) - -#define ICoreWebView2_3_get_CanGoForward(This,canGoForward) \ - ( (This)->lpVtbl -> get_CanGoForward(This,canGoForward) ) - -#define ICoreWebView2_3_GoBack(This) \ - ( (This)->lpVtbl -> GoBack(This) ) - -#define ICoreWebView2_3_GoForward(This) \ - ( (This)->lpVtbl -> GoForward(This) ) - -#define ICoreWebView2_3_GetDevToolsProtocolEventReceiver(This,eventName,receiver) \ - ( (This)->lpVtbl -> GetDevToolsProtocolEventReceiver(This,eventName,receiver) ) - -#define ICoreWebView2_3_Stop(This) \ - ( (This)->lpVtbl -> Stop(This) ) - -#define ICoreWebView2_3_add_NewWindowRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NewWindowRequested(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_NewWindowRequested(This,token) \ - ( (This)->lpVtbl -> remove_NewWindowRequested(This,token) ) - -#define ICoreWebView2_3_add_DocumentTitleChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_DocumentTitleChanged(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_DocumentTitleChanged(This,token) \ - ( (This)->lpVtbl -> remove_DocumentTitleChanged(This,token) ) - -#define ICoreWebView2_3_get_DocumentTitle(This,title) \ - ( (This)->lpVtbl -> get_DocumentTitle(This,title) ) - -#define ICoreWebView2_3_AddHostObjectToScript(This,name,object) \ - ( (This)->lpVtbl -> AddHostObjectToScript(This,name,object) ) - -#define ICoreWebView2_3_RemoveHostObjectFromScript(This,name) \ - ( (This)->lpVtbl -> RemoveHostObjectFromScript(This,name) ) - -#define ICoreWebView2_3_OpenDevToolsWindow(This) \ - ( (This)->lpVtbl -> OpenDevToolsWindow(This) ) - -#define ICoreWebView2_3_add_ContainsFullScreenElementChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ContainsFullScreenElementChanged(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_ContainsFullScreenElementChanged(This,token) \ - ( (This)->lpVtbl -> remove_ContainsFullScreenElementChanged(This,token) ) - -#define ICoreWebView2_3_get_ContainsFullScreenElement(This,containsFullScreenElement) \ - ( (This)->lpVtbl -> get_ContainsFullScreenElement(This,containsFullScreenElement) ) - -#define ICoreWebView2_3_add_WebResourceRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WebResourceRequested(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_WebResourceRequested(This,token) \ - ( (This)->lpVtbl -> remove_WebResourceRequested(This,token) ) - -#define ICoreWebView2_3_AddWebResourceRequestedFilter(This,uri,resourceContext) \ - ( (This)->lpVtbl -> AddWebResourceRequestedFilter(This,uri,resourceContext) ) - -#define ICoreWebView2_3_RemoveWebResourceRequestedFilter(This,uri,resourceContext) \ - ( (This)->lpVtbl -> RemoveWebResourceRequestedFilter(This,uri,resourceContext) ) - -#define ICoreWebView2_3_add_WindowCloseRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WindowCloseRequested(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_WindowCloseRequested(This,token) \ - ( (This)->lpVtbl -> remove_WindowCloseRequested(This,token) ) - - -#define ICoreWebView2_3_add_WebResourceResponseReceived(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_WebResourceResponseReceived(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_WebResourceResponseReceived(This,token) \ - ( (This)->lpVtbl -> remove_WebResourceResponseReceived(This,token) ) - -#define ICoreWebView2_3_NavigateWithWebResourceRequest(This,request) \ - ( (This)->lpVtbl -> NavigateWithWebResourceRequest(This,request) ) - -#define ICoreWebView2_3_add_DOMContentLoaded(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_DOMContentLoaded(This,eventHandler,token) ) - -#define ICoreWebView2_3_remove_DOMContentLoaded(This,token) \ - ( (This)->lpVtbl -> remove_DOMContentLoaded(This,token) ) - -#define ICoreWebView2_3_get_CookieManager(This,cookieManager) \ - ( (This)->lpVtbl -> get_CookieManager(This,cookieManager) ) - -#define ICoreWebView2_3_get_Environment(This,environment) \ - ( (This)->lpVtbl -> get_Environment(This,environment) ) - - -#define ICoreWebView2_3_TrySuspend(This,handler) \ - ( (This)->lpVtbl -> TrySuspend(This,handler) ) - -#define ICoreWebView2_3_Resume(This) \ - ( (This)->lpVtbl -> Resume(This) ) - -#define ICoreWebView2_3_get_IsSuspended(This,isSuspended) \ - ( (This)->lpVtbl -> get_IsSuspended(This,isSuspended) ) - -#define ICoreWebView2_3_SetVirtualHostNameToFolderMapping(This,hostName,folderPath,accessKind) \ - ( (This)->lpVtbl -> SetVirtualHostNameToFolderMapping(This,hostName,folderPath,accessKind) ) - -#define ICoreWebView2_3_ClearVirtualHostNameToFolderMapping(This,hostName) \ - ( (This)->lpVtbl -> ClearVirtualHostNameToFolderMapping(This,hostName) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2_3_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CompositionController_INTERFACE_DEFINED__ -#define __ICoreWebView2CompositionController_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CompositionController */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CompositionController = {0x3df9b733,0xb9ae,0x4a15,{0x86,0xb4,0xeb,0x9e,0xe9,0x82,0x64,0x69}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("3df9b733-b9ae-4a15-86b4-eb9ee9826469") - ICoreWebView2CompositionController : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RootVisualTarget( - /* [retval][out] */ IUnknown **target) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_RootVisualTarget( - /* [in] */ IUnknown *target) = 0; - - virtual HRESULT STDMETHODCALLTYPE SendMouseInput( - /* [in] */ COREWEBVIEW2_MOUSE_EVENT_KIND eventKind, - /* [in] */ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS virtualKeys, - /* [in] */ UINT32 mouseData, - /* [in] */ POINT point) = 0; - - virtual HRESULT STDMETHODCALLTYPE SendPointerInput( - /* [in] */ COREWEBVIEW2_POINTER_EVENT_KIND eventKind, - /* [in] */ ICoreWebView2PointerInfo *pointerInfo) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Cursor( - /* [retval][out] */ HCURSOR *cursor) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SystemCursorId( - /* [retval][out] */ UINT32 *systemCursorId) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_CursorChanged( - /* [in] */ ICoreWebView2CursorChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_CursorChanged( - /* [in] */ EventRegistrationToken token) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CompositionControllerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CompositionController * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CompositionController * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CompositionController * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RootVisualTarget )( - ICoreWebView2CompositionController * This, - /* [retval][out] */ IUnknown **target); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RootVisualTarget )( - ICoreWebView2CompositionController * This, - /* [in] */ IUnknown *target); - - HRESULT ( STDMETHODCALLTYPE *SendMouseInput )( - ICoreWebView2CompositionController * This, - /* [in] */ COREWEBVIEW2_MOUSE_EVENT_KIND eventKind, - /* [in] */ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS virtualKeys, - /* [in] */ UINT32 mouseData, - /* [in] */ POINT point); - - HRESULT ( STDMETHODCALLTYPE *SendPointerInput )( - ICoreWebView2CompositionController * This, - /* [in] */ COREWEBVIEW2_POINTER_EVENT_KIND eventKind, - /* [in] */ ICoreWebView2PointerInfo *pointerInfo); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cursor )( - ICoreWebView2CompositionController * This, - /* [retval][out] */ HCURSOR *cursor); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SystemCursorId )( - ICoreWebView2CompositionController * This, - /* [retval][out] */ UINT32 *systemCursorId); - - HRESULT ( STDMETHODCALLTYPE *add_CursorChanged )( - ICoreWebView2CompositionController * This, - /* [in] */ ICoreWebView2CursorChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_CursorChanged )( - ICoreWebView2CompositionController * This, - /* [in] */ EventRegistrationToken token); - - END_INTERFACE - } ICoreWebView2CompositionControllerVtbl; - - interface ICoreWebView2CompositionController - { - CONST_VTBL struct ICoreWebView2CompositionControllerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CompositionController_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CompositionController_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CompositionController_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CompositionController_get_RootVisualTarget(This,target) \ - ( (This)->lpVtbl -> get_RootVisualTarget(This,target) ) - -#define ICoreWebView2CompositionController_put_RootVisualTarget(This,target) \ - ( (This)->lpVtbl -> put_RootVisualTarget(This,target) ) - -#define ICoreWebView2CompositionController_SendMouseInput(This,eventKind,virtualKeys,mouseData,point) \ - ( (This)->lpVtbl -> SendMouseInput(This,eventKind,virtualKeys,mouseData,point) ) - -#define ICoreWebView2CompositionController_SendPointerInput(This,eventKind,pointerInfo) \ - ( (This)->lpVtbl -> SendPointerInput(This,eventKind,pointerInfo) ) - -#define ICoreWebView2CompositionController_get_Cursor(This,cursor) \ - ( (This)->lpVtbl -> get_Cursor(This,cursor) ) - -#define ICoreWebView2CompositionController_get_SystemCursorId(This,systemCursorId) \ - ( (This)->lpVtbl -> get_SystemCursorId(This,systemCursorId) ) - -#define ICoreWebView2CompositionController_add_CursorChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_CursorChanged(This,eventHandler,token) ) - -#define ICoreWebView2CompositionController_remove_CursorChanged(This,token) \ - ( (This)->lpVtbl -> remove_CursorChanged(This,token) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CompositionController_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CompositionController2_INTERFACE_DEFINED__ -#define __ICoreWebView2CompositionController2_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CompositionController2 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CompositionController2 = {0x0b6a3d24,0x49cb,0x4806,{0xba,0x20,0xb5,0xe0,0x73,0x4a,0x7b,0x26}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("0b6a3d24-49cb-4806-ba20-b5e0734a7b26") - ICoreWebView2CompositionController2 : public ICoreWebView2CompositionController - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_UIAProvider( - /* [retval][out] */ IUnknown **provider) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CompositionController2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CompositionController2 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CompositionController2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CompositionController2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RootVisualTarget )( - ICoreWebView2CompositionController2 * This, - /* [retval][out] */ IUnknown **target); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RootVisualTarget )( - ICoreWebView2CompositionController2 * This, - /* [in] */ IUnknown *target); - - HRESULT ( STDMETHODCALLTYPE *SendMouseInput )( - ICoreWebView2CompositionController2 * This, - /* [in] */ COREWEBVIEW2_MOUSE_EVENT_KIND eventKind, - /* [in] */ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS virtualKeys, - /* [in] */ UINT32 mouseData, - /* [in] */ POINT point); - - HRESULT ( STDMETHODCALLTYPE *SendPointerInput )( - ICoreWebView2CompositionController2 * This, - /* [in] */ COREWEBVIEW2_POINTER_EVENT_KIND eventKind, - /* [in] */ ICoreWebView2PointerInfo *pointerInfo); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cursor )( - ICoreWebView2CompositionController2 * This, - /* [retval][out] */ HCURSOR *cursor); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SystemCursorId )( - ICoreWebView2CompositionController2 * This, - /* [retval][out] */ UINT32 *systemCursorId); - - HRESULT ( STDMETHODCALLTYPE *add_CursorChanged )( - ICoreWebView2CompositionController2 * This, - /* [in] */ ICoreWebView2CursorChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_CursorChanged )( - ICoreWebView2CompositionController2 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_UIAProvider )( - ICoreWebView2CompositionController2 * This, - /* [retval][out] */ IUnknown **provider); - - END_INTERFACE - } ICoreWebView2CompositionController2Vtbl; - - interface ICoreWebView2CompositionController2 - { - CONST_VTBL struct ICoreWebView2CompositionController2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CompositionController2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CompositionController2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CompositionController2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CompositionController2_get_RootVisualTarget(This,target) \ - ( (This)->lpVtbl -> get_RootVisualTarget(This,target) ) - -#define ICoreWebView2CompositionController2_put_RootVisualTarget(This,target) \ - ( (This)->lpVtbl -> put_RootVisualTarget(This,target) ) - -#define ICoreWebView2CompositionController2_SendMouseInput(This,eventKind,virtualKeys,mouseData,point) \ - ( (This)->lpVtbl -> SendMouseInput(This,eventKind,virtualKeys,mouseData,point) ) - -#define ICoreWebView2CompositionController2_SendPointerInput(This,eventKind,pointerInfo) \ - ( (This)->lpVtbl -> SendPointerInput(This,eventKind,pointerInfo) ) - -#define ICoreWebView2CompositionController2_get_Cursor(This,cursor) \ - ( (This)->lpVtbl -> get_Cursor(This,cursor) ) - -#define ICoreWebView2CompositionController2_get_SystemCursorId(This,systemCursorId) \ - ( (This)->lpVtbl -> get_SystemCursorId(This,systemCursorId) ) - -#define ICoreWebView2CompositionController2_add_CursorChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_CursorChanged(This,eventHandler,token) ) - -#define ICoreWebView2CompositionController2_remove_CursorChanged(This,token) \ - ( (This)->lpVtbl -> remove_CursorChanged(This,token) ) - - -#define ICoreWebView2CompositionController2_get_UIAProvider(This,provider) \ - ( (This)->lpVtbl -> get_UIAProvider(This,provider) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CompositionController2_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Controller_INTERFACE_DEFINED__ -#define __ICoreWebView2Controller_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Controller */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Controller = {0x4d00c0d1,0x9434,0x4eb6,{0x80,0x78,0x86,0x97,0xa5,0x60,0x33,0x4f}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("4d00c0d1-9434-4eb6-8078-8697a560334f") - ICoreWebView2Controller : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsVisible( - /* [retval][out] */ BOOL *isVisible) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsVisible( - /* [in] */ BOOL isVisible) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Bounds( - /* [retval][out] */ RECT *bounds) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Bounds( - /* [in] */ RECT bounds) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ZoomFactor( - /* [retval][out] */ double *zoomFactor) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ZoomFactor( - /* [in] */ double zoomFactor) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_ZoomFactorChanged( - /* [in] */ ICoreWebView2ZoomFactorChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_ZoomFactorChanged( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetBoundsAndZoomFactor( - /* [in] */ RECT bounds, - /* [in] */ double zoomFactor) = 0; - - virtual HRESULT STDMETHODCALLTYPE MoveFocus( - /* [in] */ COREWEBVIEW2_MOVE_FOCUS_REASON reason) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_MoveFocusRequested( - /* [in] */ ICoreWebView2MoveFocusRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_MoveFocusRequested( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_GotFocus( - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_GotFocus( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_LostFocus( - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_LostFocus( - /* [in] */ EventRegistrationToken token) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_AcceleratorKeyPressed( - /* [in] */ ICoreWebView2AcceleratorKeyPressedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_AcceleratorKeyPressed( - /* [in] */ EventRegistrationToken token) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ParentWindow( - /* [retval][out] */ HWND *parentWindow) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ParentWindow( - /* [in] */ HWND parentWindow) = 0; - - virtual HRESULT STDMETHODCALLTYPE NotifyParentWindowPositionChanged( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Close( void) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CoreWebView2( - /* [retval][out] */ ICoreWebView2 **coreWebView2) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ControllerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Controller * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Controller * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Controller * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsVisible )( - ICoreWebView2Controller * This, - /* [retval][out] */ BOOL *isVisible); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsVisible )( - ICoreWebView2Controller * This, - /* [in] */ BOOL isVisible); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Bounds )( - ICoreWebView2Controller * This, - /* [retval][out] */ RECT *bounds); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Bounds )( - ICoreWebView2Controller * This, - /* [in] */ RECT bounds); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ZoomFactor )( - ICoreWebView2Controller * This, - /* [retval][out] */ double *zoomFactor); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ZoomFactor )( - ICoreWebView2Controller * This, - /* [in] */ double zoomFactor); - - HRESULT ( STDMETHODCALLTYPE *add_ZoomFactorChanged )( - ICoreWebView2Controller * This, - /* [in] */ ICoreWebView2ZoomFactorChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ZoomFactorChanged )( - ICoreWebView2Controller * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *SetBoundsAndZoomFactor )( - ICoreWebView2Controller * This, - /* [in] */ RECT bounds, - /* [in] */ double zoomFactor); - - HRESULT ( STDMETHODCALLTYPE *MoveFocus )( - ICoreWebView2Controller * This, - /* [in] */ COREWEBVIEW2_MOVE_FOCUS_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *add_MoveFocusRequested )( - ICoreWebView2Controller * This, - /* [in] */ ICoreWebView2MoveFocusRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_MoveFocusRequested )( - ICoreWebView2Controller * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_GotFocus )( - ICoreWebView2Controller * This, - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_GotFocus )( - ICoreWebView2Controller * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_LostFocus )( - ICoreWebView2Controller * This, - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_LostFocus )( - ICoreWebView2Controller * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_AcceleratorKeyPressed )( - ICoreWebView2Controller * This, - /* [in] */ ICoreWebView2AcceleratorKeyPressedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_AcceleratorKeyPressed )( - ICoreWebView2Controller * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ParentWindow )( - ICoreWebView2Controller * This, - /* [retval][out] */ HWND *parentWindow); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ParentWindow )( - ICoreWebView2Controller * This, - /* [in] */ HWND parentWindow); - - HRESULT ( STDMETHODCALLTYPE *NotifyParentWindowPositionChanged )( - ICoreWebView2Controller * This); - - HRESULT ( STDMETHODCALLTYPE *Close )( - ICoreWebView2Controller * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CoreWebView2 )( - ICoreWebView2Controller * This, - /* [retval][out] */ ICoreWebView2 **coreWebView2); - - END_INTERFACE - } ICoreWebView2ControllerVtbl; - - interface ICoreWebView2Controller - { - CONST_VTBL struct ICoreWebView2ControllerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Controller_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Controller_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Controller_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Controller_get_IsVisible(This,isVisible) \ - ( (This)->lpVtbl -> get_IsVisible(This,isVisible) ) - -#define ICoreWebView2Controller_put_IsVisible(This,isVisible) \ - ( (This)->lpVtbl -> put_IsVisible(This,isVisible) ) - -#define ICoreWebView2Controller_get_Bounds(This,bounds) \ - ( (This)->lpVtbl -> get_Bounds(This,bounds) ) - -#define ICoreWebView2Controller_put_Bounds(This,bounds) \ - ( (This)->lpVtbl -> put_Bounds(This,bounds) ) - -#define ICoreWebView2Controller_get_ZoomFactor(This,zoomFactor) \ - ( (This)->lpVtbl -> get_ZoomFactor(This,zoomFactor) ) - -#define ICoreWebView2Controller_put_ZoomFactor(This,zoomFactor) \ - ( (This)->lpVtbl -> put_ZoomFactor(This,zoomFactor) ) - -#define ICoreWebView2Controller_add_ZoomFactorChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ZoomFactorChanged(This,eventHandler,token) ) - -#define ICoreWebView2Controller_remove_ZoomFactorChanged(This,token) \ - ( (This)->lpVtbl -> remove_ZoomFactorChanged(This,token) ) - -#define ICoreWebView2Controller_SetBoundsAndZoomFactor(This,bounds,zoomFactor) \ - ( (This)->lpVtbl -> SetBoundsAndZoomFactor(This,bounds,zoomFactor) ) - -#define ICoreWebView2Controller_MoveFocus(This,reason) \ - ( (This)->lpVtbl -> MoveFocus(This,reason) ) - -#define ICoreWebView2Controller_add_MoveFocusRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_MoveFocusRequested(This,eventHandler,token) ) - -#define ICoreWebView2Controller_remove_MoveFocusRequested(This,token) \ - ( (This)->lpVtbl -> remove_MoveFocusRequested(This,token) ) - -#define ICoreWebView2Controller_add_GotFocus(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_GotFocus(This,eventHandler,token) ) - -#define ICoreWebView2Controller_remove_GotFocus(This,token) \ - ( (This)->lpVtbl -> remove_GotFocus(This,token) ) - -#define ICoreWebView2Controller_add_LostFocus(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_LostFocus(This,eventHandler,token) ) - -#define ICoreWebView2Controller_remove_LostFocus(This,token) \ - ( (This)->lpVtbl -> remove_LostFocus(This,token) ) - -#define ICoreWebView2Controller_add_AcceleratorKeyPressed(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_AcceleratorKeyPressed(This,eventHandler,token) ) - -#define ICoreWebView2Controller_remove_AcceleratorKeyPressed(This,token) \ - ( (This)->lpVtbl -> remove_AcceleratorKeyPressed(This,token) ) - -#define ICoreWebView2Controller_get_ParentWindow(This,parentWindow) \ - ( (This)->lpVtbl -> get_ParentWindow(This,parentWindow) ) - -#define ICoreWebView2Controller_put_ParentWindow(This,parentWindow) \ - ( (This)->lpVtbl -> put_ParentWindow(This,parentWindow) ) - -#define ICoreWebView2Controller_NotifyParentWindowPositionChanged(This) \ - ( (This)->lpVtbl -> NotifyParentWindowPositionChanged(This) ) - -#define ICoreWebView2Controller_Close(This) \ - ( (This)->lpVtbl -> Close(This) ) - -#define ICoreWebView2Controller_get_CoreWebView2(This,coreWebView2) \ - ( (This)->lpVtbl -> get_CoreWebView2(This,coreWebView2) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Controller_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Controller2_INTERFACE_DEFINED__ -#define __ICoreWebView2Controller2_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Controller2 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Controller2 = {0xc979903e,0xd4ca,0x4228,{0x92,0xeb,0x47,0xee,0x3f,0xa9,0x6e,0xab}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("c979903e-d4ca-4228-92eb-47ee3fa96eab") - ICoreWebView2Controller2 : public ICoreWebView2Controller - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DefaultBackgroundColor( - /* [retval][out] */ COREWEBVIEW2_COLOR *backgroundColor) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_DefaultBackgroundColor( - /* [in] */ COREWEBVIEW2_COLOR backgroundColor) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Controller2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Controller2 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Controller2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Controller2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsVisible )( - ICoreWebView2Controller2 * This, - /* [retval][out] */ BOOL *isVisible); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsVisible )( - ICoreWebView2Controller2 * This, - /* [in] */ BOOL isVisible); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Bounds )( - ICoreWebView2Controller2 * This, - /* [retval][out] */ RECT *bounds); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Bounds )( - ICoreWebView2Controller2 * This, - /* [in] */ RECT bounds); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ZoomFactor )( - ICoreWebView2Controller2 * This, - /* [retval][out] */ double *zoomFactor); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ZoomFactor )( - ICoreWebView2Controller2 * This, - /* [in] */ double zoomFactor); - - HRESULT ( STDMETHODCALLTYPE *add_ZoomFactorChanged )( - ICoreWebView2Controller2 * This, - /* [in] */ ICoreWebView2ZoomFactorChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ZoomFactorChanged )( - ICoreWebView2Controller2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *SetBoundsAndZoomFactor )( - ICoreWebView2Controller2 * This, - /* [in] */ RECT bounds, - /* [in] */ double zoomFactor); - - HRESULT ( STDMETHODCALLTYPE *MoveFocus )( - ICoreWebView2Controller2 * This, - /* [in] */ COREWEBVIEW2_MOVE_FOCUS_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *add_MoveFocusRequested )( - ICoreWebView2Controller2 * This, - /* [in] */ ICoreWebView2MoveFocusRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_MoveFocusRequested )( - ICoreWebView2Controller2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_GotFocus )( - ICoreWebView2Controller2 * This, - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_GotFocus )( - ICoreWebView2Controller2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_LostFocus )( - ICoreWebView2Controller2 * This, - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_LostFocus )( - ICoreWebView2Controller2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_AcceleratorKeyPressed )( - ICoreWebView2Controller2 * This, - /* [in] */ ICoreWebView2AcceleratorKeyPressedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_AcceleratorKeyPressed )( - ICoreWebView2Controller2 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ParentWindow )( - ICoreWebView2Controller2 * This, - /* [retval][out] */ HWND *parentWindow); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ParentWindow )( - ICoreWebView2Controller2 * This, - /* [in] */ HWND parentWindow); - - HRESULT ( STDMETHODCALLTYPE *NotifyParentWindowPositionChanged )( - ICoreWebView2Controller2 * This); - - HRESULT ( STDMETHODCALLTYPE *Close )( - ICoreWebView2Controller2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CoreWebView2 )( - ICoreWebView2Controller2 * This, - /* [retval][out] */ ICoreWebView2 **coreWebView2); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultBackgroundColor )( - ICoreWebView2Controller2 * This, - /* [retval][out] */ COREWEBVIEW2_COLOR *backgroundColor); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultBackgroundColor )( - ICoreWebView2Controller2 * This, - /* [in] */ COREWEBVIEW2_COLOR backgroundColor); - - END_INTERFACE - } ICoreWebView2Controller2Vtbl; - - interface ICoreWebView2Controller2 - { - CONST_VTBL struct ICoreWebView2Controller2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Controller2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Controller2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Controller2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Controller2_get_IsVisible(This,isVisible) \ - ( (This)->lpVtbl -> get_IsVisible(This,isVisible) ) - -#define ICoreWebView2Controller2_put_IsVisible(This,isVisible) \ - ( (This)->lpVtbl -> put_IsVisible(This,isVisible) ) - -#define ICoreWebView2Controller2_get_Bounds(This,bounds) \ - ( (This)->lpVtbl -> get_Bounds(This,bounds) ) - -#define ICoreWebView2Controller2_put_Bounds(This,bounds) \ - ( (This)->lpVtbl -> put_Bounds(This,bounds) ) - -#define ICoreWebView2Controller2_get_ZoomFactor(This,zoomFactor) \ - ( (This)->lpVtbl -> get_ZoomFactor(This,zoomFactor) ) - -#define ICoreWebView2Controller2_put_ZoomFactor(This,zoomFactor) \ - ( (This)->lpVtbl -> put_ZoomFactor(This,zoomFactor) ) - -#define ICoreWebView2Controller2_add_ZoomFactorChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ZoomFactorChanged(This,eventHandler,token) ) - -#define ICoreWebView2Controller2_remove_ZoomFactorChanged(This,token) \ - ( (This)->lpVtbl -> remove_ZoomFactorChanged(This,token) ) - -#define ICoreWebView2Controller2_SetBoundsAndZoomFactor(This,bounds,zoomFactor) \ - ( (This)->lpVtbl -> SetBoundsAndZoomFactor(This,bounds,zoomFactor) ) - -#define ICoreWebView2Controller2_MoveFocus(This,reason) \ - ( (This)->lpVtbl -> MoveFocus(This,reason) ) - -#define ICoreWebView2Controller2_add_MoveFocusRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_MoveFocusRequested(This,eventHandler,token) ) - -#define ICoreWebView2Controller2_remove_MoveFocusRequested(This,token) \ - ( (This)->lpVtbl -> remove_MoveFocusRequested(This,token) ) - -#define ICoreWebView2Controller2_add_GotFocus(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_GotFocus(This,eventHandler,token) ) - -#define ICoreWebView2Controller2_remove_GotFocus(This,token) \ - ( (This)->lpVtbl -> remove_GotFocus(This,token) ) - -#define ICoreWebView2Controller2_add_LostFocus(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_LostFocus(This,eventHandler,token) ) - -#define ICoreWebView2Controller2_remove_LostFocus(This,token) \ - ( (This)->lpVtbl -> remove_LostFocus(This,token) ) - -#define ICoreWebView2Controller2_add_AcceleratorKeyPressed(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_AcceleratorKeyPressed(This,eventHandler,token) ) - -#define ICoreWebView2Controller2_remove_AcceleratorKeyPressed(This,token) \ - ( (This)->lpVtbl -> remove_AcceleratorKeyPressed(This,token) ) - -#define ICoreWebView2Controller2_get_ParentWindow(This,parentWindow) \ - ( (This)->lpVtbl -> get_ParentWindow(This,parentWindow) ) - -#define ICoreWebView2Controller2_put_ParentWindow(This,parentWindow) \ - ( (This)->lpVtbl -> put_ParentWindow(This,parentWindow) ) - -#define ICoreWebView2Controller2_NotifyParentWindowPositionChanged(This) \ - ( (This)->lpVtbl -> NotifyParentWindowPositionChanged(This) ) - -#define ICoreWebView2Controller2_Close(This) \ - ( (This)->lpVtbl -> Close(This) ) - -#define ICoreWebView2Controller2_get_CoreWebView2(This,coreWebView2) \ - ( (This)->lpVtbl -> get_CoreWebView2(This,coreWebView2) ) - - -#define ICoreWebView2Controller2_get_DefaultBackgroundColor(This,backgroundColor) \ - ( (This)->lpVtbl -> get_DefaultBackgroundColor(This,backgroundColor) ) - -#define ICoreWebView2Controller2_put_DefaultBackgroundColor(This,backgroundColor) \ - ( (This)->lpVtbl -> put_DefaultBackgroundColor(This,backgroundColor) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Controller2_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Controller3_INTERFACE_DEFINED__ -#define __ICoreWebView2Controller3_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Controller3 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Controller3 = {0xf9614724,0x5d2b,0x41dc,{0xae,0xf7,0x73,0xd6,0x2b,0x51,0x54,0x3b}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("f9614724-5d2b-41dc-aef7-73d62b51543b") - ICoreWebView2Controller3 : public ICoreWebView2Controller2 - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RasterizationScale( - /* [retval][out] */ double *scale) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_RasterizationScale( - /* [in] */ double scale) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ShouldDetectMonitorScaleChanges( - /* [retval][out] */ BOOL *value) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ShouldDetectMonitorScaleChanges( - /* [in] */ BOOL value) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_RasterizationScaleChanged( - /* [in] */ ICoreWebView2RasterizationScaleChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_RasterizationScaleChanged( - /* [in] */ EventRegistrationToken token) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BoundsMode( - /* [retval][out] */ COREWEBVIEW2_BOUNDS_MODE *boundsMode) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_BoundsMode( - /* [in] */ COREWEBVIEW2_BOUNDS_MODE boundsMode) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Controller3Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Controller3 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Controller3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Controller3 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsVisible )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ BOOL *isVisible); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsVisible )( - ICoreWebView2Controller3 * This, - /* [in] */ BOOL isVisible); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Bounds )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ RECT *bounds); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Bounds )( - ICoreWebView2Controller3 * This, - /* [in] */ RECT bounds); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ZoomFactor )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ double *zoomFactor); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ZoomFactor )( - ICoreWebView2Controller3 * This, - /* [in] */ double zoomFactor); - - HRESULT ( STDMETHODCALLTYPE *add_ZoomFactorChanged )( - ICoreWebView2Controller3 * This, - /* [in] */ ICoreWebView2ZoomFactorChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_ZoomFactorChanged )( - ICoreWebView2Controller3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *SetBoundsAndZoomFactor )( - ICoreWebView2Controller3 * This, - /* [in] */ RECT bounds, - /* [in] */ double zoomFactor); - - HRESULT ( STDMETHODCALLTYPE *MoveFocus )( - ICoreWebView2Controller3 * This, - /* [in] */ COREWEBVIEW2_MOVE_FOCUS_REASON reason); - - HRESULT ( STDMETHODCALLTYPE *add_MoveFocusRequested )( - ICoreWebView2Controller3 * This, - /* [in] */ ICoreWebView2MoveFocusRequestedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_MoveFocusRequested )( - ICoreWebView2Controller3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_GotFocus )( - ICoreWebView2Controller3 * This, - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_GotFocus )( - ICoreWebView2Controller3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_LostFocus )( - ICoreWebView2Controller3 * This, - /* [in] */ ICoreWebView2FocusChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_LostFocus )( - ICoreWebView2Controller3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *add_AcceleratorKeyPressed )( - ICoreWebView2Controller3 * This, - /* [in] */ ICoreWebView2AcceleratorKeyPressedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_AcceleratorKeyPressed )( - ICoreWebView2Controller3 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ParentWindow )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ HWND *parentWindow); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ParentWindow )( - ICoreWebView2Controller3 * This, - /* [in] */ HWND parentWindow); - - HRESULT ( STDMETHODCALLTYPE *NotifyParentWindowPositionChanged )( - ICoreWebView2Controller3 * This); - - HRESULT ( STDMETHODCALLTYPE *Close )( - ICoreWebView2Controller3 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CoreWebView2 )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ ICoreWebView2 **coreWebView2); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultBackgroundColor )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ COREWEBVIEW2_COLOR *backgroundColor); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultBackgroundColor )( - ICoreWebView2Controller3 * This, - /* [in] */ COREWEBVIEW2_COLOR backgroundColor); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RasterizationScale )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ double *scale); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RasterizationScale )( - ICoreWebView2Controller3 * This, - /* [in] */ double scale); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ShouldDetectMonitorScaleChanges )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ BOOL *value); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ShouldDetectMonitorScaleChanges )( - ICoreWebView2Controller3 * This, - /* [in] */ BOOL value); - - HRESULT ( STDMETHODCALLTYPE *add_RasterizationScaleChanged )( - ICoreWebView2Controller3 * This, - /* [in] */ ICoreWebView2RasterizationScaleChangedEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_RasterizationScaleChanged )( - ICoreWebView2Controller3 * This, - /* [in] */ EventRegistrationToken token); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BoundsMode )( - ICoreWebView2Controller3 * This, - /* [retval][out] */ COREWEBVIEW2_BOUNDS_MODE *boundsMode); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_BoundsMode )( - ICoreWebView2Controller3 * This, - /* [in] */ COREWEBVIEW2_BOUNDS_MODE boundsMode); - - END_INTERFACE - } ICoreWebView2Controller3Vtbl; - - interface ICoreWebView2Controller3 - { - CONST_VTBL struct ICoreWebView2Controller3Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Controller3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Controller3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Controller3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Controller3_get_IsVisible(This,isVisible) \ - ( (This)->lpVtbl -> get_IsVisible(This,isVisible) ) - -#define ICoreWebView2Controller3_put_IsVisible(This,isVisible) \ - ( (This)->lpVtbl -> put_IsVisible(This,isVisible) ) - -#define ICoreWebView2Controller3_get_Bounds(This,bounds) \ - ( (This)->lpVtbl -> get_Bounds(This,bounds) ) - -#define ICoreWebView2Controller3_put_Bounds(This,bounds) \ - ( (This)->lpVtbl -> put_Bounds(This,bounds) ) - -#define ICoreWebView2Controller3_get_ZoomFactor(This,zoomFactor) \ - ( (This)->lpVtbl -> get_ZoomFactor(This,zoomFactor) ) - -#define ICoreWebView2Controller3_put_ZoomFactor(This,zoomFactor) \ - ( (This)->lpVtbl -> put_ZoomFactor(This,zoomFactor) ) - -#define ICoreWebView2Controller3_add_ZoomFactorChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_ZoomFactorChanged(This,eventHandler,token) ) - -#define ICoreWebView2Controller3_remove_ZoomFactorChanged(This,token) \ - ( (This)->lpVtbl -> remove_ZoomFactorChanged(This,token) ) - -#define ICoreWebView2Controller3_SetBoundsAndZoomFactor(This,bounds,zoomFactor) \ - ( (This)->lpVtbl -> SetBoundsAndZoomFactor(This,bounds,zoomFactor) ) - -#define ICoreWebView2Controller3_MoveFocus(This,reason) \ - ( (This)->lpVtbl -> MoveFocus(This,reason) ) - -#define ICoreWebView2Controller3_add_MoveFocusRequested(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_MoveFocusRequested(This,eventHandler,token) ) - -#define ICoreWebView2Controller3_remove_MoveFocusRequested(This,token) \ - ( (This)->lpVtbl -> remove_MoveFocusRequested(This,token) ) - -#define ICoreWebView2Controller3_add_GotFocus(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_GotFocus(This,eventHandler,token) ) - -#define ICoreWebView2Controller3_remove_GotFocus(This,token) \ - ( (This)->lpVtbl -> remove_GotFocus(This,token) ) - -#define ICoreWebView2Controller3_add_LostFocus(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_LostFocus(This,eventHandler,token) ) - -#define ICoreWebView2Controller3_remove_LostFocus(This,token) \ - ( (This)->lpVtbl -> remove_LostFocus(This,token) ) - -#define ICoreWebView2Controller3_add_AcceleratorKeyPressed(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_AcceleratorKeyPressed(This,eventHandler,token) ) - -#define ICoreWebView2Controller3_remove_AcceleratorKeyPressed(This,token) \ - ( (This)->lpVtbl -> remove_AcceleratorKeyPressed(This,token) ) - -#define ICoreWebView2Controller3_get_ParentWindow(This,parentWindow) \ - ( (This)->lpVtbl -> get_ParentWindow(This,parentWindow) ) - -#define ICoreWebView2Controller3_put_ParentWindow(This,parentWindow) \ - ( (This)->lpVtbl -> put_ParentWindow(This,parentWindow) ) - -#define ICoreWebView2Controller3_NotifyParentWindowPositionChanged(This) \ - ( (This)->lpVtbl -> NotifyParentWindowPositionChanged(This) ) - -#define ICoreWebView2Controller3_Close(This) \ - ( (This)->lpVtbl -> Close(This) ) - -#define ICoreWebView2Controller3_get_CoreWebView2(This,coreWebView2) \ - ( (This)->lpVtbl -> get_CoreWebView2(This,coreWebView2) ) - - -#define ICoreWebView2Controller3_get_DefaultBackgroundColor(This,backgroundColor) \ - ( (This)->lpVtbl -> get_DefaultBackgroundColor(This,backgroundColor) ) - -#define ICoreWebView2Controller3_put_DefaultBackgroundColor(This,backgroundColor) \ - ( (This)->lpVtbl -> put_DefaultBackgroundColor(This,backgroundColor) ) - - -#define ICoreWebView2Controller3_get_RasterizationScale(This,scale) \ - ( (This)->lpVtbl -> get_RasterizationScale(This,scale) ) - -#define ICoreWebView2Controller3_put_RasterizationScale(This,scale) \ - ( (This)->lpVtbl -> put_RasterizationScale(This,scale) ) - -#define ICoreWebView2Controller3_get_ShouldDetectMonitorScaleChanges(This,value) \ - ( (This)->lpVtbl -> get_ShouldDetectMonitorScaleChanges(This,value) ) - -#define ICoreWebView2Controller3_put_ShouldDetectMonitorScaleChanges(This,value) \ - ( (This)->lpVtbl -> put_ShouldDetectMonitorScaleChanges(This,value) ) - -#define ICoreWebView2Controller3_add_RasterizationScaleChanged(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_RasterizationScaleChanged(This,eventHandler,token) ) - -#define ICoreWebView2Controller3_remove_RasterizationScaleChanged(This,token) \ - ( (This)->lpVtbl -> remove_RasterizationScaleChanged(This,token) ) - -#define ICoreWebView2Controller3_get_BoundsMode(This,boundsMode) \ - ( (This)->lpVtbl -> get_BoundsMode(This,boundsMode) ) - -#define ICoreWebView2Controller3_put_BoundsMode(This,boundsMode) \ - ( (This)->lpVtbl -> put_BoundsMode(This,boundsMode) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Controller3_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ContentLoadingEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2ContentLoadingEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ContentLoadingEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ContentLoadingEventArgs = {0x0c8a1275,0x9b6b,0x4901,{0x87,0xad,0x70,0xdf,0x25,0xba,0xfa,0x6e}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("0c8a1275-9b6b-4901-87ad-70df25bafa6e") - ICoreWebView2ContentLoadingEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsErrorPage( - /* [retval][out] */ BOOL *isErrorPage) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_NavigationId( - /* [retval][out] */ UINT64 *navigationId) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ContentLoadingEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ContentLoadingEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ContentLoadingEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ContentLoadingEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsErrorPage )( - ICoreWebView2ContentLoadingEventArgs * This, - /* [retval][out] */ BOOL *isErrorPage); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_NavigationId )( - ICoreWebView2ContentLoadingEventArgs * This, - /* [retval][out] */ UINT64 *navigationId); - - END_INTERFACE - } ICoreWebView2ContentLoadingEventArgsVtbl; - - interface ICoreWebView2ContentLoadingEventArgs - { - CONST_VTBL struct ICoreWebView2ContentLoadingEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ContentLoadingEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ContentLoadingEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ContentLoadingEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ContentLoadingEventArgs_get_IsErrorPage(This,isErrorPage) \ - ( (This)->lpVtbl -> get_IsErrorPage(This,isErrorPage) ) - -#define ICoreWebView2ContentLoadingEventArgs_get_NavigationId(This,navigationId) \ - ( (This)->lpVtbl -> get_NavigationId(This,navigationId) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ContentLoadingEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ContentLoadingEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2ContentLoadingEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ContentLoadingEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ContentLoadingEventHandler = {0x364471e7,0xf2be,0x4910,{0xbd,0xba,0xd7,0x20,0x77,0xd5,0x1c,0x4b}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("364471e7-f2be-4910-bdba-d72077d51c4b") - ICoreWebView2ContentLoadingEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2ContentLoadingEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ContentLoadingEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ContentLoadingEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ContentLoadingEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ContentLoadingEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2ContentLoadingEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2ContentLoadingEventArgs *args); - - END_INTERFACE - } ICoreWebView2ContentLoadingEventHandlerVtbl; - - interface ICoreWebView2ContentLoadingEventHandler - { - CONST_VTBL struct ICoreWebView2ContentLoadingEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ContentLoadingEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ContentLoadingEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ContentLoadingEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ContentLoadingEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ContentLoadingEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Cookie_INTERFACE_DEFINED__ -#define __ICoreWebView2Cookie_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Cookie */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Cookie = {0xAD26D6BE,0x1486,0x43E6,{0xBF,0x87,0xA2,0x03,0x40,0x06,0xCA,0x21}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("AD26D6BE-1486-43E6-BF87-A2034006CA21") - ICoreWebView2Cookie : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Name( - /* [retval][out] */ LPWSTR *name) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Value( - /* [retval][out] */ LPWSTR *value) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Value( - /* [in] */ LPCWSTR value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Domain( - /* [retval][out] */ LPWSTR *domain) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Path( - /* [retval][out] */ LPWSTR *path) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Expires( - /* [retval][out] */ double *expires) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Expires( - /* [in] */ double expires) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsHttpOnly( - /* [retval][out] */ BOOL *isHttpOnly) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsHttpOnly( - /* [in] */ BOOL isHttpOnly) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SameSite( - /* [retval][out] */ COREWEBVIEW2_COOKIE_SAME_SITE_KIND *sameSite) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_SameSite( - /* [in] */ COREWEBVIEW2_COOKIE_SAME_SITE_KIND sameSite) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsSecure( - /* [retval][out] */ BOOL *isSecure) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsSecure( - /* [in] */ BOOL isSecure) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsSession( - /* [retval][out] */ BOOL *isSession) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CookieVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Cookie * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Cookie * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Cookie * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( - ICoreWebView2Cookie * This, - /* [retval][out] */ LPWSTR *name); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( - ICoreWebView2Cookie * This, - /* [retval][out] */ LPWSTR *value); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Value )( - ICoreWebView2Cookie * This, - /* [in] */ LPCWSTR value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Domain )( - ICoreWebView2Cookie * This, - /* [retval][out] */ LPWSTR *domain); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Path )( - ICoreWebView2Cookie * This, - /* [retval][out] */ LPWSTR *path); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Expires )( - ICoreWebView2Cookie * This, - /* [retval][out] */ double *expires); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Expires )( - ICoreWebView2Cookie * This, - /* [in] */ double expires); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsHttpOnly )( - ICoreWebView2Cookie * This, - /* [retval][out] */ BOOL *isHttpOnly); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsHttpOnly )( - ICoreWebView2Cookie * This, - /* [in] */ BOOL isHttpOnly); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SameSite )( - ICoreWebView2Cookie * This, - /* [retval][out] */ COREWEBVIEW2_COOKIE_SAME_SITE_KIND *sameSite); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SameSite )( - ICoreWebView2Cookie * This, - /* [in] */ COREWEBVIEW2_COOKIE_SAME_SITE_KIND sameSite); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsSecure )( - ICoreWebView2Cookie * This, - /* [retval][out] */ BOOL *isSecure); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsSecure )( - ICoreWebView2Cookie * This, - /* [in] */ BOOL isSecure); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsSession )( - ICoreWebView2Cookie * This, - /* [retval][out] */ BOOL *isSession); - - END_INTERFACE - } ICoreWebView2CookieVtbl; - - interface ICoreWebView2Cookie - { - CONST_VTBL struct ICoreWebView2CookieVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Cookie_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Cookie_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Cookie_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Cookie_get_Name(This,name) \ - ( (This)->lpVtbl -> get_Name(This,name) ) - -#define ICoreWebView2Cookie_get_Value(This,value) \ - ( (This)->lpVtbl -> get_Value(This,value) ) - -#define ICoreWebView2Cookie_put_Value(This,value) \ - ( (This)->lpVtbl -> put_Value(This,value) ) - -#define ICoreWebView2Cookie_get_Domain(This,domain) \ - ( (This)->lpVtbl -> get_Domain(This,domain) ) - -#define ICoreWebView2Cookie_get_Path(This,path) \ - ( (This)->lpVtbl -> get_Path(This,path) ) - -#define ICoreWebView2Cookie_get_Expires(This,expires) \ - ( (This)->lpVtbl -> get_Expires(This,expires) ) - -#define ICoreWebView2Cookie_put_Expires(This,expires) \ - ( (This)->lpVtbl -> put_Expires(This,expires) ) - -#define ICoreWebView2Cookie_get_IsHttpOnly(This,isHttpOnly) \ - ( (This)->lpVtbl -> get_IsHttpOnly(This,isHttpOnly) ) - -#define ICoreWebView2Cookie_put_IsHttpOnly(This,isHttpOnly) \ - ( (This)->lpVtbl -> put_IsHttpOnly(This,isHttpOnly) ) - -#define ICoreWebView2Cookie_get_SameSite(This,sameSite) \ - ( (This)->lpVtbl -> get_SameSite(This,sameSite) ) - -#define ICoreWebView2Cookie_put_SameSite(This,sameSite) \ - ( (This)->lpVtbl -> put_SameSite(This,sameSite) ) - -#define ICoreWebView2Cookie_get_IsSecure(This,isSecure) \ - ( (This)->lpVtbl -> get_IsSecure(This,isSecure) ) - -#define ICoreWebView2Cookie_put_IsSecure(This,isSecure) \ - ( (This)->lpVtbl -> put_IsSecure(This,isSecure) ) - -#define ICoreWebView2Cookie_get_IsSession(This,isSession) \ - ( (This)->lpVtbl -> get_IsSession(This,isSession) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Cookie_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CookieList_INTERFACE_DEFINED__ -#define __ICoreWebView2CookieList_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CookieList */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CookieList = {0xF7F6F714,0x5D2A,0x43C6,{0x95,0x03,0x34,0x6E,0xCE,0x02,0xD1,0x86}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("F7F6F714-5D2A-43C6-9503-346ECE02D186") - ICoreWebView2CookieList : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Count( - /* [retval][out] */ UINT *count) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetValueAtIndex( - /* [in] */ UINT index, - /* [retval][out] */ ICoreWebView2Cookie **cookie) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CookieListVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CookieList * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CookieList * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CookieList * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( - ICoreWebView2CookieList * This, - /* [retval][out] */ UINT *count); - - HRESULT ( STDMETHODCALLTYPE *GetValueAtIndex )( - ICoreWebView2CookieList * This, - /* [in] */ UINT index, - /* [retval][out] */ ICoreWebView2Cookie **cookie); - - END_INTERFACE - } ICoreWebView2CookieListVtbl; - - interface ICoreWebView2CookieList - { - CONST_VTBL struct ICoreWebView2CookieListVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CookieList_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CookieList_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CookieList_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CookieList_get_Count(This,count) \ - ( (This)->lpVtbl -> get_Count(This,count) ) - -#define ICoreWebView2CookieList_GetValueAtIndex(This,index,cookie) \ - ( (This)->lpVtbl -> GetValueAtIndex(This,index,cookie) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CookieList_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CookieManager_INTERFACE_DEFINED__ -#define __ICoreWebView2CookieManager_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CookieManager */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CookieManager = {0x177CD9E7,0xB6F5,0x451A,{0x94,0xA0,0x5D,0x7A,0x3A,0x4C,0x41,0x41}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("177CD9E7-B6F5-451A-94A0-5D7A3A4C4141") - ICoreWebView2CookieManager : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE CreateCookie( - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR value, - /* [in] */ LPCWSTR domain, - /* [in] */ LPCWSTR path, - /* [retval][out] */ ICoreWebView2Cookie **cookie) = 0; - - virtual HRESULT STDMETHODCALLTYPE CopyCookie( - /* [in] */ ICoreWebView2Cookie *cookieParam, - /* [retval][out] */ ICoreWebView2Cookie **cookie) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCookies( - /* [in] */ LPCWSTR uri, - /* [in] */ ICoreWebView2GetCookiesCompletedHandler *handler) = 0; - - virtual HRESULT STDMETHODCALLTYPE AddOrUpdateCookie( - /* [in] */ ICoreWebView2Cookie *cookie) = 0; - - virtual HRESULT STDMETHODCALLTYPE DeleteCookie( - /* [in] */ ICoreWebView2Cookie *cookie) = 0; - - virtual HRESULT STDMETHODCALLTYPE DeleteCookies( - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR uri) = 0; - - virtual HRESULT STDMETHODCALLTYPE DeleteCookiesWithDomainAndPath( - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR domain, - /* [in] */ LPCWSTR path) = 0; - - virtual HRESULT STDMETHODCALLTYPE DeleteAllCookies( void) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CookieManagerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CookieManager * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CookieManager * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CookieManager * This); - - HRESULT ( STDMETHODCALLTYPE *CreateCookie )( - ICoreWebView2CookieManager * This, - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR value, - /* [in] */ LPCWSTR domain, - /* [in] */ LPCWSTR path, - /* [retval][out] */ ICoreWebView2Cookie **cookie); - - HRESULT ( STDMETHODCALLTYPE *CopyCookie )( - ICoreWebView2CookieManager * This, - /* [in] */ ICoreWebView2Cookie *cookieParam, - /* [retval][out] */ ICoreWebView2Cookie **cookie); - - HRESULT ( STDMETHODCALLTYPE *GetCookies )( - ICoreWebView2CookieManager * This, - /* [in] */ LPCWSTR uri, - /* [in] */ ICoreWebView2GetCookiesCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *AddOrUpdateCookie )( - ICoreWebView2CookieManager * This, - /* [in] */ ICoreWebView2Cookie *cookie); - - HRESULT ( STDMETHODCALLTYPE *DeleteCookie )( - ICoreWebView2CookieManager * This, - /* [in] */ ICoreWebView2Cookie *cookie); - - HRESULT ( STDMETHODCALLTYPE *DeleteCookies )( - ICoreWebView2CookieManager * This, - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR uri); - - HRESULT ( STDMETHODCALLTYPE *DeleteCookiesWithDomainAndPath )( - ICoreWebView2CookieManager * This, - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR domain, - /* [in] */ LPCWSTR path); - - HRESULT ( STDMETHODCALLTYPE *DeleteAllCookies )( - ICoreWebView2CookieManager * This); - - END_INTERFACE - } ICoreWebView2CookieManagerVtbl; - - interface ICoreWebView2CookieManager - { - CONST_VTBL struct ICoreWebView2CookieManagerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CookieManager_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CookieManager_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CookieManager_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CookieManager_CreateCookie(This,name,value,domain,path,cookie) \ - ( (This)->lpVtbl -> CreateCookie(This,name,value,domain,path,cookie) ) - -#define ICoreWebView2CookieManager_CopyCookie(This,cookieParam,cookie) \ - ( (This)->lpVtbl -> CopyCookie(This,cookieParam,cookie) ) - -#define ICoreWebView2CookieManager_GetCookies(This,uri,handler) \ - ( (This)->lpVtbl -> GetCookies(This,uri,handler) ) - -#define ICoreWebView2CookieManager_AddOrUpdateCookie(This,cookie) \ - ( (This)->lpVtbl -> AddOrUpdateCookie(This,cookie) ) - -#define ICoreWebView2CookieManager_DeleteCookie(This,cookie) \ - ( (This)->lpVtbl -> DeleteCookie(This,cookie) ) - -#define ICoreWebView2CookieManager_DeleteCookies(This,name,uri) \ - ( (This)->lpVtbl -> DeleteCookies(This,name,uri) ) - -#define ICoreWebView2CookieManager_DeleteCookiesWithDomainAndPath(This,name,domain,path) \ - ( (This)->lpVtbl -> DeleteCookiesWithDomainAndPath(This,name,domain,path) ) - -#define ICoreWebView2CookieManager_DeleteAllCookies(This) \ - ( (This)->lpVtbl -> DeleteAllCookies(This) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CookieManager_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler = {0x02fab84b,0x1428,0x4fb7,{0xad,0x45,0x1b,0x2e,0x64,0x73,0x61,0x84}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("02fab84b-1428-4fb7-ad45-1b2e64736184") - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - HRESULT errorCode, - ICoreWebView2CompositionController *webView) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler * This, - HRESULT errorCode, - ICoreWebView2CompositionController *webView); - - END_INTERFACE - } ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandlerVtbl; - - interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler - { - CONST_VTBL struct ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Invoke(This,errorCode,webView) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,webView) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler = {0x6c4819f3,0xc9b7,0x4260,{0x81,0x27,0xc9,0xf5,0xbd,0xe7,0xf6,0x8c}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("6c4819f3-c9b7-4260-8127-c9f5bde7f68c") - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - HRESULT errorCode, - ICoreWebView2Controller *createdController) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler * This, - HRESULT errorCode, - ICoreWebView2Controller *createdController); - - END_INTERFACE - } ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl; - - interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler - { - CONST_VTBL struct ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Invoke(This,errorCode,createdController) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,createdController) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = {0x4e8a3389,0xc9d8,0x4bd2,{0xb6,0xb5,0x12,0x4f,0xee,0x6c,0xc1,0x4d}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("4e8a3389-c9d8-4bd2-b6b5-124fee6cc14d") - ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - HRESULT errorCode, - ICoreWebView2Environment *createdEnvironment) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler * This, - HRESULT errorCode, - ICoreWebView2Environment *createdEnvironment); - - END_INTERFACE - } ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl; - - interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler - { - CONST_VTBL struct ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Invoke(This,errorCode,createdEnvironment) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,createdEnvironment) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ContainsFullScreenElementChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2ContainsFullScreenElementChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ContainsFullScreenElementChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ContainsFullScreenElementChangedEventHandler = {0xe45d98b1,0xafef,0x45be,{0x8b,0xaf,0x6c,0x77,0x28,0x86,0x7f,0x73}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("e45d98b1-afef-45be-8baf-6c7728867f73") - ICoreWebView2ContainsFullScreenElementChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ContainsFullScreenElementChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ContainsFullScreenElementChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ContainsFullScreenElementChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ContainsFullScreenElementChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2ContainsFullScreenElementChangedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2ContainsFullScreenElementChangedEventHandlerVtbl; - - interface ICoreWebView2ContainsFullScreenElementChangedEventHandler - { - CONST_VTBL struct ICoreWebView2ContainsFullScreenElementChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ContainsFullScreenElementChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ContainsFullScreenElementChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ContainsFullScreenElementChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ContainsFullScreenElementChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ContainsFullScreenElementChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CursorChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2CursorChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CursorChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CursorChangedEventHandler = {0x9da43ccc,0x26e1,0x4dad,{0xb5,0x6c,0xd8,0x96,0x1c,0x94,0xc5,0x71}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("9da43ccc-26e1-4dad-b56c-d8961c94c571") - ICoreWebView2CursorChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2CompositionController *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CursorChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CursorChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CursorChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CursorChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2CursorChangedEventHandler * This, - /* [in] */ ICoreWebView2CompositionController *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2CursorChangedEventHandlerVtbl; - - interface ICoreWebView2CursorChangedEventHandler - { - CONST_VTBL struct ICoreWebView2CursorChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CursorChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CursorChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CursorChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CursorChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CursorChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2DocumentTitleChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2DocumentTitleChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2DocumentTitleChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2DocumentTitleChangedEventHandler = {0xf5f2b923,0x953e,0x4042,{0x9f,0x95,0xf3,0xa1,0x18,0xe1,0xaf,0xd4}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("f5f2b923-953e-4042-9f95-f3a118e1afd4") - ICoreWebView2DocumentTitleChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2DocumentTitleChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2DocumentTitleChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2DocumentTitleChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2DocumentTitleChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2DocumentTitleChangedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2DocumentTitleChangedEventHandlerVtbl; - - interface ICoreWebView2DocumentTitleChangedEventHandler - { - CONST_VTBL struct ICoreWebView2DocumentTitleChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2DocumentTitleChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2DocumentTitleChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2DocumentTitleChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2DocumentTitleChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2DocumentTitleChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2DOMContentLoadedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2DOMContentLoadedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2DOMContentLoadedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2DOMContentLoadedEventArgs = {0x16B1E21A,0xC503,0x44F2,{0x84,0xC9,0x70,0xAB,0xA5,0x03,0x12,0x83}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("16B1E21A-C503-44F2-84C9-70ABA5031283") - ICoreWebView2DOMContentLoadedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_NavigationId( - /* [retval][out] */ UINT64 *navigationId) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2DOMContentLoadedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2DOMContentLoadedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2DOMContentLoadedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2DOMContentLoadedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_NavigationId )( - ICoreWebView2DOMContentLoadedEventArgs * This, - /* [retval][out] */ UINT64 *navigationId); - - END_INTERFACE - } ICoreWebView2DOMContentLoadedEventArgsVtbl; - - interface ICoreWebView2DOMContentLoadedEventArgs - { - CONST_VTBL struct ICoreWebView2DOMContentLoadedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2DOMContentLoadedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2DOMContentLoadedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2DOMContentLoadedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2DOMContentLoadedEventArgs_get_NavigationId(This,navigationId) \ - ( (This)->lpVtbl -> get_NavigationId(This,navigationId) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2DOMContentLoadedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2DOMContentLoadedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2DOMContentLoadedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2DOMContentLoadedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2DOMContentLoadedEventHandler = {0x4BAC7E9C,0x199E,0x49ED,{0x87,0xED,0x24,0x93,0x03,0xAC,0xF0,0x19}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("4BAC7E9C-199E-49ED-87ED-249303ACF019") - ICoreWebView2DOMContentLoadedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2DOMContentLoadedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2DOMContentLoadedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2DOMContentLoadedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2DOMContentLoadedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2DOMContentLoadedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2DOMContentLoadedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2DOMContentLoadedEventArgs *args); - - END_INTERFACE - } ICoreWebView2DOMContentLoadedEventHandlerVtbl; - - interface ICoreWebView2DOMContentLoadedEventHandler - { - CONST_VTBL struct ICoreWebView2DOMContentLoadedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2DOMContentLoadedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2DOMContentLoadedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2DOMContentLoadedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2DOMContentLoadedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2DOMContentLoadedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Deferral_INTERFACE_DEFINED__ -#define __ICoreWebView2Deferral_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Deferral */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Deferral = {0xc10e7f7b,0xb585,0x46f0,{0xa6,0x23,0x8b,0xef,0xbf,0x3e,0x4e,0xe0}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("c10e7f7b-b585-46f0-a623-8befbf3e4ee0") - ICoreWebView2Deferral : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Complete( void) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2DeferralVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Deferral * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Deferral * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Deferral * This); - - HRESULT ( STDMETHODCALLTYPE *Complete )( - ICoreWebView2Deferral * This); - - END_INTERFACE - } ICoreWebView2DeferralVtbl; - - interface ICoreWebView2Deferral - { - CONST_VTBL struct ICoreWebView2DeferralVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Deferral_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Deferral_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Deferral_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Deferral_Complete(This) \ - ( (This)->lpVtbl -> Complete(This) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Deferral_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2DevToolsProtocolEventReceivedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2DevToolsProtocolEventReceivedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs = {0x653c2959,0xbb3a,0x4377,{0x86,0x32,0xb5,0x8a,0xda,0x4e,0x66,0xc4}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("653c2959-bb3a-4377-8632-b58ada4e66c4") - ICoreWebView2DevToolsProtocolEventReceivedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ParameterObjectAsJson( - /* [retval][out] */ LPWSTR *parameterObjectAsJson) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2DevToolsProtocolEventReceivedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2DevToolsProtocolEventReceivedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2DevToolsProtocolEventReceivedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2DevToolsProtocolEventReceivedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ParameterObjectAsJson )( - ICoreWebView2DevToolsProtocolEventReceivedEventArgs * This, - /* [retval][out] */ LPWSTR *parameterObjectAsJson); - - END_INTERFACE - } ICoreWebView2DevToolsProtocolEventReceivedEventArgsVtbl; - - interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs - { - CONST_VTBL struct ICoreWebView2DevToolsProtocolEventReceivedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2DevToolsProtocolEventReceivedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2DevToolsProtocolEventReceivedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2DevToolsProtocolEventReceivedEventArgs_get_ParameterObjectAsJson(This,parameterObjectAsJson) \ - ( (This)->lpVtbl -> get_ParameterObjectAsJson(This,parameterObjectAsJson) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2DevToolsProtocolEventReceivedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2DevToolsProtocolEventReceivedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2DevToolsProtocolEventReceivedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2DevToolsProtocolEventReceivedEventHandler = {0xe2fda4be,0x5456,0x406c,{0xa2,0x61,0x3d,0x45,0x21,0x38,0x36,0x2c}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("e2fda4be-5456-406c-a261-3d452138362c") - ICoreWebView2DevToolsProtocolEventReceivedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2DevToolsProtocolEventReceivedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2DevToolsProtocolEventReceivedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2DevToolsProtocolEventReceivedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2DevToolsProtocolEventReceivedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2DevToolsProtocolEventReceivedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2DevToolsProtocolEventReceivedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2DevToolsProtocolEventReceivedEventArgs *args); - - END_INTERFACE - } ICoreWebView2DevToolsProtocolEventReceivedEventHandlerVtbl; - - interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler - { - CONST_VTBL struct ICoreWebView2DevToolsProtocolEventReceivedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2DevToolsProtocolEventReceivedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2DevToolsProtocolEventReceivedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2DevToolsProtocolEventReceivedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2DevToolsProtocolEventReceiver_INTERFACE_DEFINED__ -#define __ICoreWebView2DevToolsProtocolEventReceiver_INTERFACE_DEFINED__ - -/* interface ICoreWebView2DevToolsProtocolEventReceiver */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2DevToolsProtocolEventReceiver = {0xb32ca51a,0x8371,0x45e9,{0x93,0x17,0xaf,0x02,0x1d,0x08,0x03,0x67}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("b32ca51a-8371-45e9-9317-af021d080367") - ICoreWebView2DevToolsProtocolEventReceiver : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE add_DevToolsProtocolEventReceived( - /* [in] */ ICoreWebView2DevToolsProtocolEventReceivedEventHandler *handler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_DevToolsProtocolEventReceived( - /* [in] */ EventRegistrationToken token) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2DevToolsProtocolEventReceiverVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2DevToolsProtocolEventReceiver * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2DevToolsProtocolEventReceiver * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2DevToolsProtocolEventReceiver * This); - - HRESULT ( STDMETHODCALLTYPE *add_DevToolsProtocolEventReceived )( - ICoreWebView2DevToolsProtocolEventReceiver * This, - /* [in] */ ICoreWebView2DevToolsProtocolEventReceivedEventHandler *handler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_DevToolsProtocolEventReceived )( - ICoreWebView2DevToolsProtocolEventReceiver * This, - /* [in] */ EventRegistrationToken token); - - END_INTERFACE - } ICoreWebView2DevToolsProtocolEventReceiverVtbl; - - interface ICoreWebView2DevToolsProtocolEventReceiver - { - CONST_VTBL struct ICoreWebView2DevToolsProtocolEventReceiverVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2DevToolsProtocolEventReceiver_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2DevToolsProtocolEventReceiver_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2DevToolsProtocolEventReceiver_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2DevToolsProtocolEventReceiver_add_DevToolsProtocolEventReceived(This,handler,token) \ - ( (This)->lpVtbl -> add_DevToolsProtocolEventReceived(This,handler,token) ) - -#define ICoreWebView2DevToolsProtocolEventReceiver_remove_DevToolsProtocolEventReceived(This,token) \ - ( (This)->lpVtbl -> remove_DevToolsProtocolEventReceived(This,token) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2DevToolsProtocolEventReceiver_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment_INTERFACE_DEFINED__ -#define __ICoreWebView2Environment_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Environment */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Environment = {0xb96d755e,0x0319,0x4e92,{0xa2,0x96,0x23,0x43,0x6f,0x46,0xa1,0xfc}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("b96d755e-0319-4e92-a296-23436f46a1fc") - ICoreWebView2Environment : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE CreateCoreWebView2Controller( - HWND parentWindow, - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler *handler) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateWebResourceResponse( - /* [in] */ IStream *content, - /* [in] */ int statusCode, - /* [in] */ LPCWSTR reasonPhrase, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceResponse **response) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BrowserVersionString( - /* [retval][out] */ LPWSTR *versionInfo) = 0; - - virtual HRESULT STDMETHODCALLTYPE add_NewBrowserVersionAvailable( - /* [in] */ ICoreWebView2NewBrowserVersionAvailableEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token) = 0; - - virtual HRESULT STDMETHODCALLTYPE remove_NewBrowserVersionAvailable( - /* [in] */ EventRegistrationToken token) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2EnvironmentVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Environment * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Environment * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Environment * This); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2Controller )( - ICoreWebView2Environment * This, - HWND parentWindow, - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CreateWebResourceResponse )( - ICoreWebView2Environment * This, - /* [in] */ IStream *content, - /* [in] */ int statusCode, - /* [in] */ LPCWSTR reasonPhrase, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceResponse **response); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BrowserVersionString )( - ICoreWebView2Environment * This, - /* [retval][out] */ LPWSTR *versionInfo); - - HRESULT ( STDMETHODCALLTYPE *add_NewBrowserVersionAvailable )( - ICoreWebView2Environment * This, - /* [in] */ ICoreWebView2NewBrowserVersionAvailableEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NewBrowserVersionAvailable )( - ICoreWebView2Environment * This, - /* [in] */ EventRegistrationToken token); - - END_INTERFACE - } ICoreWebView2EnvironmentVtbl; - - interface ICoreWebView2Environment - { - CONST_VTBL struct ICoreWebView2EnvironmentVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Environment_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Environment_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Environment_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Environment_CreateCoreWebView2Controller(This,parentWindow,handler) \ - ( (This)->lpVtbl -> CreateCoreWebView2Controller(This,parentWindow,handler) ) - -#define ICoreWebView2Environment_CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) \ - ( (This)->lpVtbl -> CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) ) - -#define ICoreWebView2Environment_get_BrowserVersionString(This,versionInfo) \ - ( (This)->lpVtbl -> get_BrowserVersionString(This,versionInfo) ) - -#define ICoreWebView2Environment_add_NewBrowserVersionAvailable(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NewBrowserVersionAvailable(This,eventHandler,token) ) - -#define ICoreWebView2Environment_remove_NewBrowserVersionAvailable(This,token) \ - ( (This)->lpVtbl -> remove_NewBrowserVersionAvailable(This,token) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Environment_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment2_INTERFACE_DEFINED__ -#define __ICoreWebView2Environment2_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Environment2 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Environment2 = {0x41F3632B,0x5EF4,0x404F,{0xAD,0x82,0x2D,0x60,0x6C,0x5A,0x9A,0x21}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("41F3632B-5EF4-404F-AD82-2D606C5A9A21") - ICoreWebView2Environment2 : public ICoreWebView2Environment - { - public: - virtual HRESULT STDMETHODCALLTYPE CreateWebResourceRequest( - /* [in] */ LPCWSTR uri, - /* [in] */ LPCWSTR method, - /* [in] */ IStream *postData, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceRequest **request) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Environment2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Environment2 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Environment2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Environment2 * This); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2Controller )( - ICoreWebView2Environment2 * This, - HWND parentWindow, - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CreateWebResourceResponse )( - ICoreWebView2Environment2 * This, - /* [in] */ IStream *content, - /* [in] */ int statusCode, - /* [in] */ LPCWSTR reasonPhrase, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceResponse **response); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BrowserVersionString )( - ICoreWebView2Environment2 * This, - /* [retval][out] */ LPWSTR *versionInfo); - - HRESULT ( STDMETHODCALLTYPE *add_NewBrowserVersionAvailable )( - ICoreWebView2Environment2 * This, - /* [in] */ ICoreWebView2NewBrowserVersionAvailableEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NewBrowserVersionAvailable )( - ICoreWebView2Environment2 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *CreateWebResourceRequest )( - ICoreWebView2Environment2 * This, - /* [in] */ LPCWSTR uri, - /* [in] */ LPCWSTR method, - /* [in] */ IStream *postData, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceRequest **request); - - END_INTERFACE - } ICoreWebView2Environment2Vtbl; - - interface ICoreWebView2Environment2 - { - CONST_VTBL struct ICoreWebView2Environment2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Environment2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Environment2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Environment2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Environment2_CreateCoreWebView2Controller(This,parentWindow,handler) \ - ( (This)->lpVtbl -> CreateCoreWebView2Controller(This,parentWindow,handler) ) - -#define ICoreWebView2Environment2_CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) \ - ( (This)->lpVtbl -> CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) ) - -#define ICoreWebView2Environment2_get_BrowserVersionString(This,versionInfo) \ - ( (This)->lpVtbl -> get_BrowserVersionString(This,versionInfo) ) - -#define ICoreWebView2Environment2_add_NewBrowserVersionAvailable(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NewBrowserVersionAvailable(This,eventHandler,token) ) - -#define ICoreWebView2Environment2_remove_NewBrowserVersionAvailable(This,token) \ - ( (This)->lpVtbl -> remove_NewBrowserVersionAvailable(This,token) ) - - -#define ICoreWebView2Environment2_CreateWebResourceRequest(This,uri,method,postData,headers,request) \ - ( (This)->lpVtbl -> CreateWebResourceRequest(This,uri,method,postData,headers,request) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Environment2_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment3_INTERFACE_DEFINED__ -#define __ICoreWebView2Environment3_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Environment3 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Environment3 = {0x80a22ae3,0xbe7c,0x4ce2,{0xaf,0xe1,0x5a,0x50,0x05,0x6c,0xde,0xeb}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("80a22ae3-be7c-4ce2-afe1-5a50056cdeeb") - ICoreWebView2Environment3 : public ICoreWebView2Environment2 - { - public: - virtual HRESULT STDMETHODCALLTYPE CreateCoreWebView2CompositionController( - HWND parentWindow, - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler *handler) = 0; - - virtual HRESULT STDMETHODCALLTYPE CreateCoreWebView2PointerInfo( - /* [retval][out] */ ICoreWebView2PointerInfo **pointerInfo) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Environment3Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Environment3 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Environment3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Environment3 * This); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2Controller )( - ICoreWebView2Environment3 * This, - HWND parentWindow, - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CreateWebResourceResponse )( - ICoreWebView2Environment3 * This, - /* [in] */ IStream *content, - /* [in] */ int statusCode, - /* [in] */ LPCWSTR reasonPhrase, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceResponse **response); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BrowserVersionString )( - ICoreWebView2Environment3 * This, - /* [retval][out] */ LPWSTR *versionInfo); - - HRESULT ( STDMETHODCALLTYPE *add_NewBrowserVersionAvailable )( - ICoreWebView2Environment3 * This, - /* [in] */ ICoreWebView2NewBrowserVersionAvailableEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NewBrowserVersionAvailable )( - ICoreWebView2Environment3 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *CreateWebResourceRequest )( - ICoreWebView2Environment3 * This, - /* [in] */ LPCWSTR uri, - /* [in] */ LPCWSTR method, - /* [in] */ IStream *postData, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceRequest **request); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2CompositionController )( - ICoreWebView2Environment3 * This, - HWND parentWindow, - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2PointerInfo )( - ICoreWebView2Environment3 * This, - /* [retval][out] */ ICoreWebView2PointerInfo **pointerInfo); - - END_INTERFACE - } ICoreWebView2Environment3Vtbl; - - interface ICoreWebView2Environment3 - { - CONST_VTBL struct ICoreWebView2Environment3Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Environment3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Environment3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Environment3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Environment3_CreateCoreWebView2Controller(This,parentWindow,handler) \ - ( (This)->lpVtbl -> CreateCoreWebView2Controller(This,parentWindow,handler) ) - -#define ICoreWebView2Environment3_CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) \ - ( (This)->lpVtbl -> CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) ) - -#define ICoreWebView2Environment3_get_BrowserVersionString(This,versionInfo) \ - ( (This)->lpVtbl -> get_BrowserVersionString(This,versionInfo) ) - -#define ICoreWebView2Environment3_add_NewBrowserVersionAvailable(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NewBrowserVersionAvailable(This,eventHandler,token) ) - -#define ICoreWebView2Environment3_remove_NewBrowserVersionAvailable(This,token) \ - ( (This)->lpVtbl -> remove_NewBrowserVersionAvailable(This,token) ) - - -#define ICoreWebView2Environment3_CreateWebResourceRequest(This,uri,method,postData,headers,request) \ - ( (This)->lpVtbl -> CreateWebResourceRequest(This,uri,method,postData,headers,request) ) - - -#define ICoreWebView2Environment3_CreateCoreWebView2CompositionController(This,parentWindow,handler) \ - ( (This)->lpVtbl -> CreateCoreWebView2CompositionController(This,parentWindow,handler) ) - -#define ICoreWebView2Environment3_CreateCoreWebView2PointerInfo(This,pointerInfo) \ - ( (This)->lpVtbl -> CreateCoreWebView2PointerInfo(This,pointerInfo) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Environment3_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Environment4_INTERFACE_DEFINED__ -#define __ICoreWebView2Environment4_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Environment4 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Environment4 = {0x20944379,0x6dcf,0x41d6,{0xa0,0xa0,0xab,0xc0,0xfc,0x50,0xde,0x0d}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("20944379-6dcf-41d6-a0a0-abc0fc50de0d") - ICoreWebView2Environment4 : public ICoreWebView2Environment3 - { - public: - virtual HRESULT STDMETHODCALLTYPE GetProviderForHwnd( - /* [in] */ HWND hwnd, - /* [retval][out] */ IUnknown **provider) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Environment4Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Environment4 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Environment4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Environment4 * This); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2Controller )( - ICoreWebView2Environment4 * This, - HWND parentWindow, - ICoreWebView2CreateCoreWebView2ControllerCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CreateWebResourceResponse )( - ICoreWebView2Environment4 * This, - /* [in] */ IStream *content, - /* [in] */ int statusCode, - /* [in] */ LPCWSTR reasonPhrase, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceResponse **response); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BrowserVersionString )( - ICoreWebView2Environment4 * This, - /* [retval][out] */ LPWSTR *versionInfo); - - HRESULT ( STDMETHODCALLTYPE *add_NewBrowserVersionAvailable )( - ICoreWebView2Environment4 * This, - /* [in] */ ICoreWebView2NewBrowserVersionAvailableEventHandler *eventHandler, - /* [out] */ EventRegistrationToken *token); - - HRESULT ( STDMETHODCALLTYPE *remove_NewBrowserVersionAvailable )( - ICoreWebView2Environment4 * This, - /* [in] */ EventRegistrationToken token); - - HRESULT ( STDMETHODCALLTYPE *CreateWebResourceRequest )( - ICoreWebView2Environment4 * This, - /* [in] */ LPCWSTR uri, - /* [in] */ LPCWSTR method, - /* [in] */ IStream *postData, - /* [in] */ LPCWSTR headers, - /* [retval][out] */ ICoreWebView2WebResourceRequest **request); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2CompositionController )( - ICoreWebView2Environment4 * This, - HWND parentWindow, - ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler *handler); - - HRESULT ( STDMETHODCALLTYPE *CreateCoreWebView2PointerInfo )( - ICoreWebView2Environment4 * This, - /* [retval][out] */ ICoreWebView2PointerInfo **pointerInfo); - - HRESULT ( STDMETHODCALLTYPE *GetProviderForHwnd )( - ICoreWebView2Environment4 * This, - /* [in] */ HWND hwnd, - /* [retval][out] */ IUnknown **provider); - - END_INTERFACE - } ICoreWebView2Environment4Vtbl; - - interface ICoreWebView2Environment4 - { - CONST_VTBL struct ICoreWebView2Environment4Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Environment4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Environment4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Environment4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Environment4_CreateCoreWebView2Controller(This,parentWindow,handler) \ - ( (This)->lpVtbl -> CreateCoreWebView2Controller(This,parentWindow,handler) ) - -#define ICoreWebView2Environment4_CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) \ - ( (This)->lpVtbl -> CreateWebResourceResponse(This,content,statusCode,reasonPhrase,headers,response) ) - -#define ICoreWebView2Environment4_get_BrowserVersionString(This,versionInfo) \ - ( (This)->lpVtbl -> get_BrowserVersionString(This,versionInfo) ) - -#define ICoreWebView2Environment4_add_NewBrowserVersionAvailable(This,eventHandler,token) \ - ( (This)->lpVtbl -> add_NewBrowserVersionAvailable(This,eventHandler,token) ) - -#define ICoreWebView2Environment4_remove_NewBrowserVersionAvailable(This,token) \ - ( (This)->lpVtbl -> remove_NewBrowserVersionAvailable(This,token) ) - - -#define ICoreWebView2Environment4_CreateWebResourceRequest(This,uri,method,postData,headers,request) \ - ( (This)->lpVtbl -> CreateWebResourceRequest(This,uri,method,postData,headers,request) ) - - -#define ICoreWebView2Environment4_CreateCoreWebView2CompositionController(This,parentWindow,handler) \ - ( (This)->lpVtbl -> CreateCoreWebView2CompositionController(This,parentWindow,handler) ) - -#define ICoreWebView2Environment4_CreateCoreWebView2PointerInfo(This,pointerInfo) \ - ( (This)->lpVtbl -> CreateCoreWebView2PointerInfo(This,pointerInfo) ) - - -#define ICoreWebView2Environment4_GetProviderForHwnd(This,hwnd,provider) \ - ( (This)->lpVtbl -> GetProviderForHwnd(This,hwnd,provider) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Environment4_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2EnvironmentOptions_INTERFACE_DEFINED__ -#define __ICoreWebView2EnvironmentOptions_INTERFACE_DEFINED__ - -/* interface ICoreWebView2EnvironmentOptions */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2EnvironmentOptions = {0x2fde08a8,0x1e9a,0x4766,{0x8c,0x05,0x95,0xa9,0xce,0xb9,0xd1,0xc5}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("2fde08a8-1e9a-4766-8c05-95a9ceb9d1c5") - ICoreWebView2EnvironmentOptions : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AdditionalBrowserArguments( - /* [retval][out] */ LPWSTR *value) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AdditionalBrowserArguments( - /* [in] */ LPCWSTR value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Language( - /* [retval][out] */ LPWSTR *value) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Language( - /* [in] */ LPCWSTR value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TargetCompatibleBrowserVersion( - /* [retval][out] */ LPWSTR *value) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_TargetCompatibleBrowserVersion( - /* [in] */ LPCWSTR value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AllowSingleSignOnUsingOSPrimaryAccount( - /* [retval][out] */ BOOL *allow) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AllowSingleSignOnUsingOSPrimaryAccount( - /* [in] */ BOOL allow) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2EnvironmentOptionsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2EnvironmentOptions * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2EnvironmentOptions * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2EnvironmentOptions * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AdditionalBrowserArguments )( - ICoreWebView2EnvironmentOptions * This, - /* [retval][out] */ LPWSTR *value); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AdditionalBrowserArguments )( - ICoreWebView2EnvironmentOptions * This, - /* [in] */ LPCWSTR value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Language )( - ICoreWebView2EnvironmentOptions * This, - /* [retval][out] */ LPWSTR *value); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Language )( - ICoreWebView2EnvironmentOptions * This, - /* [in] */ LPCWSTR value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TargetCompatibleBrowserVersion )( - ICoreWebView2EnvironmentOptions * This, - /* [retval][out] */ LPWSTR *value); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_TargetCompatibleBrowserVersion )( - ICoreWebView2EnvironmentOptions * This, - /* [in] */ LPCWSTR value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AllowSingleSignOnUsingOSPrimaryAccount )( - ICoreWebView2EnvironmentOptions * This, - /* [retval][out] */ BOOL *allow); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AllowSingleSignOnUsingOSPrimaryAccount )( - ICoreWebView2EnvironmentOptions * This, - /* [in] */ BOOL allow); - - END_INTERFACE - } ICoreWebView2EnvironmentOptionsVtbl; - - interface ICoreWebView2EnvironmentOptions - { - CONST_VTBL struct ICoreWebView2EnvironmentOptionsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2EnvironmentOptions_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2EnvironmentOptions_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2EnvironmentOptions_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2EnvironmentOptions_get_AdditionalBrowserArguments(This,value) \ - ( (This)->lpVtbl -> get_AdditionalBrowserArguments(This,value) ) - -#define ICoreWebView2EnvironmentOptions_put_AdditionalBrowserArguments(This,value) \ - ( (This)->lpVtbl -> put_AdditionalBrowserArguments(This,value) ) - -#define ICoreWebView2EnvironmentOptions_get_Language(This,value) \ - ( (This)->lpVtbl -> get_Language(This,value) ) - -#define ICoreWebView2EnvironmentOptions_put_Language(This,value) \ - ( (This)->lpVtbl -> put_Language(This,value) ) - -#define ICoreWebView2EnvironmentOptions_get_TargetCompatibleBrowserVersion(This,value) \ - ( (This)->lpVtbl -> get_TargetCompatibleBrowserVersion(This,value) ) - -#define ICoreWebView2EnvironmentOptions_put_TargetCompatibleBrowserVersion(This,value) \ - ( (This)->lpVtbl -> put_TargetCompatibleBrowserVersion(This,value) ) - -#define ICoreWebView2EnvironmentOptions_get_AllowSingleSignOnUsingOSPrimaryAccount(This,allow) \ - ( (This)->lpVtbl -> get_AllowSingleSignOnUsingOSPrimaryAccount(This,allow) ) - -#define ICoreWebView2EnvironmentOptions_put_AllowSingleSignOnUsingOSPrimaryAccount(This,allow) \ - ( (This)->lpVtbl -> put_AllowSingleSignOnUsingOSPrimaryAccount(This,allow) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2EnvironmentOptions_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ExecuteScriptCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2ExecuteScriptCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ExecuteScriptCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ExecuteScriptCompletedHandler = {0x49511172,0xcc67,0x4bca,{0x99,0x23,0x13,0x71,0x12,0xf4,0xc4,0xcc}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("49511172-cc67-4bca-9923-137112f4c4cc") - ICoreWebView2ExecuteScriptCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ HRESULT errorCode, - /* [in] */ LPCWSTR resultObjectAsJson) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ExecuteScriptCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ExecuteScriptCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ExecuteScriptCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ExecuteScriptCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2ExecuteScriptCompletedHandler * This, - /* [in] */ HRESULT errorCode, - /* [in] */ LPCWSTR resultObjectAsJson); - - END_INTERFACE - } ICoreWebView2ExecuteScriptCompletedHandlerVtbl; - - interface ICoreWebView2ExecuteScriptCompletedHandler - { - CONST_VTBL struct ICoreWebView2ExecuteScriptCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ExecuteScriptCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ExecuteScriptCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ExecuteScriptCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ExecuteScriptCompletedHandler_Invoke(This,errorCode,resultObjectAsJson) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,resultObjectAsJson) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ExecuteScriptCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2FrameInfo_INTERFACE_DEFINED__ -#define __ICoreWebView2FrameInfo_INTERFACE_DEFINED__ - -/* interface ICoreWebView2FrameInfo */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2FrameInfo = {0xda86b8a1,0xbdf3,0x4f11,{0x99,0x55,0x52,0x8c,0xef,0xa5,0x97,0x27}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("da86b8a1-bdf3-4f11-9955-528cefa59727") - ICoreWebView2FrameInfo : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Name( - /* [retval][out] */ LPWSTR *name) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Source( - /* [retval][out] */ LPWSTR *source) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2FrameInfoVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2FrameInfo * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2FrameInfo * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2FrameInfo * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( - ICoreWebView2FrameInfo * This, - /* [retval][out] */ LPWSTR *name); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( - ICoreWebView2FrameInfo * This, - /* [retval][out] */ LPWSTR *source); - - END_INTERFACE - } ICoreWebView2FrameInfoVtbl; - - interface ICoreWebView2FrameInfo - { - CONST_VTBL struct ICoreWebView2FrameInfoVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2FrameInfo_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2FrameInfo_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2FrameInfo_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2FrameInfo_get_Name(This,name) \ - ( (This)->lpVtbl -> get_Name(This,name) ) - -#define ICoreWebView2FrameInfo_get_Source(This,source) \ - ( (This)->lpVtbl -> get_Source(This,source) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2FrameInfo_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2FrameInfoCollection_INTERFACE_DEFINED__ -#define __ICoreWebView2FrameInfoCollection_INTERFACE_DEFINED__ - -/* interface ICoreWebView2FrameInfoCollection */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2FrameInfoCollection = {0x8f834154,0xd38e,0x4d90,{0xaf,0xfb,0x68,0x00,0xa7,0x27,0x28,0x39}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("8f834154-d38e-4d90-affb-6800a7272839") - ICoreWebView2FrameInfoCollection : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetIterator( - /* [retval][out] */ ICoreWebView2FrameInfoCollectionIterator **iterator) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2FrameInfoCollectionVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2FrameInfoCollection * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2FrameInfoCollection * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2FrameInfoCollection * This); - - HRESULT ( STDMETHODCALLTYPE *GetIterator )( - ICoreWebView2FrameInfoCollection * This, - /* [retval][out] */ ICoreWebView2FrameInfoCollectionIterator **iterator); - - END_INTERFACE - } ICoreWebView2FrameInfoCollectionVtbl; - - interface ICoreWebView2FrameInfoCollection - { - CONST_VTBL struct ICoreWebView2FrameInfoCollectionVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2FrameInfoCollection_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2FrameInfoCollection_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2FrameInfoCollection_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2FrameInfoCollection_GetIterator(This,iterator) \ - ( (This)->lpVtbl -> GetIterator(This,iterator) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2FrameInfoCollection_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2FrameInfoCollectionIterator_INTERFACE_DEFINED__ -#define __ICoreWebView2FrameInfoCollectionIterator_INTERFACE_DEFINED__ - -/* interface ICoreWebView2FrameInfoCollectionIterator */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2FrameInfoCollectionIterator = {0x1bf89e2d,0x1b2b,0x4629,{0xb2,0x8f,0x05,0x09,0x9b,0x41,0xbb,0x03}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("1bf89e2d-1b2b-4629-b28f-05099b41bb03") - ICoreWebView2FrameInfoCollectionIterator : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HasCurrent( - /* [retval][out] */ BOOL *hasCurrent) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCurrent( - /* [retval][out] */ ICoreWebView2FrameInfo **frameInfo) = 0; - - virtual HRESULT STDMETHODCALLTYPE MoveNext( - /* [retval][out] */ BOOL *hasNext) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2FrameInfoCollectionIteratorVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2FrameInfoCollectionIterator * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2FrameInfoCollectionIterator * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2FrameInfoCollectionIterator * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HasCurrent )( - ICoreWebView2FrameInfoCollectionIterator * This, - /* [retval][out] */ BOOL *hasCurrent); - - HRESULT ( STDMETHODCALLTYPE *GetCurrent )( - ICoreWebView2FrameInfoCollectionIterator * This, - /* [retval][out] */ ICoreWebView2FrameInfo **frameInfo); - - HRESULT ( STDMETHODCALLTYPE *MoveNext )( - ICoreWebView2FrameInfoCollectionIterator * This, - /* [retval][out] */ BOOL *hasNext); - - END_INTERFACE - } ICoreWebView2FrameInfoCollectionIteratorVtbl; - - interface ICoreWebView2FrameInfoCollectionIterator - { - CONST_VTBL struct ICoreWebView2FrameInfoCollectionIteratorVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2FrameInfoCollectionIterator_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2FrameInfoCollectionIterator_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2FrameInfoCollectionIterator_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2FrameInfoCollectionIterator_get_HasCurrent(This,hasCurrent) \ - ( (This)->lpVtbl -> get_HasCurrent(This,hasCurrent) ) - -#define ICoreWebView2FrameInfoCollectionIterator_GetCurrent(This,frameInfo) \ - ( (This)->lpVtbl -> GetCurrent(This,frameInfo) ) - -#define ICoreWebView2FrameInfoCollectionIterator_MoveNext(This,hasNext) \ - ( (This)->lpVtbl -> MoveNext(This,hasNext) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2FrameInfoCollectionIterator_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2FocusChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2FocusChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2FocusChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2FocusChangedEventHandler = {0x05ea24bd,0x6452,0x4926,{0x90,0x14,0x4b,0x82,0xb4,0x98,0x13,0x5d}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("05ea24bd-6452-4926-9014-4b82b498135d") - ICoreWebView2FocusChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2FocusChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2FocusChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2FocusChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2FocusChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2FocusChangedEventHandler * This, - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2FocusChangedEventHandlerVtbl; - - interface ICoreWebView2FocusChangedEventHandler - { - CONST_VTBL struct ICoreWebView2FocusChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2FocusChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2FocusChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2FocusChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2FocusChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2FocusChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2GetCookiesCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2GetCookiesCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2GetCookiesCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2GetCookiesCompletedHandler = {0x5A4F5069,0x5C15,0x47C3,{0x86,0x46,0xF4,0xDE,0x1C,0x11,0x66,0x70}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("5A4F5069-5C15-47C3-8646-F4DE1C116670") - ICoreWebView2GetCookiesCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - HRESULT result, - ICoreWebView2CookieList *cookieList) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2GetCookiesCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2GetCookiesCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2GetCookiesCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2GetCookiesCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2GetCookiesCompletedHandler * This, - HRESULT result, - ICoreWebView2CookieList *cookieList); - - END_INTERFACE - } ICoreWebView2GetCookiesCompletedHandlerVtbl; - - interface ICoreWebView2GetCookiesCompletedHandler - { - CONST_VTBL struct ICoreWebView2GetCookiesCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2GetCookiesCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2GetCookiesCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2GetCookiesCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2GetCookiesCompletedHandler_Invoke(This,result,cookieList) \ - ( (This)->lpVtbl -> Invoke(This,result,cookieList) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2GetCookiesCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2HistoryChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2HistoryChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2HistoryChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2HistoryChangedEventHandler = {0xc79a420c,0xefd9,0x4058,{0x92,0x95,0x3e,0x8b,0x4b,0xca,0xb6,0x45}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("c79a420c-efd9-4058-9295-3e8b4bcab645") - ICoreWebView2HistoryChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2HistoryChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2HistoryChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2HistoryChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2HistoryChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2HistoryChangedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2HistoryChangedEventHandlerVtbl; - - interface ICoreWebView2HistoryChangedEventHandler - { - CONST_VTBL struct ICoreWebView2HistoryChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2HistoryChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2HistoryChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2HistoryChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2HistoryChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2HistoryChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2HttpHeadersCollectionIterator_INTERFACE_DEFINED__ -#define __ICoreWebView2HttpHeadersCollectionIterator_INTERFACE_DEFINED__ - -/* interface ICoreWebView2HttpHeadersCollectionIterator */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2HttpHeadersCollectionIterator = {0x0702fc30,0xf43b,0x47bb,{0xab,0x52,0xa4,0x2c,0xb5,0x52,0xad,0x9f}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("0702fc30-f43b-47bb-ab52-a42cb552ad9f") - ICoreWebView2HttpHeadersCollectionIterator : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetCurrentHeader( - /* [out] */ LPWSTR *name, - /* [out] */ LPWSTR *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HasCurrentHeader( - /* [retval][out] */ BOOL *hasCurrent) = 0; - - virtual HRESULT STDMETHODCALLTYPE MoveNext( - /* [retval][out] */ BOOL *hasNext) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2HttpHeadersCollectionIteratorVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2HttpHeadersCollectionIterator * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2HttpHeadersCollectionIterator * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2HttpHeadersCollectionIterator * This); - - HRESULT ( STDMETHODCALLTYPE *GetCurrentHeader )( - ICoreWebView2HttpHeadersCollectionIterator * This, - /* [out] */ LPWSTR *name, - /* [out] */ LPWSTR *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HasCurrentHeader )( - ICoreWebView2HttpHeadersCollectionIterator * This, - /* [retval][out] */ BOOL *hasCurrent); - - HRESULT ( STDMETHODCALLTYPE *MoveNext )( - ICoreWebView2HttpHeadersCollectionIterator * This, - /* [retval][out] */ BOOL *hasNext); - - END_INTERFACE - } ICoreWebView2HttpHeadersCollectionIteratorVtbl; - - interface ICoreWebView2HttpHeadersCollectionIterator - { - CONST_VTBL struct ICoreWebView2HttpHeadersCollectionIteratorVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2HttpHeadersCollectionIterator_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2HttpHeadersCollectionIterator_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2HttpHeadersCollectionIterator_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2HttpHeadersCollectionIterator_GetCurrentHeader(This,name,value) \ - ( (This)->lpVtbl -> GetCurrentHeader(This,name,value) ) - -#define ICoreWebView2HttpHeadersCollectionIterator_get_HasCurrentHeader(This,hasCurrent) \ - ( (This)->lpVtbl -> get_HasCurrentHeader(This,hasCurrent) ) - -#define ICoreWebView2HttpHeadersCollectionIterator_MoveNext(This,hasNext) \ - ( (This)->lpVtbl -> MoveNext(This,hasNext) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2HttpHeadersCollectionIterator_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2HttpRequestHeaders_INTERFACE_DEFINED__ -#define __ICoreWebView2HttpRequestHeaders_INTERFACE_DEFINED__ - -/* interface ICoreWebView2HttpRequestHeaders */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2HttpRequestHeaders = {0xe86cac0e,0x5523,0x465c,{0xb5,0x36,0x8f,0xb9,0xfc,0x8c,0x8c,0x60}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("e86cac0e-5523-465c-b536-8fb9fc8c8c60") - ICoreWebView2HttpRequestHeaders : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetHeader( - /* [in] */ LPCWSTR name, - /* [retval][out] */ LPWSTR *value) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHeaders( - /* [in] */ LPCWSTR name, - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator) = 0; - - virtual HRESULT STDMETHODCALLTYPE Contains( - /* [in] */ LPCWSTR name, - /* [retval][out] */ BOOL *contains) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetHeader( - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR value) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveHeader( - /* [in] */ LPCWSTR name) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetIterator( - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2HttpRequestHeadersVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2HttpRequestHeaders * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2HttpRequestHeaders * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2HttpRequestHeaders * This); - - HRESULT ( STDMETHODCALLTYPE *GetHeader )( - ICoreWebView2HttpRequestHeaders * This, - /* [in] */ LPCWSTR name, - /* [retval][out] */ LPWSTR *value); - - HRESULT ( STDMETHODCALLTYPE *GetHeaders )( - ICoreWebView2HttpRequestHeaders * This, - /* [in] */ LPCWSTR name, - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator); - - HRESULT ( STDMETHODCALLTYPE *Contains )( - ICoreWebView2HttpRequestHeaders * This, - /* [in] */ LPCWSTR name, - /* [retval][out] */ BOOL *contains); - - HRESULT ( STDMETHODCALLTYPE *SetHeader )( - ICoreWebView2HttpRequestHeaders * This, - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR value); - - HRESULT ( STDMETHODCALLTYPE *RemoveHeader )( - ICoreWebView2HttpRequestHeaders * This, - /* [in] */ LPCWSTR name); - - HRESULT ( STDMETHODCALLTYPE *GetIterator )( - ICoreWebView2HttpRequestHeaders * This, - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator); - - END_INTERFACE - } ICoreWebView2HttpRequestHeadersVtbl; - - interface ICoreWebView2HttpRequestHeaders - { - CONST_VTBL struct ICoreWebView2HttpRequestHeadersVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2HttpRequestHeaders_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2HttpRequestHeaders_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2HttpRequestHeaders_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2HttpRequestHeaders_GetHeader(This,name,value) \ - ( (This)->lpVtbl -> GetHeader(This,name,value) ) - -#define ICoreWebView2HttpRequestHeaders_GetHeaders(This,name,iterator) \ - ( (This)->lpVtbl -> GetHeaders(This,name,iterator) ) - -#define ICoreWebView2HttpRequestHeaders_Contains(This,name,contains) \ - ( (This)->lpVtbl -> Contains(This,name,contains) ) - -#define ICoreWebView2HttpRequestHeaders_SetHeader(This,name,value) \ - ( (This)->lpVtbl -> SetHeader(This,name,value) ) - -#define ICoreWebView2HttpRequestHeaders_RemoveHeader(This,name) \ - ( (This)->lpVtbl -> RemoveHeader(This,name) ) - -#define ICoreWebView2HttpRequestHeaders_GetIterator(This,iterator) \ - ( (This)->lpVtbl -> GetIterator(This,iterator) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2HttpRequestHeaders_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2HttpResponseHeaders_INTERFACE_DEFINED__ -#define __ICoreWebView2HttpResponseHeaders_INTERFACE_DEFINED__ - -/* interface ICoreWebView2HttpResponseHeaders */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2HttpResponseHeaders = {0x03c5ff5a,0x9b45,0x4a88,{0x88,0x1c,0x89,0xa9,0xf3,0x28,0x61,0x9c}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("03c5ff5a-9b45-4a88-881c-89a9f328619c") - ICoreWebView2HttpResponseHeaders : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE AppendHeader( - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR value) = 0; - - virtual HRESULT STDMETHODCALLTYPE Contains( - /* [in] */ LPCWSTR name, - /* [retval][out] */ BOOL *contains) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHeader( - /* [in] */ LPCWSTR name, - /* [retval][out] */ LPWSTR *value) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHeaders( - /* [in] */ LPCWSTR name, - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetIterator( - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2HttpResponseHeadersVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2HttpResponseHeaders * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2HttpResponseHeaders * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2HttpResponseHeaders * This); - - HRESULT ( STDMETHODCALLTYPE *AppendHeader )( - ICoreWebView2HttpResponseHeaders * This, - /* [in] */ LPCWSTR name, - /* [in] */ LPCWSTR value); - - HRESULT ( STDMETHODCALLTYPE *Contains )( - ICoreWebView2HttpResponseHeaders * This, - /* [in] */ LPCWSTR name, - /* [retval][out] */ BOOL *contains); - - HRESULT ( STDMETHODCALLTYPE *GetHeader )( - ICoreWebView2HttpResponseHeaders * This, - /* [in] */ LPCWSTR name, - /* [retval][out] */ LPWSTR *value); - - HRESULT ( STDMETHODCALLTYPE *GetHeaders )( - ICoreWebView2HttpResponseHeaders * This, - /* [in] */ LPCWSTR name, - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator); - - HRESULT ( STDMETHODCALLTYPE *GetIterator )( - ICoreWebView2HttpResponseHeaders * This, - /* [retval][out] */ ICoreWebView2HttpHeadersCollectionIterator **iterator); - - END_INTERFACE - } ICoreWebView2HttpResponseHeadersVtbl; - - interface ICoreWebView2HttpResponseHeaders - { - CONST_VTBL struct ICoreWebView2HttpResponseHeadersVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2HttpResponseHeaders_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2HttpResponseHeaders_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2HttpResponseHeaders_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2HttpResponseHeaders_AppendHeader(This,name,value) \ - ( (This)->lpVtbl -> AppendHeader(This,name,value) ) - -#define ICoreWebView2HttpResponseHeaders_Contains(This,name,contains) \ - ( (This)->lpVtbl -> Contains(This,name,contains) ) - -#define ICoreWebView2HttpResponseHeaders_GetHeader(This,name,value) \ - ( (This)->lpVtbl -> GetHeader(This,name,value) ) - -#define ICoreWebView2HttpResponseHeaders_GetHeaders(This,name,iterator) \ - ( (This)->lpVtbl -> GetHeaders(This,name,iterator) ) - -#define ICoreWebView2HttpResponseHeaders_GetIterator(This,iterator) \ - ( (This)->lpVtbl -> GetIterator(This,iterator) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2HttpResponseHeaders_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Interop_INTERFACE_DEFINED__ -#define __ICoreWebView2Interop_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Interop */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Interop = {0x912b34a7,0xd10b,0x49c4,{0xaf,0x18,0x7c,0xb7,0xe6,0x04,0xe0,0x1a}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("912b34a7-d10b-49c4-af18-7cb7e604e01a") - ICoreWebView2Interop : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE AddHostObjectToScript( - /* [in] */ LPCWSTR name, - /* [in] */ VARIANT *object) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2InteropVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Interop * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Interop * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Interop * This); - - HRESULT ( STDMETHODCALLTYPE *AddHostObjectToScript )( - ICoreWebView2Interop * This, - /* [in] */ LPCWSTR name, - /* [in] */ VARIANT *object); - - END_INTERFACE - } ICoreWebView2InteropVtbl; - - interface ICoreWebView2Interop - { - CONST_VTBL struct ICoreWebView2InteropVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Interop_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Interop_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Interop_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Interop_AddHostObjectToScript(This,name,object) \ - ( (This)->lpVtbl -> AddHostObjectToScript(This,name,object) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Interop_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2MoveFocusRequestedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2MoveFocusRequestedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2MoveFocusRequestedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2MoveFocusRequestedEventArgs = {0x2d6aa13b,0x3839,0x4a15,{0x92,0xfc,0xd8,0x8b,0x3c,0x0d,0x9c,0x9d}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("2d6aa13b-3839-4a15-92fc-d88b3c0d9c9d") - ICoreWebView2MoveFocusRequestedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Reason( - /* [retval][out] */ COREWEBVIEW2_MOVE_FOCUS_REASON *reason) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Handled( - /* [retval][out] */ BOOL *value) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Handled( - /* [in] */ BOOL value) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2MoveFocusRequestedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2MoveFocusRequestedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2MoveFocusRequestedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2MoveFocusRequestedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Reason )( - ICoreWebView2MoveFocusRequestedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_MOVE_FOCUS_REASON *reason); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Handled )( - ICoreWebView2MoveFocusRequestedEventArgs * This, - /* [retval][out] */ BOOL *value); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Handled )( - ICoreWebView2MoveFocusRequestedEventArgs * This, - /* [in] */ BOOL value); - - END_INTERFACE - } ICoreWebView2MoveFocusRequestedEventArgsVtbl; - - interface ICoreWebView2MoveFocusRequestedEventArgs - { - CONST_VTBL struct ICoreWebView2MoveFocusRequestedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2MoveFocusRequestedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2MoveFocusRequestedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2MoveFocusRequestedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2MoveFocusRequestedEventArgs_get_Reason(This,reason) \ - ( (This)->lpVtbl -> get_Reason(This,reason) ) - -#define ICoreWebView2MoveFocusRequestedEventArgs_get_Handled(This,value) \ - ( (This)->lpVtbl -> get_Handled(This,value) ) - -#define ICoreWebView2MoveFocusRequestedEventArgs_put_Handled(This,value) \ - ( (This)->lpVtbl -> put_Handled(This,value) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2MoveFocusRequestedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2MoveFocusRequestedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2MoveFocusRequestedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2MoveFocusRequestedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2MoveFocusRequestedEventHandler = {0x69035451,0x6dc7,0x4cb8,{0x9b,0xce,0xb2,0xbd,0x70,0xad,0x28,0x9f}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("69035451-6dc7-4cb8-9bce-b2bd70ad289f") - ICoreWebView2MoveFocusRequestedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ ICoreWebView2MoveFocusRequestedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2MoveFocusRequestedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2MoveFocusRequestedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2MoveFocusRequestedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2MoveFocusRequestedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2MoveFocusRequestedEventHandler * This, - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ ICoreWebView2MoveFocusRequestedEventArgs *args); - - END_INTERFACE - } ICoreWebView2MoveFocusRequestedEventHandlerVtbl; - - interface ICoreWebView2MoveFocusRequestedEventHandler - { - CONST_VTBL struct ICoreWebView2MoveFocusRequestedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2MoveFocusRequestedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2MoveFocusRequestedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2MoveFocusRequestedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2MoveFocusRequestedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2MoveFocusRequestedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationCompletedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2NavigationCompletedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2NavigationCompletedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2NavigationCompletedEventArgs = {0x30d68b7d,0x20d9,0x4752,{0xa9,0xca,0xec,0x84,0x48,0xfb,0xb5,0xc1}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("30d68b7d-20d9-4752-a9ca-ec8448fbb5c1") - ICoreWebView2NavigationCompletedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsSuccess( - /* [retval][out] */ BOOL *isSuccess) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_WebErrorStatus( - /* [retval][out] */ COREWEBVIEW2_WEB_ERROR_STATUS *webErrorStatus) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_NavigationId( - /* [retval][out] */ UINT64 *navigationId) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2NavigationCompletedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2NavigationCompletedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2NavigationCompletedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2NavigationCompletedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsSuccess )( - ICoreWebView2NavigationCompletedEventArgs * This, - /* [retval][out] */ BOOL *isSuccess); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_WebErrorStatus )( - ICoreWebView2NavigationCompletedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_WEB_ERROR_STATUS *webErrorStatus); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_NavigationId )( - ICoreWebView2NavigationCompletedEventArgs * This, - /* [retval][out] */ UINT64 *navigationId); - - END_INTERFACE - } ICoreWebView2NavigationCompletedEventArgsVtbl; - - interface ICoreWebView2NavigationCompletedEventArgs - { - CONST_VTBL struct ICoreWebView2NavigationCompletedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2NavigationCompletedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2NavigationCompletedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2NavigationCompletedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2NavigationCompletedEventArgs_get_IsSuccess(This,isSuccess) \ - ( (This)->lpVtbl -> get_IsSuccess(This,isSuccess) ) - -#define ICoreWebView2NavigationCompletedEventArgs_get_WebErrorStatus(This,webErrorStatus) \ - ( (This)->lpVtbl -> get_WebErrorStatus(This,webErrorStatus) ) - -#define ICoreWebView2NavigationCompletedEventArgs_get_NavigationId(This,navigationId) \ - ( (This)->lpVtbl -> get_NavigationId(This,navigationId) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2NavigationCompletedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationCompletedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2NavigationCompletedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2NavigationCompletedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2NavigationCompletedEventHandler = {0xd33a35bf,0x1c49,0x4f98,{0x93,0xab,0x00,0x6e,0x05,0x33,0xfe,0x1c}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("d33a35bf-1c49-4f98-93ab-006e0533fe1c") - ICoreWebView2NavigationCompletedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2NavigationCompletedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2NavigationCompletedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2NavigationCompletedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2NavigationCompletedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2NavigationCompletedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2NavigationCompletedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2NavigationCompletedEventArgs *args); - - END_INTERFACE - } ICoreWebView2NavigationCompletedEventHandlerVtbl; - - interface ICoreWebView2NavigationCompletedEventHandler - { - CONST_VTBL struct ICoreWebView2NavigationCompletedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2NavigationCompletedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2NavigationCompletedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2NavigationCompletedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2NavigationCompletedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2NavigationCompletedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationStartingEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2NavigationStartingEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2NavigationStartingEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2NavigationStartingEventArgs = {0x5b495469,0xe119,0x438a,{0x9b,0x18,0x76,0x04,0xf2,0x5f,0x2e,0x49}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("5b495469-e119-438a-9b18-7604f25f2e49") - ICoreWebView2NavigationStartingEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Uri( - /* [retval][out] */ LPWSTR *uri) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsUserInitiated( - /* [retval][out] */ BOOL *isUserInitiated) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsRedirected( - /* [retval][out] */ BOOL *isRedirected) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RequestHeaders( - /* [retval][out] */ ICoreWebView2HttpRequestHeaders **requestHeaders) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Cancel( - /* [retval][out] */ BOOL *cancel) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Cancel( - /* [in] */ BOOL cancel) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_NavigationId( - /* [retval][out] */ UINT64 *navigationId) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2NavigationStartingEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2NavigationStartingEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2NavigationStartingEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Uri )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [retval][out] */ LPWSTR *uri); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsUserInitiated )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [retval][out] */ BOOL *isUserInitiated); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsRedirected )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [retval][out] */ BOOL *isRedirected); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RequestHeaders )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [retval][out] */ ICoreWebView2HttpRequestHeaders **requestHeaders); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cancel )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [retval][out] */ BOOL *cancel); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Cancel )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [in] */ BOOL cancel); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_NavigationId )( - ICoreWebView2NavigationStartingEventArgs * This, - /* [retval][out] */ UINT64 *navigationId); - - END_INTERFACE - } ICoreWebView2NavigationStartingEventArgsVtbl; - - interface ICoreWebView2NavigationStartingEventArgs - { - CONST_VTBL struct ICoreWebView2NavigationStartingEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2NavigationStartingEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2NavigationStartingEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2NavigationStartingEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2NavigationStartingEventArgs_get_Uri(This,uri) \ - ( (This)->lpVtbl -> get_Uri(This,uri) ) - -#define ICoreWebView2NavigationStartingEventArgs_get_IsUserInitiated(This,isUserInitiated) \ - ( (This)->lpVtbl -> get_IsUserInitiated(This,isUserInitiated) ) - -#define ICoreWebView2NavigationStartingEventArgs_get_IsRedirected(This,isRedirected) \ - ( (This)->lpVtbl -> get_IsRedirected(This,isRedirected) ) - -#define ICoreWebView2NavigationStartingEventArgs_get_RequestHeaders(This,requestHeaders) \ - ( (This)->lpVtbl -> get_RequestHeaders(This,requestHeaders) ) - -#define ICoreWebView2NavigationStartingEventArgs_get_Cancel(This,cancel) \ - ( (This)->lpVtbl -> get_Cancel(This,cancel) ) - -#define ICoreWebView2NavigationStartingEventArgs_put_Cancel(This,cancel) \ - ( (This)->lpVtbl -> put_Cancel(This,cancel) ) - -#define ICoreWebView2NavigationStartingEventArgs_get_NavigationId(This,navigationId) \ - ( (This)->lpVtbl -> get_NavigationId(This,navigationId) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2NavigationStartingEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2NavigationStartingEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2NavigationStartingEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2NavigationStartingEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2NavigationStartingEventHandler = {0x9adbe429,0xf36d,0x432b,{0x9d,0xdc,0xf8,0x88,0x1f,0xbd,0x76,0xe3}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("9adbe429-f36d-432b-9ddc-f8881fbd76e3") - ICoreWebView2NavigationStartingEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2NavigationStartingEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2NavigationStartingEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2NavigationStartingEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2NavigationStartingEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2NavigationStartingEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2NavigationStartingEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2NavigationStartingEventArgs *args); - - END_INTERFACE - } ICoreWebView2NavigationStartingEventHandlerVtbl; - - interface ICoreWebView2NavigationStartingEventHandler - { - CONST_VTBL struct ICoreWebView2NavigationStartingEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2NavigationStartingEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2NavigationStartingEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2NavigationStartingEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2NavigationStartingEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2NavigationStartingEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2NewBrowserVersionAvailableEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2NewBrowserVersionAvailableEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2NewBrowserVersionAvailableEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2NewBrowserVersionAvailableEventHandler = {0xf9a2976e,0xd34e,0x44fc,{0xad,0xee,0x81,0xb6,0xb5,0x7c,0xa9,0x14}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("f9a2976e-d34e-44fc-adee-81b6b57ca914") - ICoreWebView2NewBrowserVersionAvailableEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2Environment *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2NewBrowserVersionAvailableEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2NewBrowserVersionAvailableEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2NewBrowserVersionAvailableEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2NewBrowserVersionAvailableEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2NewBrowserVersionAvailableEventHandler * This, - /* [in] */ ICoreWebView2Environment *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2NewBrowserVersionAvailableEventHandlerVtbl; - - interface ICoreWebView2NewBrowserVersionAvailableEventHandler - { - CONST_VTBL struct ICoreWebView2NewBrowserVersionAvailableEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2NewBrowserVersionAvailableEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2NewBrowserVersionAvailableEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2NewBrowserVersionAvailableEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2NewBrowserVersionAvailableEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2NewBrowserVersionAvailableEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2NewWindowRequestedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2NewWindowRequestedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2NewWindowRequestedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2NewWindowRequestedEventArgs = {0x34acb11c,0xfc37,0x4418,{0x91,0x32,0xf9,0xc2,0x1d,0x1e,0xaf,0xb9}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("34acb11c-fc37-4418-9132-f9c21d1eafb9") - ICoreWebView2NewWindowRequestedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Uri( - /* [retval][out] */ LPWSTR *uri) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_NewWindow( - /* [in] */ ICoreWebView2 *newWindow) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_NewWindow( - /* [retval][out] */ ICoreWebView2 **newWindow) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Handled( - /* [in] */ BOOL handled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Handled( - /* [retval][out] */ BOOL *handled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsUserInitiated( - /* [retval][out] */ BOOL *isUserInitiated) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDeferral( - /* [retval][out] */ ICoreWebView2Deferral **deferral) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_WindowFeatures( - /* [retval][out] */ ICoreWebView2WindowFeatures **value) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2NewWindowRequestedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2NewWindowRequestedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2NewWindowRequestedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Uri )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [retval][out] */ LPWSTR *uri); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_NewWindow )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [in] */ ICoreWebView2 *newWindow); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_NewWindow )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [retval][out] */ ICoreWebView2 **newWindow); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Handled )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [in] */ BOOL handled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Handled )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [retval][out] */ BOOL *handled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsUserInitiated )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [retval][out] */ BOOL *isUserInitiated); - - HRESULT ( STDMETHODCALLTYPE *GetDeferral )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [retval][out] */ ICoreWebView2Deferral **deferral); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_WindowFeatures )( - ICoreWebView2NewWindowRequestedEventArgs * This, - /* [retval][out] */ ICoreWebView2WindowFeatures **value); - - END_INTERFACE - } ICoreWebView2NewWindowRequestedEventArgsVtbl; - - interface ICoreWebView2NewWindowRequestedEventArgs - { - CONST_VTBL struct ICoreWebView2NewWindowRequestedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2NewWindowRequestedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2NewWindowRequestedEventArgs_get_Uri(This,uri) \ - ( (This)->lpVtbl -> get_Uri(This,uri) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_put_NewWindow(This,newWindow) \ - ( (This)->lpVtbl -> put_NewWindow(This,newWindow) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_get_NewWindow(This,newWindow) \ - ( (This)->lpVtbl -> get_NewWindow(This,newWindow) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_put_Handled(This,handled) \ - ( (This)->lpVtbl -> put_Handled(This,handled) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_get_Handled(This,handled) \ - ( (This)->lpVtbl -> get_Handled(This,handled) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_get_IsUserInitiated(This,isUserInitiated) \ - ( (This)->lpVtbl -> get_IsUserInitiated(This,isUserInitiated) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_GetDeferral(This,deferral) \ - ( (This)->lpVtbl -> GetDeferral(This,deferral) ) - -#define ICoreWebView2NewWindowRequestedEventArgs_get_WindowFeatures(This,value) \ - ( (This)->lpVtbl -> get_WindowFeatures(This,value) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2NewWindowRequestedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2NewWindowRequestedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2NewWindowRequestedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2NewWindowRequestedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2NewWindowRequestedEventHandler = {0xd4c185fe,0xc81c,0x4989,{0x97,0xaf,0x2d,0x3f,0xa7,0xab,0x56,0x51}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("d4c185fe-c81c-4989-97af-2d3fa7ab5651") - ICoreWebView2NewWindowRequestedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2NewWindowRequestedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2NewWindowRequestedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2NewWindowRequestedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2NewWindowRequestedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2NewWindowRequestedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2NewWindowRequestedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2NewWindowRequestedEventArgs *args); - - END_INTERFACE - } ICoreWebView2NewWindowRequestedEventHandlerVtbl; - - interface ICoreWebView2NewWindowRequestedEventHandler - { - CONST_VTBL struct ICoreWebView2NewWindowRequestedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2NewWindowRequestedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2NewWindowRequestedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2NewWindowRequestedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2NewWindowRequestedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2NewWindowRequestedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2PermissionRequestedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2PermissionRequestedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2PermissionRequestedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2PermissionRequestedEventArgs = {0x973ae2ef,0xff18,0x4894,{0x8f,0xb2,0x3c,0x75,0x8f,0x04,0x68,0x10}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("973ae2ef-ff18-4894-8fb2-3c758f046810") - ICoreWebView2PermissionRequestedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Uri( - /* [retval][out] */ LPWSTR *uri) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PermissionKind( - /* [retval][out] */ COREWEBVIEW2_PERMISSION_KIND *permissionKind) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsUserInitiated( - /* [retval][out] */ BOOL *isUserInitiated) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_State( - /* [retval][out] */ COREWEBVIEW2_PERMISSION_STATE *state) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_State( - /* [in] */ COREWEBVIEW2_PERMISSION_STATE state) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDeferral( - /* [retval][out] */ ICoreWebView2Deferral **deferral) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2PermissionRequestedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2PermissionRequestedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2PermissionRequestedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2PermissionRequestedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Uri )( - ICoreWebView2PermissionRequestedEventArgs * This, - /* [retval][out] */ LPWSTR *uri); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PermissionKind )( - ICoreWebView2PermissionRequestedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_PERMISSION_KIND *permissionKind); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsUserInitiated )( - ICoreWebView2PermissionRequestedEventArgs * This, - /* [retval][out] */ BOOL *isUserInitiated); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( - ICoreWebView2PermissionRequestedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_PERMISSION_STATE *state); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_State )( - ICoreWebView2PermissionRequestedEventArgs * This, - /* [in] */ COREWEBVIEW2_PERMISSION_STATE state); - - HRESULT ( STDMETHODCALLTYPE *GetDeferral )( - ICoreWebView2PermissionRequestedEventArgs * This, - /* [retval][out] */ ICoreWebView2Deferral **deferral); - - END_INTERFACE - } ICoreWebView2PermissionRequestedEventArgsVtbl; - - interface ICoreWebView2PermissionRequestedEventArgs - { - CONST_VTBL struct ICoreWebView2PermissionRequestedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2PermissionRequestedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2PermissionRequestedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2PermissionRequestedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2PermissionRequestedEventArgs_get_Uri(This,uri) \ - ( (This)->lpVtbl -> get_Uri(This,uri) ) - -#define ICoreWebView2PermissionRequestedEventArgs_get_PermissionKind(This,permissionKind) \ - ( (This)->lpVtbl -> get_PermissionKind(This,permissionKind) ) - -#define ICoreWebView2PermissionRequestedEventArgs_get_IsUserInitiated(This,isUserInitiated) \ - ( (This)->lpVtbl -> get_IsUserInitiated(This,isUserInitiated) ) - -#define ICoreWebView2PermissionRequestedEventArgs_get_State(This,state) \ - ( (This)->lpVtbl -> get_State(This,state) ) - -#define ICoreWebView2PermissionRequestedEventArgs_put_State(This,state) \ - ( (This)->lpVtbl -> put_State(This,state) ) - -#define ICoreWebView2PermissionRequestedEventArgs_GetDeferral(This,deferral) \ - ( (This)->lpVtbl -> GetDeferral(This,deferral) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2PermissionRequestedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2PermissionRequestedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2PermissionRequestedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2PermissionRequestedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2PermissionRequestedEventHandler = {0x15e1c6a3,0xc72a,0x4df3,{0x91,0xd7,0xd0,0x97,0xfb,0xec,0x6b,0xfd}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("15e1c6a3-c72a-4df3-91d7-d097fbec6bfd") - ICoreWebView2PermissionRequestedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2PermissionRequestedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2PermissionRequestedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2PermissionRequestedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2PermissionRequestedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2PermissionRequestedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2PermissionRequestedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2PermissionRequestedEventArgs *args); - - END_INTERFACE - } ICoreWebView2PermissionRequestedEventHandlerVtbl; - - interface ICoreWebView2PermissionRequestedEventHandler - { - CONST_VTBL struct ICoreWebView2PermissionRequestedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2PermissionRequestedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2PermissionRequestedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2PermissionRequestedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2PermissionRequestedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2PermissionRequestedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2PointerInfo_INTERFACE_DEFINED__ -#define __ICoreWebView2PointerInfo_INTERFACE_DEFINED__ - -/* interface ICoreWebView2PointerInfo */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2PointerInfo = {0xe6995887,0xd10d,0x4f5d,{0x93,0x59,0x4c,0xe4,0x6e,0x4f,0x96,0xb9}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("e6995887-d10d-4f5d-9359-4ce46e4f96b9") - ICoreWebView2PointerInfo : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PointerKind( - /* [retval][out] */ DWORD *pointerKind) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PointerKind( - /* [in] */ DWORD pointerKind) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PointerId( - /* [retval][out] */ UINT32 *pointerId) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PointerId( - /* [in] */ UINT32 pointerId) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_FrameId( - /* [retval][out] */ UINT32 *frameId) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_FrameId( - /* [in] */ UINT32 frameId) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PointerFlags( - /* [retval][out] */ UINT32 *pointerFlags) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PointerFlags( - /* [in] */ UINT32 pointerFlags) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PointerDeviceRect( - /* [retval][out] */ RECT *pointerDeviceRect) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PointerDeviceRect( - /* [in] */ RECT pointerDeviceRect) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DisplayRect( - /* [retval][out] */ RECT *displayRect) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_DisplayRect( - /* [in] */ RECT displayRect) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PixelLocation( - /* [retval][out] */ POINT *pixelLocation) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PixelLocation( - /* [in] */ POINT pixelLocation) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HimetricLocation( - /* [retval][out] */ POINT *himetricLocation) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_HimetricLocation( - /* [in] */ POINT himetricLocation) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PixelLocationRaw( - /* [retval][out] */ POINT *pixelLocationRaw) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PixelLocationRaw( - /* [in] */ POINT pixelLocationRaw) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HimetricLocationRaw( - /* [retval][out] */ POINT *himetricLocationRaw) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_HimetricLocationRaw( - /* [in] */ POINT himetricLocationRaw) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Time( - /* [retval][out] */ DWORD *time) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Time( - /* [in] */ DWORD time) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HistoryCount( - /* [retval][out] */ UINT32 *historyCount) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_HistoryCount( - /* [in] */ UINT32 historyCount) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_InputData( - /* [retval][out] */ INT32 *inputData) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_InputData( - /* [in] */ INT32 inputData) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_KeyStates( - /* [retval][out] */ DWORD *keyStates) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_KeyStates( - /* [in] */ DWORD keyStates) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PerformanceCount( - /* [retval][out] */ UINT64 *performanceCount) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PerformanceCount( - /* [in] */ UINT64 performanceCount) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ButtonChangeKind( - /* [retval][out] */ INT32 *buttonChangeKind) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ButtonChangeKind( - /* [in] */ INT32 buttonChangeKind) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PenFlags( - /* [retval][out] */ UINT32 *penFLags) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PenFlags( - /* [in] */ UINT32 penFLags) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PenMask( - /* [retval][out] */ UINT32 *penMask) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PenMask( - /* [in] */ UINT32 penMask) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PenPressure( - /* [retval][out] */ UINT32 *penPressure) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PenPressure( - /* [in] */ UINT32 penPressure) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PenRotation( - /* [retval][out] */ UINT32 *penRotation) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PenRotation( - /* [in] */ UINT32 penRotation) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PenTiltX( - /* [retval][out] */ INT32 *penTiltX) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PenTiltX( - /* [in] */ INT32 penTiltX) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PenTiltY( - /* [retval][out] */ INT32 *penTiltY) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PenTiltY( - /* [in] */ INT32 penTiltY) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TouchFlags( - /* [retval][out] */ UINT32 *touchFlags) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_TouchFlags( - /* [in] */ UINT32 touchFlags) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TouchMask( - /* [retval][out] */ UINT32 *touchMask) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_TouchMask( - /* [in] */ UINT32 touchMask) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TouchContact( - /* [retval][out] */ RECT *touchContact) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_TouchContact( - /* [in] */ RECT touchContact) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TouchContactRaw( - /* [retval][out] */ RECT *touchContactRaw) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_TouchContactRaw( - /* [in] */ RECT touchContactRaw) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TouchOrientation( - /* [retval][out] */ UINT32 *touchOrientation) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_TouchOrientation( - /* [in] */ UINT32 touchOrientation) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_TouchPressure( - /* [retval][out] */ UINT32 *touchPressure) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_TouchPressure( - /* [in] */ UINT32 touchPressure) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2PointerInfoVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2PointerInfo * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2PointerInfo * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2PointerInfo * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PointerKind )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ DWORD *pointerKind); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PointerKind )( - ICoreWebView2PointerInfo * This, - /* [in] */ DWORD pointerKind); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PointerId )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *pointerId); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PointerId )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 pointerId); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrameId )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *frameId); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_FrameId )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 frameId); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PointerFlags )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *pointerFlags); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PointerFlags )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 pointerFlags); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PointerDeviceRect )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ RECT *pointerDeviceRect); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PointerDeviceRect )( - ICoreWebView2PointerInfo * This, - /* [in] */ RECT pointerDeviceRect); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DisplayRect )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ RECT *displayRect); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DisplayRect )( - ICoreWebView2PointerInfo * This, - /* [in] */ RECT displayRect); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PixelLocation )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ POINT *pixelLocation); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PixelLocation )( - ICoreWebView2PointerInfo * This, - /* [in] */ POINT pixelLocation); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HimetricLocation )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ POINT *himetricLocation); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_HimetricLocation )( - ICoreWebView2PointerInfo * This, - /* [in] */ POINT himetricLocation); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PixelLocationRaw )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ POINT *pixelLocationRaw); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PixelLocationRaw )( - ICoreWebView2PointerInfo * This, - /* [in] */ POINT pixelLocationRaw); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HimetricLocationRaw )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ POINT *himetricLocationRaw); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_HimetricLocationRaw )( - ICoreWebView2PointerInfo * This, - /* [in] */ POINT himetricLocationRaw); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Time )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ DWORD *time); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Time )( - ICoreWebView2PointerInfo * This, - /* [in] */ DWORD time); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HistoryCount )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *historyCount); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_HistoryCount )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 historyCount); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_InputData )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ INT32 *inputData); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_InputData )( - ICoreWebView2PointerInfo * This, - /* [in] */ INT32 inputData); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_KeyStates )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ DWORD *keyStates); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_KeyStates )( - ICoreWebView2PointerInfo * This, - /* [in] */ DWORD keyStates); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PerformanceCount )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT64 *performanceCount); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PerformanceCount )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT64 performanceCount); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ButtonChangeKind )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ INT32 *buttonChangeKind); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ButtonChangeKind )( - ICoreWebView2PointerInfo * This, - /* [in] */ INT32 buttonChangeKind); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PenFlags )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *penFLags); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PenFlags )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 penFLags); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PenMask )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *penMask); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PenMask )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 penMask); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PenPressure )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *penPressure); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PenPressure )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 penPressure); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PenRotation )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *penRotation); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PenRotation )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 penRotation); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PenTiltX )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ INT32 *penTiltX); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PenTiltX )( - ICoreWebView2PointerInfo * This, - /* [in] */ INT32 penTiltX); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PenTiltY )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ INT32 *penTiltY); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PenTiltY )( - ICoreWebView2PointerInfo * This, - /* [in] */ INT32 penTiltY); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TouchFlags )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *touchFlags); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_TouchFlags )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 touchFlags); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TouchMask )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *touchMask); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_TouchMask )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 touchMask); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TouchContact )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ RECT *touchContact); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_TouchContact )( - ICoreWebView2PointerInfo * This, - /* [in] */ RECT touchContact); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TouchContactRaw )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ RECT *touchContactRaw); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_TouchContactRaw )( - ICoreWebView2PointerInfo * This, - /* [in] */ RECT touchContactRaw); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TouchOrientation )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *touchOrientation); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_TouchOrientation )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 touchOrientation); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_TouchPressure )( - ICoreWebView2PointerInfo * This, - /* [retval][out] */ UINT32 *touchPressure); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_TouchPressure )( - ICoreWebView2PointerInfo * This, - /* [in] */ UINT32 touchPressure); - - END_INTERFACE - } ICoreWebView2PointerInfoVtbl; - - interface ICoreWebView2PointerInfo - { - CONST_VTBL struct ICoreWebView2PointerInfoVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2PointerInfo_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2PointerInfo_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2PointerInfo_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2PointerInfo_get_PointerKind(This,pointerKind) \ - ( (This)->lpVtbl -> get_PointerKind(This,pointerKind) ) - -#define ICoreWebView2PointerInfo_put_PointerKind(This,pointerKind) \ - ( (This)->lpVtbl -> put_PointerKind(This,pointerKind) ) - -#define ICoreWebView2PointerInfo_get_PointerId(This,pointerId) \ - ( (This)->lpVtbl -> get_PointerId(This,pointerId) ) - -#define ICoreWebView2PointerInfo_put_PointerId(This,pointerId) \ - ( (This)->lpVtbl -> put_PointerId(This,pointerId) ) - -#define ICoreWebView2PointerInfo_get_FrameId(This,frameId) \ - ( (This)->lpVtbl -> get_FrameId(This,frameId) ) - -#define ICoreWebView2PointerInfo_put_FrameId(This,frameId) \ - ( (This)->lpVtbl -> put_FrameId(This,frameId) ) - -#define ICoreWebView2PointerInfo_get_PointerFlags(This,pointerFlags) \ - ( (This)->lpVtbl -> get_PointerFlags(This,pointerFlags) ) - -#define ICoreWebView2PointerInfo_put_PointerFlags(This,pointerFlags) \ - ( (This)->lpVtbl -> put_PointerFlags(This,pointerFlags) ) - -#define ICoreWebView2PointerInfo_get_PointerDeviceRect(This,pointerDeviceRect) \ - ( (This)->lpVtbl -> get_PointerDeviceRect(This,pointerDeviceRect) ) - -#define ICoreWebView2PointerInfo_put_PointerDeviceRect(This,pointerDeviceRect) \ - ( (This)->lpVtbl -> put_PointerDeviceRect(This,pointerDeviceRect) ) - -#define ICoreWebView2PointerInfo_get_DisplayRect(This,displayRect) \ - ( (This)->lpVtbl -> get_DisplayRect(This,displayRect) ) - -#define ICoreWebView2PointerInfo_put_DisplayRect(This,displayRect) \ - ( (This)->lpVtbl -> put_DisplayRect(This,displayRect) ) - -#define ICoreWebView2PointerInfo_get_PixelLocation(This,pixelLocation) \ - ( (This)->lpVtbl -> get_PixelLocation(This,pixelLocation) ) - -#define ICoreWebView2PointerInfo_put_PixelLocation(This,pixelLocation) \ - ( (This)->lpVtbl -> put_PixelLocation(This,pixelLocation) ) - -#define ICoreWebView2PointerInfo_get_HimetricLocation(This,himetricLocation) \ - ( (This)->lpVtbl -> get_HimetricLocation(This,himetricLocation) ) - -#define ICoreWebView2PointerInfo_put_HimetricLocation(This,himetricLocation) \ - ( (This)->lpVtbl -> put_HimetricLocation(This,himetricLocation) ) - -#define ICoreWebView2PointerInfo_get_PixelLocationRaw(This,pixelLocationRaw) \ - ( (This)->lpVtbl -> get_PixelLocationRaw(This,pixelLocationRaw) ) - -#define ICoreWebView2PointerInfo_put_PixelLocationRaw(This,pixelLocationRaw) \ - ( (This)->lpVtbl -> put_PixelLocationRaw(This,pixelLocationRaw) ) - -#define ICoreWebView2PointerInfo_get_HimetricLocationRaw(This,himetricLocationRaw) \ - ( (This)->lpVtbl -> get_HimetricLocationRaw(This,himetricLocationRaw) ) - -#define ICoreWebView2PointerInfo_put_HimetricLocationRaw(This,himetricLocationRaw) \ - ( (This)->lpVtbl -> put_HimetricLocationRaw(This,himetricLocationRaw) ) - -#define ICoreWebView2PointerInfo_get_Time(This,time) \ - ( (This)->lpVtbl -> get_Time(This,time) ) - -#define ICoreWebView2PointerInfo_put_Time(This,time) \ - ( (This)->lpVtbl -> put_Time(This,time) ) - -#define ICoreWebView2PointerInfo_get_HistoryCount(This,historyCount) \ - ( (This)->lpVtbl -> get_HistoryCount(This,historyCount) ) - -#define ICoreWebView2PointerInfo_put_HistoryCount(This,historyCount) \ - ( (This)->lpVtbl -> put_HistoryCount(This,historyCount) ) - -#define ICoreWebView2PointerInfo_get_InputData(This,inputData) \ - ( (This)->lpVtbl -> get_InputData(This,inputData) ) - -#define ICoreWebView2PointerInfo_put_InputData(This,inputData) \ - ( (This)->lpVtbl -> put_InputData(This,inputData) ) - -#define ICoreWebView2PointerInfo_get_KeyStates(This,keyStates) \ - ( (This)->lpVtbl -> get_KeyStates(This,keyStates) ) - -#define ICoreWebView2PointerInfo_put_KeyStates(This,keyStates) \ - ( (This)->lpVtbl -> put_KeyStates(This,keyStates) ) - -#define ICoreWebView2PointerInfo_get_PerformanceCount(This,performanceCount) \ - ( (This)->lpVtbl -> get_PerformanceCount(This,performanceCount) ) - -#define ICoreWebView2PointerInfo_put_PerformanceCount(This,performanceCount) \ - ( (This)->lpVtbl -> put_PerformanceCount(This,performanceCount) ) - -#define ICoreWebView2PointerInfo_get_ButtonChangeKind(This,buttonChangeKind) \ - ( (This)->lpVtbl -> get_ButtonChangeKind(This,buttonChangeKind) ) - -#define ICoreWebView2PointerInfo_put_ButtonChangeKind(This,buttonChangeKind) \ - ( (This)->lpVtbl -> put_ButtonChangeKind(This,buttonChangeKind) ) - -#define ICoreWebView2PointerInfo_get_PenFlags(This,penFLags) \ - ( (This)->lpVtbl -> get_PenFlags(This,penFLags) ) - -#define ICoreWebView2PointerInfo_put_PenFlags(This,penFLags) \ - ( (This)->lpVtbl -> put_PenFlags(This,penFLags) ) - -#define ICoreWebView2PointerInfo_get_PenMask(This,penMask) \ - ( (This)->lpVtbl -> get_PenMask(This,penMask) ) - -#define ICoreWebView2PointerInfo_put_PenMask(This,penMask) \ - ( (This)->lpVtbl -> put_PenMask(This,penMask) ) - -#define ICoreWebView2PointerInfo_get_PenPressure(This,penPressure) \ - ( (This)->lpVtbl -> get_PenPressure(This,penPressure) ) - -#define ICoreWebView2PointerInfo_put_PenPressure(This,penPressure) \ - ( (This)->lpVtbl -> put_PenPressure(This,penPressure) ) - -#define ICoreWebView2PointerInfo_get_PenRotation(This,penRotation) \ - ( (This)->lpVtbl -> get_PenRotation(This,penRotation) ) - -#define ICoreWebView2PointerInfo_put_PenRotation(This,penRotation) \ - ( (This)->lpVtbl -> put_PenRotation(This,penRotation) ) - -#define ICoreWebView2PointerInfo_get_PenTiltX(This,penTiltX) \ - ( (This)->lpVtbl -> get_PenTiltX(This,penTiltX) ) - -#define ICoreWebView2PointerInfo_put_PenTiltX(This,penTiltX) \ - ( (This)->lpVtbl -> put_PenTiltX(This,penTiltX) ) - -#define ICoreWebView2PointerInfo_get_PenTiltY(This,penTiltY) \ - ( (This)->lpVtbl -> get_PenTiltY(This,penTiltY) ) - -#define ICoreWebView2PointerInfo_put_PenTiltY(This,penTiltY) \ - ( (This)->lpVtbl -> put_PenTiltY(This,penTiltY) ) - -#define ICoreWebView2PointerInfo_get_TouchFlags(This,touchFlags) \ - ( (This)->lpVtbl -> get_TouchFlags(This,touchFlags) ) - -#define ICoreWebView2PointerInfo_put_TouchFlags(This,touchFlags) \ - ( (This)->lpVtbl -> put_TouchFlags(This,touchFlags) ) - -#define ICoreWebView2PointerInfo_get_TouchMask(This,touchMask) \ - ( (This)->lpVtbl -> get_TouchMask(This,touchMask) ) - -#define ICoreWebView2PointerInfo_put_TouchMask(This,touchMask) \ - ( (This)->lpVtbl -> put_TouchMask(This,touchMask) ) - -#define ICoreWebView2PointerInfo_get_TouchContact(This,touchContact) \ - ( (This)->lpVtbl -> get_TouchContact(This,touchContact) ) - -#define ICoreWebView2PointerInfo_put_TouchContact(This,touchContact) \ - ( (This)->lpVtbl -> put_TouchContact(This,touchContact) ) - -#define ICoreWebView2PointerInfo_get_TouchContactRaw(This,touchContactRaw) \ - ( (This)->lpVtbl -> get_TouchContactRaw(This,touchContactRaw) ) - -#define ICoreWebView2PointerInfo_put_TouchContactRaw(This,touchContactRaw) \ - ( (This)->lpVtbl -> put_TouchContactRaw(This,touchContactRaw) ) - -#define ICoreWebView2PointerInfo_get_TouchOrientation(This,touchOrientation) \ - ( (This)->lpVtbl -> get_TouchOrientation(This,touchOrientation) ) - -#define ICoreWebView2PointerInfo_put_TouchOrientation(This,touchOrientation) \ - ( (This)->lpVtbl -> put_TouchOrientation(This,touchOrientation) ) - -#define ICoreWebView2PointerInfo_get_TouchPressure(This,touchPressure) \ - ( (This)->lpVtbl -> get_TouchPressure(This,touchPressure) ) - -#define ICoreWebView2PointerInfo_put_TouchPressure(This,touchPressure) \ - ( (This)->lpVtbl -> put_TouchPressure(This,touchPressure) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2PointerInfo_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ProcessFailedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2ProcessFailedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ProcessFailedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ProcessFailedEventArgs = {0x8155a9a4,0x1474,0x4a86,{0x8c,0xae,0x15,0x1b,0x0f,0xa6,0xb8,0xca}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("8155a9a4-1474-4a86-8cae-151b0fa6b8ca") - ICoreWebView2ProcessFailedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ProcessFailedKind( - /* [retval][out] */ COREWEBVIEW2_PROCESS_FAILED_KIND *processFailedKind) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ProcessFailedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ProcessFailedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ProcessFailedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ProcessFailedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProcessFailedKind )( - ICoreWebView2ProcessFailedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_PROCESS_FAILED_KIND *processFailedKind); - - END_INTERFACE - } ICoreWebView2ProcessFailedEventArgsVtbl; - - interface ICoreWebView2ProcessFailedEventArgs - { - CONST_VTBL struct ICoreWebView2ProcessFailedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ProcessFailedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ProcessFailedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ProcessFailedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ProcessFailedEventArgs_get_ProcessFailedKind(This,processFailedKind) \ - ( (This)->lpVtbl -> get_ProcessFailedKind(This,processFailedKind) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ProcessFailedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ProcessFailedEventArgs2_INTERFACE_DEFINED__ -#define __ICoreWebView2ProcessFailedEventArgs2_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ProcessFailedEventArgs2 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ProcessFailedEventArgs2 = {0x4dab9422,0x46fa,0x4c3e,{0xa5,0xd2,0x41,0xd2,0x07,0x1d,0x36,0x80}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("4dab9422-46fa-4c3e-a5d2-41d2071d3680") - ICoreWebView2ProcessFailedEventArgs2 : public ICoreWebView2ProcessFailedEventArgs - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Reason( - /* [retval][out] */ COREWEBVIEW2_PROCESS_FAILED_REASON *reason) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ExitCode( - /* [retval][out] */ int *exitCode) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ProcessDescription( - /* [retval][out] */ LPWSTR *processDescription) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_FrameInfosForFailedProcess( - /* [retval][out] */ ICoreWebView2FrameInfoCollection **frames) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ProcessFailedEventArgs2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ProcessFailedEventArgs2 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ProcessFailedEventArgs2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ProcessFailedEventArgs2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProcessFailedKind )( - ICoreWebView2ProcessFailedEventArgs2 * This, - /* [retval][out] */ COREWEBVIEW2_PROCESS_FAILED_KIND *processFailedKind); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Reason )( - ICoreWebView2ProcessFailedEventArgs2 * This, - /* [retval][out] */ COREWEBVIEW2_PROCESS_FAILED_REASON *reason); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ExitCode )( - ICoreWebView2ProcessFailedEventArgs2 * This, - /* [retval][out] */ int *exitCode); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProcessDescription )( - ICoreWebView2ProcessFailedEventArgs2 * This, - /* [retval][out] */ LPWSTR *processDescription); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrameInfosForFailedProcess )( - ICoreWebView2ProcessFailedEventArgs2 * This, - /* [retval][out] */ ICoreWebView2FrameInfoCollection **frames); - - END_INTERFACE - } ICoreWebView2ProcessFailedEventArgs2Vtbl; - - interface ICoreWebView2ProcessFailedEventArgs2 - { - CONST_VTBL struct ICoreWebView2ProcessFailedEventArgs2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ProcessFailedEventArgs2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ProcessFailedEventArgs2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ProcessFailedEventArgs2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ProcessFailedEventArgs2_get_ProcessFailedKind(This,processFailedKind) \ - ( (This)->lpVtbl -> get_ProcessFailedKind(This,processFailedKind) ) - - -#define ICoreWebView2ProcessFailedEventArgs2_get_Reason(This,reason) \ - ( (This)->lpVtbl -> get_Reason(This,reason) ) - -#define ICoreWebView2ProcessFailedEventArgs2_get_ExitCode(This,exitCode) \ - ( (This)->lpVtbl -> get_ExitCode(This,exitCode) ) - -#define ICoreWebView2ProcessFailedEventArgs2_get_ProcessDescription(This,processDescription) \ - ( (This)->lpVtbl -> get_ProcessDescription(This,processDescription) ) - -#define ICoreWebView2ProcessFailedEventArgs2_get_FrameInfosForFailedProcess(This,frames) \ - ( (This)->lpVtbl -> get_FrameInfosForFailedProcess(This,frames) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ProcessFailedEventArgs2_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ProcessFailedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2ProcessFailedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ProcessFailedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ProcessFailedEventHandler = {0x79e0aea4,0x990b,0x42d9,{0xaa,0x1d,0x0f,0xcc,0x2e,0x5b,0xc7,0xf1}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("79e0aea4-990b-42d9-aa1d-0fcc2e5bc7f1") - ICoreWebView2ProcessFailedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2ProcessFailedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ProcessFailedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ProcessFailedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ProcessFailedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ProcessFailedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2ProcessFailedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2ProcessFailedEventArgs *args); - - END_INTERFACE - } ICoreWebView2ProcessFailedEventHandlerVtbl; - - interface ICoreWebView2ProcessFailedEventHandler - { - CONST_VTBL struct ICoreWebView2ProcessFailedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ProcessFailedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ProcessFailedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ProcessFailedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ProcessFailedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ProcessFailedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2RasterizationScaleChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2RasterizationScaleChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2RasterizationScaleChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2RasterizationScaleChangedEventHandler = {0x9c98c8b1,0xac53,0x427e,{0xa3,0x45,0x30,0x49,0xb5,0x52,0x4b,0xbe}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("9c98c8b1-ac53-427e-a345-3049b5524bbe") - ICoreWebView2RasterizationScaleChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2RasterizationScaleChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2RasterizationScaleChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2RasterizationScaleChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2RasterizationScaleChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2RasterizationScaleChangedEventHandler * This, - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2RasterizationScaleChangedEventHandlerVtbl; - - interface ICoreWebView2RasterizationScaleChangedEventHandler - { - CONST_VTBL struct ICoreWebView2RasterizationScaleChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2RasterizationScaleChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2RasterizationScaleChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2RasterizationScaleChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2RasterizationScaleChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2RasterizationScaleChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ScriptDialogOpeningEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2ScriptDialogOpeningEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ScriptDialogOpeningEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ScriptDialogOpeningEventArgs = {0x7390bb70,0xabe0,0x4843,{0x95,0x29,0xf1,0x43,0xb3,0x1b,0x03,0xd6}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("7390bb70-abe0-4843-9529-f143b31b03d6") - ICoreWebView2ScriptDialogOpeningEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Uri( - /* [retval][out] */ LPWSTR *uri) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Kind( - /* [retval][out] */ COREWEBVIEW2_SCRIPT_DIALOG_KIND *kind) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Message( - /* [retval][out] */ LPWSTR *message) = 0; - - virtual HRESULT STDMETHODCALLTYPE Accept( void) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DefaultText( - /* [retval][out] */ LPWSTR *defaultText) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ResultText( - /* [retval][out] */ LPWSTR *resultText) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ResultText( - /* [in] */ LPCWSTR resultText) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDeferral( - /* [retval][out] */ ICoreWebView2Deferral **deferral) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ScriptDialogOpeningEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ScriptDialogOpeningEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ScriptDialogOpeningEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Uri )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [retval][out] */ LPWSTR *uri); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Kind )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_SCRIPT_DIALOG_KIND *kind); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Message )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [retval][out] */ LPWSTR *message); - - HRESULT ( STDMETHODCALLTYPE *Accept )( - ICoreWebView2ScriptDialogOpeningEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultText )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [retval][out] */ LPWSTR *defaultText); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ResultText )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [retval][out] */ LPWSTR *resultText); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ResultText )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [in] */ LPCWSTR resultText); - - HRESULT ( STDMETHODCALLTYPE *GetDeferral )( - ICoreWebView2ScriptDialogOpeningEventArgs * This, - /* [retval][out] */ ICoreWebView2Deferral **deferral); - - END_INTERFACE - } ICoreWebView2ScriptDialogOpeningEventArgsVtbl; - - interface ICoreWebView2ScriptDialogOpeningEventArgs - { - CONST_VTBL struct ICoreWebView2ScriptDialogOpeningEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ScriptDialogOpeningEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ScriptDialogOpeningEventArgs_get_Uri(This,uri) \ - ( (This)->lpVtbl -> get_Uri(This,uri) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_get_Kind(This,kind) \ - ( (This)->lpVtbl -> get_Kind(This,kind) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_get_Message(This,message) \ - ( (This)->lpVtbl -> get_Message(This,message) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_Accept(This) \ - ( (This)->lpVtbl -> Accept(This) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_get_DefaultText(This,defaultText) \ - ( (This)->lpVtbl -> get_DefaultText(This,defaultText) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_get_ResultText(This,resultText) \ - ( (This)->lpVtbl -> get_ResultText(This,resultText) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_put_ResultText(This,resultText) \ - ( (This)->lpVtbl -> put_ResultText(This,resultText) ) - -#define ICoreWebView2ScriptDialogOpeningEventArgs_GetDeferral(This,deferral) \ - ( (This)->lpVtbl -> GetDeferral(This,deferral) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ScriptDialogOpeningEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ScriptDialogOpeningEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2ScriptDialogOpeningEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ScriptDialogOpeningEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ScriptDialogOpeningEventHandler = {0xef381bf9,0xafa8,0x4e37,{0x91,0xc4,0x8a,0xc4,0x85,0x24,0xbd,0xfb}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("ef381bf9-afa8-4e37-91c4-8ac48524bdfb") - ICoreWebView2ScriptDialogOpeningEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2ScriptDialogOpeningEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ScriptDialogOpeningEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ScriptDialogOpeningEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ScriptDialogOpeningEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ScriptDialogOpeningEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2ScriptDialogOpeningEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2ScriptDialogOpeningEventArgs *args); - - END_INTERFACE - } ICoreWebView2ScriptDialogOpeningEventHandlerVtbl; - - interface ICoreWebView2ScriptDialogOpeningEventHandler - { - CONST_VTBL struct ICoreWebView2ScriptDialogOpeningEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ScriptDialogOpeningEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ScriptDialogOpeningEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ScriptDialogOpeningEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ScriptDialogOpeningEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ScriptDialogOpeningEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Settings_INTERFACE_DEFINED__ -#define __ICoreWebView2Settings_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Settings */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Settings = {0xe562e4f0,0xd7fa,0x43ac,{0x8d,0x71,0xc0,0x51,0x50,0x49,0x9f,0x00}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("e562e4f0-d7fa-43ac-8d71-c05150499f00") - ICoreWebView2Settings : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsScriptEnabled( - /* [retval][out] */ BOOL *isScriptEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsScriptEnabled( - /* [in] */ BOOL isScriptEnabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsWebMessageEnabled( - /* [retval][out] */ BOOL *isWebMessageEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsWebMessageEnabled( - /* [in] */ BOOL isWebMessageEnabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AreDefaultScriptDialogsEnabled( - /* [retval][out] */ BOOL *areDefaultScriptDialogsEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AreDefaultScriptDialogsEnabled( - /* [in] */ BOOL areDefaultScriptDialogsEnabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsStatusBarEnabled( - /* [retval][out] */ BOOL *isStatusBarEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsStatusBarEnabled( - /* [in] */ BOOL isStatusBarEnabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AreDevToolsEnabled( - /* [retval][out] */ BOOL *areDevToolsEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AreDevToolsEnabled( - /* [in] */ BOOL areDevToolsEnabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AreDefaultContextMenusEnabled( - /* [retval][out] */ BOOL *enabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AreDefaultContextMenusEnabled( - /* [in] */ BOOL enabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AreHostObjectsAllowed( - /* [retval][out] */ BOOL *allowed) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AreHostObjectsAllowed( - /* [in] */ BOOL allowed) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsZoomControlEnabled( - /* [retval][out] */ BOOL *enabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsZoomControlEnabled( - /* [in] */ BOOL enabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsBuiltInErrorPageEnabled( - /* [retval][out] */ BOOL *enabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_IsBuiltInErrorPageEnabled( - /* [in] */ BOOL enabled) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2SettingsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Settings * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Settings * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Settings * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsScriptEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *isScriptEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsScriptEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL isScriptEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsWebMessageEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *isWebMessageEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsWebMessageEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL isWebMessageEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDefaultScriptDialogsEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *areDefaultScriptDialogsEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDefaultScriptDialogsEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL areDefaultScriptDialogsEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsStatusBarEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *isStatusBarEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsStatusBarEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL isStatusBarEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDevToolsEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *areDevToolsEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDevToolsEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL areDevToolsEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDefaultContextMenusEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDefaultContextMenusEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreHostObjectsAllowed )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *allowed); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreHostObjectsAllowed )( - ICoreWebView2Settings * This, - /* [in] */ BOOL allowed); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsZoomControlEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsZoomControlEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsBuiltInErrorPageEnabled )( - ICoreWebView2Settings * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsBuiltInErrorPageEnabled )( - ICoreWebView2Settings * This, - /* [in] */ BOOL enabled); - - END_INTERFACE - } ICoreWebView2SettingsVtbl; - - interface ICoreWebView2Settings - { - CONST_VTBL struct ICoreWebView2SettingsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Settings_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Settings_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Settings_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Settings_get_IsScriptEnabled(This,isScriptEnabled) \ - ( (This)->lpVtbl -> get_IsScriptEnabled(This,isScriptEnabled) ) - -#define ICoreWebView2Settings_put_IsScriptEnabled(This,isScriptEnabled) \ - ( (This)->lpVtbl -> put_IsScriptEnabled(This,isScriptEnabled) ) - -#define ICoreWebView2Settings_get_IsWebMessageEnabled(This,isWebMessageEnabled) \ - ( (This)->lpVtbl -> get_IsWebMessageEnabled(This,isWebMessageEnabled) ) - -#define ICoreWebView2Settings_put_IsWebMessageEnabled(This,isWebMessageEnabled) \ - ( (This)->lpVtbl -> put_IsWebMessageEnabled(This,isWebMessageEnabled) ) - -#define ICoreWebView2Settings_get_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) \ - ( (This)->lpVtbl -> get_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) ) - -#define ICoreWebView2Settings_put_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) \ - ( (This)->lpVtbl -> put_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) ) - -#define ICoreWebView2Settings_get_IsStatusBarEnabled(This,isStatusBarEnabled) \ - ( (This)->lpVtbl -> get_IsStatusBarEnabled(This,isStatusBarEnabled) ) - -#define ICoreWebView2Settings_put_IsStatusBarEnabled(This,isStatusBarEnabled) \ - ( (This)->lpVtbl -> put_IsStatusBarEnabled(This,isStatusBarEnabled) ) - -#define ICoreWebView2Settings_get_AreDevToolsEnabled(This,areDevToolsEnabled) \ - ( (This)->lpVtbl -> get_AreDevToolsEnabled(This,areDevToolsEnabled) ) - -#define ICoreWebView2Settings_put_AreDevToolsEnabled(This,areDevToolsEnabled) \ - ( (This)->lpVtbl -> put_AreDevToolsEnabled(This,areDevToolsEnabled) ) - -#define ICoreWebView2Settings_get_AreDefaultContextMenusEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_AreDefaultContextMenusEnabled(This,enabled) ) - -#define ICoreWebView2Settings_put_AreDefaultContextMenusEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_AreDefaultContextMenusEnabled(This,enabled) ) - -#define ICoreWebView2Settings_get_AreHostObjectsAllowed(This,allowed) \ - ( (This)->lpVtbl -> get_AreHostObjectsAllowed(This,allowed) ) - -#define ICoreWebView2Settings_put_AreHostObjectsAllowed(This,allowed) \ - ( (This)->lpVtbl -> put_AreHostObjectsAllowed(This,allowed) ) - -#define ICoreWebView2Settings_get_IsZoomControlEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_IsZoomControlEnabled(This,enabled) ) - -#define ICoreWebView2Settings_put_IsZoomControlEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_IsZoomControlEnabled(This,enabled) ) - -#define ICoreWebView2Settings_get_IsBuiltInErrorPageEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_IsBuiltInErrorPageEnabled(This,enabled) ) - -#define ICoreWebView2Settings_put_IsBuiltInErrorPageEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_IsBuiltInErrorPageEnabled(This,enabled) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Settings_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Settings2_INTERFACE_DEFINED__ -#define __ICoreWebView2Settings2_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Settings2 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Settings2 = {0xee9a0f68,0xf46c,0x4e32,{0xac,0x23,0xef,0x8c,0xac,0x22,0x4d,0x2a}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("ee9a0f68-f46c-4e32-ac23-ef8cac224d2a") - ICoreWebView2Settings2 : public ICoreWebView2Settings - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_UserAgent( - /* [retval][out] */ LPWSTR *userAgent) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_UserAgent( - /* [in] */ LPCWSTR userAgent) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Settings2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Settings2 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Settings2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Settings2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsScriptEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *isScriptEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsScriptEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL isScriptEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsWebMessageEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *isWebMessageEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsWebMessageEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL isWebMessageEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDefaultScriptDialogsEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *areDefaultScriptDialogsEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDefaultScriptDialogsEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL areDefaultScriptDialogsEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsStatusBarEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *isStatusBarEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsStatusBarEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL isStatusBarEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDevToolsEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *areDevToolsEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDevToolsEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL areDevToolsEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDefaultContextMenusEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDefaultContextMenusEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreHostObjectsAllowed )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *allowed); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreHostObjectsAllowed )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL allowed); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsZoomControlEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsZoomControlEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsBuiltInErrorPageEnabled )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsBuiltInErrorPageEnabled )( - ICoreWebView2Settings2 * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserAgent )( - ICoreWebView2Settings2 * This, - /* [retval][out] */ LPWSTR *userAgent); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_UserAgent )( - ICoreWebView2Settings2 * This, - /* [in] */ LPCWSTR userAgent); - - END_INTERFACE - } ICoreWebView2Settings2Vtbl; - - interface ICoreWebView2Settings2 - { - CONST_VTBL struct ICoreWebView2Settings2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Settings2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Settings2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Settings2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Settings2_get_IsScriptEnabled(This,isScriptEnabled) \ - ( (This)->lpVtbl -> get_IsScriptEnabled(This,isScriptEnabled) ) - -#define ICoreWebView2Settings2_put_IsScriptEnabled(This,isScriptEnabled) \ - ( (This)->lpVtbl -> put_IsScriptEnabled(This,isScriptEnabled) ) - -#define ICoreWebView2Settings2_get_IsWebMessageEnabled(This,isWebMessageEnabled) \ - ( (This)->lpVtbl -> get_IsWebMessageEnabled(This,isWebMessageEnabled) ) - -#define ICoreWebView2Settings2_put_IsWebMessageEnabled(This,isWebMessageEnabled) \ - ( (This)->lpVtbl -> put_IsWebMessageEnabled(This,isWebMessageEnabled) ) - -#define ICoreWebView2Settings2_get_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) \ - ( (This)->lpVtbl -> get_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) ) - -#define ICoreWebView2Settings2_put_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) \ - ( (This)->lpVtbl -> put_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) ) - -#define ICoreWebView2Settings2_get_IsStatusBarEnabled(This,isStatusBarEnabled) \ - ( (This)->lpVtbl -> get_IsStatusBarEnabled(This,isStatusBarEnabled) ) - -#define ICoreWebView2Settings2_put_IsStatusBarEnabled(This,isStatusBarEnabled) \ - ( (This)->lpVtbl -> put_IsStatusBarEnabled(This,isStatusBarEnabled) ) - -#define ICoreWebView2Settings2_get_AreDevToolsEnabled(This,areDevToolsEnabled) \ - ( (This)->lpVtbl -> get_AreDevToolsEnabled(This,areDevToolsEnabled) ) - -#define ICoreWebView2Settings2_put_AreDevToolsEnabled(This,areDevToolsEnabled) \ - ( (This)->lpVtbl -> put_AreDevToolsEnabled(This,areDevToolsEnabled) ) - -#define ICoreWebView2Settings2_get_AreDefaultContextMenusEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_AreDefaultContextMenusEnabled(This,enabled) ) - -#define ICoreWebView2Settings2_put_AreDefaultContextMenusEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_AreDefaultContextMenusEnabled(This,enabled) ) - -#define ICoreWebView2Settings2_get_AreHostObjectsAllowed(This,allowed) \ - ( (This)->lpVtbl -> get_AreHostObjectsAllowed(This,allowed) ) - -#define ICoreWebView2Settings2_put_AreHostObjectsAllowed(This,allowed) \ - ( (This)->lpVtbl -> put_AreHostObjectsAllowed(This,allowed) ) - -#define ICoreWebView2Settings2_get_IsZoomControlEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_IsZoomControlEnabled(This,enabled) ) - -#define ICoreWebView2Settings2_put_IsZoomControlEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_IsZoomControlEnabled(This,enabled) ) - -#define ICoreWebView2Settings2_get_IsBuiltInErrorPageEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_IsBuiltInErrorPageEnabled(This,enabled) ) - -#define ICoreWebView2Settings2_put_IsBuiltInErrorPageEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_IsBuiltInErrorPageEnabled(This,enabled) ) - - -#define ICoreWebView2Settings2_get_UserAgent(This,userAgent) \ - ( (This)->lpVtbl -> get_UserAgent(This,userAgent) ) - -#define ICoreWebView2Settings2_put_UserAgent(This,userAgent) \ - ( (This)->lpVtbl -> put_UserAgent(This,userAgent) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Settings2_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2Settings3_INTERFACE_DEFINED__ -#define __ICoreWebView2Settings3_INTERFACE_DEFINED__ - -/* interface ICoreWebView2Settings3 */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2Settings3 = {0xfdb5ab74,0xaf33,0x4854,{0x84,0xf0,0x0a,0x63,0x1d,0xeb,0x5e,0xba}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("fdb5ab74-af33-4854-84f0-0a631deb5eba") - ICoreWebView2Settings3 : public ICoreWebView2Settings2 - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AreBrowserAcceleratorKeysEnabled( - /* [retval][out] */ BOOL *areBrowserAcceleratorKeysEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AreBrowserAcceleratorKeysEnabled( - /* [in] */ BOOL areBrowserAcceleratorKeysEnabled) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2Settings3Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2Settings3 * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2Settings3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2Settings3 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsScriptEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *isScriptEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsScriptEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL isScriptEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsWebMessageEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *isWebMessageEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsWebMessageEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL isWebMessageEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDefaultScriptDialogsEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *areDefaultScriptDialogsEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDefaultScriptDialogsEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL areDefaultScriptDialogsEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsStatusBarEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *isStatusBarEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsStatusBarEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL isStatusBarEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDevToolsEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *areDevToolsEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDevToolsEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL areDevToolsEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreDefaultContextMenusEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreDefaultContextMenusEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreHostObjectsAllowed )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *allowed); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreHostObjectsAllowed )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL allowed); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsZoomControlEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsZoomControlEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsBuiltInErrorPageEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *enabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_IsBuiltInErrorPageEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL enabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserAgent )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ LPWSTR *userAgent); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_UserAgent )( - ICoreWebView2Settings3 * This, - /* [in] */ LPCWSTR userAgent); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AreBrowserAcceleratorKeysEnabled )( - ICoreWebView2Settings3 * This, - /* [retval][out] */ BOOL *areBrowserAcceleratorKeysEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AreBrowserAcceleratorKeysEnabled )( - ICoreWebView2Settings3 * This, - /* [in] */ BOOL areBrowserAcceleratorKeysEnabled); - - END_INTERFACE - } ICoreWebView2Settings3Vtbl; - - interface ICoreWebView2Settings3 - { - CONST_VTBL struct ICoreWebView2Settings3Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2Settings3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2Settings3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2Settings3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2Settings3_get_IsScriptEnabled(This,isScriptEnabled) \ - ( (This)->lpVtbl -> get_IsScriptEnabled(This,isScriptEnabled) ) - -#define ICoreWebView2Settings3_put_IsScriptEnabled(This,isScriptEnabled) \ - ( (This)->lpVtbl -> put_IsScriptEnabled(This,isScriptEnabled) ) - -#define ICoreWebView2Settings3_get_IsWebMessageEnabled(This,isWebMessageEnabled) \ - ( (This)->lpVtbl -> get_IsWebMessageEnabled(This,isWebMessageEnabled) ) - -#define ICoreWebView2Settings3_put_IsWebMessageEnabled(This,isWebMessageEnabled) \ - ( (This)->lpVtbl -> put_IsWebMessageEnabled(This,isWebMessageEnabled) ) - -#define ICoreWebView2Settings3_get_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) \ - ( (This)->lpVtbl -> get_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) ) - -#define ICoreWebView2Settings3_put_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) \ - ( (This)->lpVtbl -> put_AreDefaultScriptDialogsEnabled(This,areDefaultScriptDialogsEnabled) ) - -#define ICoreWebView2Settings3_get_IsStatusBarEnabled(This,isStatusBarEnabled) \ - ( (This)->lpVtbl -> get_IsStatusBarEnabled(This,isStatusBarEnabled) ) - -#define ICoreWebView2Settings3_put_IsStatusBarEnabled(This,isStatusBarEnabled) \ - ( (This)->lpVtbl -> put_IsStatusBarEnabled(This,isStatusBarEnabled) ) - -#define ICoreWebView2Settings3_get_AreDevToolsEnabled(This,areDevToolsEnabled) \ - ( (This)->lpVtbl -> get_AreDevToolsEnabled(This,areDevToolsEnabled) ) - -#define ICoreWebView2Settings3_put_AreDevToolsEnabled(This,areDevToolsEnabled) \ - ( (This)->lpVtbl -> put_AreDevToolsEnabled(This,areDevToolsEnabled) ) - -#define ICoreWebView2Settings3_get_AreDefaultContextMenusEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_AreDefaultContextMenusEnabled(This,enabled) ) - -#define ICoreWebView2Settings3_put_AreDefaultContextMenusEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_AreDefaultContextMenusEnabled(This,enabled) ) - -#define ICoreWebView2Settings3_get_AreHostObjectsAllowed(This,allowed) \ - ( (This)->lpVtbl -> get_AreHostObjectsAllowed(This,allowed) ) - -#define ICoreWebView2Settings3_put_AreHostObjectsAllowed(This,allowed) \ - ( (This)->lpVtbl -> put_AreHostObjectsAllowed(This,allowed) ) - -#define ICoreWebView2Settings3_get_IsZoomControlEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_IsZoomControlEnabled(This,enabled) ) - -#define ICoreWebView2Settings3_put_IsZoomControlEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_IsZoomControlEnabled(This,enabled) ) - -#define ICoreWebView2Settings3_get_IsBuiltInErrorPageEnabled(This,enabled) \ - ( (This)->lpVtbl -> get_IsBuiltInErrorPageEnabled(This,enabled) ) - -#define ICoreWebView2Settings3_put_IsBuiltInErrorPageEnabled(This,enabled) \ - ( (This)->lpVtbl -> put_IsBuiltInErrorPageEnabled(This,enabled) ) - - -#define ICoreWebView2Settings3_get_UserAgent(This,userAgent) \ - ( (This)->lpVtbl -> get_UserAgent(This,userAgent) ) - -#define ICoreWebView2Settings3_put_UserAgent(This,userAgent) \ - ( (This)->lpVtbl -> put_UserAgent(This,userAgent) ) - - -#define ICoreWebView2Settings3_get_AreBrowserAcceleratorKeysEnabled(This,areBrowserAcceleratorKeysEnabled) \ - ( (This)->lpVtbl -> get_AreBrowserAcceleratorKeysEnabled(This,areBrowserAcceleratorKeysEnabled) ) - -#define ICoreWebView2Settings3_put_AreBrowserAcceleratorKeysEnabled(This,areBrowserAcceleratorKeysEnabled) \ - ( (This)->lpVtbl -> put_AreBrowserAcceleratorKeysEnabled(This,areBrowserAcceleratorKeysEnabled) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2Settings3_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2SourceChangedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2SourceChangedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2SourceChangedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2SourceChangedEventArgs = {0x31e0e545,0x1dba,0x4266,{0x89,0x14,0xf6,0x38,0x48,0xa1,0xf7,0xd7}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("31e0e545-1dba-4266-8914-f63848a1f7d7") - ICoreWebView2SourceChangedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsNewDocument( - /* [retval][out] */ BOOL *isNewDocument) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2SourceChangedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2SourceChangedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2SourceChangedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2SourceChangedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsNewDocument )( - ICoreWebView2SourceChangedEventArgs * This, - /* [retval][out] */ BOOL *isNewDocument); - - END_INTERFACE - } ICoreWebView2SourceChangedEventArgsVtbl; - - interface ICoreWebView2SourceChangedEventArgs - { - CONST_VTBL struct ICoreWebView2SourceChangedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2SourceChangedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2SourceChangedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2SourceChangedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2SourceChangedEventArgs_get_IsNewDocument(This,isNewDocument) \ - ( (This)->lpVtbl -> get_IsNewDocument(This,isNewDocument) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2SourceChangedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2SourceChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2SourceChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2SourceChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2SourceChangedEventHandler = {0x3c067f9f,0x5388,0x4772,{0x8b,0x48,0x79,0xf7,0xef,0x1a,0xb3,0x7c}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("3c067f9f-5388-4772-8b48-79f7ef1ab37c") - ICoreWebView2SourceChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2SourceChangedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2SourceChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2SourceChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2SourceChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2SourceChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2SourceChangedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2SourceChangedEventArgs *args); - - END_INTERFACE - } ICoreWebView2SourceChangedEventHandlerVtbl; - - interface ICoreWebView2SourceChangedEventHandler - { - CONST_VTBL struct ICoreWebView2SourceChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2SourceChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2SourceChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2SourceChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2SourceChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2SourceChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2TrySuspendCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2TrySuspendCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2TrySuspendCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2TrySuspendCompletedHandler = {0x00F206A7,0x9D17,0x4605,{0x91,0xF6,0x4E,0x8E,0x4D,0xE1,0x92,0xE3}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("00F206A7-9D17-4605-91F6-4E8E4DE192E3") - ICoreWebView2TrySuspendCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ HRESULT errorCode, - /* [in] */ BOOL isSuccessful) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2TrySuspendCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2TrySuspendCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2TrySuspendCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2TrySuspendCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2TrySuspendCompletedHandler * This, - /* [in] */ HRESULT errorCode, - /* [in] */ BOOL isSuccessful); - - END_INTERFACE - } ICoreWebView2TrySuspendCompletedHandlerVtbl; - - interface ICoreWebView2TrySuspendCompletedHandler - { - CONST_VTBL struct ICoreWebView2TrySuspendCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2TrySuspendCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2TrySuspendCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2TrySuspendCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2TrySuspendCompletedHandler_Invoke(This,errorCode,isSuccessful) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,isSuccessful) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2TrySuspendCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebMessageReceivedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2WebMessageReceivedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebMessageReceivedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebMessageReceivedEventArgs = {0x0f99a40c,0xe962,0x4207,{0x9e,0x92,0xe3,0xd5,0x42,0xef,0xf8,0x49}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("0f99a40c-e962-4207-9e92-e3d542eff849") - ICoreWebView2WebMessageReceivedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Source( - /* [retval][out] */ LPWSTR *source) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_WebMessageAsJson( - /* [retval][out] */ LPWSTR *webMessageAsJson) = 0; - - virtual HRESULT STDMETHODCALLTYPE TryGetWebMessageAsString( - /* [retval][out] */ LPWSTR *webMessageAsString) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebMessageReceivedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebMessageReceivedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebMessageReceivedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebMessageReceivedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Source )( - ICoreWebView2WebMessageReceivedEventArgs * This, - /* [retval][out] */ LPWSTR *source); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_WebMessageAsJson )( - ICoreWebView2WebMessageReceivedEventArgs * This, - /* [retval][out] */ LPWSTR *webMessageAsJson); - - HRESULT ( STDMETHODCALLTYPE *TryGetWebMessageAsString )( - ICoreWebView2WebMessageReceivedEventArgs * This, - /* [retval][out] */ LPWSTR *webMessageAsString); - - END_INTERFACE - } ICoreWebView2WebMessageReceivedEventArgsVtbl; - - interface ICoreWebView2WebMessageReceivedEventArgs - { - CONST_VTBL struct ICoreWebView2WebMessageReceivedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebMessageReceivedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebMessageReceivedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebMessageReceivedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebMessageReceivedEventArgs_get_Source(This,source) \ - ( (This)->lpVtbl -> get_Source(This,source) ) - -#define ICoreWebView2WebMessageReceivedEventArgs_get_WebMessageAsJson(This,webMessageAsJson) \ - ( (This)->lpVtbl -> get_WebMessageAsJson(This,webMessageAsJson) ) - -#define ICoreWebView2WebMessageReceivedEventArgs_TryGetWebMessageAsString(This,webMessageAsString) \ - ( (This)->lpVtbl -> TryGetWebMessageAsString(This,webMessageAsString) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebMessageReceivedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebMessageReceivedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2WebMessageReceivedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebMessageReceivedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebMessageReceivedEventHandler = {0x57213f19,0x00e6,0x49fa,{0x8e,0x07,0x89,0x8e,0xa0,0x1e,0xcb,0xd2}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("57213f19-00e6-49fa-8e07-898ea01ecbd2") - ICoreWebView2WebMessageReceivedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2WebMessageReceivedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebMessageReceivedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebMessageReceivedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebMessageReceivedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebMessageReceivedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2WebMessageReceivedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2WebMessageReceivedEventArgs *args); - - END_INTERFACE - } ICoreWebView2WebMessageReceivedEventHandlerVtbl; - - interface ICoreWebView2WebMessageReceivedEventHandler - { - CONST_VTBL struct ICoreWebView2WebMessageReceivedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebMessageReceivedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebMessageReceivedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebMessageReceivedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebMessageReceivedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebMessageReceivedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceRequest_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceRequest_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceRequest */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceRequest = {0x97055cd4,0x512c,0x4264,{0x8b,0x5f,0xe3,0xf4,0x46,0xce,0xa6,0xa5}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("97055cd4-512c-4264-8b5f-e3f446cea6a5") - ICoreWebView2WebResourceRequest : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Uri( - /* [retval][out] */ LPWSTR *uri) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Uri( - /* [in] */ LPCWSTR uri) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Method( - /* [retval][out] */ LPWSTR *method) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Method( - /* [in] */ LPCWSTR method) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Content( - /* [retval][out] */ IStream **content) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Content( - /* [in] */ IStream *content) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Headers( - /* [retval][out] */ ICoreWebView2HttpRequestHeaders **headers) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceRequestVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceRequest * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceRequest * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceRequest * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Uri )( - ICoreWebView2WebResourceRequest * This, - /* [retval][out] */ LPWSTR *uri); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Uri )( - ICoreWebView2WebResourceRequest * This, - /* [in] */ LPCWSTR uri); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Method )( - ICoreWebView2WebResourceRequest * This, - /* [retval][out] */ LPWSTR *method); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Method )( - ICoreWebView2WebResourceRequest * This, - /* [in] */ LPCWSTR method); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Content )( - ICoreWebView2WebResourceRequest * This, - /* [retval][out] */ IStream **content); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Content )( - ICoreWebView2WebResourceRequest * This, - /* [in] */ IStream *content); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Headers )( - ICoreWebView2WebResourceRequest * This, - /* [retval][out] */ ICoreWebView2HttpRequestHeaders **headers); - - END_INTERFACE - } ICoreWebView2WebResourceRequestVtbl; - - interface ICoreWebView2WebResourceRequest - { - CONST_VTBL struct ICoreWebView2WebResourceRequestVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceRequest_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceRequest_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceRequest_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceRequest_get_Uri(This,uri) \ - ( (This)->lpVtbl -> get_Uri(This,uri) ) - -#define ICoreWebView2WebResourceRequest_put_Uri(This,uri) \ - ( (This)->lpVtbl -> put_Uri(This,uri) ) - -#define ICoreWebView2WebResourceRequest_get_Method(This,method) \ - ( (This)->lpVtbl -> get_Method(This,method) ) - -#define ICoreWebView2WebResourceRequest_put_Method(This,method) \ - ( (This)->lpVtbl -> put_Method(This,method) ) - -#define ICoreWebView2WebResourceRequest_get_Content(This,content) \ - ( (This)->lpVtbl -> get_Content(This,content) ) - -#define ICoreWebView2WebResourceRequest_put_Content(This,content) \ - ( (This)->lpVtbl -> put_Content(This,content) ) - -#define ICoreWebView2WebResourceRequest_get_Headers(This,headers) \ - ( (This)->lpVtbl -> get_Headers(This,headers) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceRequest_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceRequestedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceRequestedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceRequestedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceRequestedEventArgs = {0x453e667f,0x12c7,0x49d4,{0xbe,0x6d,0xdd,0xbe,0x79,0x56,0xf5,0x7a}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("453e667f-12c7-49d4-be6d-ddbe7956f57a") - ICoreWebView2WebResourceRequestedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Request( - /* [retval][out] */ ICoreWebView2WebResourceRequest **request) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Response( - /* [retval][out] */ ICoreWebView2WebResourceResponse **response) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Response( - /* [in] */ ICoreWebView2WebResourceResponse *response) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDeferral( - /* [retval][out] */ ICoreWebView2Deferral **deferral) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ResourceContext( - /* [retval][out] */ COREWEBVIEW2_WEB_RESOURCE_CONTEXT *context) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceRequestedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceRequestedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceRequestedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceRequestedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Request )( - ICoreWebView2WebResourceRequestedEventArgs * This, - /* [retval][out] */ ICoreWebView2WebResourceRequest **request); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Response )( - ICoreWebView2WebResourceRequestedEventArgs * This, - /* [retval][out] */ ICoreWebView2WebResourceResponse **response); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Response )( - ICoreWebView2WebResourceRequestedEventArgs * This, - /* [in] */ ICoreWebView2WebResourceResponse *response); - - HRESULT ( STDMETHODCALLTYPE *GetDeferral )( - ICoreWebView2WebResourceRequestedEventArgs * This, - /* [retval][out] */ ICoreWebView2Deferral **deferral); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ResourceContext )( - ICoreWebView2WebResourceRequestedEventArgs * This, - /* [retval][out] */ COREWEBVIEW2_WEB_RESOURCE_CONTEXT *context); - - END_INTERFACE - } ICoreWebView2WebResourceRequestedEventArgsVtbl; - - interface ICoreWebView2WebResourceRequestedEventArgs - { - CONST_VTBL struct ICoreWebView2WebResourceRequestedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceRequestedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceRequestedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceRequestedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceRequestedEventArgs_get_Request(This,request) \ - ( (This)->lpVtbl -> get_Request(This,request) ) - -#define ICoreWebView2WebResourceRequestedEventArgs_get_Response(This,response) \ - ( (This)->lpVtbl -> get_Response(This,response) ) - -#define ICoreWebView2WebResourceRequestedEventArgs_put_Response(This,response) \ - ( (This)->lpVtbl -> put_Response(This,response) ) - -#define ICoreWebView2WebResourceRequestedEventArgs_GetDeferral(This,deferral) \ - ( (This)->lpVtbl -> GetDeferral(This,deferral) ) - -#define ICoreWebView2WebResourceRequestedEventArgs_get_ResourceContext(This,context) \ - ( (This)->lpVtbl -> get_ResourceContext(This,context) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceRequestedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceRequestedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceRequestedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceRequestedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceRequestedEventHandler = {0xab00b74c,0x15f1,0x4646,{0x80,0xe8,0xe7,0x63,0x41,0xd2,0x5d,0x71}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("ab00b74c-15f1-4646-80e8-e76341d25d71") - ICoreWebView2WebResourceRequestedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2WebResourceRequestedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceRequestedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceRequestedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceRequestedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceRequestedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2WebResourceRequestedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2WebResourceRequestedEventArgs *args); - - END_INTERFACE - } ICoreWebView2WebResourceRequestedEventHandlerVtbl; - - interface ICoreWebView2WebResourceRequestedEventHandler - { - CONST_VTBL struct ICoreWebView2WebResourceRequestedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceRequestedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceRequestedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceRequestedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceRequestedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceRequestedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponse_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceResponse_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceResponse */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceResponse = {0xaafcc94f,0xfa27,0x48fd,{0x97,0xdf,0x83,0x0e,0xf7,0x5a,0xae,0xc9}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("aafcc94f-fa27-48fd-97df-830ef75aaec9") - ICoreWebView2WebResourceResponse : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Content( - /* [retval][out] */ IStream **content) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Content( - /* [in] */ IStream *content) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Headers( - /* [retval][out] */ ICoreWebView2HttpResponseHeaders **headers) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( - /* [retval][out] */ int *statusCode) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_StatusCode( - /* [in] */ int statusCode) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ReasonPhrase( - /* [retval][out] */ LPWSTR *reasonPhrase) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ReasonPhrase( - /* [in] */ LPCWSTR reasonPhrase) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceResponseVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceResponse * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceResponse * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceResponse * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Content )( - ICoreWebView2WebResourceResponse * This, - /* [retval][out] */ IStream **content); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Content )( - ICoreWebView2WebResourceResponse * This, - /* [in] */ IStream *content); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Headers )( - ICoreWebView2WebResourceResponse * This, - /* [retval][out] */ ICoreWebView2HttpResponseHeaders **headers); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( - ICoreWebView2WebResourceResponse * This, - /* [retval][out] */ int *statusCode); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_StatusCode )( - ICoreWebView2WebResourceResponse * This, - /* [in] */ int statusCode); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReasonPhrase )( - ICoreWebView2WebResourceResponse * This, - /* [retval][out] */ LPWSTR *reasonPhrase); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ReasonPhrase )( - ICoreWebView2WebResourceResponse * This, - /* [in] */ LPCWSTR reasonPhrase); - - END_INTERFACE - } ICoreWebView2WebResourceResponseVtbl; - - interface ICoreWebView2WebResourceResponse - { - CONST_VTBL struct ICoreWebView2WebResourceResponseVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceResponse_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceResponse_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceResponse_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceResponse_get_Content(This,content) \ - ( (This)->lpVtbl -> get_Content(This,content) ) - -#define ICoreWebView2WebResourceResponse_put_Content(This,content) \ - ( (This)->lpVtbl -> put_Content(This,content) ) - -#define ICoreWebView2WebResourceResponse_get_Headers(This,headers) \ - ( (This)->lpVtbl -> get_Headers(This,headers) ) - -#define ICoreWebView2WebResourceResponse_get_StatusCode(This,statusCode) \ - ( (This)->lpVtbl -> get_StatusCode(This,statusCode) ) - -#define ICoreWebView2WebResourceResponse_put_StatusCode(This,statusCode) \ - ( (This)->lpVtbl -> put_StatusCode(This,statusCode) ) - -#define ICoreWebView2WebResourceResponse_get_ReasonPhrase(This,reasonPhrase) \ - ( (This)->lpVtbl -> get_ReasonPhrase(This,reasonPhrase) ) - -#define ICoreWebView2WebResourceResponse_put_ReasonPhrase(This,reasonPhrase) \ - ( (This)->lpVtbl -> put_ReasonPhrase(This,reasonPhrase) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceResponse_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseReceivedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceResponseReceivedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceResponseReceivedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceResponseReceivedEventHandler = {0x7DE9898A,0x24F5,0x40C3,{0xA2,0xDE,0xD4,0xF4,0x58,0xE6,0x98,0x28}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("7DE9898A-24F5-40C3-A2DE-D4F458E69828") - ICoreWebView2WebResourceResponseReceivedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2WebResourceResponseReceivedEventArgs *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceResponseReceivedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceResponseReceivedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceResponseReceivedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceResponseReceivedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2WebResourceResponseReceivedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ ICoreWebView2WebResourceResponseReceivedEventArgs *args); - - END_INTERFACE - } ICoreWebView2WebResourceResponseReceivedEventHandlerVtbl; - - interface ICoreWebView2WebResourceResponseReceivedEventHandler - { - CONST_VTBL struct ICoreWebView2WebResourceResponseReceivedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceResponseReceivedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceResponseReceivedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceResponseReceivedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceResponseReceivedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceResponseReceivedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseReceivedEventArgs_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceResponseReceivedEventArgs_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceResponseReceivedEventArgs */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceResponseReceivedEventArgs = {0xD1DB483D,0x6796,0x4B8B,{0x80,0xFC,0x13,0x71,0x2B,0xB7,0x16,0xF4}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("D1DB483D-6796-4B8B-80FC-13712BB716F4") - ICoreWebView2WebResourceResponseReceivedEventArgs : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Request( - /* [retval][out] */ ICoreWebView2WebResourceRequest **request) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Response( - /* [retval][out] */ ICoreWebView2WebResourceResponseView **response) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceResponseReceivedEventArgsVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceResponseReceivedEventArgs * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceResponseReceivedEventArgs * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceResponseReceivedEventArgs * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Request )( - ICoreWebView2WebResourceResponseReceivedEventArgs * This, - /* [retval][out] */ ICoreWebView2WebResourceRequest **request); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Response )( - ICoreWebView2WebResourceResponseReceivedEventArgs * This, - /* [retval][out] */ ICoreWebView2WebResourceResponseView **response); - - END_INTERFACE - } ICoreWebView2WebResourceResponseReceivedEventArgsVtbl; - - interface ICoreWebView2WebResourceResponseReceivedEventArgs - { - CONST_VTBL struct ICoreWebView2WebResourceResponseReceivedEventArgsVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceResponseReceivedEventArgs_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceResponseReceivedEventArgs_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceResponseReceivedEventArgs_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceResponseReceivedEventArgs_get_Request(This,request) \ - ( (This)->lpVtbl -> get_Request(This,request) ) - -#define ICoreWebView2WebResourceResponseReceivedEventArgs_get_Response(This,response) \ - ( (This)->lpVtbl -> get_Response(This,response) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceResponseReceivedEventArgs_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseView_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceResponseView_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceResponseView */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceResponseView = {0x79701053,0x7759,0x4162,{0x8F,0x7D,0xF1,0xB3,0xF0,0x84,0x92,0x8D}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("79701053-7759-4162-8F7D-F1B3F084928D") - ICoreWebView2WebResourceResponseView : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Headers( - /* [retval][out] */ ICoreWebView2HttpResponseHeaders **headers) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( - /* [retval][out] */ int *statusCode) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ReasonPhrase( - /* [retval][out] */ LPWSTR *reasonPhrase) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetContent( - /* [in] */ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler *handler) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceResponseViewVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceResponseView * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceResponseView * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceResponseView * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Headers )( - ICoreWebView2WebResourceResponseView * This, - /* [retval][out] */ ICoreWebView2HttpResponseHeaders **headers); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( - ICoreWebView2WebResourceResponseView * This, - /* [retval][out] */ int *statusCode); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReasonPhrase )( - ICoreWebView2WebResourceResponseView * This, - /* [retval][out] */ LPWSTR *reasonPhrase); - - HRESULT ( STDMETHODCALLTYPE *GetContent )( - ICoreWebView2WebResourceResponseView * This, - /* [in] */ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler *handler); - - END_INTERFACE - } ICoreWebView2WebResourceResponseViewVtbl; - - interface ICoreWebView2WebResourceResponseView - { - CONST_VTBL struct ICoreWebView2WebResourceResponseViewVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceResponseView_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceResponseView_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceResponseView_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceResponseView_get_Headers(This,headers) \ - ( (This)->lpVtbl -> get_Headers(This,headers) ) - -#define ICoreWebView2WebResourceResponseView_get_StatusCode(This,statusCode) \ - ( (This)->lpVtbl -> get_StatusCode(This,statusCode) ) - -#define ICoreWebView2WebResourceResponseView_get_ReasonPhrase(This,reasonPhrase) \ - ( (This)->lpVtbl -> get_ReasonPhrase(This,reasonPhrase) ) - -#define ICoreWebView2WebResourceResponseView_GetContent(This,handler) \ - ( (This)->lpVtbl -> GetContent(This,handler) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceResponseView_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WebResourceResponseViewGetContentCompletedHandler = {0x875738E1,0x9FA2,0x40E3,{0x8B,0x74,0x2E,0x89,0x72,0xDD,0x6F,0xE7}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("875738E1-9FA2-40E3-8B74-2E8972DD6FE7") - ICoreWebView2WebResourceResponseViewGetContentCompletedHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ HRESULT errorCode, - /* [in] */ IStream *content) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WebResourceResponseViewGetContentCompletedHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WebResourceResponseViewGetContentCompletedHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WebResourceResponseViewGetContentCompletedHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WebResourceResponseViewGetContentCompletedHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2WebResourceResponseViewGetContentCompletedHandler * This, - /* [in] */ HRESULT errorCode, - /* [in] */ IStream *content); - - END_INTERFACE - } ICoreWebView2WebResourceResponseViewGetContentCompletedHandlerVtbl; - - interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler - { - CONST_VTBL struct ICoreWebView2WebResourceResponseViewGetContentCompletedHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Invoke(This,errorCode,content) \ - ( (This)->lpVtbl -> Invoke(This,errorCode,content) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WindowCloseRequestedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2WindowCloseRequestedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WindowCloseRequestedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WindowCloseRequestedEventHandler = {0x5c19e9e0,0x092f,0x486b,{0xaf,0xfa,0xca,0x82,0x31,0x91,0x30,0x39}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("5c19e9e0-092f-486b-affa-ca8231913039") - ICoreWebView2WindowCloseRequestedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WindowCloseRequestedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WindowCloseRequestedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WindowCloseRequestedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WindowCloseRequestedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2WindowCloseRequestedEventHandler * This, - /* [in] */ ICoreWebView2 *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2WindowCloseRequestedEventHandlerVtbl; - - interface ICoreWebView2WindowCloseRequestedEventHandler - { - CONST_VTBL struct ICoreWebView2WindowCloseRequestedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WindowCloseRequestedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WindowCloseRequestedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WindowCloseRequestedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WindowCloseRequestedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WindowCloseRequestedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2WindowFeatures_INTERFACE_DEFINED__ -#define __ICoreWebView2WindowFeatures_INTERFACE_DEFINED__ - -/* interface ICoreWebView2WindowFeatures */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2WindowFeatures = {0x5eaf559f,0xb46e,0x4397,{0x88,0x60,0xe4,0x22,0xf2,0x87,0xff,0x1e}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("5eaf559f-b46e-4397-8860-e422f287ff1e") - ICoreWebView2WindowFeatures : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HasPosition( - /* [retval][out] */ BOOL *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HasSize( - /* [retval][out] */ BOOL *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Left( - /* [retval][out] */ UINT32 *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Top( - /* [retval][out] */ UINT32 *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Height( - /* [retval][out] */ UINT32 *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Width( - /* [retval][out] */ UINT32 *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ShouldDisplayMenuBar( - /* [retval][out] */ BOOL *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ShouldDisplayStatus( - /* [retval][out] */ BOOL *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ShouldDisplayToolbar( - /* [retval][out] */ BOOL *value) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ShouldDisplayScrollBars( - /* [retval][out] */ BOOL *value) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2WindowFeaturesVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2WindowFeatures * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2WindowFeatures * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2WindowFeatures * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HasPosition )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ BOOL *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HasSize )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ BOOL *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Left )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ UINT32 *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Top )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ UINT32 *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Height )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ UINT32 *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Width )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ UINT32 *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ShouldDisplayMenuBar )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ BOOL *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ShouldDisplayStatus )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ BOOL *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ShouldDisplayToolbar )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ BOOL *value); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ShouldDisplayScrollBars )( - ICoreWebView2WindowFeatures * This, - /* [retval][out] */ BOOL *value); - - END_INTERFACE - } ICoreWebView2WindowFeaturesVtbl; - - interface ICoreWebView2WindowFeatures - { - CONST_VTBL struct ICoreWebView2WindowFeaturesVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2WindowFeatures_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2WindowFeatures_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2WindowFeatures_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2WindowFeatures_get_HasPosition(This,value) \ - ( (This)->lpVtbl -> get_HasPosition(This,value) ) - -#define ICoreWebView2WindowFeatures_get_HasSize(This,value) \ - ( (This)->lpVtbl -> get_HasSize(This,value) ) - -#define ICoreWebView2WindowFeatures_get_Left(This,value) \ - ( (This)->lpVtbl -> get_Left(This,value) ) - -#define ICoreWebView2WindowFeatures_get_Top(This,value) \ - ( (This)->lpVtbl -> get_Top(This,value) ) - -#define ICoreWebView2WindowFeatures_get_Height(This,value) \ - ( (This)->lpVtbl -> get_Height(This,value) ) - -#define ICoreWebView2WindowFeatures_get_Width(This,value) \ - ( (This)->lpVtbl -> get_Width(This,value) ) - -#define ICoreWebView2WindowFeatures_get_ShouldDisplayMenuBar(This,value) \ - ( (This)->lpVtbl -> get_ShouldDisplayMenuBar(This,value) ) - -#define ICoreWebView2WindowFeatures_get_ShouldDisplayStatus(This,value) \ - ( (This)->lpVtbl -> get_ShouldDisplayStatus(This,value) ) - -#define ICoreWebView2WindowFeatures_get_ShouldDisplayToolbar(This,value) \ - ( (This)->lpVtbl -> get_ShouldDisplayToolbar(This,value) ) - -#define ICoreWebView2WindowFeatures_get_ShouldDisplayScrollBars(This,value) \ - ( (This)->lpVtbl -> get_ShouldDisplayScrollBars(This,value) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2WindowFeatures_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2ZoomFactorChangedEventHandler_INTERFACE_DEFINED__ -#define __ICoreWebView2ZoomFactorChangedEventHandler_INTERFACE_DEFINED__ - -/* interface ICoreWebView2ZoomFactorChangedEventHandler */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2ZoomFactorChangedEventHandler = {0xb52d71d6,0xc4df,0x4543,{0xa9,0x0c,0x64,0xa3,0xe6,0x0f,0x38,0xcb}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("b52d71d6-c4df-4543-a90c-64a3e60f38cb") - ICoreWebView2ZoomFactorChangedEventHandler : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE Invoke( - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ IUnknown *args) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2ZoomFactorChangedEventHandlerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2ZoomFactorChangedEventHandler * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2ZoomFactorChangedEventHandler * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2ZoomFactorChangedEventHandler * This); - - HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICoreWebView2ZoomFactorChangedEventHandler * This, - /* [in] */ ICoreWebView2Controller *sender, - /* [in] */ IUnknown *args); - - END_INTERFACE - } ICoreWebView2ZoomFactorChangedEventHandlerVtbl; - - interface ICoreWebView2ZoomFactorChangedEventHandler - { - CONST_VTBL struct ICoreWebView2ZoomFactorChangedEventHandlerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2ZoomFactorChangedEventHandler_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2ZoomFactorChangedEventHandler_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2ZoomFactorChangedEventHandler_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2ZoomFactorChangedEventHandler_Invoke(This,sender,args) \ - ( (This)->lpVtbl -> Invoke(This,sender,args) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2ZoomFactorChangedEventHandler_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2CompositionControllerInterop_INTERFACE_DEFINED__ -#define __ICoreWebView2CompositionControllerInterop_INTERFACE_DEFINED__ - -/* interface ICoreWebView2CompositionControllerInterop */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2CompositionControllerInterop = {0x8e9922ce,0x9c80,0x42e6,{0xba,0xd7,0xfc,0xeb,0xf2,0x91,0xa4,0x95}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("8e9922ce-9c80-42e6-bad7-fcebf291a495") - ICoreWebView2CompositionControllerInterop : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_UIAProvider( - /* [retval][out] */ IUnknown **provider) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RootVisualTarget( - /* [retval][out] */ IUnknown **target) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_RootVisualTarget( - /* [in] */ IUnknown *target) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2CompositionControllerInteropVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2CompositionControllerInterop * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2CompositionControllerInterop * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2CompositionControllerInterop * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_UIAProvider )( - ICoreWebView2CompositionControllerInterop * This, - /* [retval][out] */ IUnknown **provider); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RootVisualTarget )( - ICoreWebView2CompositionControllerInterop * This, - /* [retval][out] */ IUnknown **target); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_RootVisualTarget )( - ICoreWebView2CompositionControllerInterop * This, - /* [in] */ IUnknown *target); - - END_INTERFACE - } ICoreWebView2CompositionControllerInteropVtbl; - - interface ICoreWebView2CompositionControllerInterop - { - CONST_VTBL struct ICoreWebView2CompositionControllerInteropVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2CompositionControllerInterop_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2CompositionControllerInterop_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2CompositionControllerInterop_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2CompositionControllerInterop_get_UIAProvider(This,provider) \ - ( (This)->lpVtbl -> get_UIAProvider(This,provider) ) - -#define ICoreWebView2CompositionControllerInterop_get_RootVisualTarget(This,target) \ - ( (This)->lpVtbl -> get_RootVisualTarget(This,target) ) - -#define ICoreWebView2CompositionControllerInterop_put_RootVisualTarget(This,target) \ - ( (This)->lpVtbl -> put_RootVisualTarget(This,target) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2CompositionControllerInterop_INTERFACE_DEFINED__ */ - - -#ifndef __ICoreWebView2EnvironmentInterop_INTERFACE_DEFINED__ -#define __ICoreWebView2EnvironmentInterop_INTERFACE_DEFINED__ - -/* interface ICoreWebView2EnvironmentInterop */ -/* [unique][object][uuid] */ - - -EXTERN_C __declspec(selectany) const IID IID_ICoreWebView2EnvironmentInterop = {0xee503a63,0xc1e2,0x4fbf,{0x8a,0x4d,0x82,0x4e,0x95,0xf8,0xbb,0x13}}; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("ee503a63-c1e2-4fbf-8a4d-824e95f8bb13") - ICoreWebView2EnvironmentInterop : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE GetProviderForHwnd( - /* [in] */ HWND hwnd, - /* [retval][out] */ IUnknown **provider) = 0; - - }; - - -#else /* C style interface */ - - typedef struct ICoreWebView2EnvironmentInteropVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICoreWebView2EnvironmentInterop * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICoreWebView2EnvironmentInterop * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICoreWebView2EnvironmentInterop * This); - - HRESULT ( STDMETHODCALLTYPE *GetProviderForHwnd )( - ICoreWebView2EnvironmentInterop * This, - /* [in] */ HWND hwnd, - /* [retval][out] */ IUnknown **provider); - - END_INTERFACE - } ICoreWebView2EnvironmentInteropVtbl; - - interface ICoreWebView2EnvironmentInterop - { - CONST_VTBL struct ICoreWebView2EnvironmentInteropVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICoreWebView2EnvironmentInterop_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ICoreWebView2EnvironmentInterop_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ICoreWebView2EnvironmentInterop_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ICoreWebView2EnvironmentInterop_GetProviderForHwnd(This,hwnd,provider) \ - ( (This)->lpVtbl -> GetProviderForHwnd(This,hwnd,provider) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ICoreWebView2EnvironmentInterop_INTERFACE_DEFINED__ */ - -#endif /* __WebView2_LIBRARY_DEFINED__ */ - -/* Additional Prototypes for ALL interfaces */ - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/v2/internal/ffenestri/windows/WebView2EnvironmentOptions.h b/v2/internal/ffenestri/windows/WebView2EnvironmentOptions.h deleted file mode 100644 index 6475ce58a..000000000 --- a/v2/internal/ffenestri/windows/WebView2EnvironmentOptions.h +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (C) Microsoft Corporation. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef __core_webview2_environment_options_h__ -#define __core_webview2_environment_options_h__ - -#include -#include - -#include "webview2.h" -#define CORE_WEBVIEW_TARGET_PRODUCT_VERSION L"91.0.864.35" - -#define COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(p) \ - public: \ - HRESULT STDMETHODCALLTYPE get_##p(LPWSTR* value) override { \ - if (!value) \ - return E_POINTER; \ - *value = m_##p.Copy(); \ - if ((*value == nullptr) && (m_##p.Get() != nullptr)) \ - return HRESULT_FROM_WIN32(GetLastError()); \ - return S_OK; \ - } \ - HRESULT STDMETHODCALLTYPE put_##p(LPCWSTR value) override { \ - LPCWSTR result = m_##p.Set(value); \ - if ((result == nullptr) && (value != nullptr)) \ - return HRESULT_FROM_WIN32(GetLastError()); \ - return S_OK; \ - } \ - \ - protected: \ - AutoCoMemString m_##p; - -#define COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(p) \ - public: \ - HRESULT STDMETHODCALLTYPE get_##p(BOOL* value) override { \ - if (!value) \ - return E_POINTER; \ - *value = m_##p; \ - return S_OK; \ - } \ - HRESULT STDMETHODCALLTYPE put_##p(BOOL value) override { \ - m_##p = value; \ - return S_OK; \ - } \ - \ - protected: \ - BOOL m_##p = FALSE; - -// This is a base COM class that implements ICoreWebView2EnvironmentOptions. -template -class CoreWebView2EnvironmentOptionsBase - : public Microsoft::WRL::Implements< - Microsoft::WRL::RuntimeClassFlags, - ICoreWebView2EnvironmentOptions> { - public: - CoreWebView2EnvironmentOptionsBase() { - // Initialize the target compatible browser version value to the version of - // the browser binaries corresponding to this version of the SDK. - m_TargetCompatibleBrowserVersion.Set(CORE_WEBVIEW_TARGET_PRODUCT_VERSION); - } - - protected: - ~CoreWebView2EnvironmentOptionsBase(){}; - - class AutoCoMemString { - public: - AutoCoMemString() {} - ~AutoCoMemString() { Release(); } - void Release() { - if (m_string) { - deallocate_fn(m_string); - m_string = nullptr; - } - } - - LPCWSTR Set(LPCWSTR str) { - Release(); - if (str) { - m_string = MakeCoMemString(str); - } - return m_string; - } - LPCWSTR Get() { return m_string; } - LPWSTR Copy() { - if (m_string) - return MakeCoMemString(m_string); - return nullptr; - } - - protected: - LPWSTR MakeCoMemString(LPCWSTR source) { - const size_t length = wcslen(source); - const size_t bytes = (length + 1) * sizeof(*source); - // Ensure we didn't overflow during our size calculation. - if (bytes <= length) { - return nullptr; - } - - wchar_t* result = reinterpret_cast(allocate_fn(bytes)); - if (result) - memcpy(result, source, bytes); - - return result; - } - - LPWSTR m_string = nullptr; - }; - - COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(AdditionalBrowserArguments) - COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(Language) - COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(TargetCompatibleBrowserVersion) - COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY( - AllowSingleSignOnUsingOSPrimaryAccount) -}; - -template -class CoreWebView2EnvironmentOptionsBaseClass - : public Microsoft::WRL::RuntimeClass< - Microsoft::WRL::RuntimeClassFlags, - CoreWebView2EnvironmentOptionsBase> { - public: - CoreWebView2EnvironmentOptionsBaseClass() {} - - protected: - ~CoreWebView2EnvironmentOptionsBaseClass() override{}; -}; - -typedef CoreWebView2EnvironmentOptionsBaseClass - CoreWebView2EnvironmentOptions; - -#endif // __core_webview2_environment_options_h__ diff --git a/v2/internal/ffenestri/windows/scripts/README.md b/v2/internal/ffenestri/windows/scripts/README.md deleted file mode 100644 index 634e3596b..000000000 --- a/v2/internal/ffenestri/windows/scripts/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Build - -This script will download the given webview2 sdk version and copy out the files necessary for building Wails apps. - -## Prerequistes - - - nuget - -## Usage - -`updatesdk.bat ` diff --git a/v2/internal/ffenestri/windows/scripts/sdkversion.txt b/v2/internal/ffenestri/windows/scripts/sdkversion.txt deleted file mode 100644 index e4c251ea5..000000000 --- a/v2/internal/ffenestri/windows/scripts/sdkversion.txt +++ /dev/null @@ -1 +0,0 @@ -The version of WebView2 SDK used: 1.0.992.28 diff --git a/v2/internal/ffenestri/windows/scripts/updatesdk.bat b/v2/internal/ffenestri/windows/scripts/updatesdk.bat deleted file mode 100644 index 780c09128..000000000 --- a/v2/internal/ffenestri/windows/scripts/updatesdk.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -IF %1.==. GOTO NoVersion -nuget install microsoft.web.webview2 -Version %1 -OutputDirectory . >NUL || goto :eof -echo Downloaded microsoft.web.webview2.%1 - -set sdk_version=%1 -set native_dir="%~dp0\microsoft.web.webview2.%sdk_version%\build\native" -copy "%native_dir%\include\*.h" .. >NUL -copy "%native_dir%\x64\WebView2Loader.dll" "..\x64" >NUL -@REM @rd /S /Q "microsoft.web.webview2.%sdk_version%" -del /s version.txt >nul 2>&1 -echo The version of WebView2 SDK used: %sdk_version% > sdkversion.txt -echo SDK updated to %sdk_version% -goto :eof - -:NoVersion - echo Please provide a version number, EG: 1.0.664.37 - goto :eof diff --git a/v2/internal/ffenestri/windows/x64/WebView2Loader.dll b/v2/internal/ffenestri/windows/x64/WebView2Loader.dll deleted file mode 100644 index 869459eca14b5e59f11a348414ebf510a40c446d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137144 zcmd?Sd0>>))%ZV?WMBdb&!CJ35glc)p>YYsB{85gFayuPM1q1~1&IwtS~m(af(x2B ziSqC;mA3Y6`*yRfee2tmx)HEyLXadZvb7bYRa~l19Mpgs0xt9Yocqiq5$*E+{{2PC zbJuh4J@?#m&pG$po2sv@a5xBG+4ILz@x{*JSnozWd<&0hSq zWxgd#Z@Y2n^|$zHufO%y+hV@2-r!przt#7(TYaIKSNU$aZP5+q`yGzzu*0$F{vnPF zzWUpmEckB6*}kDU!yJwg^yqJy)C#^H6|R?ls&J0O;d1bcpX}FBPn3FJ7opTy?_r=xic-z7PYM+P|@vmbXl zPM7Qxewx?W^;^a}9p$Q{nF3Ec9joY?{-o3K@CkJ!dVcJN6*0ckPok1^NXCA`WccXS z`AZjFAG_Y+So2HDlv3t@_!jXU@Dp%20_WSs91o2q;~@D3e4qVXxt8;n*ag)X8LMLi z<+gsVT;TlD(%QNk9X4)!l;eNL%U@9L#v2yb-gay3Lb4sDnR3$pfS-W$FLv`XNy?XB zflRsAK3A?~;gzA_?4ZN(kd&*=lzZcI_#r)pM`1tNv9tc5ciAoRoj^6o(^ZPIc?%)gIkAmiFFE zHKWaF(JQ99<0WbDYz5}dxNoCSy;QmH#3~i4O4EVZ2;(Ka;%fKp1ybyHr#c+tTTJlsR=Er^7dPm~mD~Xop>Jq)DEgRld56fz%a^vd+qEO1yd>y~$M^85T*Amu^c}2S6){Sa+)ChPoSP5w3 zCYSOL>`eC97z#*D-DtH=g4si5%SSsM8zj-{Vs^oY*4U&njN*%15h5!3Dp{CB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Xyq!EZT1d(1qq$(5!t65Su za*ju}?rv{BpaU0JFn(JP;hTzNqevtWpz!iSpak41Px*+l1!^p=jzdn`q zN-QFVJ8hpujm!;X#^1XiTv2h{W2r#`p#Z2fFoy+ykw_C!+4#+9S`SIhKcN*a`b-`SFv*xid3@xEpKFtsRN>{3hV31dmBC9)g z>4}C*hROA{=~Bp6wc(H!7keN#GB!R?d9DBt8w?XD$bF8pM0KlM1Ed4xFdTD_QmW;jw5nyITP}` z7LbAOh*{E!hGTiNc@=t&=)()XhJyLAsT>C<_bfv^Bch6erEmJiBqI_#DnHiCzuR|O lc04!uVIryOO=R)Gp@z*}n+|))U%20O>fOR~WnNY?@jp@*LdO6A diff --git a/v2/internal/ffenestri/windows/x64/x64.go b/v2/internal/ffenestri/windows/x64/x64.go deleted file mode 100644 index 8e4e2f31b..000000000 --- a/v2/internal/ffenestri/windows/x64/x64.go +++ /dev/null @@ -1,8 +0,0 @@ -// +build windows - -package x64 - -import _ "embed" - -//go:embed WebView2Loader.dll -var WebView2Loader []byte diff --git a/v2/internal/ffenestri/windows_checkboxes.go b/v2/internal/ffenestri/windows_checkboxes.go deleted file mode 100644 index 32cb417aa..000000000 --- a/v2/internal/ffenestri/windows_checkboxes.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build windows -// +build windows - -package ffenestri - -import ( - "fmt" - "os" - "sync" - "text/tabwriter" - - "github.com/leaanthony/slicer" - "github.com/wailsapp/wails/v2/internal/menumanager" -) - -/* --------------------------------------------------------------------------------- - -Checkbox Cache --------------- -The checkbox cache keeps a list of IDs that are associated with the same checkbox menu item. -This can happen when a checkbox is used in an application menu and a tray menu, eg "start at login". -The cache is used to bulk toggle the menu items when one is clicked. - -*/ - -type CheckboxCache struct { - cache map[*menumanager.ProcessedMenu]map[wailsMenuItemID][]win32MenuItemID - mutex sync.RWMutex -} - -func NewCheckboxCache() *CheckboxCache { - return &CheckboxCache{ - cache: make(map[*menumanager.ProcessedMenu]map[wailsMenuItemID][]win32MenuItemID), - } -} - -func (c *CheckboxCache) Dump() { - // Start a new tabwriter - w := new(tabwriter.Writer) - w.Init(os.Stdout, 8, 8, 0, '\t', 0) - - println("---------------- Checkbox", c, "Dump ----------------") - for _, processedMenu := range c.cache { - println("Menu", processedMenu) - for wailsMenuItemID, win32menus := range processedMenu { - println(" WailsMenu: ", wailsMenuItemID) - menus := slicer.String() - for _, win32menu := range win32menus { - menus.Add(fmt.Sprintf("%v", win32menu)) - } - _, _ = fmt.Fprintf(w, "%s\t%s\n", wailsMenuItemID, menus.Join(", ")) - _ = w.Flush() - } - } -} - -func (c *CheckboxCache) addToCheckboxCache(menu *menumanager.ProcessedMenu, item wailsMenuItemID, menuID win32MenuItemID) { - - // Get map for menu - if c.cache[menu] == nil { - c.cache[menu] = make(map[wailsMenuItemID][]win32MenuItemID) - } - menuMap := c.cache[menu] - - // Ensure we have a slice - if menuMap[item] == nil { - menuMap[item] = []win32MenuItemID{} - } - - c.mutex.Lock() - menuMap[item] = append(menuMap[item], menuID) - c.mutex.Unlock() - -} - -func (c *CheckboxCache) removeMenuFromCheckboxCache(menu *menumanager.ProcessedMenu) { - c.mutex.Lock() - delete(c.cache, menu) - c.mutex.Unlock() -} - -// win32MenuIDsForWailsMenuID returns all win32menuids that are used for a wails menu item id across -// all menus -func (c *CheckboxCache) win32MenuIDsForWailsMenuID(item wailsMenuItemID) []win32MenuItemID { - c.mutex.Lock() - result := []win32MenuItemID{} - for _, menu := range c.cache { - ids := menu[item] - if ids != nil { - result = append(result, ids...) - } - } - c.mutex.Unlock() - return result -} diff --git a/v2/internal/ffenestri/windows_errorhandler_debug.go b/v2/internal/ffenestri/windows_errorhandler_debug.go deleted file mode 100644 index e7a069044..000000000 --- a/v2/internal/ffenestri/windows_errorhandler_debug.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build windows && debug -// +build windows,debug - -package ffenestri - -import ( - "fmt" - "github.com/ztrue/tracerr" - "runtime" - "strings" -) - -func wall(err error, inputs ...interface{}) error { - if err == nil { - return nil - } - pc, _, _, _ := runtime.Caller(1) - funcName := runtime.FuncForPC(pc).Name() - splitName := strings.Split(funcName, ".") - message := "[" + splitName[len(splitName)-1] + "]" - if len(inputs) > 0 { - params := []string{} - for _, param := range inputs { - params = append(params, fmt.Sprintf("%v", param)) - } - message += "(" + strings.Join(params, " ") + ")" - } - return tracerr.Errorf(message) -} diff --git a/v2/internal/ffenestri/windows_errorhandler_production.go b/v2/internal/ffenestri/windows_errorhandler_production.go deleted file mode 100644 index d492e2ffc..000000000 --- a/v2/internal/ffenestri/windows_errorhandler_production.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build windows && !debug -// +build windows,!debug - -package ffenestri - -import "C" -import ( - "fmt" - "golang.org/x/sys/windows" - "log" - "os" - "runtime" - "strings" - "syscall" -) - -func wall(err error, inputs ...interface{}) error { - if err == nil { - return nil - } - pc, _, _, _ := runtime.Caller(1) - funcName := runtime.FuncForPC(pc).Name() - splitName := strings.Split(funcName, ".") - message := "[" + splitName[len(splitName)-1] + "]" - if len(inputs) > 0 { - params := []string{} - for _, param := range inputs { - params = append(params, fmt.Sprintf("%v", param)) - } - message += "(" + strings.Join(params, " ") + ")" - } - - title, err := syscall.UTF16PtrFromString("Fatal Error") - if err != nil { - log.Fatal(err) - } - - text, err := syscall.UTF16PtrFromString("There has been a fatal error. Details:\n" + message) - if err != nil { - log.Fatal(err) - } - - var flags uint32 = windows.MB_ICONERROR | windows.MB_OK - - _, err = windows.MessageBox(0, text, title, flags|windows.MB_SYSTEMMODAL) - os.Exit(1) - return err -} diff --git a/v2/internal/ffenestri/windows_menu.go b/v2/internal/ffenestri/windows_menu.go deleted file mode 100644 index 6dc5099bc..000000000 --- a/v2/internal/ffenestri/windows_menu.go +++ /dev/null @@ -1,233 +0,0 @@ -//go:build windows -// +build windows - -package ffenestri - -import ( - "fmt" - "github.com/wailsapp/wails/v2/internal/menumanager" - "github.com/wailsapp/wails/v2/pkg/menu" - "github.com/wailsapp/wails/v2/pkg/menu/keys" - "runtime" - "strings" -) - -//-------------------- Types ------------------------ - -type win32MenuItemID uint32 -type win32Menu uintptr -type win32Window uintptr -type wailsMenuItemID string // The internal menu ID - -type Menu struct { - wailsMenu *menumanager.WailsMenu - menu win32Menu - menuType menuType - - // A list of all checkbox and radio menuitems we - // create for this menu - checkboxes []win32MenuItemID - radioboxes []win32MenuItemID - initiallySelectedRadioItems []win32MenuItemID -} - -func createMenu(wailsMenu *menumanager.WailsMenu, menuType menuType) (*Menu, error) { - - mainMenu, err := createWin32Menu() - if err != nil { - return nil, err - } - - result := &Menu{ - wailsMenu: wailsMenu, - menu: mainMenu, - menuType: menuType, - } - - // Process top level menus - for _, toplevelmenu := range applicationMenu.Menu.Items { - err := result.processMenuItem(result.menu, toplevelmenu) - if err != nil { - return nil, err - } - } - - err = result.processRadioGroups() - if err != nil { - return nil, err - } - - return result, nil -} - -func (m *Menu) processMenuItem(parent win32Menu, menuItem *menumanager.ProcessedMenuItem) error { - - // Ignore hidden items - if menuItem.Hidden { - return nil - } - - // Calculate the flags for this menu item - flags := uintptr(calculateFlags(menuItem)) - - switch menuItem.Type { - case menu.SubmenuType: - submenu, err := createWin32PopupMenu() - if err != nil { - return err - } - for _, submenuItem := range menuItem.SubMenu.Items { - err = m.processMenuItem(submenu, submenuItem) - if err != nil { - return err - } - } - err = appendWin32MenuItem(parent, flags, uintptr(submenu), menuItem.Label) - if err != nil { - return err - } - case menu.TextType, menu.CheckboxType, menu.RadioType: - win32ID := addMenuCacheEntry(parent, m.menuType, menuItem, m.wailsMenu.Menu) - if menuItem.Accelerator != nil { - m.processAccelerator(menuItem) - } - label := menuItem.Label - //label := fmt.Sprintf("%s (%d)", menuItem.Label, win32ID) - err := appendWin32MenuItem(parent, flags, uintptr(win32ID), label) - if err != nil { - return err - } - if menuItem.Type == menu.CheckboxType { - // We need to maintain a list of this menu's checkboxes - m.checkboxes = append(m.checkboxes, win32ID) - globalCheckboxCache.addToCheckboxCache(m.wailsMenu.Menu, wailsMenuItemID(menuItem.ID), win32ID) - } - if menuItem.Type == menu.RadioType { - // We need to maintain a list of this menu's radioitems - m.radioboxes = append(m.radioboxes, win32ID) - globalRadioGroupMap.addRadioGroupMapping(m.wailsMenu.Menu, wailsMenuItemID(menuItem.ID), win32ID) - if menuItem.Checked { - m.initiallySelectedRadioItems = append(m.initiallySelectedRadioItems, win32ID) - } - } - case menu.SeparatorType: - err := appendWin32MenuItem(parent, flags, 0, "") - if err != nil { - return err - } - } - return nil -} - -func (m *Menu) processRadioGroups() error { - - for _, rg := range applicationMenu.RadioGroups { - startWailsMenuID := wailsMenuItemID(rg.Members[0]) - endWailsMenuID := wailsMenuItemID(rg.Members[len(rg.Members)-1]) - - startIDs := globalRadioGroupMap.getRadioGroupMapping(startWailsMenuID) - endIDs := globalRadioGroupMap.getRadioGroupMapping(endWailsMenuID) - - var radioGroupMaps = []*radioGroupStartEnd{} - for index := range startIDs { - startID := startIDs[index] - endID := endIDs[index] - thisRadioGroup := &radioGroupStartEnd{ - startID: startID, - endID: endID, - } - radioGroupMaps = append(radioGroupMaps, thisRadioGroup) - } - - // Set this for each member - for _, member := range rg.Members { - id := wailsMenuItemID(member) - globalRadioGroupCache.addToRadioGroupCache(m.wailsMenu.Menu, id, radioGroupMaps) - } - } - - // Enable all initially checked radio items - for _, win32MenuID := range m.initiallySelectedRadioItems { - menuItemDetails := getMenuCacheEntry(win32MenuID) - wailsMenuID := wailsMenuItemID(menuItemDetails.item.ID) - err := selectRadioItemFromWailsMenuID(wailsMenuID, win32MenuID) - if err != nil { - return err - } - } - - return nil -} - -func (m *Menu) Destroy() error { - - // Release the MenuIDs - releaseMenuIDsForProcessedMenu(m.wailsMenu.Menu) - - // Unload this menu's checkboxes from the cache - globalCheckboxCache.removeMenuFromCheckboxCache(m.wailsMenu.Menu) - - // Unload this menu's radio groups from the cache - globalRadioGroupCache.removeMenuFromRadioBoxCache(m.wailsMenu.Menu) - - globalRadioGroupMap.removeMenuFromRadioGroupMapping(m.wailsMenu.Menu) - - // Free up callbacks - resetCallbacks() - - // Delete menu - return destroyWin32Menu(m.menu) -} - -func (m *Menu) processAccelerator(menuitem *menumanager.ProcessedMenuItem) { - - // Add in shortcut to label if there is no "\t" override - if !strings.Contains(menuitem.Label, "\t") { - menuitem.Label += "\t" + keys.Stringify(menuitem.Accelerator, runtime.GOOS) - } - - // Calculate the modifier - var modifiers uint8 - for _, mod := range menuitem.Accelerator.Modifiers { - switch mod { - case keys.ControlKey, keys.CmdOrCtrlKey: - modifiers |= 1 - case keys.OptionOrAltKey: - modifiers |= 2 - case keys.ShiftKey: - modifiers |= 4 - //case keys.SuperKey: - // modifiers |= 8 - } - } - - var keycode = calculateKeycode(strings.ToLower(menuitem.Accelerator.Key)) - if keycode == 0 { - fmt.Printf("WARNING: Key '%s' is unsupported in windows. Cannot bind callback.", menuitem.Accelerator.Key) - return - } - addMenuCallback(keycode, modifiers, menuitem.ID, m.menuType) - -} - -var flagMap = map[menu.Type]uint32{ - menu.TextType: MF_STRING, - menu.SeparatorType: MF_SEPARATOR, - menu.SubmenuType: MF_STRING | MF_POPUP, - menu.CheckboxType: MF_STRING, - menu.RadioType: MF_STRING, -} - -func calculateFlags(menuItem *menumanager.ProcessedMenuItem) uint32 { - result := flagMap[menuItem.Type] - - if menuItem.Disabled { - result |= MF_DISABLED - } - - if menuItem.Type == menu.CheckboxType && menuItem.Checked { - result |= MF_CHECKED - } - - return result -} diff --git a/v2/internal/ffenestri/windows_menu_cache.go b/v2/internal/ffenestri/windows_menu_cache.go deleted file mode 100644 index 36b37a239..000000000 --- a/v2/internal/ffenestri/windows_menu_cache.go +++ /dev/null @@ -1,75 +0,0 @@ -//go:build windows -// +build windows - -package ffenestri - -import ( - "github.com/leaanthony/idgen" - "github.com/wailsapp/wails/v2/internal/menumanager" - "sync" -) - -/** - -MenuCache ---------- -When windows calls back to Go (when an item is clicked), we need to -be able to retrieve information about the menu item: - - The menu that the menuitem is part of (parent) - - The original processed menu item - - The type of the menu (application, context or tray) - -This cache is built up when a menu is created. - -*/ - -// TODO: Make this like the other caches - -type menuCacheEntry struct { - parent win32Menu - menuType menuType - item *menumanager.ProcessedMenuItem - processedMenu *menumanager.ProcessedMenu -} - -var idGenerator = idgen.New() - -var menuCache = map[win32MenuItemID]*menuCacheEntry{} -var menuCacheLock sync.RWMutex -var wailsMenuIDtoWin32IDMap = map[wailsMenuItemID]win32MenuItemID{} - -// This releases the menuIDs back to the id generator -var winIDsOwnedByProcessedMenu = map[*menumanager.ProcessedMenu][]win32MenuItemID{} - -func releaseMenuIDsForProcessedMenu(processedMenu *menumanager.ProcessedMenu) { - for _, menuID := range winIDsOwnedByProcessedMenu[processedMenu] { - idGenerator.ReleaseID(uint(menuID)) - } - delete(winIDsOwnedByProcessedMenu, processedMenu) -} - -func addMenuCacheEntry(parent win32Menu, typ menuType, wailsMenuItem *menumanager.ProcessedMenuItem, processedMenu *menumanager.ProcessedMenu) win32MenuItemID { - menuCacheLock.Lock() - defer menuCacheLock.Unlock() - id, err := idGenerator.NewID() - checkFatal(err) - menuID := win32MenuItemID(id) - menuCache[menuID] = &menuCacheEntry{ - parent: parent, - menuType: typ, - item: wailsMenuItem, - processedMenu: processedMenu, - } - // save the mapping - wailsMenuIDtoWin32IDMap[wailsMenuItemID(wailsMenuItem.ID)] = menuID - // keep track of menuids owned by this menu (so we can release the ids) - winIDsOwnedByProcessedMenu[processedMenu] = append(winIDsOwnedByProcessedMenu[processedMenu], menuID) - return menuID - -} - -func getMenuCacheEntry(id win32MenuItemID) *menuCacheEntry { - menuCacheLock.Lock() - defer menuCacheLock.Unlock() - return menuCache[id] -} diff --git a/v2/internal/ffenestri/windows_menu_callbacks.go b/v2/internal/ffenestri/windows_menu_callbacks.go deleted file mode 100644 index 9bfae895b..000000000 --- a/v2/internal/ffenestri/windows_menu_callbacks.go +++ /dev/null @@ -1,126 +0,0 @@ -package ffenestri - -type callbackData struct { - menuID string - menuType menuType -} - -var callbacks = map[uint16]map[uint8]callbackData{} - -func addMenuCallback(key uint16, modifiers uint8, menuID string, menutype menuType) { - - if callbacks[key] == nil { - callbacks[key] = make(map[uint8]callbackData) - } - callbacks[key][modifiers] = callbackData{ - menuID: menuID, - menuType: menutype, - } -} - -func resetCallbacks() { - callbacks = map[uint16]map[uint8]callbackData{} -} - -func getCallbackForKeyPress(key uint16, modifiers uint8) (string, menuType) { - if callbacks[key] == nil { - return "", "" - } - result := callbacks[key][modifiers] - return result.menuID, result.menuType -} - -func calculateKeycode(key string) uint16 { - return keymap[key] -} - -// TODO: Complete this list -var keymap = map[string]uint16{ - "0": 0x30, - "1": 0x31, - "2": 0x32, - "3": 0x33, - "4": 0x34, - "5": 0x35, - "6": 0x36, - "7": 0x37, - "8": 0x38, - "9": 0x39, - "a": 0x41, - "b": 0x42, - "c": 0x43, - "d": 0x44, - "e": 0x45, - "f": 0x46, - "g": 0x47, - "h": 0x48, - "i": 0x49, - "j": 0x4A, - "k": 0x4B, - "l": 0x4C, - "m": 0x4D, - "n": 0x4E, - "o": 0x4F, - "p": 0x50, - "q": 0x51, - "r": 0x52, - "s": 0x53, - "t": 0x54, - "u": 0x55, - "v": 0x56, - "w": 0x57, - "x": 0x58, - "y": 0x59, - "z": 0x5A, - "backspace": 0x08, - "tab": 0x09, - "return": 0x0D, - "enter": 0x0D, - "escape": 0x1B, - "left": 0x25, - "right": 0x27, - "up": 0x26, - "down": 0x28, - "space": 0x20, - "delete": 0x2E, - "home": 0x24, - "end": 0x23, - "page up": 0x21, - "page down": 0x22, - "f1": 0x70, - "f2": 0x71, - "f3": 0x72, - "f4": 0x73, - "f5": 0x74, - "f6": 0x75, - "f7": 0x76, - "f8": 0x77, - "f9": 0x78, - "f10": 0x79, - "f11": 0x7A, - "f12": 0x7B, - "f13": 0x7C, - "f14": 0x7D, - "f15": 0x7E, - "f16": 0x7F, - "f17": 0x80, - "f18": 0x81, - "f19": 0x82, - "f20": 0x83, - "f21": 0x84, - "f22": 0x85, - "f23": 0x86, - "f24": 0x87, - // Windows doesn't have these apparently so use 0 for unsupported - "f25": 0, - "f26": 0, - "f27": 0, - "f28": 0, - "f29": 0, - "f30": 0, - "f31": 0, - "f32": 0, - "f33": 0, - "f34": 0, - "f35": 0, -} diff --git a/v2/internal/ffenestri/windows_radiogroup.go b/v2/internal/ffenestri/windows_radiogroup.go deleted file mode 100644 index 993bc0898..000000000 --- a/v2/internal/ffenestri/windows_radiogroup.go +++ /dev/null @@ -1,195 +0,0 @@ -//go:build windows -// +build windows - -package ffenestri - -import ( - "fmt" - "github.com/leaanthony/slicer" - "os" - "sync" - "text/tabwriter" - - "github.com/wailsapp/wails/v2/internal/menumanager" -) - -/* --------------------------------------------------------------------------------- - -Radio Groups ------------- -Radio groups are stored by the ProcessedMenu as a list of menu ids. -Windows only cares about the start and end ids of the group so we -preprocess the radio groups and store this data in a radioGroupMap. -When a radio button is clicked, we use the menu id to read in the -radio group data and call CheckMenuRadioItem to update the group. - -*/ - -type radioGroupStartEnd struct { - startID win32MenuItemID - endID win32MenuItemID -} - -type RadioGroupCache struct { - cache map[*menumanager.ProcessedMenu]map[wailsMenuItemID][]*radioGroupStartEnd - mutex sync.RWMutex -} - -func NewRadioGroupCache() *RadioGroupCache { - return &RadioGroupCache{ - cache: make(map[*menumanager.ProcessedMenu]map[wailsMenuItemID][]*radioGroupStartEnd), - } -} - -func (c *RadioGroupCache) Dump() { - // Start a new tabwriter - w := new(tabwriter.Writer) - w.Init(os.Stdout, 8, 8, 0, '\t', 0) - - println("---------------- RadioGroupCache", c, "Dump ----------------") - for menu, processedMenu := range c.cache { - println("Menu", menu) - _, _ = fmt.Fprintf(w, "Wails ID \tWindows ID Pairs\n") - for wailsMenuItemID, radioGroupStartEnd := range processedMenu { - menus := slicer.String() - for _, se := range radioGroupStartEnd { - menus.Add(fmt.Sprintf("[%d -> %d]", se.startID, se.endID)) - } - _, _ = fmt.Fprintf(w, "%s\t%s\n", wailsMenuItemID, menus.Join(", ")) - _ = w.Flush() - } - } -} - -func (c *RadioGroupCache) addToRadioGroupCache(menu *menumanager.ProcessedMenu, item wailsMenuItemID, radioGroupMaps []*radioGroupStartEnd) { - - c.mutex.Lock() - - // Get map for menu - if c.cache[menu] == nil { - c.cache[menu] = make(map[wailsMenuItemID][]*radioGroupStartEnd) - } - menuMap := c.cache[menu] - - // Ensure we have a slice - if menuMap[item] == nil { - menuMap[item] = []*radioGroupStartEnd{} - } - - menuMap[item] = radioGroupMaps - - c.mutex.Unlock() - -} - -func (c *RadioGroupCache) removeMenuFromRadioBoxCache(menu *menumanager.ProcessedMenu) { - c.mutex.Lock() - delete(c.cache, menu) - c.mutex.Unlock() -} - -func (c *RadioGroupCache) getRadioGroupMappings(wailsMenuID wailsMenuItemID) []*radioGroupStartEnd { - c.mutex.Lock() - result := []*radioGroupStartEnd{} - for _, menugroups := range c.cache { - groups := menugroups[wailsMenuID] - if groups != nil { - result = append(result, groups...) - } - } - c.mutex.Unlock() - return result -} - -type RadioGroupMap struct { - cache map[*menumanager.ProcessedMenu]map[wailsMenuItemID][]win32MenuItemID - mutex sync.RWMutex -} - -func NewRadioGroupMap() *RadioGroupMap { - return &RadioGroupMap{ - cache: make(map[*menumanager.ProcessedMenu]map[wailsMenuItemID][]win32MenuItemID), - } -} - -func (c *RadioGroupMap) Dump() { - // Start a new tabwriter - w := new(tabwriter.Writer) - w.Init(os.Stdout, 8, 8, 0, '\t', 0) - - println("---------------- RadioGroupMap", c, "Dump ----------------") - for _, processedMenu := range c.cache { - _, _ = fmt.Fprintf(w, "Menu\tWails ID \tWindows IDs\n") - for wailsMenuItemID, win32menus := range processedMenu { - menus := slicer.String() - for _, win32menu := range win32menus { - menus.Add(fmt.Sprintf("%v", win32menu)) - } - _, _ = fmt.Fprintf(w, "%p\t%s\t%s\n", processedMenu, wailsMenuItemID, menus.Join(", ")) - _ = w.Flush() - } - } -} - -func (m *RadioGroupMap) addRadioGroupMapping(menu *menumanager.ProcessedMenu, item wailsMenuItemID, win32ID win32MenuItemID) { - m.mutex.Lock() - - // Get map for menu - if m.cache[menu] == nil { - m.cache[menu] = make(map[wailsMenuItemID][]win32MenuItemID) - } - menuMap := m.cache[menu] - - // Ensure we have a slice - if menuMap[item] == nil { - menuMap[item] = []win32MenuItemID{} - } - - menuMap[item] = append(menuMap[item], win32ID) - - m.mutex.Unlock() -} - -func (m *RadioGroupMap) removeMenuFromRadioGroupMapping(menu *menumanager.ProcessedMenu) { - m.mutex.Lock() - delete(m.cache, menu) - m.mutex.Unlock() -} - -func (m *RadioGroupMap) getRadioGroupMapping(wailsMenuID wailsMenuItemID) []win32MenuItemID { - m.mutex.Lock() - result := []win32MenuItemID{} - for _, menuids := range m.cache { - ids := menuids[wailsMenuID] - if ids != nil { - result = append(result, ids...) - } - } - m.mutex.Unlock() - return result -} - -func selectRadioItemFromWailsMenuID(wailsMenuID wailsMenuItemID, win32MenuID win32MenuItemID) error { - radioItemGroups := globalRadioGroupCache.getRadioGroupMappings(wailsMenuID) - // Figure out offset into group - var offset win32MenuItemID = 0 - for _, radioItemGroup := range radioItemGroups { - if win32MenuID >= radioItemGroup.startID && win32MenuID <= radioItemGroup.endID { - offset = win32MenuID - radioItemGroup.startID - break - } - } - for _, radioItemGroup := range radioItemGroups { - selectedMenuID := radioItemGroup.startID + offset - menuItemDetails := getMenuCacheEntry(selectedMenuID) - if menuItemDetails != nil { - if menuItemDetails.parent != 0 { - err := selectRadioItem(selectedMenuID, radioItemGroup.startID, radioItemGroup.endID, menuItemDetails.parent) - if err != nil { - return err - } - } - } - } - return nil -} diff --git a/v2/internal/ffenestri/windows_win32.go b/v2/internal/ffenestri/windows_win32.go deleted file mode 100644 index 89991df99..000000000 --- a/v2/internal/ffenestri/windows_win32.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build windows -// +build windows - -package ffenestri - -import ( - "unsafe" - - "github.com/wailsapp/wails/v2/internal/menumanager" - "golang.org/x/sys/windows" -) - -var ( - // DLL stuff - user32 = windows.NewLazySystemDLL("User32.dll") - win32CreateMenu = user32.NewProc("CreateMenu") - win32DestroyMenu = user32.NewProc("DestroyMenu") - win32CreatePopupMenu = user32.NewProc("CreatePopupMenu") - win32AppendMenuW = user32.NewProc("AppendMenuW") - win32SetMenu = user32.NewProc("SetMenu") - win32CheckMenuItem = user32.NewProc("CheckMenuItem") - win32GetMenuState = user32.NewProc("GetMenuState") - win32CheckMenuRadioItem = user32.NewProc("CheckMenuRadioItem") - - applicationMenu *menumanager.WailsMenu - menuManager *menumanager.Manager -) - -const MF_BITMAP uint32 = 0x00000004 -const MF_CHECKED uint32 = 0x00000008 -const MF_DISABLED uint32 = 0x00000002 -const MF_ENABLED uint32 = 0x00000000 -const MF_GRAYED uint32 = 0x00000001 -const MF_MENUBARBREAK uint32 = 0x00000020 -const MF_MENUBREAK uint32 = 0x00000040 -const MF_OWNERDRAW uint32 = 0x00000100 -const MF_POPUP uint32 = 0x00000010 -const MF_SEPARATOR uint32 = 0x00000800 -const MF_STRING uint32 = 0x00000000 -const MF_UNCHECKED uint32 = 0x00000000 -const MF_BYCOMMAND uint32 = 0x00000000 -const MF_BYPOSITION uint32 = 0x00000400 - -const WM_SIZE = 5 -const WM_GETMINMAXINFO = 36 - -type Win32Rect struct { - Left int32 - Top int32 - Right int32 - Bottom int32 -} - -// ------------------- win32 calls ----------------------- - -func createWin32Menu() (win32Menu, error) { - res, _, err := win32CreateMenu.Call() - if res == 0 { - return 0, wall(err) - } - return win32Menu(res), nil -} - -func destroyWin32Menu(menu win32Menu) error { - res, _, err := win32DestroyMenu.Call(uintptr(menu)) - if res == 0 { - return wall(err, "Menu:", menu) - } - return nil -} - -func createWin32PopupMenu() (win32Menu, error) { - res, _, err := win32CreatePopupMenu.Call() - if res == 0 { - return 0, wall(err) - } - return win32Menu(res), nil -} - -func appendWin32MenuItem(menu win32Menu, flags uintptr, submenuOrID uintptr, label string) error { - menuText, err := windows.UTF16PtrFromString(label) - if err != nil { - return err - } - res, _, err := win32AppendMenuW.Call( - uintptr(menu), - flags, - submenuOrID, - uintptr(unsafe.Pointer(menuText)), - ) - if res == 0 { - return wall(err, "Menu", menu, "Flags", flags, "submenuOrID", submenuOrID, "label", label) - } - return nil -} - -func setWindowMenu(window win32Window, menu win32Menu) error { - res, _, err := win32SetMenu.Call(uintptr(window), uintptr(menu)) - if res == 0 { - return wall(err, "window", window, "menu", menu) - } - return nil -} - -func selectRadioItem(selectedMenuID, startMenuItemID, endMenuItemID win32MenuItemID, parent win32Menu) error { - res, _, err := win32CheckMenuRadioItem.Call(uintptr(parent), uintptr(startMenuItemID), uintptr(endMenuItemID), uintptr(selectedMenuID), uintptr(MF_BYCOMMAND)) - if int(res) == 0 { - return wall(err, selectedMenuID, startMenuItemID, endMenuItemID, parent) - } - return nil -} - -// -//func getWindowRect(window win32Window) (*Win32Rect, error) { -// var windowRect Win32Rect -// res, _, err := win32GetWindowRect.Call(uintptr(window), uintptr(unsafe.Pointer(&windowRect))) -// if res == 0 { -// return nil, err -// } -// return &windowRect, nil -//} -// -//func getClientRect(window win32Window) (*Win32Rect, error) { -// var clientRect Win32Rect -// res, _, err := win32GetClientRect.Call(uintptr(window), uintptr(unsafe.Pointer(&clientRect))) -// if res == 0 { -// return nil, err -// } -// return &clientRect, nil -//} -// diff --git a/v2/internal/ffenestri/wv2ComHandler_windows.h b/v2/internal/ffenestri/wv2ComHandler_windows.h deleted file mode 100644 index 60fc43574..000000000 --- a/v2/internal/ffenestri/wv2ComHandler_windows.h +++ /dev/null @@ -1,126 +0,0 @@ - -#ifndef WV2COMHANDLER_H -#define WV2COMHANDLER_H - -#include "ffenestri_windows.h" -#include "windows/WebView2.h" - -#include -#include - -class wv2ComHandler - : public ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, - public ICoreWebView2CreateCoreWebView2ControllerCompletedHandler, - public ICoreWebView2WebMessageReceivedEventHandler, - public ICoreWebView2PermissionRequestedEventHandler, - public ICoreWebView2AcceleratorKeyPressedEventHandler -{ - - struct Application *app; - HWND window; - messageCallback mcb; - comHandlerCallback cb; - - public: - wv2ComHandler(struct Application *app, HWND window, messageCallback mcb, comHandlerCallback cb) { - this->app = app; - this->window = window; - this->mcb = mcb; - this->cb = cb; - } - ULONG STDMETHODCALLTYPE AddRef() { return 1; } - ULONG STDMETHODCALLTYPE Release() { return 1; } - HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID *ppv) { - return S_OK; - } - HRESULT STDMETHODCALLTYPE Invoke(HRESULT res, - ICoreWebView2Environment *env) { - env->CreateCoreWebView2Controller(window, this); - return S_OK; - } - HRESULT STDMETHODCALLTYPE Invoke(HRESULT res, - ICoreWebView2Controller *controller) { - controller->AddRef(); - - ICoreWebView2 *webview; - ::EventRegistrationToken token; - controller->get_CoreWebView2(&webview); - controller->add_AcceleratorKeyPressed(this, &token); - webview->add_WebMessageReceived(this, &token); - webview->add_PermissionRequested(this, &token); - - cb(controller); - return S_OK; - } - - // This is our keyboard callback method - HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2Controller *controller, ICoreWebView2AcceleratorKeyPressedEventArgs * args) { - // Prevent WebView2 from processing the key - args->put_Handled(TRUE); - - COREWEBVIEW2_KEY_EVENT_KIND kind; - args->get_KeyEventKind(&kind); - if (kind == COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN || - kind == COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN) - { - UINT key; - args->get_VirtualKey(&key); - COREWEBVIEW2_PHYSICAL_KEY_STATUS status; - args->get_PhysicalKeyStatus(&status); - if (!status.WasKeyDown) - { - processKeyPress(key); - } - } - return S_OK; - } - - // This is called when JS posts a message back to webkit - HRESULT STDMETHODCALLTYPE Invoke( - ICoreWebView2 *sender, ICoreWebView2WebMessageReceivedEventArgs *args) { - LPWSTR message; - args->TryGetWebMessageAsString(&message); - if ( message == nullptr ) { - return S_OK; - } - const char *m = LPWSTRToCstr(message); - - // check for internal messages - if (strcmp(m, "completed") == 0) { - completed(app); - return S_OK; - } - else if (strcmp(m, "initialised") == 0) { - loadAssets(app); - return S_OK; - } - else if (strcmp(m, "wails-drag") == 0) { - // We don't drag in fullscreen mode - if (!app->isFullscreen) { - ReleaseCapture(); - SendMessage(this->window, WM_NCLBUTTONDOWN, HTCAPTION, 0); - } - return S_OK; - } - else { - messageFromWindowCallback(m); - } - delete[] m; - return S_OK; - } - HRESULT STDMETHODCALLTYPE - Invoke(ICoreWebView2 *sender, - ICoreWebView2PermissionRequestedEventArgs *args) { - printf("DDDDDDDDDDDD\n"); - - COREWEBVIEW2_PERMISSION_KIND kind; - args->get_PermissionKind(&kind); - if (kind == COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ) { - args->put_State(COREWEBVIEW2_PERMISSION_STATE_ALLOW); - } - return S_OK; - } - -}; - -#endif \ No newline at end of file diff --git a/v2/internal/fs/fs.go b/v2/internal/fs/fs.go index a1273f327..89d21c4da 100644 --- a/v2/internal/fs/fs.go +++ b/v2/internal/fs/fs.go @@ -14,13 +14,6 @@ import ( "github.com/leaanthony/slicer" ) -// LocalDirectory gets the caller's file directory -// Equivalent to node's __DIRNAME -func LocalDirectory() string { - _, thisFile, _, _ := runtime.Caller(1) - return filepath.Dir(thisFile) -} - // RelativeToCwd returns an absolute path based on the cwd // and the given relative path func RelativeToCwd(relativePath string) (string, error) { @@ -340,63 +333,6 @@ func CopyDirExtended(src string, dst string, ignore []string) (err error) { return } -// MoveDirExtended recursively moves a directory tree, attempting to preserve permissions. -// Source directory must exist, destination directory must *not* exist. It ignores any files or -// directories that are given through the ignore parameter. -// Symlinks are ignored and skipped. -func MoveDirExtended(src string, dst string, ignore []string) (err error) { - - ignoreList := slicer.String(ignore) - src = filepath.Clean(src) - dst = filepath.Clean(dst) - - si, err := os.Stat(src) - if err != nil { - return err - } - if !si.IsDir() { - return fmt.Errorf("source is not a directory") - } - - _, err = os.Stat(dst) - if err != nil && !os.IsNotExist(err) { - return - } - if err == nil { - return fmt.Errorf("destination already exists") - } - - err = MkDirs(dst) - if err != nil { - return - } - - entries, err := os.ReadDir(src) - if err != nil { - return - } - - for _, entry := range entries { - if ignoreList.Contains(entry.Name()) { - continue - } - srcPath := filepath.Join(src, entry.Name()) - dstPath := filepath.Join(dst, entry.Name()) - - // Skip symlinks. - if entry.Type()&os.ModeSymlink != 0 { - continue - } - - err := os.Rename(srcPath, dstPath) - if err != nil { - return err - } - } - - return -} - func FindPathToFile(fsys fs.FS, file string) (string, error) { stat, _ := fs.Stat(fsys, file) if stat != nil { diff --git a/v2/internal/messagedispatcher/dispatchclient.go b/v2/internal/messagedispatcher/dispatchclient.go deleted file mode 100644 index f528ebd33..000000000 --- a/v2/internal/messagedispatcher/dispatchclient.go +++ /dev/null @@ -1,90 +0,0 @@ -package messagedispatcher - -import ( - "fmt" - - "github.com/wailsapp/wails/v2/pkg/runtime" - - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/messagedispatcher/message" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// Client defines what a frontend client can do -type Client interface { - Quit() - NotifyEvent(message string) - CallResult(message string) - OpenFileDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) - OpenMultipleFilesDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) - OpenDirectoryDialog(dialogOptions runtime.OpenDialogOptions, callbackID string) - SaveDialog(dialogOptions runtime.SaveDialogOptions, callbackID string) - MessageDialog(dialogOptions runtime.MessageDialogOptions, callbackID string) - WindowSetTitle(title string) - WindowShow() - WindowHide() - WindowCenter() - WindowMaximise() - WindowUnmaximise() - WindowMinimise() - WindowUnminimise() - WindowPosition(x int, y int) - WindowSize(width int, height int) - WindowSetMinSize(width int, height int) - WindowSetMaxSize(width int, height int) - WindowFullscreen() - WindowUnfullscreen() - WindowSetColour(colour int) - DarkModeEnabled(callbackID string) - SetApplicationMenu(menuJSON string) - SetTrayMenu(trayMenuJSON string) - UpdateTrayMenuLabel(JSON string) - UpdateContextMenu(contextMenuJSON string) - DeleteTrayMenuByID(id string) -} - -// DispatchClient is what the frontends use to interface with the -// dispatcher -type DispatchClient struct { - id string - logger logger.CustomLogger - - bus *servicebus.ServiceBus - - // Client - frontend Client -} - -func newDispatchClient(id string, frontend Client, logger logger.CustomLogger, bus *servicebus.ServiceBus) *DispatchClient { - - return &DispatchClient{ - id: id, - frontend: frontend, - logger: logger, - bus: bus, - } - -} - -// DispatchMessage is called by the front ends. It is passed -// an IPC message, translates it to a more concrete message -// type then publishes it on the service bus. -func (d *DispatchClient) DispatchMessage(incomingMessage string) { - - // Parse the message - d.logger.Trace(fmt.Sprintf("Received message: %+v", incomingMessage)) - parsedMessage, err := message.Parse(incomingMessage) - if err != nil { - d.logger.Error(err.Error()) - return - } - - // Save this client id - parsedMessage.ClientID = d.id - - d.logger.Trace("I got a parsedMessage: %+v", parsedMessage) - - // Publish the parsed message - d.bus.PublishForTarget(parsedMessage.Topic, parsedMessage.Data, d.id) - -} diff --git a/v2/internal/messagedispatcher/message/call.go b/v2/internal/messagedispatcher/message/call.go deleted file mode 100644 index 946e00a93..000000000 --- a/v2/internal/messagedispatcher/message/call.go +++ /dev/null @@ -1,38 +0,0 @@ -package message - -import ( - "encoding/json" - "fmt" -) - -type CallMessage struct { - Name string `json:"name"` - Args []json.RawMessage `json:"args"` - CallbackID string `json:"callbackID,omitempty"` -} - -// callMessageParser does what it says on the tin! -func callMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Call messages must be at least 3 bytes `C{}`` - if len(message) < 3 { - return nil, fmt.Errorf("call message was an invalid length") - } - - callMessage := new(CallMessage) - - m := message[1:] - - err := json.Unmarshal([]byte(m), callMessage) - if err != nil { - println(err.Error()) - return nil, err - } - - topic := "call:invoke" - - // Create a new parsed message struct - parsedMessage := &parsedMessage{Topic: topic, Data: callMessage} - - return parsedMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/contextmenus.go b/v2/internal/messagedispatcher/message/contextmenus.go deleted file mode 100644 index 53acebd0e..000000000 --- a/v2/internal/messagedispatcher/message/contextmenus.go +++ /dev/null @@ -1,43 +0,0 @@ -package message - -import ( - "fmt" - - "github.com/wailsapp/wails/v2/pkg/menu" -) - -// ContextMenusOnMessage is used to emit listener registration requests -// on the service bus -type ContextMenusOnMessage struct { - // MenuID is the id of the menu item we are interested in - MenuID string - // Callback is called when the menu is clicked - Callback func(*menu.MenuItem, string) -} - -// contextMenusMessageParser does what it says on the tin! -func contextMenusMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Menu messages must be at least 2 bytes - if len(message) < 3 { - return nil, fmt.Errorf("context menus message was an invalid length") - } - - var topic string - var data interface{} - - // Switch the message type - switch message[1] { - case 'C': - contextMenuData := message[2:] - topic = "contextmenus:clicked" - data = contextMenuData - default: - return nil, fmt.Errorf("invalid menu message: %s", message) - } - - // Create a new parsed message struct - parsedMessage := &parsedMessage{Topic: topic, Data: data} - - return parsedMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/dialog.go b/v2/internal/messagedispatcher/message/dialog.go deleted file mode 100644 index 5fcc63d30..000000000 --- a/v2/internal/messagedispatcher/message/dialog.go +++ /dev/null @@ -1,61 +0,0 @@ -package message - -import ( - "encoding/json" - "fmt" - "strings" -) - -// dialogMessageParser does what it says on the tin! -func dialogMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Dialog messages must be at least 4 bytes - if len(message) < 4 { - return nil, fmt.Errorf("dialog message was an invalid length") - } - - var topic = "bad topic from dialogMessageParser" - var responseMessage *parsedMessage - - // Switch the event type (with or without data) - switch message[0] { - // Format of Dialog response messages: D

|<[]string as json encoded string> - case 'D': - dialogType := message[1] - message = message[2:] - idx := strings.IndexByte(message, '|') - if idx < 0 { - return nil, fmt.Errorf("Invalid dialog response message format: %+v", message) - } - callbackID := message[:idx] - payloadData := message[idx+1:] - - switch dialogType { - case 'O': - topic = "dialog:openselected:" + callbackID - responseMessage = &parsedMessage{Topic: topic, Data: payloadData} - case 'D': - topic = "dialog:opendirectoryselected:" + callbackID - responseMessage = &parsedMessage{Topic: topic, Data: payloadData} - case '*': - var data []string - topic = "dialog:openmultipleselected:" + callbackID - err := json.Unmarshal([]byte(payloadData), &data) - if err != nil { - return nil, err - } - responseMessage = &parsedMessage{Topic: topic, Data: data} - case 'S': - topic = "dialog:saveselected:" + callbackID - responseMessage = &parsedMessage{Topic: topic, Data: payloadData} - case 'M': - topic = "dialog:messageselected:" + callbackID - responseMessage = &parsedMessage{Topic: topic, Data: payloadData} - } - - default: - return nil, fmt.Errorf("Invalid message to dialogMessageParser()") - } - - return responseMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/event.go b/v2/internal/messagedispatcher/message/event.go deleted file mode 100644 index dcb133e48..000000000 --- a/v2/internal/messagedispatcher/message/event.go +++ /dev/null @@ -1,47 +0,0 @@ -package message - -import ( - "encoding/json" - "fmt" -) - -type EventMessage struct { - Name string `json:"name"` - Data []interface{} `json:"data"` -} - -type OnEventMessage struct { - Name string - Callback func(optionalData ...interface{}) - Counter int -} - -// eventMessageParser does what it says on the tin! -func eventMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Event messages must be at least 2 bytes - if len(message) < 3 { - return nil, fmt.Errorf("event message was an invalid length") - } - - eventMessage := new(EventMessage) - direction := message[1] - - // Switch the event type (with or without data) - switch message[0] { - case 'E': - m := message[2:] - err := json.Unmarshal([]byte(m), eventMessage) - if err != nil { - println(err.Error()) - return nil, err - } - } - - topic := "event:emit:from:" + string(direction) - - // Create a new parsed message struct - parsedMessage := &parsedMessage{Topic: topic, Data: eventMessage} - - return parsedMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/log.go b/v2/internal/messagedispatcher/message/log.go deleted file mode 100644 index 9b24fc5a1..000000000 --- a/v2/internal/messagedispatcher/message/log.go +++ /dev/null @@ -1,36 +0,0 @@ -package message - -import "fmt" - -var logMessageMap = map[byte]string{ - 'P': "log:print", - 'T': "log:trace", - 'D': "log:debug", - 'I': "log:info", - 'W': "log:warning", - 'E': "log:error", - 'F': "log:fatal", - 'S': "log:setlevel", -} - -// logMessageParser does what it says on the tin! -func logMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Log messages must be at least 2 bytes - if len(message) < 2 { - return nil, fmt.Errorf("log message was an invalid length") - } - - // Switch on the log type - messageTopic := logMessageMap[message[1]] - - // If the type is invalid, raise error - if messageTopic == "" { - return nil, fmt.Errorf("log message type '%c' invalid", message[1]) - } - - // Create a new parsed message struct - parsedMessage := &parsedMessage{Topic: messageTopic, Data: message[2:]} - - return parsedMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/menu.go b/v2/internal/messagedispatcher/message/menu.go deleted file mode 100644 index 483865fb9..000000000 --- a/v2/internal/messagedispatcher/message/menu.go +++ /dev/null @@ -1,51 +0,0 @@ -package message - -import ( - "fmt" - - "github.com/wailsapp/wails/v2/pkg/menu" -) - -// MenuOnMessage is used to emit listener registration requests -// on the service bus -type MenuOnMessage struct { - // MenuID is the id of the menu item we are interested in - MenuID string - // Callback is called when the menu is clicked - Callback func(*menu.MenuItem) -} - -// menuMessageParser does what it says on the tin! -func menuMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Menu messages must be at least 2 bytes - if len(message) < 3 { - return nil, fmt.Errorf("event message was an invalid length") - } - - var topic string - var data interface{} - - // Switch the message type - switch message[1] { - case 'C': - callbackid := message[2:] - topic = "menu:clicked" - data = callbackid - case 'o': - callbackid := message[2:] - topic = "menu:ontrayopen" - data = callbackid - case 'c': - callbackid := message[2:] - topic = "menu:ontrayclose" - data = callbackid - default: - return nil, fmt.Errorf("invalid menu message: %s", message) - } - - // Create a new parsed message struct - parsedMessage := &parsedMessage{Topic: topic, Data: data} - - return parsedMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/messageparser.go b/v2/internal/messagedispatcher/message/messageparser.go deleted file mode 100644 index 362070b0b..000000000 --- a/v2/internal/messagedispatcher/message/messageparser.go +++ /dev/null @@ -1,40 +0,0 @@ -package message - -import "fmt" - -// Parse -type parsedMessage struct { - Topic string - ClientID string - Data interface{} -} - -// Map of different message parsers based on the header byte of the message -var messageParsers = map[byte]func(string) (*parsedMessage, error){ - 'L': logMessageParser, - 'R': runtimeMessageParser, - 'E': eventMessageParser, - 'C': callMessageParser, - 'W': windowMessageParser, - 'D': dialogMessageParser, - 'S': systemMessageParser, - 'M': menuMessageParser, - 'T': trayMessageParser, - 'X': contextMenusMessageParser, - 'U': urlMessageParser, -} - -// Parse will attempt to parse the given message -func Parse(message string) (*parsedMessage, error) { - - if len(message) == 0 { - return nil, fmt.Errorf("MessageParser received blank message") - } - - parseMethod := messageParsers[message[0]] - if parseMethod == nil { - return nil, fmt.Errorf("message type '%c' invalid", message[0]) - } - - return parseMethod(message) -} diff --git a/v2/internal/messagedispatcher/message/runtime.go b/v2/internal/messagedispatcher/message/runtime.go deleted file mode 100644 index fc3a44258..000000000 --- a/v2/internal/messagedispatcher/message/runtime.go +++ /dev/null @@ -1,37 +0,0 @@ -package message - -import "fmt" - -// runtimeMessageParser does what it says on the tin! -func runtimeMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Log messages must be at least 2 bytes - if len(message) < 3 { - return nil, fmt.Errorf("runtime message was an invalid length") - } - - // Switch on the runtime module type - module := message[1] - switch module { - case 'B': - return processBrowserMessage(message) - } - - return nil, fmt.Errorf("unknown message: %s", message) -} - -// processBrowserMessage expects messages of the following format: -// RB -// O = Open -func processBrowserMessage(message string) (*parsedMessage, error) { - method := message[2] - switch method { - case 'O': - // Open URL - target := message[3:] - return &parsedMessage{Topic: "runtime:browser:open", Data: target}, nil - } - - return nil, fmt.Errorf("unknown browser message: %s", message) - -} diff --git a/v2/internal/messagedispatcher/message/system.go b/v2/internal/messagedispatcher/message/system.go deleted file mode 100644 index 1bda75140..000000000 --- a/v2/internal/messagedispatcher/message/system.go +++ /dev/null @@ -1,50 +0,0 @@ -package message - -import ( - "fmt" - "strings" -) - -// systemMessageParser does what it says on the tin! -func systemMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: system messages must be at least 2 bytes - if len(message) < 2 { - return nil, fmt.Errorf("system message was an invalid length") - } - - var responseMessage *parsedMessage - - // Remove 'S' - message = message[1:] - - // Switch the event type (with or without data) - switch message[0] { - // Format of system response messages: S| - // DarkModeEnabled - case 'D': - if len(message) < 4 { - return nil, fmt.Errorf("system message was an invalid length") - } - message = message[1:] - idx := strings.IndexByte(message, '|') - if idx < 0 { - return nil, fmt.Errorf("Invalid system response message format") - } - callbackID := message[:idx] - payloadData := message[idx+1:] - - topic := "systemresponse:" + callbackID - responseMessage = &parsedMessage{Topic: topic, Data: payloadData == "T"} - - // This is our startup hook - the frontend is now ready - case 'S': - topic := "hooks:startup" - startupURL := message[1:] - responseMessage = &parsedMessage{Topic: topic, Data: startupURL} - default: - return nil, fmt.Errorf("Invalid message to systemMessageParser()") - } - - return responseMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/tray.go b/v2/internal/messagedispatcher/message/tray.go deleted file mode 100644 index ac1cde8ed..000000000 --- a/v2/internal/messagedispatcher/message/tray.go +++ /dev/null @@ -1,46 +0,0 @@ -package message - -import ( - "fmt" - - "github.com/wailsapp/wails/v2/pkg/menu" -) - -// TrayOnMessage is used to emit listener registration requests -// on the service bus -type TrayOnMessage struct { - // MenuID is the id of the menu item we are interested in - MenuID string - // Callback is called when the menu is clicked - Callback func(*menu.MenuItem) -} - -// trayMessageParser does what it says on the tin! -func trayMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Menu messages must be at least 2 bytes - if len(message) < 3 { - return nil, fmt.Errorf("tray message was an invalid length") - } - - var topic string - var data interface{} - - // Switch the message type - switch message[1] { - case 'C': - callbackid := message[2:] - topic = "tray:clicked" - data = callbackid - case 'I': - topic = "trayfrontend:seticon" - data = message[2:] - default: - return nil, fmt.Errorf("invalid tray message: %s", message) - } - - // Create a new parsed message struct - parsedMessage := &parsedMessage{Topic: topic, Data: data} - - return parsedMessage, nil -} diff --git a/v2/internal/messagedispatcher/message/url.go b/v2/internal/messagedispatcher/message/url.go deleted file mode 100644 index 1bdc2f903..000000000 --- a/v2/internal/messagedispatcher/message/url.go +++ /dev/null @@ -1,20 +0,0 @@ -package message - -import "fmt" - -// urlMessageParser does what it says on the tin! -func urlMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: URL messages must be at least 2 bytes - if len(message) < 2 { - return nil, fmt.Errorf("log message was an invalid length") - } - - // Switch on the log type - switch message[1] { - case 'C': - return &parsedMessage{Topic: "url:handler", Data: message[2:]}, nil - default: - return nil, fmt.Errorf("url message type '%c' invalid", message[1]) - } -} diff --git a/v2/internal/messagedispatcher/message/window.go b/v2/internal/messagedispatcher/message/window.go deleted file mode 100644 index e31353fac..000000000 --- a/v2/internal/messagedispatcher/message/window.go +++ /dev/null @@ -1,91 +0,0 @@ -package message - -import "fmt" - -// windowMessageParser does what it says on the tin! -func windowMessageParser(message string) (*parsedMessage, error) { - - // Sanity check: Window messages must be at least 2 bytes - if len(message) < 2 { - return nil, fmt.Errorf("window message was an invalid length") - } - - // Extract event type - windowEvent := message[1] - parsedMessage := &parsedMessage{} - - // Switch the windowEvent type - switch windowEvent { - - // Closed window - case 'C': - parsedMessage.Topic = "quit" - parsedMessage.Data = "Window Closed" - - // Center window - case 'c': - parsedMessage.Topic = "window:center" - parsedMessage.Data = "" - - // Hide window - case 'H': - parsedMessage.Topic = "window:hide" - parsedMessage.Data = "" - - // Show window - case 'S': - parsedMessage.Topic = "window:show" - parsedMessage.Data = "" - - // Position window - case 'p': - parsedMessage.Topic = "window:position:" + message[3:] - parsedMessage.Data = "" - - // Set window size - case 's': - parsedMessage.Topic = "window:size:" + message[3:] - parsedMessage.Data = "" - - // Maximise window - case 'M': - parsedMessage.Topic = "window:maximise" - parsedMessage.Data = "" - - // Unmaximise window - case 'U': - parsedMessage.Topic = "window:unmaximise" - parsedMessage.Data = "" - - // Minimise window - case 'm': - parsedMessage.Topic = "window:minimise" - parsedMessage.Data = "" - - // Unminimise window - case 'u': - parsedMessage.Topic = "window:unminimise" - parsedMessage.Data = "" - - // Fullscreen window - case 'F': - parsedMessage.Topic = "window:fullscreen" - parsedMessage.Data = "" - - // UnFullscreen window - case 'f': - parsedMessage.Topic = "window:unfullscreen" - parsedMessage.Data = "" - - // Set Title - case 'T': - parsedMessage.Topic = "window:settitle" - parsedMessage.Data = message[2:] - - // Unknown event type - default: - return nil, fmt.Errorf("unknown message: %s", message) - } - - return parsedMessage, nil -} diff --git a/v2/internal/messagedispatcher/messagedispatcher.go b/v2/internal/messagedispatcher/messagedispatcher.go deleted file mode 100644 index 5aea081d9..000000000 --- a/v2/internal/messagedispatcher/messagedispatcher.go +++ /dev/null @@ -1,578 +0,0 @@ -package messagedispatcher - -import ( - "context" - "encoding/json" - "strconv" - "strings" - "sync" - - "github.com/wailsapp/wails/v2/pkg/runtime" - - "github.com/wailsapp/wails/v2/internal/crypto" - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/messagedispatcher/message" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// Dispatcher translates messages received from the frontend -// and publishes them onto the service bus -type Dispatcher struct { - quitChannel <-chan *servicebus.Message - resultChannel <-chan *servicebus.Message - eventChannel <-chan *servicebus.Message - windowChannel <-chan *servicebus.Message - dialogChannel <-chan *servicebus.Message - systemChannel <-chan *servicebus.Message - menuChannel <-chan *servicebus.Message - - servicebus *servicebus.ServiceBus - logger logger.CustomLogger - - // Clients - clients map[string]*DispatchClient - lock sync.RWMutex - - // Context for cancellation - ctx context.Context - cancel context.CancelFunc - - // internal wait group - wg sync.WaitGroup -} - -// New dispatcher. Needs a service bus to send to. -func New(servicebus *servicebus.ServiceBus, logger *logger.Logger) (*Dispatcher, error) { - // Subscribe to call result messages - resultChannel, err := servicebus.Subscribe("call:result") - if err != nil { - return nil, err - } - - // Subscribe to event messages - eventChannel, err := servicebus.Subscribe("event:emit") - if err != nil { - return nil, err - } - - // Subscribe to quit messages - quitChannel, err := servicebus.Subscribe("quit") - if err != nil { - return nil, err - } - - // Subscribe to window messages - windowChannel, err := servicebus.Subscribe("window") - if err != nil { - return nil, err - } - - // Subscribe to dialog events - dialogChannel, err := servicebus.Subscribe("dialog:select") - if err != nil { - return nil, err - } - - systemChannel, err := servicebus.Subscribe("system:") - if err != nil { - return nil, err - } - - menuChannel, err := servicebus.Subscribe("menufrontend:") - if err != nil { - return nil, err - } - - // Create context - ctx, cancel := context.WithCancel(context.Background()) - - result := &Dispatcher{ - servicebus: servicebus, - eventChannel: eventChannel, - logger: logger.CustomLogger("Message Dispatcher"), - clients: make(map[string]*DispatchClient), - resultChannel: resultChannel, - quitChannel: quitChannel, - windowChannel: windowChannel, - dialogChannel: dialogChannel, - systemChannel: systemChannel, - menuChannel: menuChannel, - ctx: ctx, - cancel: cancel, - } - - return result, nil -} - -// Start the subsystem -func (d *Dispatcher) Start() error { - - d.logger.Trace("Starting") - - d.wg.Add(1) - - // Spin off a go routine - go func() { - defer d.logger.Trace("Shutdown") - for { - select { - case <-d.ctx.Done(): - d.wg.Done() - return - case <-d.quitChannel: - d.processQuit() - case resultMessage := <-d.resultChannel: - d.processCallResult(resultMessage) - case eventMessage := <-d.eventChannel: - d.processEvent(eventMessage) - case windowMessage := <-d.windowChannel: - d.processWindowMessage(windowMessage) - case dialogMessage := <-d.dialogChannel: - d.processDialogMessage(dialogMessage) - case systemMessage := <-d.systemChannel: - d.processSystemMessage(systemMessage) - case menuMessage := <-d.menuChannel: - d.processMenuMessage(menuMessage) - } - } - }() - - return nil -} - -func (d *Dispatcher) processQuit() { - d.lock.RLock() - defer d.lock.RUnlock() - for _, client := range d.clients { - client.frontend.Quit() - } -} - -// RegisterClient will register the given callback with the dispatcher -// and return a DispatchClient that the caller can use to send messages -func (d *Dispatcher) RegisterClient(client Client) *DispatchClient { - d.lock.Lock() - defer d.lock.Unlock() - - // Create ID - id := d.getUniqueID() - d.clients[id] = newDispatchClient(id, client, d.logger, d.servicebus) - - return d.clients[id] -} - -// RemoveClient will remove the registered client -func (d *Dispatcher) RemoveClient(dc *DispatchClient) { - d.lock.Lock() - defer d.lock.Unlock() - delete(d.clients, dc.id) -} - -func (d *Dispatcher) getUniqueID() string { - var uid string - for { - uid = crypto.RandomID() - - if d.clients[uid] == nil { - break - } - } - - return uid -} - -func (d *Dispatcher) processCallResult(result *servicebus.Message) { - target := result.Target() - - if target == "" { - // This is an error. Calls are 1:1! - d.logger.Fatal("No target for call result: %+v", result) - } - - d.lock.RLock() - client := d.clients[target] - d.lock.RUnlock() - if client == nil { - // This is fatal - unknown target! - d.logger.Fatal("Unknown target for call result: %+v", result) - return - } - - d.logger.Trace("Sending message to client %s: R%s", target, result.Data().(string)) - client.frontend.CallResult(result.Data().(string)) -} - -// processSystem -func (d *Dispatcher) processSystemMessage(result *servicebus.Message) { - - d.logger.Trace("Got system in message dispatcher: %+v", result) - - splitTopic := strings.Split(result.Topic(), ":") - command := splitTopic[1] - callbackID := splitTopic[2] - switch command { - case "isdarkmode": - d.lock.RLock() - for _, client := range d.clients { - client.frontend.DarkModeEnabled(callbackID) - break - } - d.lock.RUnlock() - - default: - d.logger.Error("Unknown system command: %s", command) - } -} - -// processEvent will -func (d *Dispatcher) processEvent(result *servicebus.Message) { - - d.logger.Trace("Got event in message dispatcher: %+v", result) - - splitTopic := strings.Split(result.Topic(), ":") - eventType := splitTopic[1] - switch eventType { - case "emit": - eventFrom := splitTopic[3] - if eventFrom == "g" { - // This was sent from Go - notify frontend - eventData := result.Data().(*message.EventMessage) - // Unpack event - payload, err := json.Marshal(eventData) - if err != nil { - d.logger.Error("Unable to marshal eventData: %s", err.Error()) - return - } - d.lock.RLock() - for _, client := range d.clients { - client.frontend.NotifyEvent(string(payload)) - } - d.lock.RUnlock() - } - default: - d.logger.Error("Unknown event type: %s", eventType) - } -} - -// processWindowMessage processes messages intended for the window -func (d *Dispatcher) processWindowMessage(result *servicebus.Message) { - d.lock.RLock() - defer d.lock.RUnlock() - splitTopic := strings.Split(result.Topic(), ":") - command := splitTopic[1] - switch command { - case "settitle": - title, ok := result.Data().(string) - if !ok { - d.logger.Error("Invalid title for 'window:settitle' : %#v", result.Data()) - return - } - // Notify clients - for _, client := range d.clients { - client.frontend.WindowSetTitle(title) - } - case "fullscreen": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowFullscreen() - } - case "unfullscreen": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowUnfullscreen() - } - case "setcolour": - colour, ok := result.Data().(int) - if !ok { - d.logger.Error("Invalid colour for 'window:setcolour' : %#v", result.Data()) - return - } - // Notify clients - for _, client := range d.clients { - client.frontend.WindowSetColour(colour) - } - case "show": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowShow() - } - case "hide": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowHide() - } - case "center": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowCenter() - } - case "maximise": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowMaximise() - } - case "unmaximise": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowUnmaximise() - } - case "minimise": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowMinimise() - } - case "unminimise": - // Notify clients - for _, client := range d.clients { - client.frontend.WindowUnminimise() - } - case "position": - // We need 2 arguments - if len(splitTopic) != 4 { - d.logger.Error("Invalid number of parameters for 'window:position' : %#v", result.Data()) - return - } - x, err1 := strconv.Atoi(splitTopic[2]) - y, err2 := strconv.Atoi(splitTopic[3]) - if err1 != nil || err2 != nil { - d.logger.Error("Invalid integer parameters for 'window:position' : %#v", result.Data()) - return - } - // Notify clients - for _, client := range d.clients { - client.frontend.WindowPosition(x, y) - } - case "size": - // We need 2 arguments - if len(splitTopic) != 4 { - d.logger.Error("Invalid number of parameters for 'window:size' : %#v", result.Data()) - return - } - w, err1 := strconv.Atoi(splitTopic[2]) - h, err2 := strconv.Atoi(splitTopic[3]) - if err1 != nil || err2 != nil { - d.logger.Error("Invalid integer parameters for 'window:size' : %#v", result.Data()) - return - } - // Notifh clients - for _, client := range d.clients { - client.frontend.WindowSize(w, h) - } - case "minsize": - // We need 2 arguments - if len(splitTopic) != 4 { - d.logger.Error("Invalid number of parameters for 'window:minsize' : %#v", result.Data()) - return - } - w, err1 := strconv.Atoi(splitTopic[2]) - h, err2 := strconv.Atoi(splitTopic[3]) - if err1 != nil || err2 != nil { - d.logger.Error("Invalid integer parameters for 'window:minsize' : %#v", result.Data()) - return - } - // Notifh clients - for _, client := range d.clients { - client.frontend.WindowSetMinSize(w, h) - } - case "maxsize": - // We need 2 arguments - if len(splitTopic) != 4 { - d.logger.Error("Invalid number of parameters for 'window:maxsize' : %#v", result.Data()) - return - } - w, err1 := strconv.Atoi(splitTopic[2]) - h, err2 := strconv.Atoi(splitTopic[3]) - if err1 != nil || err2 != nil { - d.logger.Error("Invalid integer parameters for 'window:maxsize' : %#v", result.Data()) - return - } - // Notifh clients - for _, client := range d.clients { - client.frontend.WindowSetMaxSize(w, h) - } - default: - d.logger.Error("Unknown window command: %s", command) - } - d.logger.Trace("Got window in message dispatcher: %+v", result) - -} - -// processDialogMessage processes dialog messages -func (d *Dispatcher) processDialogMessage(result *servicebus.Message) { - splitTopic := strings.Split(result.Topic(), ":") - if len(splitTopic) < 4 { - d.logger.Error("Invalid dialog message : %#v", result.Data()) - return - } - - command := splitTopic[1] - switch command { - case "select": - dialogType := splitTopic[2] - switch dialogType { - case "open": - dialogOptions, ok := result.Data().(runtime.OpenDialogOptions) - if !ok { - d.logger.Error("Invalid data for 'dialog:select:open' : %#v", result.Data()) - return - } - // This is hardcoded in the sender too - callbackID := splitTopic[3] - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.OpenFileDialog(dialogOptions, callbackID) - } - case "openmultiple": - dialogOptions, ok := result.Data().(runtime.OpenDialogOptions) - if !ok { - d.logger.Error("Invalid data for 'dialog:select:openmultiple' : %#v", result.Data()) - return - } - // This is hardcoded in the sender too - callbackID := splitTopic[3] - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.OpenMultipleFilesDialog(dialogOptions, callbackID) - } - case "directory": - dialogOptions, ok := result.Data().(runtime.OpenDialogOptions) - if !ok { - d.logger.Error("Invalid data for 'dialog:select:directory' : %#v", result.Data()) - return - } - // This is hardcoded in the sender too - callbackID := splitTopic[3] - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.OpenDirectoryDialog(dialogOptions, callbackID) - } - case "save": - dialogOptions, ok := result.Data().(runtime.SaveDialogOptions) - if !ok { - d.logger.Error("Invalid data for 'dialog:select:save' : %#v", result.Data()) - return - } - // This is hardcoded in the sender too - callbackID := splitTopic[3] - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.SaveDialog(dialogOptions, callbackID) - } - case "message": - dialogOptions, ok := result.Data().(runtime.MessageDialogOptions) - if !ok { - d.logger.Error("Invalid data for 'dialog:select:message' : %#v", result.Data()) - return - } - // This is hardcoded in the sender too - callbackID := splitTopic[3] - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.MessageDialog(dialogOptions, callbackID) - } - default: - d.logger.Error("Unknown dialog type: %s", dialogType) - } - - default: - d.logger.Error("Unknown dialog command: %s", command) - } - -} - -func (d *Dispatcher) processMenuMessage(result *servicebus.Message) { - splitTopic := strings.Split(result.Topic(), ":") - if len(splitTopic) < 2 { - d.logger.Error("Invalid menu message : %#v", result.Data()) - return - } - - command := splitTopic[1] - switch command { - case "updateappmenu": - - updatedMenu, ok := result.Data().(string) - if !ok { - d.logger.Error("Invalid data for 'menufrontend:updateappmenu' : %#v", - result.Data()) - return - } - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.SetApplicationMenu(updatedMenu) - } - - case "settraymenu": - trayMenuJSON, ok := result.Data().(string) - if !ok { - d.logger.Error("Invalid data for 'menufrontend:settraymenu' : %#v", - result.Data()) - return - } - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.SetTrayMenu(trayMenuJSON) - } - - case "updatecontextmenu": - updatedContextMenu, ok := result.Data().(string) - if !ok { - d.logger.Error("Invalid data for 'menufrontend:updatecontextmenu' : %#v", - result.Data()) - return - } - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.UpdateContextMenu(updatedContextMenu) - } - - case "updatetraymenulabel": - updatedTrayMenuLabel, ok := result.Data().(string) - if !ok { - d.logger.Error("Invalid data for 'menufrontend:updatetraymenulabel' : %#v", - result.Data()) - return - } - - // TODO: Work out what we mean in a multi window environment... - // For now we will just pick the first one - for _, client := range d.clients { - client.frontend.UpdateTrayMenuLabel(updatedTrayMenuLabel) - } - case "deletetraymenu": - traymenuid, ok := result.Data().(string) - if !ok { - d.logger.Error("Invalid data for 'menufrontend:updatetraymenulabel' : %#v", - result.Data()) - return - } - - for _, client := range d.clients { - client.frontend.DeleteTrayMenuByID(traymenuid) - } - - default: - d.logger.Error("Unknown menufrontend command: %s", command) - } -} - -func (d *Dispatcher) Close() { - d.cancel() - d.wg.Wait() -} diff --git a/v2/internal/parse/README.md b/v2/internal/parse/README.md deleted file mode 100644 index 5a40811a3..000000000 --- a/v2/internal/parse/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Parse - -Parse will attempt to parse your Wails project to perform a number of tasks: - * Verify that you have bound struct pointers - * Generate JS helper files/docs - -It currently checks bindings correctly if your code binds using one of the following methods: - * Literal Binding: `app.Bind(&MyStruct{})` - * Variable Binding: `app.Bind(m)` - m can be `m := &MyStruct{}` or `m := newMyStruct()` - * Function Binding: `app.Bind(newMyStruct())` diff --git a/v2/internal/parse/parse.go b/v2/internal/parse/parse.go deleted file mode 100644 index 0d897ff52..000000000 --- a/v2/internal/parse/parse.go +++ /dev/null @@ -1,436 +0,0 @@ -package main - -import ( - "fmt" - "go/ast" - "os" - "strings" - - "github.com/leaanthony/slicer" - "golang.org/x/tools/go/packages" -) - -var structCache = make(map[string]*ParsedStruct) -var boundStructs = make(map[string]*ParsedStruct) -var boundMethods = []string{} -var boundStructPointerLiterals = []string{} -var boundStructLiterals = slicer.StringSlicer{} -var boundVariables = slicer.StringSlicer{} -var app = "" -var structPointerFunctionDecls = make(map[string]string) -var structFunctionDecls = make(map[string]string) -var variableStructDecls = make(map[string]string) -var variableFunctionDecls = make(map[string]string) - -type Parameter struct { - Name string - Type string -} - -type ParsedMethod struct { - Struct string - Name string - Comments []string - Inputs []*Parameter - Returns []*Parameter -} - -type ParsedStruct struct { - Name string - Methods []*ParsedMethod -} - -type BoundStructs []*ParsedStruct - -func ParseProject(projectPath string) (BoundStructs, error) { - - cfg := &packages.Config{Mode: packages.NeedFiles | packages.NeedSyntax | packages.NeedTypesInfo} - pkgs, err := packages.Load(cfg, projectPath) - if err != nil { - _, _ = fmt.Fprintf(os.Stderr, "load: %v\n", err) - os.Exit(1) - } - if packages.PrintErrors(pkgs) > 0 { - os.Exit(1) - } - - // Iterate the packages - for _, pkg := range pkgs { - - // Iterate the files - for _, file := range pkg.Syntax { - - var wailsPkgVar = "" - - ast.Inspect(file, func(n ast.Node) bool { - switch x := n.(type) { - // Parse import declarations - case *ast.ImportSpec: - // Determine what wails has been imported as - if x.Path.Value == `"github.com/wailsapp/wails/v2"` { - wailsPkgVar = x.Name.Name - } - // Parse calls. We are looking for app.Bind() calls - case *ast.CallExpr: - f, ok := x.Fun.(*ast.SelectorExpr) - if ok { - n, ok := f.X.(*ast.Ident) - if ok { - //Check this is the Bind() call associated with the app variable - if n.Name == app && f.Sel.Name == "Bind" { - if len(x.Args) == 1 { - ce, ok := x.Args[0].(*ast.CallExpr) - if ok { - n, ok := ce.Fun.(*ast.Ident) - if ok { - // We found a bind method using a function call - // EG: app.Bind( newMyStruct() ) - boundMethods = append(boundMethods, n.Name) - } - } else { - // We also want to check for Bind( &MyStruct{} ) - ue, ok := x.Args[0].(*ast.UnaryExpr) - if ok { - if ue.Op.String() == "&" { - cl, ok := ue.X.(*ast.CompositeLit) - if ok { - t, ok := cl.Type.(*ast.Ident) - if ok { - // We have found Bind( &MyStruct{} ) - boundStructPointerLiterals = append(boundStructPointerLiterals, t.Name) - } - } - } - } else { - // Let's check when the user binds a struct, - // rather than a struct pointer: Bind( MyStruct{} ) - // We do this to provide better hints to the user - cl, ok := x.Args[0].(*ast.CompositeLit) - if ok { - t, ok := cl.Type.(*ast.Ident) - if ok { - boundStructLiterals.Add(t.Name) - } - } else { - // Also check for when we bind a variable - // myVariable := &MyStruct{} - // app.Bind( myVariable ) - i, ok := x.Args[0].(*ast.Ident) - if ok { - boundVariables.Add(i.Name) - } - } - } - } - } - } - } - } - - // We scan assignments for a number of reasons: - // * Determine the variable containing the main application - // * Determine the type of variables that get used in Bind() - // * Determine the type of variables that get created with var := &MyStruct{} - case *ast.AssignStmt: - for _, rhs := range x.Rhs { - ce, ok := rhs.(*ast.CallExpr) - if ok { - se, ok := ce.Fun.(*ast.SelectorExpr) - if ok { - i, ok := se.X.(*ast.Ident) - if ok { - // Have we found the wails package name? - if i.Name == wailsPkgVar { - // Check we are calling a function to create the app - if se.Sel.Name == "CreateApp" || se.Sel.Name == "CreateAppWithOptions" { - if len(x.Lhs) == 1 { - i, ok := x.Lhs[0].(*ast.Ident) - if ok { - // Found the app variable name - app = i.Name - } - } - } - } - } - } else { - // Check for function assignment - // a := newMyStruct() - fe, ok := ce.Fun.(*ast.Ident) - if ok { - if len(x.Lhs) == 1 { - i, ok := x.Lhs[0].(*ast.Ident) - if ok { - // Store the variable -> Function mapping - // so we can later resolve the type - variableFunctionDecls[i.Name] = fe.Name - } - } - } - } - } else { - // Check for literal assignment of struct - // EG: myvar := MyStruct{} - ue, ok := rhs.(*ast.UnaryExpr) - if ok { - cl, ok := ue.X.(*ast.CompositeLit) - if ok { - t, ok := cl.Type.(*ast.Ident) - if ok { - if len(x.Lhs) == 1 { - i, ok := x.Lhs[0].(*ast.Ident) - if ok { - variableStructDecls[i.Name] = t.Name - } - } - } - } - } - } - } - // We scan for functions to build up a list of function names - // for a number of reasons: - // * Determine which functions are struct methods that are bound - // * Determine - case *ast.FuncDecl: - if x.Recv != nil { - // This is a struct method - for _, field := range x.Recv.List { - se, ok := field.Type.(*ast.StarExpr) - if ok { - // This is a struct pointer method - i, ok := se.X.(*ast.Ident) - if ok { - // If we haven't already found this struct, - // Create a placeholder in the cache - parsedStruct := structCache[i.Name] - if parsedStruct == nil { - structCache[i.Name] = &ParsedStruct{ - Name: i.Name, - } - parsedStruct = structCache[i.Name] - } - - // If this method is Public - if string(x.Name.Name[0]) == strings.ToUpper((string(x.Name.Name[0]))) { - structMethod := &ParsedMethod{ - Struct: i.Name, - Name: x.Name.Name, - } - // Check if the method has comments. - // If so, save it with the parsed method - if x.Doc != nil { - for _, comment := range x.Doc.List { - stringComment := comment.Text - if strings.HasPrefix(stringComment, "//") { - stringComment = stringComment[2:] - } - structMethod.Comments = append(structMethod.Comments, strings.TrimSpace(stringComment)) - } - } - - // Save the input parameters - for _, inputField := range x.Type.Params.List { - t, ok := inputField.Type.(*ast.Ident) - if !ok { - continue - } - for _, name := range inputField.Names { - structMethod.Inputs = append(structMethod.Inputs, &Parameter{Name: name.Name, Type: t.Name}) - } - } - - // Save the output parameters - for _, outputField := range x.Type.Results.List { - t, ok := outputField.Type.(*ast.Ident) - if !ok { - continue - } - if len(outputField.Names) == 0 { - structMethod.Returns = append(structMethod.Returns, &Parameter{Type: t.Name}) - } else { - for _, name := range outputField.Names { - structMethod.Returns = append(structMethod.Returns, &Parameter{Name: name.Name, Type: t.Name}) - } - } - } - - // Append this method to the parsed struct - parsedStruct.Methods = append(parsedStruct.Methods, structMethod) - - } - } - } - } - } else { - // This is a function declaration - // We care about its name and return type - // This will allow us to resolve types later - functionName := x.Name.Name - - // Look for one that returns a single value - if x.Type != nil && x.Type.Results != nil && x.Type.Results.List != nil { - if len(x.Type.Results.List) == 1 { - // Check for *struct - t, ok := x.Type.Results.List[0].Type.(*ast.StarExpr) - if ok { - s, ok := t.X.(*ast.Ident) - if ok { - // println("*** Function", functionName, "found which returns: *"+s.Name) - structPointerFunctionDecls[functionName] = s.Name - } - } else { - // Check for functions that return a struct - // This is to help us provide hints if the user binds a struct - t, ok := x.Type.Results.List[0].Type.(*ast.Ident) - if ok { - // println("*** Function", functionName, "found which returns: "+t.Name) - structFunctionDecls[functionName] = t.Name - } - } - } - } - } - } - return true - }) - // spew.Dump(file) - } - } - - /***** Update bound structs ******/ - - // Resolve bound Methods - for _, method := range boundMethods { - s, ok := structPointerFunctionDecls[method] - if !ok { - s, ok = structFunctionDecls[method] - if !ok { - println("Fatal: Bind statement using", method, "but cannot find", method, "declaration") - } else { - println("Fatal: Cannot bind struct using method `" + method + "` because it returns a struct (" + s + "). Return a pointer to " + s + " instead.") - } - os.Exit(1) - } - structDefinition := structCache[s] - if structDefinition == nil { - println("Fatal: Bind statement using `"+method+"` but cannot find struct", s, "definition") - os.Exit(1) - } - boundStructs[s] = structDefinition - } - - // Resolve bound vars - for _, structLiteral := range boundStructPointerLiterals { - s, ok := structCache[structLiteral] - if !ok { - println("Fatal: Bind statement using", structLiteral, "but cannot find", structLiteral, "declaration") - os.Exit(1) - } - boundStructs[structLiteral] = s - } - - // Resolve bound variables - boundVariables.Each(func(variable string) { - v, ok := variableStructDecls[variable] - if !ok { - method, ok := variableFunctionDecls[variable] - if !ok { - println("Fatal: Bind statement using variable `" + variable + "` which does not resolve to a struct pointer") - os.Exit(1) - } - - // Resolve function name - v, ok = structPointerFunctionDecls[method] - if !ok { - v, ok = structFunctionDecls[method] - if !ok { - println("Fatal: Bind statement using", method, "but cannot find", method, "declaration") - } else { - println("Fatal: Cannot bind variable `" + variable + "` because it resolves to a struct (" + v + "). Return a pointer to " + v + " instead.") - } - os.Exit(1) - } - - } - - s, ok := structCache[v] - if !ok { - println("Fatal: Bind statement using variable `" + variable + "` which resolves to a `" + v + "` but cannot find its declaration") - os.Exit(1) - } - boundStructs[v] = s - - }) - - // Check for struct literals - boundStructLiterals.Each(func(structName string) { - println("Fatal: Cannot bind struct using struct literal `" + structName + "{}`. Create a pointer to " + structName + " instead.") - os.Exit(1) - }) - - // Check for bound variables - // boundVariables.Each(func(varName string) { - // println("Fatal: Cannot bind struct using struct literal `" + structName + "{}`. Create a pointer to " + structName + " instead.") - // }) - - // spew.Dump(boundStructs) - // os.Exit(0) - - // } - // Inspect the AST and print all identifiers and literals. - - println("export {") - - noOfStructs := len(boundStructs) - structCount := 0 - for _, s := range boundStructs { - structCount++ - println() - println(" " + s.Name + ": {") - println() - noOfMethods := len(s.Methods) - for methodCount, m := range s.Methods { - println(" /****************") - for _, comment := range m.Comments { - println(" *", comment) - } - if len(m.Comments) > 0 { - println(" *") - } - inputNames := "" - for _, input := range m.Inputs { - println(" * @param {"+input.Type+"}", input.Name) - inputNames += input.Name + ", " - } - print(" * @return Promise<") - for _, output := range m.Returns { - print(output.Type + "|") - } - println("Error>") - println(" *") - println(" ***/") - if len(inputNames) > 2 { - inputNames = inputNames[:len(inputNames)-2] - } - println(" ", m.Name+": function("+inputNames+") {") - println(" return window.go." + s.Name + "." + m.Name + "(" + inputNames + ");") - print(" }") - if methodCount < noOfMethods-1 { - print(",") - } - println() - println() - } - print(" }") - if structCount < noOfStructs-1 { - print(",") - } - println() - } - println() - println("}") - println() - - return nil, nil -} diff --git a/v2/internal/runtime/js/package-lock.json b/v2/internal/runtime/js/package-lock.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/v2/internal/servicebus/extract.go b/v2/internal/servicebus/extract.go deleted file mode 100644 index bcd46186c..000000000 --- a/v2/internal/servicebus/extract.go +++ /dev/null @@ -1,17 +0,0 @@ -package servicebus - -import ( - "context" - "log" - "runtime" -) - -func ExtractBus(ctx context.Context) *ServiceBus { - bus := ctx.Value("bus") - if bus == nil { - pc, _, _, _ := runtime.Caller(1) - funcName := runtime.FuncForPC(pc).Name() - log.Fatalf("cannot call '%s': Application not initialised", funcName) - } - return bus.(*ServiceBus) -} diff --git a/v2/internal/servicebus/message.go b/v2/internal/servicebus/message.go deleted file mode 100644 index aea95f5e3..000000000 --- a/v2/internal/servicebus/message.go +++ /dev/null @@ -1,43 +0,0 @@ -package servicebus - -// Message is a service bus message that contains a -// topic and data -type Message struct { - topic string - data interface{} - target string -} - -// NewMessage creates a new message with the given -// topic and data -func NewMessage(topic string, data interface{}) *Message { - return &Message{ - topic: topic, - data: data, - } -} - -// NewMessageForTarget creates a new message with the given -// topic and data -func NewMessageForTarget(topic string, data interface{}, target string) *Message { - return &Message{ - topic: topic, - data: data, - target: target, - } -} - -// Topic returns the message topic -func (m *Message) Topic() string { - return m.topic -} - -// Data returns the message data -func (m *Message) Data() interface{} { - return m.data -} - -// Target returns the message Target -func (m *Message) Target() string { - return m.target -} diff --git a/v2/internal/servicebus/servicebus.go b/v2/internal/servicebus/servicebus.go deleted file mode 100644 index 86faa9aed..000000000 --- a/v2/internal/servicebus/servicebus.go +++ /dev/null @@ -1,181 +0,0 @@ -package servicebus - -import ( - "context" - "fmt" - "strings" - "sync" - - "github.com/wailsapp/wails/v2/internal/logger" -) - -// ServiceBus is a messaging bus for Wails applications -type ServiceBus struct { - listeners map[string][]chan *Message - messageQueue chan *Message - lock sync.RWMutex - closed bool - debug bool - logger logger.CustomLogger - ctx context.Context - cancel context.CancelFunc -} - -// New creates a new ServiceBus -// The internal message queue is set to 100 messages -// Listener queues are set to 10 -func New(logger *logger.Logger) *ServiceBus { - - ctx, cancel := context.WithCancel(context.Background()) - return &ServiceBus{ - listeners: make(map[string][]chan *Message), - messageQueue: make(chan *Message, 100), - logger: logger.CustomLogger("Service Bus"), - ctx: ctx, - cancel: cancel, - } -} - -// dispatch the given message to the listeners -func (s *ServiceBus) dispatchMessage(message *Message) { - - // Lock to prevent additions to the listeners - s.lock.RLock() - defer s.lock.RUnlock() - - // Iterate over listener's topics - for topic := range s.listeners { - - // If the topic matches - if strings.HasPrefix(message.Topic(), topic) { - - // Iterate over the listeners - for _, callback := range s.listeners[topic] { - - // Process the message - callback <- message - } - } - } -} - -// Debug puts the service bus into debug mode. -func (s *ServiceBus) Debug() { - s.debug = true -} - -// Start the service bus -func (s *ServiceBus) Start() error { - - // Prevent starting when closed - if s.closed { - return fmt.Errorf("cannot call start on closed servicebus") - } - - s.logger.Trace("Starting") - - go func() { - defer s.logger.Trace("Stopped") - - // Loop until we get a quit message - for { - - select { - case <-s.ctx.Done(): - return - - // Listen for messages - case message := <-s.messageQueue: - - // Log message if in debug mode - if s.debug { - s.logger.Trace("Got message: { Topic: %s, Interface: %#v }", message.Topic(), message.Data()) - } - // Dispatch message - s.dispatchMessage(message) - } - } - - }() - - return nil -} - -// Stop the service bus -func (s *ServiceBus) Stop() error { - - // Prevent subscribing when closed - if s.closed { - return fmt.Errorf("cannot call stop on closed servicebus") - } - - s.closed = true - - // Send quit message - s.cancel() - - // Close down subscriber channels - s.lock.Lock() - defer s.lock.Unlock() - - for _, subscribers := range s.listeners { - for _, channel := range subscribers { - close(channel) - } - } - - // Close message queue - close(s.messageQueue) - - return nil -} - -// UnSubscribe removes the listeners for the given topic (Use with caution!) -func (s *ServiceBus) UnSubscribe(topic string) { - // Prevent any reads or writes to the listeners whilst - // we create a new one - s.lock.Lock() - defer s.lock.Unlock() - s.listeners[topic] = nil -} - -// Subscribe is used to register a listener's interest in a topic -func (s *ServiceBus) Subscribe(topic string) (<-chan *Message, error) { - - // Prevent subscribing when closed - if s.closed { - return nil, fmt.Errorf("cannot call subscribe on closed servicebus") - } - - // Prevent any reads or writes to the listeners whilst - // we create a new one - s.lock.Lock() - defer s.lock.Unlock() - - // Append the new listener - listener := make(chan *Message, 10) - s.listeners[topic] = append(s.listeners[topic], listener) - return (<-chan *Message)(listener), nil - -} - -// Publish sends the given message on the service bus -func (s *ServiceBus) Publish(topic string, data interface{}) { - // Prevent publish when closed - if s.closed { - return - } - - message := NewMessage(topic, data) - s.messageQueue <- message -} - -// PublishForTarget sends the given message on the service bus for the given target -func (s *ServiceBus) PublishForTarget(topic string, data interface{}, target string) { - // Prevent publish when closed - if s.closed { - return - } - message := NewMessageForTarget(topic, data, target) - s.messageQueue <- message -} diff --git a/v2/internal/servicebus/servicebus_test.go b/v2/internal/servicebus/servicebus_test.go deleted file mode 100644 index 750a56aaa..000000000 --- a/v2/internal/servicebus/servicebus_test.go +++ /dev/null @@ -1,230 +0,0 @@ -package servicebus - -import ( - "sync" - "testing" - - "github.com/matryer/is" - "github.com/wailsapp/wails/v2/internal/logger" -) - -type Person interface { - FullName() string -} - -type person struct { - Firstname string - Lastname string -} - -func newPerson(firstname string, lastname string) *person { - result := &person{} - result.Firstname = firstname - result.Lastname = lastname - return result -} - -func (p *person) FullName() string { - return p.Firstname + " " + p.Lastname -} - -func TestSingleTopic(t *testing.T) { - - is := is.New(t) - - var expected string = "I am a message!" - var actual string - - var wg sync.WaitGroup - - // Create new bus - bus := New(logger.New()) - messageChannel, _ := bus.Subscribe("hello") - - wg.Add(1) - go func() { - message := <-messageChannel - actual = message.Data().(string) - wg.Done() - }() - - bus.Start() - bus.Publish("hello", "I am a message!") - wg.Wait() - bus.Stop() - - is.Equal(actual, expected) - -} -func TestMultipleTopics(t *testing.T) { - - is := is.New(t) - - var hello string - var world string - var expected string = "Hello World!" - - var wg sync.WaitGroup - - // Create new bus - bus := New(logger.New()) - - // Create subscriptions - helloChannel, _ := bus.Subscribe("hello") - worldChannel, _ := bus.Subscribe("world") - - wg.Add(1) - go func() { - counter := 2 - for counter > 0 { - select { - case helloMessage := <-helloChannel: - hello = helloMessage.Data().(string) - counter-- - case worldMessage := <-worldChannel: - world = worldMessage.Data().(string) - counter-- - } - } - wg.Done() - }() - - bus.Start() - bus.Publish("hello", "Hello ") - bus.Publish("world", "World!") - wg.Wait() - bus.Stop() - - is.Equal(hello+world, expected) -} - -func TestSingleTopicWildcard(t *testing.T) { - - is := is.New(t) - - var expected string = "I am a message!" - var actual string - - var wg sync.WaitGroup - - // Create new bus - bus := New(logger.New()) - messageChannel, _ := bus.Subscribe("hello") - - wg.Add(1) - go func() { - message := <-messageChannel - actual = message.Data().(string) - wg.Done() - }() - - bus.Start() - bus.Publish("hello:wildcard:test", "I am a message!") - wg.Wait() - bus.Stop() - - is.Equal(actual, expected) - -} -func TestMultipleTopicsWildcard(t *testing.T) { - - is := is.New(t) - - var hello string - var world string - var expected string = "Hello World!" - - var wg sync.WaitGroup - - // Create new bus - bus := New(logger.New()) - helloChannel, _ := bus.Subscribe("hello") - worldChannel, _ := bus.Subscribe("world") - - wg.Add(1) - go func() { - counter := 2 - for counter > 0 { - select { - case helloMessage := <-helloChannel: - hello = helloMessage.Data().(string) - counter-- - case worldMessage := <-worldChannel: - world = worldMessage.Data().(string) - counter-- - } - } - wg.Done() - }() - - bus.Start() - bus.Publish("hello:wildcard:test", "Hello ") - bus.Publish("world:wildcard:test", "World!") - wg.Wait() - bus.Stop() - - is.Equal(hello+world, expected) -} - -func TestStructData(t *testing.T) { - - is := is.New(t) - - var expected string = "Tom Jones" - var actual string - - var wg sync.WaitGroup - - // Create new bus - bus := New(logger.New()) - messageChannel, _ := bus.Subscribe("person") - - wg.Add(1) - go func() { - message := <-messageChannel - p := message.Data().(*person) - actual = p.FullName() - wg.Done() - }() - - bus.Start() - bus.Publish("person", newPerson("Tom", "Jones")) - wg.Wait() - bus.Stop() - - is.Equal(actual, expected) - -} - -func TestErrors(t *testing.T) { - - is := is.New(t) - - // Create new bus - bus := New(logger.New()) - - _, err := bus.Subscribe("person") - is.NoErr(err) - - err = bus.Start() - is.NoErr(err) - - err = bus.Publish("person", newPerson("Tom", "Jones")) - is.NoErr(err) - - err = bus.Stop() - is.NoErr(err) - - err = bus.Stop() - is.True(err != nil) - - err = bus.Start() - is.True(err != nil) - - _, err = bus.Subscribe("person") - is.True(err != nil) - - err = bus.Publish("person", newPerson("Tom", "Jones")) - is.True(err != nil) - -} diff --git a/v2/internal/subsystem/binding.go b/v2/internal/subsystem/binding.go deleted file mode 100644 index cfc4bae4f..000000000 --- a/v2/internal/subsystem/binding.go +++ /dev/null @@ -1,64 +0,0 @@ -package subsystem - -import ( - "github.com/wailsapp/wails/v2/internal/binding" - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// Binding is the Binding subsystem. It manages all service bus messages -// starting with "binding". -type Binding struct { - bindingChannel <-chan *servicebus.Message - - running bool - - // Binding db - bindings *binding.Bindings - - // logger - logger logger.CustomLogger -} - -// NewBinding creates a new binding subsystem. Uses the given bindings db for reference. -func NewBinding(bus *servicebus.ServiceBus, logger *logger.Logger, bindings *binding.Bindings) (*Binding, error) { - - // Subscribe to event messages - bindingChannel, err := bus.Subscribe("binding") - if err != nil { - return nil, err - } - - result := &Binding{ - bindingChannel: bindingChannel, - logger: logger.CustomLogger("Binding Subsystem"), - bindings: bindings, - } - - return result, nil -} - -// Start the subsystem -func (b *Binding) Start() error { - - b.running = true - - b.logger.Trace("Starting") - - // Spin off a go routine - go func() { - for b.running { - select { - case bindingMessage := <-b.bindingChannel: - b.logger.Trace("Got binding message: %+v", bindingMessage) - } - } - b.logger.Trace("Shutdown") - }() - - return nil -} - -func (b *Binding) Close() { - b.running = false -} diff --git a/v2/internal/subsystem/call.go b/v2/internal/subsystem/call.go deleted file mode 100644 index f9ee4fd47..000000000 --- a/v2/internal/subsystem/call.go +++ /dev/null @@ -1,202 +0,0 @@ -package subsystem - -import ( - "context" - "encoding/json" - "fmt" - "github.com/wailsapp/wails/v2/pkg/runtime" - "strings" - "sync" - - "github.com/wailsapp/wails/v2/internal/binding" - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/messagedispatcher/message" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// Call is the Call subsystem. It manages all service bus messages -// starting with "call". -type Call struct { - callChannel <-chan *servicebus.Message - - // quit flag - shouldQuit bool - - // bindings DB - DB *binding.DB - - // ServiceBus - bus *servicebus.ServiceBus - - // logger - logger logger.CustomLogger - - // context - ctx context.Context - - // parent waitgroup - wg *sync.WaitGroup -} - -// NewCall creates a new call subsystem -func NewCall(ctx context.Context, bus *servicebus.ServiceBus, logger *logger.Logger, DB *binding.DB) (*Call, error) { - - // Subscribe to event messages - callChannel, err := bus.Subscribe("call:invoke") - if err != nil { - return nil, err - } - - result := &Call{ - callChannel: callChannel, - logger: logger.CustomLogger("Call Subsystem"), - DB: DB, - bus: bus, - ctx: ctx, - wg: ctx.Value("waitgroup").(*sync.WaitGroup), - } - - return result, nil -} - -// Start the subsystem -func (c *Call) Start() error { - - c.wg.Add(1) - - // Spin off a go routine - go func() { - defer c.logger.Trace("Shutdown") - for { - select { - case <-c.ctx.Done(): - c.wg.Done() - return - case callMessage := <-c.callChannel: - c.processCall(callMessage) - } - } - - }() - - return nil -} - -func (c *Call) processCall(callMessage *servicebus.Message) { - - c.logger.Trace("Got message: %+v", callMessage) - - // Extract payload - payload := callMessage.Data().(*message.CallMessage) - - // Lookup method - registeredMethod := c.DB.GetMethod(payload.Name) - - // Check if it's a system call - if strings.HasPrefix(payload.Name, ".wails.") { - c.processSystemCall(payload, callMessage.Target()) - return - } - - // Check we have it - if registeredMethod == nil { - c.sendError(fmt.Errorf("Method not registered"), payload, callMessage.Target()) - return - } - c.logger.Trace("Got registered method: %+v", registeredMethod) - - args, err := registeredMethod.ParseArgs(payload.Args) - if err != nil { - c.sendError(fmt.Errorf("Error parsing arguments: %s", err.Error()), payload, callMessage.Target()) - } - - result, err := registeredMethod.Call(args) - if err != nil { - c.sendError(err, payload, callMessage.Target()) - return - } - c.logger.Trace("registeredMethod.Call: %+v, %+v", result, err) - // process result - c.sendResult(result, payload, callMessage.Target()) - -} - -func (c *Call) processSystemCall(payload *message.CallMessage, clientID string) { - c.logger.Trace("Got internal System call: %+v", payload) - callName := strings.TrimPrefix(payload.Name, ".wails.") - switch callName { - case "Dialog.Open": - var dialogOptions runtime.OpenDialogOptions - err := json.Unmarshal(payload.Args[0], &dialogOptions) - if err != nil { - c.logger.Error("Error decoding: %s", err) - } - result, err := runtime.OpenFileDialog(c.ctx, dialogOptions) - if err != nil { - c.logger.Error("Error: %s", err) - } - c.sendResult(result, payload, clientID) - case "Dialog.Save": - var dialogOptions runtime.SaveDialogOptions - err := json.Unmarshal(payload.Args[0], &dialogOptions) - if err != nil { - c.logger.Error("Error decoding: %s", err) - } - result, err := runtime.SaveFileDialog(c.ctx, dialogOptions) - if err != nil { - c.logger.Error("Error: %s", err) - } - c.sendResult(result, payload, clientID) - case "Dialog.Message": - var dialogOptions runtime.MessageDialogOptions - err := json.Unmarshal(payload.Args[0], &dialogOptions) - if err != nil { - c.logger.Error("Error decoding: %s", err) - } - result, err := runtime.MessageDialog(c.ctx, dialogOptions) - if err != nil { - c.logger.Error("Error: %s", err) - } - c.sendResult(result, payload, clientID) - default: - c.logger.Error("Unknown system call: %+v", callName) - } -} - -func (c *Call) sendResult(result interface{}, payload *message.CallMessage, clientID string) { - c.logger.Trace("Sending success result with CallbackID '%s' : %+v\n", payload.CallbackID, result) - incomingMessage := &CallbackMessage{ - Result: result, - CallbackID: payload.CallbackID, - } - messageData, err := json.Marshal(incomingMessage) - c.logger.Trace("json incomingMessage data: %+v\n", string(messageData)) - if err != nil { - // what now? - c.logger.Fatal(err.Error()) - } - c.bus.PublishForTarget("call:result", string(messageData), clientID) -} - -func (c *Call) sendError(err error, payload *message.CallMessage, clientID string) { - c.logger.Trace("Sending error result with CallbackID '%s' : %+v\n", payload.CallbackID, err.Error()) - incomingMessage := &CallbackMessage{ - Err: err.Error(), - CallbackID: payload.CallbackID, - } - - messageData, err := json.Marshal(incomingMessage) - c.logger.Trace("json incomingMessage data: %+v\n", string(messageData)) - if err != nil { - // what now? - c.logger.Fatal(err.Error()) - } - c.bus.PublishForTarget("call:result", string(messageData), clientID) -} - -// CallbackMessage defines a message that contains the result of a call -type CallbackMessage struct { - Result interface{} `json:"result"` - Err string `json:"error"` - CallbackID string `json:"callbackid"` -} diff --git a/v2/internal/subsystem/event.go b/v2/internal/subsystem/event.go deleted file mode 100644 index 988bec7dd..000000000 --- a/v2/internal/subsystem/event.go +++ /dev/null @@ -1,191 +0,0 @@ -package subsystem - -import ( - "context" - "strings" - "sync" - - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/messagedispatcher/message" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// eventListener holds a callback function which is invoked when -// the event listened for is emitted. It has a counter which indicates -// how the total number of events it is interested in. A value of zero -// means it does not expire (default). -type eventListener struct { - callback func(...interface{}) // Function to call with emitted event data - counter int // The number of times this callback may be called. -1 = infinite - delete bool // Flag to indicate that this listener should be deleted -} - -// Event is the Eventing subsystem. It manages all service bus messages -// starting with "event". -type Event struct { - eventChannel <-chan *servicebus.Message - - // Event listeners - listeners map[string][]*eventListener - notifyLock sync.RWMutex - - // logger - logger logger.CustomLogger - - // ctx - ctx context.Context - - // parent waitgroup - wg *sync.WaitGroup -} - -// NewEvent creates a new log subsystem -func NewEvent(ctx context.Context, bus *servicebus.ServiceBus, logger *logger.Logger) (*Event, error) { - - // Subscribe to event messages - eventChannel, err := bus.Subscribe("event") - if err != nil { - return nil, err - } - - result := &Event{ - eventChannel: eventChannel, - logger: logger.CustomLogger("Event Subsystem"), - listeners: make(map[string][]*eventListener), - ctx: ctx, - wg: ctx.Value("waitgroup").(*sync.WaitGroup), - } - - return result, nil -} - -// RegisterListener provides a means of subscribing to events of type "eventName" -func (e *Event) RegisterListener(eventName string, callback func(...interface{}), counter int) { - - // Create new eventListener - thisListener := &eventListener{ - callback: callback, - counter: counter, - delete: false, - } - - e.notifyLock.Lock() - // Append the new listener to the listeners slice - e.listeners[eventName] = append(e.listeners[eventName], thisListener) - e.notifyLock.Unlock() -} - -// Start the subsystem -func (e *Event) Start() error { - - e.logger.Trace("Starting") - - e.wg.Add(1) - - // Spin off a go routine - go func() { - defer e.logger.Trace("OnShutdown") - for { - select { - case <-e.ctx.Done(): - e.wg.Done() - return - case eventMessage := <-e.eventChannel: - splitTopic := strings.Split(eventMessage.Topic(), ":") - eventType := splitTopic[1] - switch eventType { - case "emit": - if len(splitTopic) != 4 { - e.logger.Error("Received emit message with invalid topic format. Expected 4 sections in topic, got %s", splitTopic) - continue - } - eventSource := splitTopic[3] - e.logger.Trace("Got Event Message: %s %+v", eventMessage.Topic(), eventMessage.Data()) - event := eventMessage.Data().(*message.EventMessage) - eventName := event.Name - switch eventSource { - - case "j": - // Notify Go Subscribers - e.logger.Trace("Notify Go subscribers to event '%s'", eventName) - go e.notifyListeners(eventName, event) - case "g": - // Notify Go listeners - e.logger.Trace("Got Go Event: %s", eventName) - go e.notifyListeners(eventName, event) - default: - e.logger.Error("unknown emit event message: %+v", eventMessage) - } - case "on": - // We wish to subscribe to an event channel - var message *message.OnEventMessage = eventMessage.Data().(*message.OnEventMessage) - eventName := message.Name - callback := message.Callback - e.RegisterListener(eventName, callback, message.Counter) - e.logger.Trace("Registered listener for event '%s' with callback %p", eventName, callback) - default: - e.logger.Error("unknown event message: %+v", eventMessage) - } - } - } - - }() - - return nil -} - -// Notifies listeners for the given event name -func (e *Event) notifyListeners(eventName string, message *message.EventMessage) { - - // Get list of event listeners - listeners := e.listeners[eventName] - if listeners == nil { - e.logger.Trace("No listeners for event '%s'", eventName) - return - } - - // Lock the listeners - e.notifyLock.Lock() - - // We have a dirty flag to indicate that there are items to delete - itemsToDelete := false - - // Callback in goroutine - for _, listener := range listeners { - if listener.counter > 0 { - listener.counter-- - } - - go listener.callback(message.Data...) - - if listener.counter == 0 { - listener.delete = true - itemsToDelete = true - } - } - - // Do we have items to delete? - if itemsToDelete == true { - - // Create a new Listeners slice - var newListeners = []*eventListener{} - - // Iterate over current listeners - for _, listener := range listeners { - // If we aren't deleting the listener, add it to the new list - if !listener.delete { - newListeners = append(newListeners, listener) - } - } - - // Save new listeners or remove entry - if len(newListeners) > 0 { - e.listeners[eventName] = newListeners - } else { - delete(e.listeners, eventName) - } - } - - // Unlock - e.notifyLock.Unlock() -} diff --git a/v2/internal/subsystem/event_test.go b/v2/internal/subsystem/event_test.go deleted file mode 100644 index 99219948c..000000000 --- a/v2/internal/subsystem/event_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package subsystem - -import ( - "os" - "sync" - "testing" - - "github.com/matryer/is" - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/messagedispatcher/message" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -func TestSingleTopic(t *testing.T) { - - is := is.New(t) - - var expected string = "I am a message!" - var actual string - - var wg sync.WaitGroup - - // Create new bus - myLogger := logger.New(os.Stdout) - myLogger.SetLogLevel(logger.TRACE) - bus := servicebus.New(myLogger) - eventSubsystem, _ := NewEvent(bus, myLogger) - eventSubsystem.Start() - - eventSubsystem.RegisterListener("test", func(data ...interface{}) { - is.Equal(len(data), 1) - actual = data[0].(string) - wg.Done() - }) - - wg.Add(1) - - eventMessage := &message.EventMessage{ - Name: "test", - Data: []interface{}{"I am a message!"}, - } - - bus.Start() - bus.Publish("event:test:from:j", eventMessage) - wg.Wait() - bus.Stop() - - is.Equal(actual, expected) - -} diff --git a/v2/internal/subsystem/log.go b/v2/internal/subsystem/log.go deleted file mode 100644 index 36f5abfd6..000000000 --- a/v2/internal/subsystem/log.go +++ /dev/null @@ -1,111 +0,0 @@ -package subsystem - -import ( - "context" - "strconv" - "strings" - "sync" - - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// Log is the Logging subsystem. It handles messages with topics starting -// with "log:" -type Log struct { - logChannel <-chan *servicebus.Message - - // quit flag - shouldQuit bool - - // Logger! - logger *logger.Logger - - // Context for shutdown - ctx context.Context - cancel context.CancelFunc - - // internal waitgroup - wg sync.WaitGroup -} - -// NewLog creates a new log subsystem -func NewLog(bus *servicebus.ServiceBus, logger *logger.Logger) (*Log, error) { - - // Subscribe to log messages - logChannel, err := bus.Subscribe("log") - if err != nil { - return nil, err - } - - ctx, cancel := context.WithCancel(context.Background()) - - result := &Log{ - logChannel: logChannel, - logger: logger, - ctx: ctx, - cancel: cancel, - } - - return result, nil -} - -// Start the subsystem -func (l *Log) Start() error { - - l.wg.Add(1) - - // Spin off a go routine - go func() { - defer l.logger.Trace("Logger Shutdown") - - for l.shouldQuit == false { - select { - case <-l.ctx.Done(): - l.wg.Done() - return - case logMessage := <-l.logChannel: - logType := strings.TrimPrefix(logMessage.Topic(), "log:") - switch logType { - case "print": - l.logger.Print(logMessage.Data().(string)) - case "trace": - l.logger.Trace(logMessage.Data().(string)) - case "debug": - l.logger.Debug(logMessage.Data().(string)) - case "info": - l.logger.Info(logMessage.Data().(string)) - case "warning": - l.logger.Warning(logMessage.Data().(string)) - case "error": - l.logger.Error(logMessage.Data().(string)) - case "fatal": - l.logger.Fatal(logMessage.Data().(string)) - case "setlevel": - switch inLevel := logMessage.Data().(type) { - case logger.LogLevel: - l.logger.SetLogLevel(inLevel) - case string: - uint64level, err := strconv.ParseUint(inLevel, 10, 8) - if err != nil { - l.logger.Error("Error parsing log level: %+v", inLevel) - continue - } - level := logger.LogLevel(uint64level) - l.logger.SetLogLevel(level) - } - - default: - l.logger.Error("unknown log message: %+v", logMessage) - } - } - } - }() - - return nil -} - -func (l *Log) Close() { - l.cancel() - l.wg.Wait() -} diff --git a/v2/internal/subsystem/menu.go b/v2/internal/subsystem/menu.go deleted file mode 100644 index 2a6552769..000000000 --- a/v2/internal/subsystem/menu.go +++ /dev/null @@ -1,176 +0,0 @@ -package subsystem - -import ( - "context" - "encoding/json" - "strings" - "sync" - - "github.com/wailsapp/wails/v2/pkg/menu" - - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/menumanager" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// Menu is the subsystem that handles the operation of menus. It manages all service bus messages -// starting with "menu". -type Menu struct { - menuChannel <-chan *servicebus.Message - - // shutdown flag - shouldQuit bool - - // logger - logger logger.CustomLogger - - // Service Bus - bus *servicebus.ServiceBus - - // Menu Manager - menuManager *menumanager.Manager - - // ctx - ctx context.Context - - // parent waitgroup - wg *sync.WaitGroup -} - -// NewMenu creates a new menu subsystem -func NewMenu(ctx context.Context, bus *servicebus.ServiceBus, logger *logger.Logger, menuManager *menumanager.Manager) (*Menu, error) { - - // Subscribe to menu messages - menuChannel, err := bus.Subscribe("menu:") - if err != nil { - return nil, err - } - - result := &Menu{ - menuChannel: menuChannel, - logger: logger.CustomLogger("Menu Subsystem"), - bus: bus, - menuManager: menuManager, - ctx: ctx, - wg: ctx.Value("waitgroup").(*sync.WaitGroup), - } - - return result, nil -} - -// Start the subsystem -func (m *Menu) Start() error { - - m.logger.Trace("Starting") - - m.wg.Add(1) - - // Spin off a go routine - go func() { - defer m.logger.Trace("Shutdown") - for { - select { - case <-m.ctx.Done(): - m.wg.Done() - return - case menuMessage := <-m.menuChannel: - splitTopic := strings.Split(menuMessage.Topic(), ":") - menuMessageType := splitTopic[1] - switch menuMessageType { - case "ontrayopen": - trayID := menuMessage.Data().(string) - m.menuManager.OnTrayMenuOpen(trayID) - case "ontrayclose": - trayID := menuMessage.Data().(string) - m.menuManager.OnTrayMenuClose(trayID) - case "clicked": - if len(splitTopic) != 2 { - m.logger.Error("Received clicked message with invalid topic format. Expected 2 sections in topic, got %s", splitTopic) - continue - } - m.logger.Trace("Got Menu clicked Message: %s %+v", menuMessage.Topic(), menuMessage.Data()) - - type ClickCallbackMessage struct { - MenuItemID string `json:"menuItemID"` - MenuType string `json:"menuType"` - Data string `json:"data"` - ParentID string `json:"parentID"` - } - - var callbackData ClickCallbackMessage - payload := []byte(menuMessage.Data().(string)) - err := json.Unmarshal(payload, &callbackData) - if err != nil { - m.logger.Error("%s", err.Error()) - return - } - - err = m.menuManager.ProcessClick(callbackData.MenuItemID, callbackData.Data, callbackData.MenuType, callbackData.ParentID) - if err != nil { - m.logger.Trace("%s", err.Error()) - } - - // Make sure we catch any menu updates - case "updateappmenu": - updatedMenu, err := m.menuManager.UpdateApplicationMenu() - if err != nil { - m.logger.Trace("%s", err.Error()) - return - } - - // Notify frontend of menu change - m.bus.Publish("menufrontend:updateappmenu", updatedMenu) - - case "updatecontextmenu": - contextMenu := menuMessage.Data().(*menu.ContextMenu) - updatedMenu, err := m.menuManager.UpdateContextMenu(contextMenu) - if err != nil { - m.logger.Trace("%s", err.Error()) - return - } - - // Notify frontend of menu change - m.bus.Publish("menufrontend:updatecontextmenu", updatedMenu) - - case "settraymenu": - trayMenu := menuMessage.Data().(*menu.TrayMenu) - updatedMenu, err := m.menuManager.SetTrayMenu(trayMenu) - if err != nil { - m.logger.Trace("%s", err.Error()) - return - } - - // Notify frontend of menu change - m.bus.Publish("menufrontend:settraymenu", updatedMenu) - - case "deletetraymenu": - trayMenu := menuMessage.Data().(*menu.TrayMenu) - trayID, err := m.menuManager.GetTrayID(trayMenu) - if err != nil { - m.logger.Trace("%s", err.Error()) - return - } - - // Notify frontend of menu change - m.bus.Publish("menufrontend:deletetraymenu", trayID) - - case "updatetraymenulabel": - trayMenu := menuMessage.Data().(*menu.TrayMenu) - updatedLabel, err := m.menuManager.UpdateTrayMenuLabel(trayMenu) - if err != nil { - m.logger.Trace("%s", err.Error()) - return - } - - // Notify frontend of menu change - m.bus.Publish("menufrontend:updatetraymenulabel", updatedLabel) - - default: - m.logger.Error("unknown menu message: %+v", menuMessage) - } - } - } - }() - - return nil -} diff --git a/v2/internal/subsystem/runtime.go b/v2/internal/subsystem/runtime.go deleted file mode 100644 index 1719de96f..000000000 --- a/v2/internal/subsystem/runtime.go +++ /dev/null @@ -1,103 +0,0 @@ -package subsystem - -import ( - "context" - "fmt" - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/servicebus" - "strings" - "sync" -) - -// Runtime is the Runtime subsystem. It handles messages with topics starting -// with "runtime:" -type Runtime struct { - runtimeChannel <-chan *servicebus.Message - - // The hooks channel allows us to hook into frontend startup - hooksChannel <-chan *servicebus.Message - startupCallback func(ctx context.Context) - shutdownCallback func() - - // quit flag - shouldQuit bool - - logger logger.CustomLogger - - //ctx - ctx context.Context - - // OnStartup Hook - startupOnce sync.Once - - // Service bus - bus *servicebus.ServiceBus -} - -// NewRuntime creates a new runtime subsystem -func NewRuntime(ctx context.Context, bus *servicebus.ServiceBus, logger *logger.Logger, startupCallback func(context.Context)) (*Runtime, error) { - - // Subscribe to log messages - runtimeChannel, err := bus.Subscribe("runtime:") - if err != nil { - return nil, err - } - - // Subscribe to log messages - hooksChannel, err := bus.Subscribe("hooks:") - if err != nil { - return nil, err - } - - result := &Runtime{ - runtimeChannel: runtimeChannel, - hooksChannel: hooksChannel, - logger: logger.CustomLogger("Runtime Subsystem"), - startupCallback: startupCallback, - bus: bus, - } - result.ctx = context.WithValue(ctx, "bus", bus) - - return result, nil -} - -// Start the subsystem -func (r *Runtime) Start() error { - - // Spin off a go routine - go func() { - defer r.logger.Trace("OnShutdown") - for { - select { - case hooksMessage := <-r.hooksChannel: - r.logger.Trace(fmt.Sprintf("Received hooksmessage: %+v", hooksMessage)) - messageSlice := strings.Split(hooksMessage.Topic(), ":") - hook := messageSlice[1] - switch hook { - case "startup": - if r.startupCallback != nil { - r.startupOnce.Do(func() { - go func() { - r.startupCallback(r.ctx) - // If we got a url, publish it now startup completed - url, ok := hooksMessage.Data().(string) - if ok && len(url) > 0 { - r.bus.Publish("url:handler", url) - } - }() - }) - } else { - r.logger.Warning("no startup callback registered!") - } - default: - r.logger.Error("unknown hook message: %+v", hooksMessage) - continue - } - case <-r.ctx.Done(): - return - } - } - }() - - return nil -} diff --git a/v2/internal/subsystem/url.go b/v2/internal/subsystem/url.go deleted file mode 100644 index 83cde87ce..000000000 --- a/v2/internal/subsystem/url.go +++ /dev/null @@ -1,98 +0,0 @@ -package subsystem - -import ( - "context" - "strings" - "sync" - - "github.com/wailsapp/wails/v2/internal/logger" - "github.com/wailsapp/wails/v2/internal/servicebus" -) - -// URL is the URL Handler subsystem. It handles messages with topics starting -// with "url:" -type URL struct { - urlChannel <-chan *servicebus.Message - - // quit flag - shouldQuit bool - - // Logger! - logger *logger.Logger - - // Context for shutdown - ctx context.Context - cancel context.CancelFunc - - // internal waitgroup - wg sync.WaitGroup - - // Handlers - handlers map[string]func(string) -} - -// NewURL creates a new log subsystem -func NewURL(bus *servicebus.ServiceBus, logger *logger.Logger, handlers map[string]func(string)) (*URL, error) { - - // Subscribe to log messages - urlChannel, err := bus.Subscribe("url") - if err != nil { - return nil, err - } - - ctx, cancel := context.WithCancel(context.Background()) - - result := &URL{ - urlChannel: urlChannel, - logger: logger, - ctx: ctx, - cancel: cancel, - handlers: handlers, - } - - return result, nil -} - -// Start the subsystem -func (u *URL) Start() error { - - u.wg.Add(1) - - // Spin off a go routine - go func() { - defer u.logger.Trace("URL Shutdown") - - for u.shouldQuit == false { - select { - case <-u.ctx.Done(): - u.wg.Done() - return - case urlMessage := <-u.urlChannel: - // Guard against nil messages - if urlMessage == nil { - continue - } - messageType := strings.TrimPrefix(urlMessage.Topic(), "url:") - switch messageType { - case "handler": - url := urlMessage.Data().(string) - splitURL := strings.Split(url, ":") - protocol := splitURL[0] - callback, ok := u.handlers[protocol] - if ok { - go callback(url) - } - default: - u.logger.Error("unknown url message: %+v", urlMessage) - } - } - } - }() - - return nil -} - -func (u *URL) Close() { - u.cancel() - u.wg.Wait() -} diff --git a/v2/pkg/str/str.go b/v2/pkg/str/str.go deleted file mode 100644 index d27d5dad7..000000000 --- a/v2/pkg/str/str.go +++ /dev/null @@ -1,10 +0,0 @@ -package str - -import ( - "fmt" - "time" -) - -func UnixNow() string { - return fmt.Sprintf("%+v", time.Now().Unix()) -} diff --git a/v2/wails.go b/v2/wails.go index e35ca82e9..dc125f588 100644 --- a/v2/wails.go +++ b/v2/wails.go @@ -3,7 +3,7 @@ package wails import ( - app "github.com/wailsapp/wails/v2/internal/appng" + "github.com/wailsapp/wails/v2/internal/app" "github.com/wailsapp/wails/v2/internal/signal" "github.com/wailsapp/wails/v2/pkg/options" )