mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[v3] Update and fix runtime JS API (#3295)
* Cleanup bundled runtime entry point * Fix JS representation of Screen struct * Expose IsFocused method in Window interface * Update JS window API * Fix cleanup of WML listeners * Bundle runtime as ES module * Update runtime dependencies * Update runtime types and events * Update bundled runtime * Update changelog --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
a5c843f5c6
commit
2b9891da2c
52 changed files with 6045 additions and 9169 deletions
|
|
@ -23,10 +23,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- [darwin] add option for showing the toolbar in fullscreen mode on macOS by [@fbbdev](https://github.com/fbbdev) in [#3282](https://github.com/wailsapp/wails/pull/3282)
|
||||
- [linux] add onKeyPress logic to convert linux keypress into an accelerator @[Atterpac](https://github.com/Atterpac) in[#3022](https://github.com/wailsapp/wails/pull/3022])
|
||||
- [linux] add task `run:linux` by [@marcus-crane](https://github.com/marcus-crane) in [#3146](https://github.com/wailsapp/wails/pull/3146)
|
||||
- export `SetIcon` method by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3147)
|
||||
- Export `SetIcon` method by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3147)
|
||||
- Improve `OnShutdown` by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3189)
|
||||
- restore `ToggleMaximise` method in `Window` interface by [@fbbdev](https://github.com/fbbdev) in [#3281](https://github.com/wailsapp/wails/pull/3281)
|
||||
- Restore `ToggleMaximise` method in `Window` interface by [@fbbdev](https://github.com/fbbdev) in [#3281](https://github.com/wailsapp/wails/pull/3281)
|
||||
- Added more information to `Environment()`. By @leaanthony in [aba82cc](https://github.com/wailsapp/wails/commit/aba82cc52787c97fb99afa58b8b63a0004b7ff6c) based on [PR](https://github.com/wailsapp/wails/pull/2044) by @Mai-Lapyst
|
||||
- Expose the `WebviewWindow.IsFocused` method on the `Window` interface by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
- Support multiple space-separated trigger events in the WML system by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
- Add ESM exports from the bundled JS runtime script by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
@ -46,9 +49,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Fix wrong baseURL when open window twice by @5aaee9 in PR [#3273](https://github.com/wailsapp/wails/pull/3273)
|
||||
- Fix ordering of if branches in `WebviewWindow.Restore` method by [@fbbdev](https://github.com/fbbdev) in [#3279](https://github.com/wailsapp/wails/pull/3279)
|
||||
- Correctly compute `startURL` across multiple `GetStartURL` invocations when `FRONTEND_DEVSERVER_URL` is present. [#3299](https://github.com/wailsapp/wails/pull/3299)
|
||||
- Fix the JS type of the `Screen` struct to match its Go counterpart by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
- Fix the `WML.Reload` method to ensure proper cleanup of registered event listeners by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
|
||||
### Changed
|
||||
|
||||
- The bundled JS runtime script is now an ESM module: script tags importing it must have the `type="module"` attribute. By [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
- The `@wailsio/runtime` package does not publish its API on the `window.wails` object, and does not start the WML system. This has been done to improve encapsulation. The WML system can be started manually if desired by calling the new `WML.Enable` method. The bundled JS runtime script still performs both operations automatically. By [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
- The Window API module `@wailsio/runtime/src/window` now exposes the containing window object as a default export. It is not possible anymore to import individual methods through ESM named or namespace import syntax.
|
||||
- The JS window API has been updated to match the current Go `WebviewWindow` API. Some methods have changed name or prototype, specifically: `Screen` becomes `GetScreen`; `GetZoomLevel`/`SetZoomLevel` become `GetZoom`/`SetZoom`; `GetZoom`, `Width` and `Height` now return values directly instead of wrapping them within objects. By [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
|
||||
|
||||
### Removed
|
||||
|
||||
### Deprecated
|
||||
|
|
|
|||
|
|
@ -152,15 +152,21 @@ tasks:
|
|||
drag-n-drop
|
||||
events
|
||||
frameless
|
||||
hide-window
|
||||
keybindings
|
||||
menu
|
||||
oauth
|
||||
plain
|
||||
screen
|
||||
server
|
||||
show-macos-toolbar
|
||||
systray
|
||||
video
|
||||
window
|
||||
window-api
|
||||
wml
|
||||
cmds:
|
||||
- for: { var: EXAMPLEDIRS }
|
||||
task: test:example
|
||||
vars:
|
||||
DIR: "{{.ITEM}}"
|
||||
DIR: "{{.ITEM}}"
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
<input autofocus autocomplete="off" class="input" id="name" type="text"/>
|
||||
<button class="btn" onclick="greet()">Greet</button>
|
||||
</div>
|
||||
<script src='/wails/runtime.js'></script>
|
||||
<script type="module" src='/wails/runtime.js'></script>
|
||||
<script src='bindings_main.js'></script>
|
||||
<script>
|
||||
let resultText = "";
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,53 +0,0 @@
|
|||
module binding
|
||||
|
||||
go 1.22
|
||||
|
||||
toolchain go1.22.0
|
||||
|
||||
require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
|
||||
|
||||
require (
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
|
||||
github.com/bep/debounce v1.2.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
||||
github.com/ebitengine/purego v0.4.0-alpha.4 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.5.0 // indirect
|
||||
github.com/go-git/go-git/v5 v5.11.0 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
|
||||
github.com/leaanthony/u v1.1.0 // indirect
|
||||
github.com/lmittmann/tint v1.0.3 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||
github.com/rivo/uniseg v0.4.4 // indirect
|
||||
github.com/samber/lo v1.38.1 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/skeema/knownhosts v1.2.1 // indirect
|
||||
github.com/wailsapp/go-webview2 v1.0.9 // indirect
|
||||
github.com/wailsapp/mimetype v1.4.1 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
|
||||
golang.org/x/mod v0.12.0 // indirect
|
||||
golang.org/x/net v0.21.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/tools v0.13.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
)
|
||||
|
||||
replace github.com/wailsapp/wails/v3 => ../..
|
||||
|
||||
replace github.com/ebitengine/purego v0.4.0-alpha.4 => github.com/tmclane/purego v0.0.0-20230601213035-1f25e70d7b01
|
||||
|
|
@ -1,191 +0,0 @@
|
|||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
|
||||
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
|
||||
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
|
||||
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
|
||||
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
|
||||
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
|
||||
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
|
||||
github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=
|
||||
github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
|
||||
github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4=
|
||||
github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
|
||||
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
|
||||
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
|
||||
github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
|
||||
github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
|
||||
github.com/lmittmann/tint v1.0.3 h1:W5PHeA2D8bBJVvabNfQD/XW9HPLZK1XoPZH0cq8NouQ=
|
||||
github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
|
||||
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
|
||||
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
|
||||
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
|
||||
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
||||
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
|
||||
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
|
||||
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
|
||||
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=
|
||||
github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/tmclane/purego v0.0.0-20230601213035-1f25e70d7b01 h1:oQwu3iNDywGp1Hry+PDvz+grwbCGpzY+ckSnWKCnX5Y=
|
||||
github.com/tmclane/purego v0.0.0-20230601213035-1f25e70d7b01/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ=
|
||||
github.com/wailsapp/go-webview2 v1.0.9 h1:lrU+q0cf1wgLdR69rN+ZnRtMJNaJRrcQ4ELxoO7/xjs=
|
||||
github.com/wailsapp/go-webview2 v1.0.9/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
|
||||
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
|
||||
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
|
||||
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
|
||||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
|
||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<title>Title</title>
|
||||
<style>body{ text-align: center; color: white; background-color: #191919; }</style>
|
||||
<style>.region{ width: 100%; border: 3px solid #00a4db; }</style>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
<script type="module" src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Context Menu Demo</h1>
|
||||
|
|
@ -62,4 +62,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<style>body{ text-align: center; color: white; background-color: #191919; user-select: none; -ms-user-select: none; -webkit-user-select: none; }</style>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Drag-n-drop Demo</h1>
|
||||
|
|
@ -13,7 +12,9 @@ Drop Files onto this window...
|
|||
<div id="results"></div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
import * as wails from "/wails/runtime.js";
|
||||
|
||||
document.body.addEventListener('drop', function(e) {
|
||||
// Note that postMessageWithAdditionalObjects does not accept a single object,
|
||||
// but only accepts an ArrayLike object.
|
||||
|
|
@ -34,4 +35,4 @@ Drop Files onto this window...
|
|||
})
|
||||
</script>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -33,11 +33,12 @@
|
|||
|
||||
}
|
||||
</style>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
import * as wails from "/wails/runtime.js";
|
||||
|
||||
let environment = wails.System.Environment();
|
||||
environment.then((result) => {
|
||||
console.log({result})
|
||||
|
|
@ -63,4 +64,4 @@
|
|||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
<style>body{ text-align: center; color: white; background-color: #191919; user-select: none; -ms-user-select: none; -webkit-user-select: none; }</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -14,11 +13,13 @@ To send an event from this window, click here: <button onclick="wails.Events.Emi
|
|||
<div id="results"></div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
import * as wails from "/wails/runtime.js";
|
||||
|
||||
wails.Events.On("myevent", function(data) {
|
||||
let currentHTML = document.getElementById("results").innerHTML;
|
||||
document.getElementById("results").innerHTML = currentHTML + "<br/>" + JSON.stringify(data);
|
||||
})
|
||||
</script>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
<script type="module" src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
module frameless
|
||||
|
||||
go 1.22
|
||||
|
||||
toolchain go1.22.0
|
||||
|
||||
require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
|
||||
|
||||
require (
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
|
||||
github.com/bep/debounce v1.2.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
||||
github.com/ebitengine/purego v0.4.0-alpha.4 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.5.0 // indirect
|
||||
github.com/go-git/go-git/v5 v5.11.0 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
|
||||
github.com/leaanthony/u v1.1.0 // indirect
|
||||
github.com/lmittmann/tint v1.0.3 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||
github.com/rivo/uniseg v0.4.4 // indirect
|
||||
github.com/samber/lo v1.38.1 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/skeema/knownhosts v1.2.1 // indirect
|
||||
github.com/wailsapp/go-webview2 v1.0.9 // indirect
|
||||
github.com/wailsapp/mimetype v1.4.1 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
|
||||
golang.org/x/mod v0.12.0 // indirect
|
||||
golang.org/x/net v0.21.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/tools v0.13.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
)
|
||||
|
||||
replace github.com/wailsapp/wails/v3 => ../..
|
||||
|
|
@ -1,188 +0,0 @@
|
|||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
|
||||
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
|
||||
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
|
||||
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
|
||||
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5770OhYUVes=
|
||||
github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ=
|
||||
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
|
||||
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
|
||||
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
|
||||
github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=
|
||||
github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
|
||||
github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4=
|
||||
github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
|
||||
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
|
||||
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
|
||||
github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
|
||||
github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
|
||||
github.com/lmittmann/tint v1.0.3 h1:W5PHeA2D8bBJVvabNfQD/XW9HPLZK1XoPZH0cq8NouQ=
|
||||
github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
|
||||
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
|
||||
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
|
||||
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
|
||||
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
||||
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
|
||||
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
|
||||
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
|
||||
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=
|
||||
github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/wailsapp/go-webview2 v1.0.9 h1:lrU+q0cf1wgLdR69rN+ZnRtMJNaJRrcQ4ELxoO7/xjs=
|
||||
github.com/wailsapp/go-webview2 v1.0.9/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
|
||||
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
|
||||
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
|
||||
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
|
||||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
|
@ -19,8 +19,10 @@
|
|||
<h3 id="name" style="padding-top: 10px"></h3>
|
||||
<a wml-event="github-logout" class="btn btn-primary"><span class="fa fa-github" style="color: #FFF"></span> Logout </a>
|
||||
</div>
|
||||
<script>
|
||||
window.wails.Events.On("wails:oauth:success", (event) => {
|
||||
<script type="module">
|
||||
import * as wails from "/wails/runtime.js";
|
||||
|
||||
wails.Events.On("wails:oauth:success", (event) => {
|
||||
document.getElementById("main").style.display = "none";
|
||||
document.getElementById("details").style.display = "block";
|
||||
document.getElementById("name").innerText = event.data.Name;
|
||||
|
|
@ -28,7 +30,7 @@
|
|||
document.body.style.backgroundColor = "#000";
|
||||
document.body.style.color = "#FFF";
|
||||
});
|
||||
window.wails.Events.On("wails:oauth:loggedout", (event) => {
|
||||
wails.Events.On("wails:oauth:loggedout", (event) => {
|
||||
document.getElementById("details").style.display = "none";
|
||||
document.getElementById("main").style.display = "block";
|
||||
document.body.style.backgroundColor = "#FFF";
|
||||
|
|
@ -36,4 +38,4 @@
|
|||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ func main() {
|
|||
Assets: application.AssetOptions{
|
||||
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write([]byte(`<html><head><title>Plain Bundle</title></head><body><div class="main"><h1>Plain Bundle</h1><p>This is a plain bundle. It has no frontend code but this was Served by the AssetServer's Handler.</p><br/><br/><p wml-event="clicked">Clicking this paragraph emits an event...<p></div></body></html>`))
|
||||
w.Write([]byte(`<html><head><title>Plain Bundle</title><script type="module" src="/wails/runtime.js"></script></head><body><div class="main"><h1>Plain Bundle</h1><p>This is a plain bundle. It has no frontend code but this was Served by the AssetServer's Handler.</p><br/><br/><p wml-event="clicked">Clicking this paragraph emits an event...<p></div></body></html>`))
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
background-image: linear-gradient(-180deg, #cb3939, #610000);
|
||||
}
|
||||
</style>
|
||||
<script type="module" src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body style="--webkit-app-region: drag;">
|
||||
<img class="logo"
|
||||
|
|
@ -78,4 +79,4 @@
|
|||
<p> Open the inspector and start playing around with the plugins. </p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -43,11 +43,12 @@
|
|||
text-align: -webkit-center;
|
||||
}
|
||||
</style>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
import * as wails from "/wails/runtime.js";
|
||||
|
||||
let monitors = wails.Screens.GetAll();
|
||||
monitors.then((result) => {
|
||||
console.log({result})
|
||||
|
|
@ -64,4 +65,4 @@
|
|||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
module frameless
|
||||
|
||||
go 1.22
|
||||
|
||||
toolchain go1.22.0
|
||||
|
||||
require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
|
||||
|
||||
require (
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
|
||||
github.com/bep/debounce v1.2.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
||||
github.com/ebitengine/purego v0.4.0-alpha.4 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.5.0 // indirect
|
||||
github.com/go-git/go-git/v5 v5.11.0 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
|
||||
github.com/leaanthony/u v1.1.0 // indirect
|
||||
github.com/lmittmann/tint v1.0.3 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||
github.com/rivo/uniseg v0.4.4 // indirect
|
||||
github.com/samber/lo v1.38.1 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/skeema/knownhosts v1.2.1 // indirect
|
||||
github.com/wailsapp/go-webview2 v1.0.9 // indirect
|
||||
github.com/wailsapp/mimetype v1.4.1 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
|
||||
golang.org/x/mod v0.12.0 // indirect
|
||||
golang.org/x/net v0.21.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/tools v0.13.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
)
|
||||
|
||||
replace github.com/wailsapp/wails/v3 => ../..
|
||||
|
|
@ -1,191 +0,0 @@
|
|||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
|
||||
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
|
||||
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
|
||||
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
|
||||
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5770OhYUVes=
|
||||
github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ=
|
||||
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
|
||||
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
|
||||
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
|
||||
github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=
|
||||
github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
|
||||
github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4=
|
||||
github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
|
||||
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
|
||||
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A=
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
|
||||
github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
|
||||
github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
|
||||
github.com/lmittmann/tint v1.0.3 h1:W5PHeA2D8bBJVvabNfQD/XW9HPLZK1XoPZH0cq8NouQ=
|
||||
github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
|
||||
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
|
||||
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
|
||||
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
|
||||
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
|
||||
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
|
||||
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
|
||||
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
|
||||
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=
|
||||
github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/wailsapp/go-webview2 v1.0.9 h1:lrU+q0cf1wgLdR69rN+ZnRtMJNaJRrcQ4ELxoO7/xjs=
|
||||
github.com/wailsapp/go-webview2 v1.0.9/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
|
||||
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
|
||||
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
|
||||
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
|
||||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
|
||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
font-size: large;
|
||||
}
|
||||
</style>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
<script type="module" src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body style="--webkit-app-region: drag;">
|
||||
<img class="logo"
|
||||
|
|
@ -147,7 +147,11 @@
|
|||
</div>
|
||||
<div>
|
||||
<p class="blue-button-42" onclick="wails.Window.ToggleMaximise()">ToggleMaximise</p>
|
||||
<p class="blue-button-42" onclick="wails.Window.IsFocused().then((result) => document.getElementById('result').textContent = `IsFocused: ${result}`)">IsFocused</p>
|
||||
<p class="blue-button-42" onclick="wails.Window.IsMaximised().then((result) => document.getElementById('result').textContent = `IsMaximised: ${result}`)">IsMaximised</p>
|
||||
<p class="blue-button-42" onclick="wails.Window.IsFullscreen().then((result) => document.getElementById('result').textContent = `IsFullscreen: ${result}`)">IsFullscreen</p>
|
||||
</div>
|
||||
<div id="result"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
font-size: large;
|
||||
}
|
||||
</style>
|
||||
<script src="/wails/runtime.js"></script>
|
||||
<script type="module" src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<img class="logo"
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
<p class="blue-button-42" wml-window="UnFullscreen">UnFullscreen</p>
|
||||
<p class="blue-button-42" wml-window="Restore">Restore</p>
|
||||
<p class="blue-button-42" wml-openurl="https://wails.io" wml-confirm="Are you sure?">Open Browser?</p>
|
||||
<p class="button-outline" wml-event="hover" wml-trigger="mouseover">Hover over me</p>
|
||||
<p class="button-outline" wml-event="hover" wml-trigger="mouseover mouseout">Hover over me</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -21,12 +21,12 @@ tasks:
|
|||
build:debug:
|
||||
internal: true
|
||||
cmds:
|
||||
- npx esbuild@latest desktop/compiled/main.js --bundle --tree-shaking=true --sourcemap=inline --outfile=../assetserver/assets/runtime.debug.js --define:DEBUG=true
|
||||
- npx esbuild@latest desktop/@wailsio/runtime/src/index.js --inject:desktop/compiled/main.js --format=esm --bundle --tree-shaking=true --sourcemap=inline --outfile=../assetserver/bundledassets/runtime.debug.js --define:DEBUG=true
|
||||
|
||||
build:production:
|
||||
internal: true
|
||||
cmds:
|
||||
- npx esbuild@latest desktop/compiled/main.js --bundle --tree-shaking=true --minify --outfile=../assetserver/assets/runtime.js --define:DEBUG=false --drop:console
|
||||
- npx esbuild@latest desktop/@wailsio/runtime/src/index.js --inject:desktop/compiled/main.js --format=esm --bundle --tree-shaking=true --minify --outfile=../assetserver/bundledassets/runtime.js --define:DEBUG=false --drop:console
|
||||
|
||||
build:all:
|
||||
internal: true
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@wailsio/runtime",
|
||||
"version": "3.0.0-alpha.14",
|
||||
"version": "3.0.0-alpha.20",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@wailsio/runtime",
|
||||
"version": "3.0.0-alpha.14",
|
||||
"version": "3.0.0-alpha.20",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"rimraf": "^5.0.5",
|
||||
|
|
@ -224,11 +224,20 @@
|
|||
}
|
||||
},
|
||||
"node_modules/jsonc-parser": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
|
||||
"integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz",
|
||||
"integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz",
|
||||
"integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "14 || >=16.14"
|
||||
}
|
||||
},
|
||||
"node_modules/lunr": {
|
||||
"version": "2.3.9",
|
||||
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
|
||||
|
|
@ -311,15 +320,6 @@
|
|||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/path-scurry/node_modules/lru-cache": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz",
|
||||
"integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "14 || >=16.14"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf": {
|
||||
"version": "5.0.5",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz",
|
||||
|
|
@ -489,9 +489,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/typedoc": {
|
||||
"version": "0.25.7",
|
||||
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.7.tgz",
|
||||
"integrity": "sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow==",
|
||||
"version": "0.25.12",
|
||||
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.12.tgz",
|
||||
"integrity": "sha512-F+qhkK2VoTweDXd1c42GS/By2DvI2uDF4/EpG424dTexSHdtCH52C6IcAvMA6jR3DzAWZjHpUOW+E02kyPNUNw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lunr": "^2.3.9",
|
||||
|
|
@ -506,7 +506,7 @@
|
|||
"node": ">= 16"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x"
|
||||
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x"
|
||||
}
|
||||
},
|
||||
"node_modules/typedoc-plugin-markdown": {
|
||||
|
|
@ -522,9 +522,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.3.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
||||
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
||||
"version": "5.4.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
|
||||
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
|
|
|
|||
|
|
@ -9,60 +9,25 @@ The electron alternative for Go
|
|||
*/
|
||||
|
||||
// Setup
|
||||
window.wails = window.wails || {};
|
||||
window._wails = window._wails || {};
|
||||
|
||||
import "./contextmenu";
|
||||
import "./drag";
|
||||
|
||||
// Re-export public API
|
||||
import * as Application from "./application";
|
||||
import * as Browser from "./browser";
|
||||
import * as Call from "./calls";
|
||||
import * as Clipboard from "./clipboard";
|
||||
import * as ContextMenu from "./contextmenu";
|
||||
import * as Dialogs from "./dialogs";
|
||||
import * as Events from "./events";
|
||||
import * as Flags from "./flags";
|
||||
import * as Screens from "./screens";
|
||||
import * as System from "./system";
|
||||
import * as Window from "./window";
|
||||
import * as WML from './wml';
|
||||
import * as Events from "./events";
|
||||
import * as Dialogs from "./dialogs";
|
||||
import * as Call from "./calls";
|
||||
import * as Drag from "./drag";
|
||||
import {invoke} from "./system";
|
||||
import Window from "./window";
|
||||
import * as WML from "./wml";
|
||||
|
||||
|
||||
export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, Window, WML};
|
||||
|
||||
|
||||
/***
|
||||
This technique for proper load detection is taken from HTMX:
|
||||
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2020, Big Sky Software
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
***/
|
||||
|
||||
window.wails = {
|
||||
export {
|
||||
Application,
|
||||
Browser,
|
||||
Call,
|
||||
|
|
@ -73,23 +38,9 @@ window.wails = {
|
|||
Screens,
|
||||
System,
|
||||
Window,
|
||||
WML,
|
||||
WML
|
||||
};
|
||||
invoke('wails:runtime:ready');
|
||||
|
||||
let isReady = false;
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
isReady = true
|
||||
})
|
||||
|
||||
function whenReady(fn) {
|
||||
if (isReady || document.readyState === 'complete') {
|
||||
fn();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', fn);
|
||||
}
|
||||
}
|
||||
|
||||
whenReady(() => {
|
||||
WML.Reload();
|
||||
});
|
||||
// Notify backend
|
||||
window._wails.invoke = System.invoke;
|
||||
System.invoke("wails:runtime:ready");
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
/**
|
||||
* Logs a message to the console with custom formatting.
|
||||
* @param {string} message - The message to be logged.
|
||||
* @return {void}
|
||||
*/
|
||||
export function debugLog(message) {
|
||||
// eslint-disable-next-line
|
||||
console.log(
|
||||
'%c wails3 %c ' + message + ' ',
|
||||
'background: #aa0000; color: #fff; border-radius: 3px 0px 0px 3px; padding: 1px; font-size: 0.7rem',
|
||||
'background: #009900; color: #fff; border-radius: 0px 3px 3px 0px; padding: 1px; font-size: 0.7rem'
|
||||
);
|
||||
}
|
||||
|
|
@ -32,12 +32,6 @@ The electron alternative for Go
|
|||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {('Zero'|'Ninety'|'OneEighty'|'TwoSeventy')} Rotation
|
||||
* The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Screen
|
||||
* @property {string} Id - Unique identifier for the screen.
|
||||
|
|
@ -48,7 +42,7 @@ The electron alternative for Go
|
|||
* @property {Rect} Bounds - Contains the bounds of the screen in terms of X, Y, Width, and Height.
|
||||
* @property {Rect} WorkArea - Contains the area of the screen that is actually usable (excluding taskbar and other system UI).
|
||||
* @property {boolean} IsPrimary - True if this is the primary monitor selected by the user in the operating system.
|
||||
* @property {Rotation} Rotation - The rotation of the screen.
|
||||
* @property {number} Rotation - The rotation of the screen.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -80,4 +74,4 @@ export function GetPrimary() {
|
|||
*/
|
||||
export function GetCurrent() {
|
||||
return call(getCurrent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
86
v3/internal/runtime/desktop/@wailsio/runtime/src/utils.js
Normal file
86
v3/internal/runtime/desktop/@wailsio/runtime/src/utils.js
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
_ __ _ __
|
||||
| | / /___ _(_) /____
|
||||
| | /| / / __ `/ / / ___/
|
||||
| |/ |/ / /_/ / / (__ )
|
||||
|__/|__/\__,_/_/_/____/
|
||||
The electron alternative for Go
|
||||
(c) Lea Anthony 2019-present
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logs a message to the console with custom formatting.
|
||||
* @param {string} message - The message to be logged.
|
||||
* @return {void}
|
||||
*/
|
||||
export function debugLog(message) {
|
||||
// eslint-disable-next-line
|
||||
console.log(
|
||||
'%c wails3 %c ' + message + ' ',
|
||||
'background: #aa0000; color: #fff; border-radius: 3px 0px 0px 3px; padding: 1px; font-size: 0.7rem',
|
||||
'background: #009900; color: #fff; border-radius: 0px 3px 3px 0px; padding: 1px; font-size: 0.7rem'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the browser supports removing listeners by triggering an AbortSignal
|
||||
* (see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#signal)
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function canAbortListeners() {
|
||||
if (!EventTarget || !AbortSignal || !AbortController)
|
||||
return false;
|
||||
|
||||
let result = true;
|
||||
|
||||
const target = new EventTarget();
|
||||
const controller = new AbortController();
|
||||
target.addEventListener('test', () => { result = false; }, { signal: controller.signal });
|
||||
controller.abort();
|
||||
target.dispatchEvent(new CustomEvent('test'));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/***
|
||||
This technique for proper load detection is taken from HTMX:
|
||||
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2020, Big Sky Software
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
***/
|
||||
|
||||
let isReady = false;
|
||||
document.addEventListener('DOMContentLoaded', () => isReady = true);
|
||||
|
||||
export function whenReady(callback) {
|
||||
if (isReady || document.readyState === 'complete') {
|
||||
callback();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', callback);
|
||||
}
|
||||
}
|
||||
|
|
@ -15,302 +15,620 @@ The electron alternative for Go
|
|||
* @typedef {import("./screens").Screen} Screen
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A record describing the position of a window.
|
||||
*
|
||||
* @typedef {Object} Position
|
||||
* @property {number} x - The horizontal position of the window
|
||||
* @property {number} y - The vertical position of the window
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A record describing the size of a window.
|
||||
*
|
||||
* @typedef {Object} Size
|
||||
* @property {number} width - The width of the window
|
||||
* @property {number} height - The height of the window
|
||||
*/
|
||||
|
||||
|
||||
import {newRuntimeCallerWithID, objectNames} from "./runtime";
|
||||
|
||||
const center = 0;
|
||||
const setTitle = 1;
|
||||
const fullscreen = 2;
|
||||
const unFullscreen = 3;
|
||||
const setSize = 4;
|
||||
const size = 5;
|
||||
const setMaxSize = 6;
|
||||
const setMinSize = 7;
|
||||
const setAlwaysOnTop = 8;
|
||||
const setRelativePosition = 9;
|
||||
const relativePosition = 10;
|
||||
const screen = 11;
|
||||
const hide = 12;
|
||||
const maximise = 13;
|
||||
const unMaximise = 14;
|
||||
const toggleMaximise = 15;
|
||||
const minimise = 16;
|
||||
const unMinimise = 17;
|
||||
const restore = 18;
|
||||
const show = 19;
|
||||
const close = 20;
|
||||
const setBackgroundColour = 21;
|
||||
const setResizable = 22;
|
||||
const width = 23;
|
||||
const height = 24;
|
||||
const zoomIn = 25;
|
||||
const zoomOut = 26;
|
||||
const zoomReset = 27;
|
||||
const getZoomLevel = 28;
|
||||
const setZoomLevel = 29;
|
||||
const AbsolutePositionMethod = 0;
|
||||
const CenterMethod = 1;
|
||||
const CloseMethod = 2;
|
||||
const DisableSizeConstraintsMethod = 3;
|
||||
const EnableSizeConstraintsMethod = 4;
|
||||
const FocusMethod = 5;
|
||||
const ForceReloadMethod = 6;
|
||||
const FullscreenMethod = 7;
|
||||
const GetScreenMethod = 8;
|
||||
const GetZoomMethod = 9;
|
||||
const HeightMethod = 10;
|
||||
const HideMethod = 11;
|
||||
const IsFocusedMethod = 12;
|
||||
const IsFullscreenMethod = 13;
|
||||
const IsMaximisedMethod = 14;
|
||||
const IsMinimisedMethod = 15;
|
||||
const MaximiseMethod = 16;
|
||||
const MinimiseMethod = 17;
|
||||
const NameMethod = 18;
|
||||
const OpenDevToolsMethod = 19;
|
||||
const RelativePositionMethod = 20;
|
||||
const ReloadMethod = 21;
|
||||
const ResizableMethod = 22;
|
||||
const RestoreMethod = 23;
|
||||
const SetAbsolutePositionMethod = 24;
|
||||
const SetAlwaysOnTopMethod = 25;
|
||||
const SetBackgroundColourMethod = 26;
|
||||
const SetFramelessMethod = 27;
|
||||
const SetFullscreenButtonEnabledMethod = 28;
|
||||
const SetMaxSizeMethod = 29;
|
||||
const SetMinSizeMethod = 30;
|
||||
const SetRelativePositionMethod = 31;
|
||||
const SetResizableMethod = 32;
|
||||
const SetSizeMethod = 33;
|
||||
const SetTitleMethod = 34;
|
||||
const SetZoomMethod = 35;
|
||||
const ShowMethod = 36;
|
||||
const SizeMethod = 37;
|
||||
const ToggleFullscreenMethod = 38;
|
||||
const ToggleMaximiseMethod = 39;
|
||||
const UnFullscreenMethod = 40;
|
||||
const UnMaximiseMethod = 41;
|
||||
const UnMinimiseMethod = 42;
|
||||
const WidthMethod = 43;
|
||||
const ZoomMethod = 44;
|
||||
const ZoomInMethod = 45;
|
||||
const ZoomOutMethod = 46;
|
||||
const ZoomResetMethod = 47;
|
||||
|
||||
const thisWindow = Get('');
|
||||
class Window {
|
||||
/**
|
||||
* @private
|
||||
* @type {(...args: any[]) => any}
|
||||
*/
|
||||
#call = null;
|
||||
|
||||
function createWindow(call) {
|
||||
return {
|
||||
Get: (windowName) => createWindow(newRuntimeCallerWithID(objectNames.Window, windowName)),
|
||||
Center: () => call(center),
|
||||
SetTitle: (title) => call(setTitle, {title}),
|
||||
Fullscreen: () => call(fullscreen),
|
||||
UnFullscreen: () => call(unFullscreen),
|
||||
SetSize: (width, height) => call(setSize, {width, height}),
|
||||
Size: () => call(size),
|
||||
SetMaxSize: (width, height) => call(setMaxSize, {width, height}),
|
||||
SetMinSize: (width, height) => call(setMinSize, {width, height}),
|
||||
SetAlwaysOnTop: (onTop) => call(setAlwaysOnTop, {alwaysOnTop: onTop}),
|
||||
SetRelativePosition: (x, y) => call(setRelativePosition, {x, y}),
|
||||
RelativePosition: () => call(relativePosition),
|
||||
Screen: () => call(screen),
|
||||
Hide: () => call(hide),
|
||||
Maximise: () => call(maximise),
|
||||
UnMaximise: () => call(unMaximise),
|
||||
ToggleMaximise: () => call(toggleMaximise),
|
||||
Minimise: () => call(minimise),
|
||||
UnMinimise: () => call(unMinimise),
|
||||
Restore: () => call(restore),
|
||||
Show: () => call(show),
|
||||
Close: () => call(close),
|
||||
SetBackgroundColour: (r, g, b, a) => call(setBackgroundColour, {r, g, b, a}),
|
||||
SetResizable: (resizable) => call(setResizable, {resizable}),
|
||||
Width: () => call(width),
|
||||
Height: () => call(height),
|
||||
ZoomIn: () => call(zoomIn),
|
||||
ZoomOut: () => call(zoomOut),
|
||||
ZoomReset: () => call(zoomReset),
|
||||
GetZoomLevel: () => call(getZoomLevel),
|
||||
SetZoomLevel: (zoomLevel) => call(setZoomLevel, {zoomLevel}),
|
||||
};
|
||||
/**
|
||||
* Initialises a window object with the specified name.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name - The name of the target window.
|
||||
*/
|
||||
constructor(name = '') {
|
||||
this.#call = newRuntimeCallerWithID(objectNames.Window, name)
|
||||
|
||||
// bind instance method to make them easily usable in event handlers
|
||||
for (const method of Object.getOwnPropertyNames(Window.prototype)) {
|
||||
if (
|
||||
method !== "constructor"
|
||||
&& typeof this[method] === "function"
|
||||
) {
|
||||
this[method] = this[method].bind(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the specified window.
|
||||
*
|
||||
* @public
|
||||
* @param {string} name - The name of the window to get.
|
||||
* @return {Window} - The corresponding window object.
|
||||
*/
|
||||
Get(name) {
|
||||
return new Window(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the absolute position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Position>} - The current absolute position of the window.
|
||||
*/
|
||||
AbsolutePosition() {
|
||||
return this.#call(AbsolutePositionMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Centers the window on the screen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Center() {
|
||||
return this.#call(CenterMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Close() {
|
||||
return this.#call(CloseMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables min/max size constraints.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
DisableSizeConstraints() {
|
||||
return this.#call(DisableSizeConstraintsMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables min/max size constraints.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
EnableSizeConstraints() {
|
||||
return this.#call(EnableSizeConstraintsMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Focuses the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Focus() {
|
||||
return this.#call(FocusMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces the window to reload the page assets.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
ForceReload() {
|
||||
return this.#call(ForceReloadMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Doc.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Fullscreen() {
|
||||
return this.#call(FullscreenMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the screen that the window is on.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Screen>} - The screen the window is currently on
|
||||
*/
|
||||
GetScreen() {
|
||||
return this.#call(GetScreenMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current zoom level of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<number>} - The current zoom level
|
||||
*/
|
||||
GetZoom() {
|
||||
return this.#call(GetZoomMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<number>} - The current height of the window
|
||||
*/
|
||||
Height() {
|
||||
return this.#call(HeightMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Hide() {
|
||||
return this.#call(HideMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the window is focused.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently focused
|
||||
*/
|
||||
IsFocused() {
|
||||
return this.#call(IsFocusedMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the window is fullscreen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently fullscreen
|
||||
*/
|
||||
IsFullscreen() {
|
||||
return this.#call(IsFullscreenMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the window is maximised.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently maximised
|
||||
*/
|
||||
IsMaximised() {
|
||||
return this.#call(IsMaximisedMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the window is minimised.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently minimised
|
||||
*/
|
||||
IsMinimised() {
|
||||
return this.#call(IsMinimisedMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Maximises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Maximise() {
|
||||
return this.#call(MaximiseMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Minimise() {
|
||||
return this.#call(MinimiseMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<string>} - The name of the window
|
||||
*/
|
||||
Name() {
|
||||
return this.#call(NameMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the development tools pane.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
OpenDevTools() {
|
||||
return this.#call(OpenDevToolsMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relative position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Position>} - The current relative position of the window
|
||||
*/
|
||||
RelativePosition() {
|
||||
return this.#call(RelativePositionMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the page assets.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Reload() {
|
||||
return this.#call(ReloadMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the window is resizable.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently resizable
|
||||
*/
|
||||
Resizable() {
|
||||
return this.#call(ResizableMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restores the window to its previous state if it was previously minimised, maximised or fullscreen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Restore() {
|
||||
return this.#call(RestoreMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the absolute position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @param {number} x - The desired horizontal absolute position of the window
|
||||
* @param {number} y - The desired vertical absolute position of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetAbsolutePosition(x, y) {
|
||||
return this.#call(SetAbsolutePositionMethod, { x, y });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the window to be always on top.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} alwaysOnTop - Whether the window should stay on top
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetAlwaysOnTop(alwaysOnTop) {
|
||||
return this.#call(SetAlwaysOnTopMethod, { alwaysOnTop });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the background colour of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} r - The desired red component of the window background
|
||||
* @param {number} g - The desired green component of the window background
|
||||
* @param {number} b - The desired blue component of the window background
|
||||
* @param {number} a - The desired alpha component of the window background
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetBackgroundColour(r, g, b, a) {
|
||||
return this.#call(SetBackgroundColourMethod, { r, g, b, a });
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the window frame and title bar.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} frameless - Whether the window should be frameless
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetFrameless(frameless) {
|
||||
return this.#call(SetFramelessMethod, { frameless });
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the system fullscreen button.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} enabled - Whether the fullscreen button should be enabled
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetFullscreenButtonEnabled(enabled) {
|
||||
return this.#call(SetFullscreenButtonEnabledMethod, { enabled });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum size of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} width - The desired maximum width of the window
|
||||
* @param {number} height - The desired maximum height of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetMaxSize(width, height) {
|
||||
return this.#call(SetMaxSizeMethod, { width, height });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the minimum size of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} width - The desired minimum width of the window
|
||||
* @param {number} height - The desired minimum height of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetMinSize(width, height) {
|
||||
return this.#call(SetMinSizeMethod, { width, height });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relative position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @param {number} x - The desired horizontal relative position of the window
|
||||
* @param {number} y - The desired vertical relative position of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetRelativePosition(x, y) {
|
||||
return this.#call(SetRelativePositionMethod, { x, y });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the window is resizable.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} resizable - Whether the window should be resizable
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetResizable(resizable) {
|
||||
return this.#call(SetResizableMethod, { resizable });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} width - The desired width of the window
|
||||
* @param {number} height - The desired height of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetSize(width, height) {
|
||||
return this.#call(SetSizeMethod, { width, height });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {string} title - The desired title of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetTitle(title) {
|
||||
return this.#call(SetTitleMethod, { title });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the zoom level of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} zoom - The desired zoom level
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
SetZoom(zoom) {
|
||||
return this.#call(SetZoomMethod, { zoom });
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Show() {
|
||||
return this.#call(ShowMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Size>} - The current size of the window
|
||||
*/
|
||||
Size() {
|
||||
return this.#call(SizeMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the window between fullscreen and normal.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
ToggleFullscreen() {
|
||||
return this.#call(ToggleFullscreenMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the window between maximised and normal.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
ToggleMaximise() {
|
||||
return this.#call(ToggleMaximiseMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Un-fullscreens the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
UnFullscreen() {
|
||||
return this.#call(UnFullscreenMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Un-maximises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
UnMaximise() {
|
||||
return this.#call(UnMaximiseMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Un-minimises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
UnMinimise() {
|
||||
return this.#call(UnMinimiseMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<number>} - The current width of the window
|
||||
*/
|
||||
Width() {
|
||||
return this.#call(WidthMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zooms the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
Zoom() {
|
||||
return this.#call(ZoomMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increases the zoom level of the webview content.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
ZoomIn() {
|
||||
return this.#call(ZoomInMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decreases the zoom level of the webview content.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
ZoomOut() {
|
||||
return this.#call(ZoomOutMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the zoom level of the webview content.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
ZoomReset() {
|
||||
return this.#call(ZoomResetMethod);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the specified window.
|
||||
* The window within which the script is running.
|
||||
*
|
||||
* @param {string} windowName - The name of the window to get.
|
||||
* @return {Object} - The specified window object.
|
||||
* @type {Window}
|
||||
*/
|
||||
export function Get(windowName) {
|
||||
return createWindow(newRuntimeCallerWithID(objectNames.Window, windowName));
|
||||
}
|
||||
const thisWindow = new Window('');
|
||||
|
||||
/**
|
||||
* Centers the window on the screen.
|
||||
*/
|
||||
export function Center() {
|
||||
thisWindow.Center();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title of the window.
|
||||
* @param {string} title - The title to set.
|
||||
*/
|
||||
export function SetTitle(title) {
|
||||
thisWindow.SetTitle(title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the window to fullscreen.
|
||||
*/
|
||||
export function Fullscreen() {
|
||||
thisWindow.Fullscreen();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the window.
|
||||
* @param {number} width - The width of the window.
|
||||
* @param {number} height - The height of the window.
|
||||
*/
|
||||
export function SetSize(width, height) {
|
||||
thisWindow.SetSize(width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the size of the window.
|
||||
*/
|
||||
export function Size() {
|
||||
return thisWindow.Size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum size of the window.
|
||||
* @param {number} width - The maximum width of the window.
|
||||
* @param {number} height - The maximum height of the window.
|
||||
*/
|
||||
export function SetMaxSize(width, height) {
|
||||
thisWindow.SetMaxSize(width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the minimum size of the window.
|
||||
* @param {number} width - The minimum width of the window.
|
||||
* @param {number} height - The minimum height of the window.
|
||||
*/
|
||||
export function SetMinSize(width, height) {
|
||||
thisWindow.SetMinSize(width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the window to always be on top.
|
||||
* @param {boolean} onTop - Whether the window should always be on top.
|
||||
*/
|
||||
export function SetAlwaysOnTop(onTop) {
|
||||
thisWindow.SetAlwaysOnTop(onTop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relative position of the window.
|
||||
* @param {number} x - The x-coordinate of the window's position.
|
||||
* @param {number} y - The y-coordinate of the window's position.
|
||||
*/
|
||||
export function SetRelativePosition(x, y) {
|
||||
thisWindow.SetRelativePosition(x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the relative position of the window.
|
||||
*/
|
||||
export function RelativePosition() {
|
||||
return thisWindow.RelativePosition();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the screen that the window is on.
|
||||
*/
|
||||
export function Screen() {
|
||||
return thisWindow.Screen();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides the window.
|
||||
*/
|
||||
export function Hide() {
|
||||
thisWindow.Hide();
|
||||
}
|
||||
|
||||
/**
|
||||
* Maximises the window.
|
||||
*/
|
||||
export function Maximise() {
|
||||
thisWindow.Maximise();
|
||||
}
|
||||
|
||||
/**
|
||||
* Un-maximises the window.
|
||||
*/
|
||||
export function UnMaximise() {
|
||||
thisWindow.UnMaximise();
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the maximisation of the window.
|
||||
*/
|
||||
export function ToggleMaximise() {
|
||||
thisWindow.ToggleMaximise();
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimises the window.
|
||||
*/
|
||||
export function Minimise() {
|
||||
thisWindow.Minimise();
|
||||
}
|
||||
|
||||
/**
|
||||
* Un-minimises the window.
|
||||
*/
|
||||
export function UnMinimise() {
|
||||
thisWindow.UnMinimise();
|
||||
}
|
||||
|
||||
/**
|
||||
* Restores the window.
|
||||
*/
|
||||
export function Restore() {
|
||||
thisWindow.Restore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the window.
|
||||
*/
|
||||
export function Show() {
|
||||
thisWindow.Show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the window.
|
||||
*/
|
||||
export function Close() {
|
||||
thisWindow.Close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the background colour of the window.
|
||||
* @param {number} r - The red component of the colour.
|
||||
* @param {number} g - The green component of the colour.
|
||||
* @param {number} b - The blue component of the colour.
|
||||
* @param {number} a - The alpha component of the colour.
|
||||
*/
|
||||
export function SetBackgroundColour(r, g, b, a) {
|
||||
thisWindow.SetBackgroundColour(r, g, b, a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the window is resizable.
|
||||
* @param {boolean} resizable - Whether the window should be resizable.
|
||||
*/
|
||||
export function SetResizable(resizable) {
|
||||
thisWindow.SetResizable(resizable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the width of the window.
|
||||
*/
|
||||
export function Width() {
|
||||
return thisWindow.Width();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the height of the window.
|
||||
*/
|
||||
export function Height() {
|
||||
return thisWindow.Height();
|
||||
}
|
||||
|
||||
/**
|
||||
* Zooms in the window.
|
||||
*/
|
||||
export function ZoomIn() {
|
||||
thisWindow.ZoomIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Zooms out the window.
|
||||
*/
|
||||
export function ZoomOut() {
|
||||
thisWindow.ZoomOut();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the zoom of the window.
|
||||
*/
|
||||
export function ZoomReset() {
|
||||
thisWindow.ZoomReset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the zoom level of the window.
|
||||
*/
|
||||
export function GetZoomLevel() {
|
||||
return thisWindow.GetZoomLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the zoom level of the window.
|
||||
* @param {number} zoomLevel - The zoom level to set.
|
||||
*/
|
||||
export function SetZoomLevel(zoomLevel) {
|
||||
thisWindow.SetZoomLevel(zoomLevel);
|
||||
}
|
||||
export default thisWindow;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,18 @@
|
|||
/*
|
||||
_ __ _ __
|
||||
| | / /___ _(_) /____
|
||||
| | /| / / __ `/ / / ___/
|
||||
| |/ |/ / /_/ / / (__ )
|
||||
|__/|__/\__,_/_/_/____/
|
||||
The electron alternative for Go
|
||||
(c) Lea Anthony 2019-present
|
||||
*/
|
||||
|
||||
import {Emit, WailsEvent} from "./events";
|
||||
import {Question} from "./dialogs";
|
||||
import {Get} from "./window";
|
||||
import {OpenURL} from "./browser";
|
||||
import {Question} from "./dialogs";
|
||||
import {Emit, WailsEvent} from "./events";
|
||||
import {canAbortListeners, whenReady} from "./utils";
|
||||
import Window from "./window";
|
||||
|
||||
/**
|
||||
* Sends an event with the given name and optional data.
|
||||
|
|
@ -13,129 +23,206 @@ import {OpenURL} from "./browser";
|
|||
* @return {void}
|
||||
*/
|
||||
function sendEvent(eventName, data=null) {
|
||||
let event = new WailsEvent(eventName, data);
|
||||
Emit(event);
|
||||
Emit(new WailsEvent(eventName, data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds event listeners to elements with `wml-event` attribute.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
function addWMLEventListeners() {
|
||||
const elements = document.querySelectorAll('[wml-event]');
|
||||
elements.forEach(function (element) {
|
||||
const eventType = element.getAttribute('wml-event');
|
||||
const confirm = element.getAttribute('wml-confirm');
|
||||
const trigger = element.getAttribute('wml-trigger') || "click";
|
||||
|
||||
let callback = function () {
|
||||
if (confirm) {
|
||||
Question({Title: "Confirm", Message:confirm, Detached: false, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
|
||||
if (result !== "No") {
|
||||
sendEvent(eventType);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
sendEvent(eventType);
|
||||
};
|
||||
|
||||
// Remove existing listeners
|
||||
element.removeEventListener(trigger, callback);
|
||||
|
||||
// Add new listener
|
||||
element.addEventListener(trigger, callback);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calls a method on a specified window.
|
||||
* @param {string} windowName - The name of the window to call the method on.
|
||||
* @param {string} method - The name of the method to call.
|
||||
* @param {string} methodName - The name of the method to call.
|
||||
*/
|
||||
function callWindowMethod(windowName, method) {
|
||||
let targetWindow = Get(windowName);
|
||||
let methodMap = WindowMethods(targetWindow);
|
||||
if (!methodMap.has(method)) {
|
||||
console.log("Window method " + method + " not found");
|
||||
function callWindowMethod(windowName, methodName) {
|
||||
const targetWindow = Window.Get(windowName);
|
||||
const method = targetWindow[methodName];
|
||||
|
||||
if (typeof method !== "function") {
|
||||
console.error(`Window method '${methodName}' not found`);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
methodMap.get(method)();
|
||||
method.call(targetWindow);
|
||||
} catch (e) {
|
||||
console.error("Error calling window method '" + method + "': " + e);
|
||||
console.error(`Error calling window method '${methodName}': `, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds window listeners for elements with the 'wml-window' attribute.
|
||||
* Removes any existing listeners before adding new ones.
|
||||
* Responds to a triggering event by running appropriate WML actions for the current target
|
||||
*
|
||||
* @param {Event} ev
|
||||
* @return {void}
|
||||
*/
|
||||
function addWMLWindowListeners() {
|
||||
const elements = document.querySelectorAll('[wml-window]');
|
||||
elements.forEach(function (element) {
|
||||
function onWMLTriggered(ev) {
|
||||
const element = ev.currentTarget;
|
||||
|
||||
function runEffect(choice = "Yes") {
|
||||
if (choice !== "Yes")
|
||||
return;
|
||||
|
||||
const eventType = element.getAttribute('wml-event');
|
||||
const targetWindow = element.getAttribute('wml-target-window') || "";
|
||||
const windowMethod = element.getAttribute('wml-window');
|
||||
const confirm = element.getAttribute('wml-confirm');
|
||||
const trigger = element.getAttribute('wml-trigger') || 'click';
|
||||
const targetWindow = element.getAttribute('wml-target-window') || '';
|
||||
const url = element.getAttribute('wml-openurl');
|
||||
|
||||
let callback = function () {
|
||||
if (confirm) {
|
||||
Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
|
||||
if (result !== "No") {
|
||||
callWindowMethod(targetWindow, windowMethod);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (eventType !== null)
|
||||
sendEvent(eventType);
|
||||
if (windowMethod !== null)
|
||||
callWindowMethod(targetWindow, windowMethod);
|
||||
};
|
||||
if (url !== null)
|
||||
void OpenURL(url);
|
||||
}
|
||||
|
||||
// Remove existing listeners
|
||||
element.removeEventListener(trigger, callback);
|
||||
const confirm = element.getAttribute('wml-confirm');
|
||||
|
||||
// Add new listener
|
||||
element.addEventListener(trigger, callback);
|
||||
});
|
||||
if (confirm) {
|
||||
Question({
|
||||
Title: "Confirm",
|
||||
Message: confirm,
|
||||
Detached: false,
|
||||
Buttons: [
|
||||
{ Label: "Yes" },
|
||||
{ Label: "No", IsDefault: true }
|
||||
]
|
||||
}).then(runEffect);
|
||||
} else {
|
||||
runEffect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a listener to elements with the 'wml-openurl' attribute.
|
||||
* When the specified trigger event is fired on any of these elements,
|
||||
* the listener will open the URL specified by the 'wml-openurl' attribute.
|
||||
* If a 'wml-confirm' attribute is provided, a confirmation dialog will be displayed,
|
||||
* and the URL will only be opened if the user confirms.
|
||||
* AbortControllerRegistry does not actually remember active event listeners: instead
|
||||
* it ties them to an AbortSignal and uses an AbortController to remove them all at once.
|
||||
*/
|
||||
class AbortControllerRegistry {
|
||||
/**
|
||||
* Stores the AbortController that can be used to remove all currently active listeners.
|
||||
*
|
||||
* @private
|
||||
* @type {AbortController}
|
||||
*/
|
||||
#controller;
|
||||
|
||||
constructor() {
|
||||
this.#controller = new AbortController();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an options object for addEventListener that ties the listener
|
||||
* to the AbortSignal from the current AbortController.
|
||||
*
|
||||
* @param {HTMLElement} element An HTML element
|
||||
* @param {string[]} triggers The list of active WML trigger events for the specified elements
|
||||
* @returns {AddEventListenerOptions}
|
||||
*/
|
||||
set(element, triggers) {
|
||||
return { signal: this.#controller.signal };
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all registered event listeners.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
reset() {
|
||||
this.#controller.abort();
|
||||
this.#controller = new AbortController();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WeakMapRegistry maps active trigger events to each DOM element through a WeakMap.
|
||||
* This ensures that the mapping remains private to this module, while still allowing garbage
|
||||
* collection of the involved elements.
|
||||
*/
|
||||
class WeakMapRegistry {
|
||||
/**
|
||||
* Stores the current element-to-trigger mapping.
|
||||
*
|
||||
* @private
|
||||
* @type {WeakMap<HTMLElement, string[]>}
|
||||
*/
|
||||
#triggerMap;
|
||||
|
||||
/**
|
||||
* Counts the number of elements with active WML triggers.
|
||||
*
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
#elementCount = 0;
|
||||
|
||||
constructor() {
|
||||
this.#triggerMap = new WeakMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the active triggers for the specified element.
|
||||
*
|
||||
* @param {HTMLElement} element An HTML element
|
||||
* @param {string[]} triggers The list of active WML trigger events for the specified element
|
||||
* @returns {AddEventListenerOptions}
|
||||
*/
|
||||
set(element, triggers) {
|
||||
this.#elementCount += !this.#triggerMap.has(element);
|
||||
this.#triggerMap.set(element, triggers);
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all registered event listeners.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
reset() {
|
||||
if (this.#elementCount <= 0)
|
||||
return;
|
||||
|
||||
for (const element of document.body.querySelectorAll('*')) {
|
||||
if (this.#elementCount <= 0)
|
||||
break;
|
||||
|
||||
const triggers = this.#triggerMap.get(element);
|
||||
this.#elementCount -= (typeof triggers !== "undefined");
|
||||
|
||||
for (const trigger of triggers || [])
|
||||
element.removeEventListener(trigger, onWMLTriggered);
|
||||
}
|
||||
|
||||
this.#triggerMap = new WeakMap();
|
||||
this.#elementCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const triggerRegistry = canAbortListeners() ? new AbortControllerRegistry() : new WeakMapRegistry();
|
||||
|
||||
/**
|
||||
* Adds event listeners to the specified element.
|
||||
*
|
||||
* @param {HTMLElement} element
|
||||
* @return {void}
|
||||
*/
|
||||
function addWMLListeners(element) {
|
||||
const triggerRegExp = /\S+/g;
|
||||
const triggerAttr = (element.getAttribute('wml-trigger') || "click");
|
||||
const triggers = [];
|
||||
|
||||
let match;
|
||||
while ((match = triggerRegExp.exec(triggerAttr)) !== null)
|
||||
triggers.push(match[0]);
|
||||
|
||||
const options = triggerRegistry.set(element, triggers);
|
||||
for (const trigger of triggers)
|
||||
element.addEventListener(trigger, onWMLTriggered, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules an automatic reload of WML to be performed as soon as the document is fully loaded.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
function addWMLOpenBrowserListener() {
|
||||
const elements = document.querySelectorAll('[wml-openurl]');
|
||||
elements.forEach(function (element) {
|
||||
const url = element.getAttribute('wml-openurl');
|
||||
const confirm = element.getAttribute('wml-confirm');
|
||||
const trigger = element.getAttribute('wml-trigger') || "click";
|
||||
|
||||
let callback = function () {
|
||||
if (confirm) {
|
||||
Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
|
||||
if (result !== "No") {
|
||||
void OpenURL(url);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
void OpenURL(url);
|
||||
};
|
||||
|
||||
// Remove existing listeners
|
||||
element.removeEventListener(trigger, callback);
|
||||
|
||||
// Add new listener
|
||||
element.addEventListener(trigger, callback);
|
||||
});
|
||||
export function Enable() {
|
||||
whenReady(Reload);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -144,28 +231,6 @@ function addWMLOpenBrowserListener() {
|
|||
* @return {void}
|
||||
*/
|
||||
export function Reload() {
|
||||
addWMLEventListeners();
|
||||
addWMLWindowListeners();
|
||||
addWMLOpenBrowserListener();
|
||||
triggerRegistry.reset();
|
||||
document.body.querySelectorAll('[wml-event], [wml-window], [wml-openurl]').forEach(addWMLListeners);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of all methods in the current window.
|
||||
* @returns {Map} - A map of window methods.
|
||||
*/
|
||||
function WindowMethods(targetWindow) {
|
||||
// Create a new map to store methods
|
||||
let result = new Map();
|
||||
|
||||
// Iterate over all properties of the window object
|
||||
for (let method in targetWindow) {
|
||||
// Check if the property is indeed a method (function)
|
||||
if(typeof targetWindow[method] === 'function') {
|
||||
// Add the method to the map
|
||||
result.set(method, targetWindow[method]);
|
||||
}
|
||||
|
||||
}
|
||||
// Return the map of window methods
|
||||
return result;
|
||||
}
|
||||
1
v3/internal/runtime/desktop/@wailsio/runtime/types/contextmenu.d.ts
vendored
Normal file
1
v3/internal/runtime/desktop/@wailsio/runtime/types/contextmenu.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
v3/internal/runtime/desktop/@wailsio/runtime/types/drag.d.ts
vendored
Normal file
1
v3/internal/runtime/desktop/@wailsio/runtime/types/drag.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
|
|
@ -202,6 +202,11 @@ export const Types: {
|
|||
};
|
||||
Linux: {
|
||||
SystemThemeChanged: string;
|
||||
WindowLoadChanged: string;
|
||||
WindowDeleteEvent: string;
|
||||
WindowFocusIn: string;
|
||||
WindowFocusOut: string;
|
||||
ApplicationStartup: string;
|
||||
};
|
||||
Common: {
|
||||
ApplicationStarted: string;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ import * as Events from "./events";
|
|||
import * as Flags from "./flags";
|
||||
import * as Screens from "./screens";
|
||||
import * as System from "./system";
|
||||
import * as Window from "./window";
|
||||
import * as WML from './wml';
|
||||
import Window from "./window";
|
||||
import * as WML from "./wml";
|
||||
export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, Window, WML };
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@ export namespace objectNames {
|
|||
let Screens: number;
|
||||
let System: number;
|
||||
let Browser: number;
|
||||
let CancelCall: number;
|
||||
}
|
||||
export let clientId: string;
|
||||
|
|
|
|||
|
|
@ -52,10 +52,6 @@ export type Rect = {
|
|||
*/
|
||||
Height: number;
|
||||
};
|
||||
/**
|
||||
* The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'.
|
||||
*/
|
||||
export type Rotation = ('Zero' | 'Ninety' | 'OneEighty' | 'TwoSeventy');
|
||||
export type Screen = {
|
||||
/**
|
||||
* - Unique identifier for the screen.
|
||||
|
|
@ -92,5 +88,5 @@ export type Screen = {
|
|||
/**
|
||||
* - The rotation of the screen.
|
||||
*/
|
||||
Rotation: Rotation;
|
||||
Rotation: number;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,9 +14,19 @@ export function IsDarkMode(): Promise<boolean>;
|
|||
*/
|
||||
export function Capabilities(): Promise<any>;
|
||||
/**
|
||||
* @typedef {object} EnvironmentInfo
|
||||
* @property {string} OS - The operating system in use.
|
||||
* @typedef {Object} OSInfo
|
||||
* @property {string} Branding - The branding of the OS.
|
||||
* @property {string} ID - The ID of the OS.
|
||||
* @property {string} Name - The name of the OS.
|
||||
* @property {string} Version - The version of the OS.
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object} EnvironmentInfo
|
||||
* @property {string} Arch - The architecture of the system.
|
||||
* @property {boolean} Debug - True if the application is running in debug mode, otherwise false.
|
||||
* @property {string} OS - The operating system in use.
|
||||
* @property {OSInfo} OSInfo - Details of the operating system.
|
||||
* @property {Object} PlatformInfo - Additional platform information.
|
||||
*/
|
||||
/**
|
||||
* @function
|
||||
|
|
@ -60,13 +70,43 @@ export function IsARM(): boolean;
|
|||
*/
|
||||
export function IsARM64(): boolean;
|
||||
export function IsDebug(): boolean;
|
||||
export type OSInfo = {
|
||||
/**
|
||||
* - The branding of the OS.
|
||||
*/
|
||||
Branding: string;
|
||||
/**
|
||||
* - The ID of the OS.
|
||||
*/
|
||||
ID: string;
|
||||
/**
|
||||
* - The name of the OS.
|
||||
*/
|
||||
Name: string;
|
||||
/**
|
||||
* - The version of the OS.
|
||||
*/
|
||||
Version: string;
|
||||
};
|
||||
export type EnvironmentInfo = {
|
||||
/**
|
||||
* - The architecture of the system.
|
||||
*/
|
||||
Arch: string;
|
||||
/**
|
||||
* - True if the application is running in debug mode, otherwise false.
|
||||
*/
|
||||
Debug: boolean;
|
||||
/**
|
||||
* - The operating system in use.
|
||||
*/
|
||||
OS: string;
|
||||
/**
|
||||
* - The architecture of the system.
|
||||
* - Details of the operating system.
|
||||
*/
|
||||
Arch: string;
|
||||
OSInfo: OSInfo;
|
||||
/**
|
||||
* - Additional platform information.
|
||||
*/
|
||||
PlatformInfo: any;
|
||||
};
|
||||
|
|
|
|||
14
v3/internal/runtime/desktop/@wailsio/runtime/types/utils.d.ts
vendored
Normal file
14
v3/internal/runtime/desktop/@wailsio/runtime/types/utils.d.ts
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Logs a message to the console with custom formatting.
|
||||
* @param {string} message - The message to be logged.
|
||||
* @return {void}
|
||||
*/
|
||||
export function debugLog(message: string): void;
|
||||
/**
|
||||
* Checks whether the browser supports removing listeners by triggering an AbortSignal
|
||||
* (see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#signal)
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function canAbortListeners(): boolean;
|
||||
export function whenReady(callback: any): void;
|
||||
|
|
@ -1,140 +1,408 @@
|
|||
/**
|
||||
* Gets the specified window.
|
||||
*
|
||||
* @param {string} windowName - The name of the window to get.
|
||||
* @return {Object} - The specified window object.
|
||||
*/
|
||||
export function Get(windowName: string): any;
|
||||
/**
|
||||
* Centers the window on the screen.
|
||||
*/
|
||||
export function Center(): void;
|
||||
/**
|
||||
* Sets the title of the window.
|
||||
* @param {string} title - The title to set.
|
||||
*/
|
||||
export function SetTitle(title: string): void;
|
||||
/**
|
||||
* Sets the window to fullscreen.
|
||||
*/
|
||||
export function Fullscreen(): void;
|
||||
/**
|
||||
* Sets the size of the window.
|
||||
* @param {number} width - The width of the window.
|
||||
* @param {number} height - The height of the window.
|
||||
*/
|
||||
export function SetSize(width: number, height: number): void;
|
||||
/**
|
||||
* Gets the size of the window.
|
||||
*/
|
||||
export function Size(): any;
|
||||
/**
|
||||
* Sets the maximum size of the window.
|
||||
* @param {number} width - The maximum width of the window.
|
||||
* @param {number} height - The maximum height of the window.
|
||||
*/
|
||||
export function SetMaxSize(width: number, height: number): void;
|
||||
/**
|
||||
* Sets the minimum size of the window.
|
||||
* @param {number} width - The minimum width of the window.
|
||||
* @param {number} height - The minimum height of the window.
|
||||
*/
|
||||
export function SetMinSize(width: number, height: number): void;
|
||||
/**
|
||||
* Sets the window to always be on top.
|
||||
* @param {boolean} onTop - Whether the window should always be on top.
|
||||
*/
|
||||
export function SetAlwaysOnTop(onTop: boolean): void;
|
||||
/**
|
||||
* Sets the relative position of the window.
|
||||
* @param {number} x - The x-coordinate of the window's position.
|
||||
* @param {number} y - The y-coordinate of the window's position.
|
||||
*/
|
||||
export function SetRelativePosition(x: number, y: number): void;
|
||||
/**
|
||||
* Gets the relative position of the window.
|
||||
*/
|
||||
export function RelativePosition(): any;
|
||||
/**
|
||||
* Gets the screen that the window is on.
|
||||
*/
|
||||
export function Screen(): any;
|
||||
export default thisWindow;
|
||||
export type Screen = import("./screens").Screen;
|
||||
/**
|
||||
* Hides the window.
|
||||
* A record describing the position of a window.
|
||||
*/
|
||||
export function Hide(): void;
|
||||
export type Position = {
|
||||
/**
|
||||
* - The horizontal position of the window
|
||||
*/
|
||||
x: number;
|
||||
/**
|
||||
* - The vertical position of the window
|
||||
*/
|
||||
y: number;
|
||||
};
|
||||
/**
|
||||
* Maximises the window.
|
||||
* A record describing the size of a window.
|
||||
*/
|
||||
export function Maximise(): void;
|
||||
export type Size = {
|
||||
/**
|
||||
* - The width of the window
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* - The height of the window
|
||||
*/
|
||||
height: number;
|
||||
};
|
||||
/**
|
||||
* Un-maximises the window.
|
||||
* The window within which the script is running.
|
||||
*
|
||||
* @type {Window}
|
||||
*/
|
||||
export function UnMaximise(): void;
|
||||
/**
|
||||
* Toggles the maximisation of the window.
|
||||
*/
|
||||
export function ToggleMaximise(): void;
|
||||
/**
|
||||
* Minimises the window.
|
||||
*/
|
||||
export function Minimise(): void;
|
||||
/**
|
||||
* Un-minimises the window.
|
||||
*/
|
||||
export function UnMinimise(): void;
|
||||
/**
|
||||
* Restores the window.
|
||||
*/
|
||||
export function Restore(): void;
|
||||
/**
|
||||
* Shows the window.
|
||||
*/
|
||||
export function Show(): void;
|
||||
/**
|
||||
* Closes the window.
|
||||
*/
|
||||
export function Close(): void;
|
||||
/**
|
||||
* Sets the background colour of the window.
|
||||
* @param {number} r - The red component of the colour.
|
||||
* @param {number} g - The green component of the colour.
|
||||
* @param {number} b - The blue component of the colour.
|
||||
* @param {number} a - The alpha component of the colour.
|
||||
*/
|
||||
export function SetBackgroundColour(r: number, g: number, b: number, a: number): void;
|
||||
/**
|
||||
* Sets whether the window is resizable.
|
||||
* @param {boolean} resizable - Whether the window should be resizable.
|
||||
*/
|
||||
export function SetResizable(resizable: boolean): void;
|
||||
/**
|
||||
* Gets the width of the window.
|
||||
*/
|
||||
export function Width(): any;
|
||||
/**
|
||||
* Gets the height of the window.
|
||||
*/
|
||||
export function Height(): any;
|
||||
/**
|
||||
* Zooms in the window.
|
||||
*/
|
||||
export function ZoomIn(): void;
|
||||
/**
|
||||
* Zooms out the window.
|
||||
*/
|
||||
export function ZoomOut(): void;
|
||||
/**
|
||||
* Resets the zoom of the window.
|
||||
*/
|
||||
export function ZoomReset(): void;
|
||||
/**
|
||||
* Gets the zoom level of the window.
|
||||
*/
|
||||
export function GetZoomLevel(): any;
|
||||
/**
|
||||
* Sets the zoom level of the window.
|
||||
* @param {number} zoomLevel - The zoom level to set.
|
||||
*/
|
||||
export function SetZoomLevel(zoomLevel: number): void;
|
||||
declare const thisWindow: Window;
|
||||
declare class Window {
|
||||
/**
|
||||
* Initialises a window object with the specified name.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name - The name of the target window.
|
||||
*/
|
||||
private constructor();
|
||||
/**
|
||||
* Gets the specified window.
|
||||
*
|
||||
* @public
|
||||
* @param {string} name - The name of the window to get.
|
||||
* @return {Window} - The corresponding window object.
|
||||
*/
|
||||
public Get(name: string): Window;
|
||||
/**
|
||||
* Returns the absolute position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Position>} - The current absolute position of the window.
|
||||
*/
|
||||
public AbsolutePosition(): Promise<Position>;
|
||||
/**
|
||||
* Centers the window on the screen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Center(): Promise<void>;
|
||||
/**
|
||||
* Closes the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Close(): Promise<void>;
|
||||
/**
|
||||
* Disables min/max size constraints.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public DisableSizeConstraints(): Promise<void>;
|
||||
/**
|
||||
* Enables min/max size constraints.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public EnableSizeConstraints(): Promise<void>;
|
||||
/**
|
||||
* Focuses the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Focus(): Promise<void>;
|
||||
/**
|
||||
* Forces the window to reload the page assets.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public ForceReload(): Promise<void>;
|
||||
/**
|
||||
* Doc.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Fullscreen(): Promise<void>;
|
||||
/**
|
||||
* Returns the screen that the window is on.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Screen>} - The screen the window is currently on
|
||||
*/
|
||||
public GetScreen(): Promise<Screen>;
|
||||
/**
|
||||
* Returns the current zoom level of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<number>} - The current zoom level
|
||||
*/
|
||||
public GetZoom(): Promise<number>;
|
||||
/**
|
||||
* Returns the height of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<number>} - The current height of the window
|
||||
*/
|
||||
public Height(): Promise<number>;
|
||||
/**
|
||||
* Hides the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Hide(): Promise<void>;
|
||||
/**
|
||||
* Returns true if the window is focused.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently focused
|
||||
*/
|
||||
public IsFocused(): Promise<boolean>;
|
||||
/**
|
||||
* Returns true if the window is fullscreen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently fullscreen
|
||||
*/
|
||||
public IsFullscreen(): Promise<boolean>;
|
||||
/**
|
||||
* Returns true if the window is maximised.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently maximised
|
||||
*/
|
||||
public IsMaximised(): Promise<boolean>;
|
||||
/**
|
||||
* Returns true if the window is minimised.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently minimised
|
||||
*/
|
||||
public IsMinimised(): Promise<boolean>;
|
||||
/**
|
||||
* Maximises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Maximise(): Promise<void>;
|
||||
/**
|
||||
* Minimises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Minimise(): Promise<void>;
|
||||
/**
|
||||
* Returns the name of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<string>} - The name of the window
|
||||
*/
|
||||
public Name(): Promise<string>;
|
||||
/**
|
||||
* Opens the development tools pane.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public OpenDevTools(): Promise<void>;
|
||||
/**
|
||||
* Returns the relative position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Position>} - The current relative position of the window
|
||||
*/
|
||||
public RelativePosition(): Promise<Position>;
|
||||
/**
|
||||
* Reloads the page assets.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Reload(): Promise<void>;
|
||||
/**
|
||||
* Returns true if the window is resizable.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<boolean>} - Whether the window is currently resizable
|
||||
*/
|
||||
public Resizable(): Promise<boolean>;
|
||||
/**
|
||||
* Restores the window to its previous state if it was previously minimised, maximised or fullscreen.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Restore(): Promise<void>;
|
||||
/**
|
||||
* Sets the absolute position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @param {number} x - The desired horizontal absolute position of the window
|
||||
* @param {number} y - The desired vertical absolute position of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetAbsolutePosition(x: number, y: number): Promise<void>;
|
||||
/**
|
||||
* Sets the window to be always on top.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} alwaysOnTop - Whether the window should stay on top
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetAlwaysOnTop(alwaysOnTop: boolean): Promise<void>;
|
||||
/**
|
||||
* Sets the background colour of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} r - The desired red component of the window background
|
||||
* @param {number} g - The desired green component of the window background
|
||||
* @param {number} b - The desired blue component of the window background
|
||||
* @param {number} a - The desired alpha component of the window background
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetBackgroundColour(r: number, g: number, b: number, a: number): Promise<void>;
|
||||
/**
|
||||
* Removes the window frame and title bar.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} frameless - Whether the window should be frameless
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetFrameless(frameless: boolean): Promise<void>;
|
||||
/**
|
||||
* Disables the system fullscreen button.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} enabled - Whether the fullscreen button should be enabled
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetFullscreenButtonEnabled(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Sets the maximum size of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} width - The desired maximum width of the window
|
||||
* @param {number} height - The desired maximum height of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetMaxSize(width: number, height: number): Promise<void>;
|
||||
/**
|
||||
* Sets the minimum size of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} width - The desired minimum width of the window
|
||||
* @param {number} height - The desired minimum height of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetMinSize(width: number, height: number): Promise<void>;
|
||||
/**
|
||||
* Sets the relative position of the window to the screen.
|
||||
*
|
||||
* @public
|
||||
* @param {number} x - The desired horizontal relative position of the window
|
||||
* @param {number} y - The desired vertical relative position of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetRelativePosition(x: number, y: number): Promise<void>;
|
||||
/**
|
||||
* Sets whether the window is resizable.
|
||||
*
|
||||
* @public
|
||||
* @param {boolean} resizable - Whether the window should be resizable
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetResizable(resizable: boolean): Promise<void>;
|
||||
/**
|
||||
* Sets the size of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} width - The desired width of the window
|
||||
* @param {number} height - The desired height of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetSize(width: number, height: number): Promise<void>;
|
||||
/**
|
||||
* Sets the title of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {string} title - The desired title of the window
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetTitle(title: string): Promise<void>;
|
||||
/**
|
||||
* Sets the zoom level of the window.
|
||||
*
|
||||
* @public
|
||||
* @param {number} zoom - The desired zoom level
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public SetZoom(zoom: number): Promise<void>;
|
||||
/**
|
||||
* Shows the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Show(): Promise<void>;
|
||||
/**
|
||||
* Returns the size of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<Size>} - The current size of the window
|
||||
*/
|
||||
public Size(): Promise<Size>;
|
||||
/**
|
||||
* Toggles the window between fullscreen and normal.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public ToggleFullscreen(): Promise<void>;
|
||||
/**
|
||||
* Toggles the window between maximised and normal.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public ToggleMaximise(): Promise<void>;
|
||||
/**
|
||||
* Un-fullscreens the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public UnFullscreen(): Promise<void>;
|
||||
/**
|
||||
* Un-maximises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public UnMaximise(): Promise<void>;
|
||||
/**
|
||||
* Un-minimises the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public UnMinimise(): Promise<void>;
|
||||
/**
|
||||
* Returns the width of the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<number>} - The current width of the window
|
||||
*/
|
||||
public Width(): Promise<number>;
|
||||
/**
|
||||
* Zooms the window.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public Zoom(): Promise<void>;
|
||||
/**
|
||||
* Increases the zoom level of the webview content.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public ZoomIn(): Promise<void>;
|
||||
/**
|
||||
* Decreases the zoom level of the webview content.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public ZoomOut(): Promise<void>;
|
||||
/**
|
||||
* Resets the zoom level of the webview content.
|
||||
*
|
||||
* @public
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
public ZoomReset(): Promise<void>;
|
||||
#private;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* Schedules an automatic reload of WML to be performed as soon as the document is fully loaded.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
export function Enable(): void;
|
||||
/**
|
||||
* Reloads the WML page by adding necessary event listeners and browser listeners.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -8,89 +8,15 @@ The electron alternative for Go
|
|||
(c) Lea Anthony 2019-present
|
||||
*/
|
||||
|
||||
import {debugLog} from "../@wailsio/runtime/src/log";
|
||||
import * as Runtime from "../@wailsio/runtime/src";
|
||||
|
||||
window._wails = window._wails || {};
|
||||
// NOTE: the following methods MUST be imported explicitly because of how esbuild injection works
|
||||
import {Enable as EnableWML} from "../@wailsio/runtime/src/wml";
|
||||
import {debugLog} from "../@wailsio/runtime/src/utils";
|
||||
|
||||
import * as Application from "../@wailsio/runtime/src/application";
|
||||
import * as Browser from "../@wailsio/runtime/src/browser";
|
||||
import * as Clipboard from "../@wailsio/runtime/src/clipboard";
|
||||
import * as ContextMenu from "../@wailsio/runtime/src/contextmenu";
|
||||
import * as Drag from "../@wailsio/runtime/src/drag";
|
||||
import * as Flags from "../@wailsio/runtime/src/flags";
|
||||
import * as Screens from "../@wailsio/runtime/src/screens";
|
||||
import * as System from "../@wailsio/runtime/src/system";
|
||||
import * as Window from "../@wailsio/runtime/src/window";
|
||||
import * as WML from '../@wailsio/runtime/src/wml';
|
||||
import * as Events from "../@wailsio/runtime/src/events";
|
||||
import * as Dialogs from "../@wailsio/runtime/src/dialogs";
|
||||
import * as Call from "../@wailsio/runtime/src/calls";
|
||||
import {invoke} from "../@wailsio/runtime/src/system";
|
||||
window.wails = Runtime;
|
||||
EnableWML();
|
||||
|
||||
/***
|
||||
This technique for proper load detection is taken from HTMX:
|
||||
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2020, Big Sky Software
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
***/
|
||||
|
||||
window._wails.invoke=invoke;
|
||||
|
||||
window.wails = window.wails || {};
|
||||
window.wails.Application = Application;
|
||||
window.wails.Browser = Browser;
|
||||
window.wails.Call = Call;
|
||||
window.wails.Clipboard = Clipboard;
|
||||
window.wails.Dialogs = Dialogs;
|
||||
window.wails.Events = Events;
|
||||
window.wails.Flags = Flags;
|
||||
window.wails.Screens = Screens;
|
||||
window.wails.System = System;
|
||||
window.wails.Window = Window;
|
||||
window.wails.WML = WML;
|
||||
|
||||
|
||||
let isReady = false
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
isReady = true
|
||||
window._wails.invoke('wails:runtime:ready');
|
||||
if(DEBUG) {
|
||||
debugLog("Wails Runtime Loaded");
|
||||
}
|
||||
})
|
||||
|
||||
function whenReady(fn) {
|
||||
if (isReady || document.readyState === 'complete') {
|
||||
fn();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', fn);
|
||||
}
|
||||
if (DEBUG) {
|
||||
debugLog("Wails Runtime Loaded")
|
||||
}
|
||||
|
||||
whenReady(() => {
|
||||
WML.Reload();
|
||||
});
|
||||
|
|
|
|||
7312
v3/internal/runtime/package-lock.json
generated
7312
v3/internal/runtime/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,11 +7,11 @@
|
|||
"author": "Lea Anthony <lea.anthony@gmail.com>",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.17.19",
|
||||
"happy-dom": "^8.1.5",
|
||||
"nanoid": "^4.0.0",
|
||||
"npm-check-updates": "^16.6.3",
|
||||
"svelte": "^3.55.1",
|
||||
"vitest": "^0.28.3"
|
||||
"esbuild": "^0.20.1",
|
||||
"happy-dom": "^13.6.2",
|
||||
"nanoid": "^5.0.6",
|
||||
"npm-check-updates": "^16.14.15",
|
||||
"svelte": "^4.2.12",
|
||||
"vitest": "^1.3.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package application
|
|||
import (
|
||||
"embed"
|
||||
"encoding/json"
|
||||
"github.com/wailsapp/wails/v3/internal/operatingsystem"
|
||||
"io"
|
||||
"log"
|
||||
"log/slog"
|
||||
|
|
@ -13,6 +12,8 @@ import (
|
|||
"strconv"
|
||||
"sync"
|
||||
|
||||
"github.com/wailsapp/wails/v3/internal/operatingsystem"
|
||||
|
||||
"github.com/pkg/browser"
|
||||
"github.com/samber/lo"
|
||||
"github.com/wailsapp/wails/v3/internal/signal"
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@
|
|||
background-image: linear-gradient(-180deg, #cb3939, #610000);
|
||||
}
|
||||
</style>
|
||||
<!-- Load the runtime from our asset bundle -->
|
||||
<script src="/wails/runtime.js"></script>
|
||||
<!-- Load the runtime -->
|
||||
<script type="module" src="/wails/runtime.js"></script>
|
||||
</head>
|
||||
<body style="--webkit-app-region: drag;">
|
||||
<img class="logo"
|
||||
|
|
@ -78,4 +78,4 @@
|
|||
<p class="button-42" wml-openurl="https://wailsapp.github.io/wails/getting-started/feedback/">Feedback</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -5,69 +5,105 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
WindowCenter = 0
|
||||
WindowSetTitle = 1
|
||||
WindowFullscreen = 2
|
||||
WindowUnFullscreen = 3
|
||||
WindowSetSize = 4
|
||||
WindowSize = 5
|
||||
WindowSetMaxSize = 6
|
||||
WindowSetMinSize = 7
|
||||
WindowSetAlwaysOnTop = 8
|
||||
WindowSetRelativePosition = 9
|
||||
WindowRelativePosition = 10
|
||||
WindowScreen = 11
|
||||
WindowHide = 12
|
||||
WindowMaximise = 13
|
||||
WindowUnMaximise = 14
|
||||
WindowToggleMaximise = 15
|
||||
WindowMinimise = 16
|
||||
WindowUnMinimise = 17
|
||||
WindowRestore = 18
|
||||
WindowShow = 19
|
||||
WindowClose = 20
|
||||
WindowSetBackgroundColour = 21
|
||||
WindowSetResizable = 22
|
||||
WindowWidth = 23
|
||||
WindowHeight = 24
|
||||
WindowZoomIn = 25
|
||||
WindowZoomOut = 26
|
||||
WindowZoomReset = 27
|
||||
WindowGetZoomLevel = 28
|
||||
WindowSetZoomLevel = 29
|
||||
WindowAbsolutePosition = 0
|
||||
WindowCenter = 1
|
||||
WindowClose = 2
|
||||
WindowDisableSizeConstraints = 3
|
||||
WindowEnableSizeConstraints = 4
|
||||
WindowFocus = 5
|
||||
WindowForceReload = 6
|
||||
WindowFullscreen = 7
|
||||
WindowGetScreen = 8
|
||||
WindowGetZoom = 9
|
||||
WindowHeight = 10
|
||||
WindowHide = 11
|
||||
WindowIsFocused = 12
|
||||
WindowIsFullscreen = 13
|
||||
WindowIsMaximised = 14
|
||||
WindowIsMinimised = 15
|
||||
WindowMaximise = 16
|
||||
WindowMinimise = 17
|
||||
WindowName = 18
|
||||
WindowOpenDevTools = 19
|
||||
WindowRelativePosition = 20
|
||||
WindowReload = 21
|
||||
WindowResizable = 22
|
||||
WindowRestore = 23
|
||||
WindowSetAbsolutePosition = 24
|
||||
WindowSetAlwaysOnTop = 25
|
||||
WindowSetBackgroundColour = 26
|
||||
WindowSetFrameless = 27
|
||||
WindowSetFullscreenButtonEnabled = 28
|
||||
WindowSetMaxSize = 29
|
||||
WindowSetMinSize = 30
|
||||
WindowSetRelativePosition = 31
|
||||
WindowSetResizable = 32
|
||||
WindowSetSize = 33
|
||||
WindowSetTitle = 34
|
||||
WindowSetZoom = 35
|
||||
WindowShow = 36
|
||||
WindowSize = 37
|
||||
WindowToggleFullscreen = 38
|
||||
WindowToggleMaximise = 39
|
||||
WindowUnFullscreen = 40
|
||||
WindowUnMaximise = 41
|
||||
WindowUnMinimise = 42
|
||||
WindowWidth = 43
|
||||
WindowZoom = 44
|
||||
WindowZoomIn = 45
|
||||
WindowZoomOut = 46
|
||||
WindowZoomReset = 47
|
||||
)
|
||||
|
||||
var windowMethodNames = map[int]string{
|
||||
WindowCenter: "Center",
|
||||
WindowSetTitle: "SetTitle",
|
||||
WindowFullscreen: "Fullscreen",
|
||||
WindowUnFullscreen: "UnFullscreen",
|
||||
WindowSetSize: "SetSize",
|
||||
WindowSize: "Size",
|
||||
WindowSetMaxSize: "SetMaxSize",
|
||||
WindowSetMinSize: "SetMinSize",
|
||||
WindowSetAlwaysOnTop: "SetAlwaysOnTop",
|
||||
WindowSetRelativePosition: "SetRelativePosition",
|
||||
WindowRelativePosition: "RelativePosition",
|
||||
WindowScreen: "Screen",
|
||||
WindowHide: "Hide",
|
||||
WindowMaximise: "Maximise",
|
||||
WindowUnMaximise: "UnMaximise",
|
||||
WindowToggleMaximise: "ToggleMaximise",
|
||||
WindowMinimise: "Minimise",
|
||||
WindowUnMinimise: "UnMinimise",
|
||||
WindowRestore: "Restore",
|
||||
WindowShow: "Show",
|
||||
WindowClose: "Close",
|
||||
WindowSetBackgroundColour: "SetBackgroundColour",
|
||||
WindowSetResizable: "SetResizable",
|
||||
WindowWidth: "Width",
|
||||
WindowHeight: "Height",
|
||||
WindowZoomIn: "ZoomIn",
|
||||
WindowZoomOut: "ZoomOut",
|
||||
WindowZoomReset: "ZoomReset",
|
||||
WindowGetZoomLevel: "GetZoomLevel",
|
||||
WindowSetZoomLevel: "SetZoomLevel",
|
||||
WindowAbsolutePosition: "AbsolutePosition",
|
||||
WindowCenter: "Center",
|
||||
WindowClose: "Close",
|
||||
WindowDisableSizeConstraints: "DisableSizeConstraints",
|
||||
WindowEnableSizeConstraints: "EnableSizeConstraints",
|
||||
WindowFocus: "Focus",
|
||||
WindowForceReload: "ForceReload",
|
||||
WindowFullscreen: "Fullscreen",
|
||||
WindowGetScreen: "GetScreen",
|
||||
WindowGetZoom: "GetZoom",
|
||||
WindowHeight: "Height",
|
||||
WindowHide: "Hide",
|
||||
WindowIsFocused: "IsFocused",
|
||||
WindowIsFullscreen: "IsFullscreen",
|
||||
WindowIsMaximised: "IsMaximised",
|
||||
WindowIsMinimised: "IsMinimised",
|
||||
WindowMaximise: "Maximise",
|
||||
WindowMinimise: "Minimise",
|
||||
WindowName: "Name",
|
||||
WindowOpenDevTools: "OpenDevTools",
|
||||
WindowRelativePosition: "RelativePosition",
|
||||
WindowReload: "Reload",
|
||||
WindowResizable: "Resizable",
|
||||
WindowRestore: "Restore",
|
||||
WindowSetAbsolutePosition: "SetAbsolutePosition",
|
||||
WindowSetAlwaysOnTop: "SetAlwaysOnTop",
|
||||
WindowSetBackgroundColour: "SetBackgroundColour",
|
||||
WindowSetFrameless: "SetFrameless",
|
||||
WindowSetFullscreenButtonEnabled: "SetFullscreenButtonEnabled",
|
||||
WindowSetMaxSize: "SetMaxSize",
|
||||
WindowSetMinSize: "SetMinSize",
|
||||
WindowSetRelativePosition: "SetRelativePosition",
|
||||
WindowSetResizable: "SetResizable",
|
||||
WindowSetSize: "SetSize",
|
||||
WindowSetTitle: "SetTitle",
|
||||
WindowSetZoom: "SetZoom",
|
||||
WindowShow: "Show",
|
||||
WindowSize: "Size",
|
||||
WindowToggleFullscreen: "ToggleFullscreen",
|
||||
WindowToggleMaximise: "ToggleMaximise",
|
||||
WindowUnFullscreen: "UnFullscreen",
|
||||
WindowUnMaximise: "UnMaximise",
|
||||
WindowUnMinimise: "UnMinimise",
|
||||
WindowWidth: "Width",
|
||||
WindowZoom: "Zoom",
|
||||
WindowZoomIn: "ZoomIn",
|
||||
WindowZoomOut: "ZoomOut",
|
||||
WindowZoomReset: "ZoomReset",
|
||||
}
|
||||
|
||||
func (m *MessageProcessor) processWindowMethod(method int, rw http.ResponseWriter, _ *http.Request, window Window, params QueryParams) {
|
||||
|
|
@ -79,80 +115,104 @@ func (m *MessageProcessor) processWindowMethod(method int, rw http.ResponseWrite
|
|||
}
|
||||
|
||||
switch method {
|
||||
case WindowSetTitle:
|
||||
title := args.String("title")
|
||||
if title == nil {
|
||||
m.Error("SetTitle: title is required")
|
||||
return
|
||||
}
|
||||
window.SetTitle(*title)
|
||||
m.ok(rw)
|
||||
case WindowSetSize:
|
||||
width := args.Int("width")
|
||||
height := args.Int("height")
|
||||
if width == nil || height == nil {
|
||||
m.Error("Invalid SetSize Message")
|
||||
return
|
||||
}
|
||||
window.SetSize(*width, *height)
|
||||
m.ok(rw)
|
||||
case WindowSetRelativePosition:
|
||||
x := args.Int("x")
|
||||
y := args.Int("y")
|
||||
if x == nil || y == nil {
|
||||
m.Error("Invalid SetRelativePosition Message")
|
||||
return
|
||||
}
|
||||
window.SetRelativePosition(*x, *y)
|
||||
m.ok(rw)
|
||||
case WindowFullscreen:
|
||||
window.Fullscreen()
|
||||
m.ok(rw)
|
||||
case WindowUnFullscreen:
|
||||
window.UnFullscreen()
|
||||
m.ok(rw)
|
||||
case WindowMinimise:
|
||||
window.Minimise()
|
||||
m.ok(rw)
|
||||
case WindowUnMinimise:
|
||||
window.UnMinimise()
|
||||
m.ok(rw)
|
||||
case WindowMaximise:
|
||||
window.Maximise()
|
||||
m.ok(rw)
|
||||
case WindowUnMaximise:
|
||||
window.UnMaximise()
|
||||
m.ok(rw)
|
||||
case WindowToggleMaximise:
|
||||
window.ToggleMaximise()
|
||||
m.ok(rw)
|
||||
case WindowRestore:
|
||||
window.Restore()
|
||||
m.ok(rw)
|
||||
case WindowShow:
|
||||
window.Show()
|
||||
m.ok(rw)
|
||||
case WindowHide:
|
||||
window.Hide()
|
||||
case WindowAbsolutePosition:
|
||||
x, y := window.AbsolutePosition()
|
||||
m.json(rw, map[string]interface{}{
|
||||
"x": x,
|
||||
"y": y,
|
||||
})
|
||||
case WindowCenter:
|
||||
window.Center()
|
||||
m.ok(rw)
|
||||
case WindowClose:
|
||||
window.Close()
|
||||
m.ok(rw)
|
||||
case WindowCenter:
|
||||
window.Center()
|
||||
case WindowDisableSizeConstraints:
|
||||
window.DisableSizeConstraints()
|
||||
m.ok(rw)
|
||||
case WindowSize:
|
||||
width, height := window.Size()
|
||||
m.json(rw, map[string]interface{}{
|
||||
"width": width,
|
||||
"height": height,
|
||||
})
|
||||
case WindowEnableSizeConstraints:
|
||||
window.EnableSizeConstraints()
|
||||
m.ok(rw)
|
||||
case WindowFocus:
|
||||
window.Focus()
|
||||
m.ok(rw)
|
||||
case WindowForceReload:
|
||||
window.ForceReload()
|
||||
m.ok(rw)
|
||||
case WindowFullscreen:
|
||||
window.Fullscreen()
|
||||
m.ok(rw)
|
||||
case WindowGetScreen:
|
||||
screen, err := window.GetScreen()
|
||||
if err != nil {
|
||||
m.httpError(rw, err.Error())
|
||||
return
|
||||
}
|
||||
m.json(rw, screen)
|
||||
case WindowGetZoom:
|
||||
zoom := window.GetZoom()
|
||||
m.json(rw, zoom)
|
||||
case WindowHeight:
|
||||
height := window.Height()
|
||||
m.json(rw, height)
|
||||
case WindowHide:
|
||||
window.Hide()
|
||||
m.ok(rw)
|
||||
case WindowIsFocused:
|
||||
isFocused := window.IsFocused()
|
||||
m.json(rw, isFocused)
|
||||
case WindowIsFullscreen:
|
||||
isFullscreen := window.IsFullscreen()
|
||||
m.json(rw, isFullscreen)
|
||||
case WindowIsMaximised:
|
||||
isMaximised := window.IsMaximised()
|
||||
m.json(rw, isMaximised)
|
||||
case WindowIsMinimised:
|
||||
isMinimised := window.IsMinimised()
|
||||
m.json(rw, isMinimised)
|
||||
case WindowMaximise:
|
||||
window.Maximise()
|
||||
m.ok(rw)
|
||||
case WindowMinimise:
|
||||
window.Minimise()
|
||||
m.ok(rw)
|
||||
case WindowName:
|
||||
name := window.Name()
|
||||
m.json(rw, name)
|
||||
case WindowRelativePosition:
|
||||
x, y := window.RelativePosition()
|
||||
m.json(rw, map[string]interface{}{
|
||||
"x": x,
|
||||
"y": y,
|
||||
})
|
||||
case WindowReload:
|
||||
window.Reload()
|
||||
m.ok(rw)
|
||||
case WindowResizable:
|
||||
resizable := window.Resizable()
|
||||
m.json(rw, resizable)
|
||||
case WindowRestore:
|
||||
window.Restore()
|
||||
m.ok(rw)
|
||||
case WindowSetAbsolutePosition:
|
||||
x := args.Int("x")
|
||||
if x == nil {
|
||||
m.Error("Invalid SetAbsolutePosition Message: 'x' value required")
|
||||
}
|
||||
y := args.Int("y")
|
||||
if y == nil {
|
||||
m.Error("Invalid SetAbsolutePosition Message: 'y' value required")
|
||||
}
|
||||
window.SetAbsolutePosition(*x, *y)
|
||||
m.ok(rw)
|
||||
case WindowSetAlwaysOnTop:
|
||||
alwaysOnTop := args.Bool("alwaysOnTop")
|
||||
if alwaysOnTop == nil {
|
||||
m.Error("Invalid SetAlwaysOnTop Message: 'alwaysOnTop' value required")
|
||||
return
|
||||
}
|
||||
window.SetAlwaysOnTop(*alwaysOnTop)
|
||||
m.ok(rw)
|
||||
case WindowSetBackgroundColour:
|
||||
r := args.UInt8("r")
|
||||
if r == nil {
|
||||
|
|
@ -181,13 +241,54 @@ func (m *MessageProcessor) processWindowMethod(method int, rw http.ResponseWrite
|
|||
Alpha: *a,
|
||||
})
|
||||
m.ok(rw)
|
||||
case WindowSetAlwaysOnTop:
|
||||
alwaysOnTop := args.Bool("alwaysOnTop")
|
||||
if alwaysOnTop == nil {
|
||||
m.Error("Invalid SetAlwaysOnTop Message: 'alwaysOnTop' value required")
|
||||
case WindowSetFrameless:
|
||||
frameless := args.Bool("frameless")
|
||||
if frameless == nil {
|
||||
m.Error("Invalid SetFrameless Message: 'frameless' value required")
|
||||
return
|
||||
}
|
||||
window.SetAlwaysOnTop(*alwaysOnTop)
|
||||
window.SetFrameless(*frameless)
|
||||
m.ok(rw)
|
||||
case WindowSetFullscreenButtonEnabled:
|
||||
enabled := args.Bool("enabled")
|
||||
if enabled == nil {
|
||||
m.Error("Invalid SetFullscreenButtonEnabled Message: 'enabled' value required")
|
||||
return
|
||||
}
|
||||
window.SetFullscreenButtonEnabled(*enabled)
|
||||
m.ok(rw)
|
||||
case WindowSetMaxSize:
|
||||
width := args.Int("width")
|
||||
if width == nil {
|
||||
m.Error("Invalid SetMaxSize Message: 'width' value required")
|
||||
}
|
||||
height := args.Int("height")
|
||||
if height == nil {
|
||||
m.Error("Invalid SetMaxSize Message: 'height' value required")
|
||||
}
|
||||
window.SetMaxSize(*width, *height)
|
||||
m.ok(rw)
|
||||
case WindowSetMinSize:
|
||||
width := args.Int("width")
|
||||
if width == nil {
|
||||
m.Error("Invalid SetMinSize Message: 'width' value required")
|
||||
}
|
||||
height := args.Int("height")
|
||||
if height == nil {
|
||||
m.Error("Invalid SetMinSize Message: 'height' value required")
|
||||
}
|
||||
window.SetMinSize(*width, *height)
|
||||
m.ok(rw)
|
||||
case WindowSetRelativePosition:
|
||||
x := args.Int("x")
|
||||
if x == nil {
|
||||
m.Error("Invalid SetAbsolutePosition Message: 'x' value required")
|
||||
}
|
||||
y := args.Int("y")
|
||||
if y == nil {
|
||||
m.Error("Invalid SetAbsolutePosition Message: 'y' value required")
|
||||
}
|
||||
window.SetRelativePosition(*x, *y)
|
||||
m.ok(rw)
|
||||
case WindowSetResizable:
|
||||
resizable := args.Bool("resizable")
|
||||
|
|
@ -197,34 +298,66 @@ func (m *MessageProcessor) processWindowMethod(method int, rw http.ResponseWrite
|
|||
}
|
||||
window.SetResizable(*resizable)
|
||||
m.ok(rw)
|
||||
case WindowSetMinSize:
|
||||
case WindowSetSize:
|
||||
width := args.Int("width")
|
||||
height := args.Int("height")
|
||||
if width == nil || height == nil {
|
||||
m.Error("Invalid SetMinSize Message")
|
||||
return
|
||||
if width == nil {
|
||||
m.Error("Invalid SetSize Message: 'width' value required")
|
||||
}
|
||||
window.SetMinSize(*width, *height)
|
||||
height := args.Int("height")
|
||||
if height == nil {
|
||||
m.Error("Invalid SetSize Message: 'height' value required")
|
||||
}
|
||||
window.SetSize(*width, *height)
|
||||
m.ok(rw)
|
||||
case WindowSetMaxSize:
|
||||
width := args.Int("width")
|
||||
height := args.Int("height")
|
||||
if width == nil || height == nil {
|
||||
m.Error("Invalid SetMaxSize Message")
|
||||
case WindowSetTitle:
|
||||
title := args.String("title")
|
||||
if title == nil {
|
||||
m.Error("Invalid SetTitle Message: 'title' value required")
|
||||
return
|
||||
}
|
||||
window.SetMaxSize(*width, *height)
|
||||
window.SetTitle(*title)
|
||||
m.ok(rw)
|
||||
case WindowSetZoom:
|
||||
zoom := args.Float64("zoom")
|
||||
if zoom == nil {
|
||||
m.Error("Invalid SetZoom Message: 'zoom' value required")
|
||||
return
|
||||
}
|
||||
window.SetZoom(*zoom)
|
||||
m.ok(rw)
|
||||
case WindowShow:
|
||||
window.Show()
|
||||
m.ok(rw)
|
||||
case WindowSize:
|
||||
width, height := window.Size()
|
||||
m.json(rw, map[string]interface{}{
|
||||
"width": width,
|
||||
"height": height,
|
||||
})
|
||||
case WindowOpenDevTools:
|
||||
window.OpenDevTools()
|
||||
m.ok(rw)
|
||||
case WindowToggleFullscreen:
|
||||
window.ToggleFullscreen()
|
||||
m.ok(rw)
|
||||
case WindowToggleMaximise:
|
||||
window.ToggleMaximise()
|
||||
m.ok(rw)
|
||||
case WindowUnFullscreen:
|
||||
window.UnFullscreen()
|
||||
m.ok(rw)
|
||||
case WindowUnMaximise:
|
||||
window.UnMaximise()
|
||||
m.ok(rw)
|
||||
case WindowUnMinimise:
|
||||
window.UnMinimise()
|
||||
m.ok(rw)
|
||||
case WindowWidth:
|
||||
width := window.Width()
|
||||
m.json(rw, map[string]interface{}{
|
||||
"width": width,
|
||||
})
|
||||
case WindowHeight:
|
||||
height := window.Height()
|
||||
m.json(rw, map[string]interface{}{
|
||||
"height": height,
|
||||
})
|
||||
m.json(rw, width)
|
||||
case WindowZoom:
|
||||
window.Zoom()
|
||||
m.ok(rw)
|
||||
case WindowZoomIn:
|
||||
window.ZoomIn()
|
||||
m.ok(rw)
|
||||
|
|
@ -234,26 +367,6 @@ func (m *MessageProcessor) processWindowMethod(method int, rw http.ResponseWrite
|
|||
case WindowZoomReset:
|
||||
window.ZoomReset()
|
||||
m.ok(rw)
|
||||
case WindowGetZoomLevel:
|
||||
zoomLevel := window.GetZoom()
|
||||
m.json(rw, map[string]interface{}{
|
||||
"zoomLevel": zoomLevel,
|
||||
})
|
||||
case WindowScreen:
|
||||
screen, err := window.GetScreen()
|
||||
if err != nil {
|
||||
m.httpError(rw, err.Error())
|
||||
return
|
||||
}
|
||||
m.json(rw, screen)
|
||||
case WindowSetZoomLevel:
|
||||
zoomLevel := args.Float64("zoomLevel")
|
||||
if zoomLevel == nil {
|
||||
m.Error("Invalid SetZoom Message: invalid 'zoomLevel' value")
|
||||
return
|
||||
}
|
||||
window.SetZoom(*zoomLevel)
|
||||
m.ok(rw)
|
||||
default:
|
||||
m.httpError(rw, "Unknown window method id: %d", method)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ type Window interface {
|
|||
Hide() Window
|
||||
ID() uint
|
||||
Info(message string, args ...any)
|
||||
IsFocused() bool
|
||||
IsFullscreen() bool
|
||||
IsMaximised() bool
|
||||
IsMinimised() bool
|
||||
|
|
|
|||
|
|
@ -1,57 +1,57 @@
|
|||
package events
|
||||
|
||||
type ApplicationEventType uint
|
||||
type WindowEventType uint
|
||||
type WindowEventType uint
|
||||
|
||||
var Common = newCommonEvents()
|
||||
|
||||
type commonEvents struct {
|
||||
ApplicationStarted ApplicationEventType
|
||||
WindowMaximise WindowEventType
|
||||
WindowUnMaximise WindowEventType
|
||||
WindowFullscreen WindowEventType
|
||||
WindowMaximise WindowEventType
|
||||
WindowUnMaximise WindowEventType
|
||||
WindowFullscreen WindowEventType
|
||||
WindowUnFullscreen WindowEventType
|
||||
WindowRestore WindowEventType
|
||||
WindowMinimise WindowEventType
|
||||
WindowUnMinimise WindowEventType
|
||||
WindowClosing WindowEventType
|
||||
WindowZoom WindowEventType
|
||||
WindowZoomIn WindowEventType
|
||||
WindowZoomOut WindowEventType
|
||||
WindowZoomReset WindowEventType
|
||||
WindowFocus WindowEventType
|
||||
WindowLostFocus WindowEventType
|
||||
WindowShow WindowEventType
|
||||
WindowHide WindowEventType
|
||||
WindowDPIChanged WindowEventType
|
||||
WindowRestore WindowEventType
|
||||
WindowMinimise WindowEventType
|
||||
WindowUnMinimise WindowEventType
|
||||
WindowClosing WindowEventType
|
||||
WindowZoom WindowEventType
|
||||
WindowZoomIn WindowEventType
|
||||
WindowZoomOut WindowEventType
|
||||
WindowZoomReset WindowEventType
|
||||
WindowFocus WindowEventType
|
||||
WindowLostFocus WindowEventType
|
||||
WindowShow WindowEventType
|
||||
WindowHide WindowEventType
|
||||
WindowDPIChanged WindowEventType
|
||||
WindowFilesDropped WindowEventType
|
||||
WindowRuntimeReady WindowEventType
|
||||
ThemeChanged ApplicationEventType
|
||||
ThemeChanged ApplicationEventType
|
||||
}
|
||||
|
||||
func newCommonEvents() commonEvents {
|
||||
return commonEvents{
|
||||
ApplicationStarted: 1179,
|
||||
WindowMaximise: 1180,
|
||||
WindowUnMaximise: 1181,
|
||||
WindowFullscreen: 1182,
|
||||
WindowMaximise: 1180,
|
||||
WindowUnMaximise: 1181,
|
||||
WindowFullscreen: 1182,
|
||||
WindowUnFullscreen: 1183,
|
||||
WindowRestore: 1184,
|
||||
WindowMinimise: 1185,
|
||||
WindowUnMinimise: 1186,
|
||||
WindowClosing: 1187,
|
||||
WindowZoom: 1188,
|
||||
WindowZoomIn: 1189,
|
||||
WindowZoomOut: 1190,
|
||||
WindowZoomReset: 1191,
|
||||
WindowFocus: 1192,
|
||||
WindowLostFocus: 1193,
|
||||
WindowShow: 1194,
|
||||
WindowHide: 1195,
|
||||
WindowDPIChanged: 1196,
|
||||
WindowRestore: 1184,
|
||||
WindowMinimise: 1185,
|
||||
WindowUnMinimise: 1186,
|
||||
WindowClosing: 1187,
|
||||
WindowZoom: 1188,
|
||||
WindowZoomIn: 1189,
|
||||
WindowZoomOut: 1190,
|
||||
WindowZoomReset: 1191,
|
||||
WindowFocus: 1192,
|
||||
WindowLostFocus: 1193,
|
||||
WindowShow: 1194,
|
||||
WindowHide: 1195,
|
||||
WindowDPIChanged: 1196,
|
||||
WindowFilesDropped: 1197,
|
||||
WindowRuntimeReady: 1198,
|
||||
ThemeChanged: 1199,
|
||||
ThemeChanged: 1199,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,20 +59,20 @@ var Linux = newLinuxEvents()
|
|||
|
||||
type linuxEvents struct {
|
||||
SystemThemeChanged ApplicationEventType
|
||||
WindowLoadChanged WindowEventType
|
||||
WindowDeleteEvent WindowEventType
|
||||
WindowFocusIn WindowEventType
|
||||
WindowFocusOut WindowEventType
|
||||
WindowLoadChanged WindowEventType
|
||||
WindowDeleteEvent WindowEventType
|
||||
WindowFocusIn WindowEventType
|
||||
WindowFocusOut WindowEventType
|
||||
ApplicationStartup ApplicationEventType
|
||||
}
|
||||
|
||||
func newLinuxEvents() linuxEvents {
|
||||
return linuxEvents{
|
||||
SystemThemeChanged: 1024,
|
||||
WindowLoadChanged: 1025,
|
||||
WindowDeleteEvent: 1026,
|
||||
WindowFocusIn: 1027,
|
||||
WindowFocusOut: 1028,
|
||||
WindowLoadChanged: 1025,
|
||||
WindowDeleteEvent: 1026,
|
||||
WindowFocusIn: 1027,
|
||||
WindowFocusOut: 1028,
|
||||
ApplicationStartup: 1029,
|
||||
}
|
||||
}
|
||||
|
|
@ -80,318 +80,318 @@ func newLinuxEvents() linuxEvents {
|
|||
var Mac = newMacEvents()
|
||||
|
||||
type macEvents struct {
|
||||
ApplicationDidBecomeActive ApplicationEventType
|
||||
ApplicationDidChangeBackingProperties ApplicationEventType
|
||||
ApplicationDidChangeEffectiveAppearance ApplicationEventType
|
||||
ApplicationDidChangeIcon ApplicationEventType
|
||||
ApplicationDidChangeOcclusionState ApplicationEventType
|
||||
ApplicationDidChangeScreenParameters ApplicationEventType
|
||||
ApplicationDidChangeStatusBarFrame ApplicationEventType
|
||||
ApplicationDidChangeStatusBarOrientation ApplicationEventType
|
||||
ApplicationDidFinishLaunching ApplicationEventType
|
||||
ApplicationDidHide ApplicationEventType
|
||||
ApplicationDidResignActiveNotification ApplicationEventType
|
||||
ApplicationDidUnhide ApplicationEventType
|
||||
ApplicationDidUpdate ApplicationEventType
|
||||
ApplicationWillBecomeActive ApplicationEventType
|
||||
ApplicationWillFinishLaunching ApplicationEventType
|
||||
ApplicationWillHide ApplicationEventType
|
||||
ApplicationWillResignActive ApplicationEventType
|
||||
ApplicationWillTerminate ApplicationEventType
|
||||
ApplicationWillUnhide ApplicationEventType
|
||||
ApplicationWillUpdate ApplicationEventType
|
||||
ApplicationDidChangeTheme ApplicationEventType
|
||||
ApplicationShouldHandleReopen ApplicationEventType
|
||||
WindowDidBecomeKey WindowEventType
|
||||
WindowDidBecomeMain WindowEventType
|
||||
WindowDidBeginSheet WindowEventType
|
||||
WindowDidChangeAlpha WindowEventType
|
||||
WindowDidChangeBackingLocation WindowEventType
|
||||
WindowDidChangeBackingProperties WindowEventType
|
||||
WindowDidChangeCollectionBehavior WindowEventType
|
||||
WindowDidChangeEffectiveAppearance WindowEventType
|
||||
WindowDidChangeOcclusionState WindowEventType
|
||||
WindowDidChangeOrderingMode WindowEventType
|
||||
WindowDidChangeScreen WindowEventType
|
||||
WindowDidChangeScreenParameters WindowEventType
|
||||
WindowDidChangeScreenProfile WindowEventType
|
||||
WindowDidChangeScreenSpace WindowEventType
|
||||
WindowDidChangeScreenSpaceProperties WindowEventType
|
||||
WindowDidChangeSharingType WindowEventType
|
||||
WindowDidChangeSpace WindowEventType
|
||||
WindowDidChangeSpaceOrderingMode WindowEventType
|
||||
WindowDidChangeTitle WindowEventType
|
||||
WindowDidChangeToolbar WindowEventType
|
||||
WindowDidChangeVisibility WindowEventType
|
||||
WindowDidDeminiaturize WindowEventType
|
||||
WindowDidEndSheet WindowEventType
|
||||
WindowDidEnterFullScreen WindowEventType
|
||||
WindowDidEnterVersionBrowser WindowEventType
|
||||
WindowDidExitFullScreen WindowEventType
|
||||
WindowDidExitVersionBrowser WindowEventType
|
||||
WindowDidExpose WindowEventType
|
||||
WindowDidFocus WindowEventType
|
||||
WindowDidMiniaturize WindowEventType
|
||||
WindowDidMove WindowEventType
|
||||
WindowDidOrderOffScreen WindowEventType
|
||||
WindowDidOrderOnScreen WindowEventType
|
||||
WindowDidResignKey WindowEventType
|
||||
WindowDidResignMain WindowEventType
|
||||
WindowDidResize WindowEventType
|
||||
WindowDidUpdate WindowEventType
|
||||
WindowDidUpdateAlpha WindowEventType
|
||||
WindowDidUpdateCollectionBehavior WindowEventType
|
||||
WindowDidUpdateCollectionProperties WindowEventType
|
||||
WindowDidUpdateShadow WindowEventType
|
||||
WindowDidUpdateTitle WindowEventType
|
||||
WindowDidUpdateToolbar WindowEventType
|
||||
WindowDidUpdateVisibility WindowEventType
|
||||
WindowShouldClose WindowEventType
|
||||
WindowWillBecomeKey WindowEventType
|
||||
WindowWillBecomeMain WindowEventType
|
||||
WindowWillBeginSheet WindowEventType
|
||||
WindowWillChangeOrderingMode WindowEventType
|
||||
WindowWillClose WindowEventType
|
||||
WindowWillDeminiaturize WindowEventType
|
||||
WindowWillEnterFullScreen WindowEventType
|
||||
WindowWillEnterVersionBrowser WindowEventType
|
||||
WindowWillExitFullScreen WindowEventType
|
||||
WindowWillExitVersionBrowser WindowEventType
|
||||
WindowWillFocus WindowEventType
|
||||
WindowWillMiniaturize WindowEventType
|
||||
WindowWillMove WindowEventType
|
||||
WindowWillOrderOffScreen WindowEventType
|
||||
WindowWillOrderOnScreen WindowEventType
|
||||
WindowWillResignMain WindowEventType
|
||||
WindowWillResize WindowEventType
|
||||
WindowWillUnfocus WindowEventType
|
||||
WindowWillUpdate WindowEventType
|
||||
WindowWillUpdateAlpha WindowEventType
|
||||
WindowWillUpdateCollectionBehavior WindowEventType
|
||||
WindowWillUpdateCollectionProperties WindowEventType
|
||||
WindowWillUpdateShadow WindowEventType
|
||||
WindowWillUpdateTitle WindowEventType
|
||||
WindowWillUpdateToolbar WindowEventType
|
||||
WindowWillUpdateVisibility WindowEventType
|
||||
WindowWillUseStandardFrame WindowEventType
|
||||
MenuWillOpen ApplicationEventType
|
||||
MenuDidOpen ApplicationEventType
|
||||
MenuDidClose ApplicationEventType
|
||||
MenuWillSendAction ApplicationEventType
|
||||
MenuDidSendAction ApplicationEventType
|
||||
MenuWillHighlightItem ApplicationEventType
|
||||
MenuDidHighlightItem ApplicationEventType
|
||||
MenuWillDisplayItem ApplicationEventType
|
||||
MenuDidDisplayItem ApplicationEventType
|
||||
MenuWillAddItem ApplicationEventType
|
||||
MenuDidAddItem ApplicationEventType
|
||||
MenuWillRemoveItem ApplicationEventType
|
||||
MenuDidRemoveItem ApplicationEventType
|
||||
MenuWillBeginTracking ApplicationEventType
|
||||
MenuDidBeginTracking ApplicationEventType
|
||||
MenuWillEndTracking ApplicationEventType
|
||||
MenuDidEndTracking ApplicationEventType
|
||||
MenuWillUpdate ApplicationEventType
|
||||
MenuDidUpdate ApplicationEventType
|
||||
MenuWillPopUp ApplicationEventType
|
||||
MenuDidPopUp ApplicationEventType
|
||||
MenuWillSendActionToItem ApplicationEventType
|
||||
MenuDidSendActionToItem ApplicationEventType
|
||||
WebViewDidStartProvisionalNavigation WindowEventType
|
||||
ApplicationDidBecomeActive ApplicationEventType
|
||||
ApplicationDidChangeBackingProperties ApplicationEventType
|
||||
ApplicationDidChangeEffectiveAppearance ApplicationEventType
|
||||
ApplicationDidChangeIcon ApplicationEventType
|
||||
ApplicationDidChangeOcclusionState ApplicationEventType
|
||||
ApplicationDidChangeScreenParameters ApplicationEventType
|
||||
ApplicationDidChangeStatusBarFrame ApplicationEventType
|
||||
ApplicationDidChangeStatusBarOrientation ApplicationEventType
|
||||
ApplicationDidFinishLaunching ApplicationEventType
|
||||
ApplicationDidHide ApplicationEventType
|
||||
ApplicationDidResignActiveNotification ApplicationEventType
|
||||
ApplicationDidUnhide ApplicationEventType
|
||||
ApplicationDidUpdate ApplicationEventType
|
||||
ApplicationWillBecomeActive ApplicationEventType
|
||||
ApplicationWillFinishLaunching ApplicationEventType
|
||||
ApplicationWillHide ApplicationEventType
|
||||
ApplicationWillResignActive ApplicationEventType
|
||||
ApplicationWillTerminate ApplicationEventType
|
||||
ApplicationWillUnhide ApplicationEventType
|
||||
ApplicationWillUpdate ApplicationEventType
|
||||
ApplicationDidChangeTheme ApplicationEventType
|
||||
ApplicationShouldHandleReopen ApplicationEventType
|
||||
WindowDidBecomeKey WindowEventType
|
||||
WindowDidBecomeMain WindowEventType
|
||||
WindowDidBeginSheet WindowEventType
|
||||
WindowDidChangeAlpha WindowEventType
|
||||
WindowDidChangeBackingLocation WindowEventType
|
||||
WindowDidChangeBackingProperties WindowEventType
|
||||
WindowDidChangeCollectionBehavior WindowEventType
|
||||
WindowDidChangeEffectiveAppearance WindowEventType
|
||||
WindowDidChangeOcclusionState WindowEventType
|
||||
WindowDidChangeOrderingMode WindowEventType
|
||||
WindowDidChangeScreen WindowEventType
|
||||
WindowDidChangeScreenParameters WindowEventType
|
||||
WindowDidChangeScreenProfile WindowEventType
|
||||
WindowDidChangeScreenSpace WindowEventType
|
||||
WindowDidChangeScreenSpaceProperties WindowEventType
|
||||
WindowDidChangeSharingType WindowEventType
|
||||
WindowDidChangeSpace WindowEventType
|
||||
WindowDidChangeSpaceOrderingMode WindowEventType
|
||||
WindowDidChangeTitle WindowEventType
|
||||
WindowDidChangeToolbar WindowEventType
|
||||
WindowDidChangeVisibility WindowEventType
|
||||
WindowDidDeminiaturize WindowEventType
|
||||
WindowDidEndSheet WindowEventType
|
||||
WindowDidEnterFullScreen WindowEventType
|
||||
WindowDidEnterVersionBrowser WindowEventType
|
||||
WindowDidExitFullScreen WindowEventType
|
||||
WindowDidExitVersionBrowser WindowEventType
|
||||
WindowDidExpose WindowEventType
|
||||
WindowDidFocus WindowEventType
|
||||
WindowDidMiniaturize WindowEventType
|
||||
WindowDidMove WindowEventType
|
||||
WindowDidOrderOffScreen WindowEventType
|
||||
WindowDidOrderOnScreen WindowEventType
|
||||
WindowDidResignKey WindowEventType
|
||||
WindowDidResignMain WindowEventType
|
||||
WindowDidResize WindowEventType
|
||||
WindowDidUpdate WindowEventType
|
||||
WindowDidUpdateAlpha WindowEventType
|
||||
WindowDidUpdateCollectionBehavior WindowEventType
|
||||
WindowDidUpdateCollectionProperties WindowEventType
|
||||
WindowDidUpdateShadow WindowEventType
|
||||
WindowDidUpdateTitle WindowEventType
|
||||
WindowDidUpdateToolbar WindowEventType
|
||||
WindowDidUpdateVisibility WindowEventType
|
||||
WindowShouldClose WindowEventType
|
||||
WindowWillBecomeKey WindowEventType
|
||||
WindowWillBecomeMain WindowEventType
|
||||
WindowWillBeginSheet WindowEventType
|
||||
WindowWillChangeOrderingMode WindowEventType
|
||||
WindowWillClose WindowEventType
|
||||
WindowWillDeminiaturize WindowEventType
|
||||
WindowWillEnterFullScreen WindowEventType
|
||||
WindowWillEnterVersionBrowser WindowEventType
|
||||
WindowWillExitFullScreen WindowEventType
|
||||
WindowWillExitVersionBrowser WindowEventType
|
||||
WindowWillFocus WindowEventType
|
||||
WindowWillMiniaturize WindowEventType
|
||||
WindowWillMove WindowEventType
|
||||
WindowWillOrderOffScreen WindowEventType
|
||||
WindowWillOrderOnScreen WindowEventType
|
||||
WindowWillResignMain WindowEventType
|
||||
WindowWillResize WindowEventType
|
||||
WindowWillUnfocus WindowEventType
|
||||
WindowWillUpdate WindowEventType
|
||||
WindowWillUpdateAlpha WindowEventType
|
||||
WindowWillUpdateCollectionBehavior WindowEventType
|
||||
WindowWillUpdateCollectionProperties WindowEventType
|
||||
WindowWillUpdateShadow WindowEventType
|
||||
WindowWillUpdateTitle WindowEventType
|
||||
WindowWillUpdateToolbar WindowEventType
|
||||
WindowWillUpdateVisibility WindowEventType
|
||||
WindowWillUseStandardFrame WindowEventType
|
||||
MenuWillOpen ApplicationEventType
|
||||
MenuDidOpen ApplicationEventType
|
||||
MenuDidClose ApplicationEventType
|
||||
MenuWillSendAction ApplicationEventType
|
||||
MenuDidSendAction ApplicationEventType
|
||||
MenuWillHighlightItem ApplicationEventType
|
||||
MenuDidHighlightItem ApplicationEventType
|
||||
MenuWillDisplayItem ApplicationEventType
|
||||
MenuDidDisplayItem ApplicationEventType
|
||||
MenuWillAddItem ApplicationEventType
|
||||
MenuDidAddItem ApplicationEventType
|
||||
MenuWillRemoveItem ApplicationEventType
|
||||
MenuDidRemoveItem ApplicationEventType
|
||||
MenuWillBeginTracking ApplicationEventType
|
||||
MenuDidBeginTracking ApplicationEventType
|
||||
MenuWillEndTracking ApplicationEventType
|
||||
MenuDidEndTracking ApplicationEventType
|
||||
MenuWillUpdate ApplicationEventType
|
||||
MenuDidUpdate ApplicationEventType
|
||||
MenuWillPopUp ApplicationEventType
|
||||
MenuDidPopUp ApplicationEventType
|
||||
MenuWillSendActionToItem ApplicationEventType
|
||||
MenuDidSendActionToItem ApplicationEventType
|
||||
WebViewDidStartProvisionalNavigation WindowEventType
|
||||
WebViewDidReceiveServerRedirectForProvisionalNavigation WindowEventType
|
||||
WebViewDidFinishNavigation WindowEventType
|
||||
WebViewDidCommitNavigation WindowEventType
|
||||
WindowFileDraggingEntered WindowEventType
|
||||
WindowFileDraggingPerformed WindowEventType
|
||||
WindowFileDraggingExited WindowEventType
|
||||
WebViewDidFinishNavigation WindowEventType
|
||||
WebViewDidCommitNavigation WindowEventType
|
||||
WindowFileDraggingEntered WindowEventType
|
||||
WindowFileDraggingPerformed WindowEventType
|
||||
WindowFileDraggingExited WindowEventType
|
||||
}
|
||||
|
||||
func newMacEvents() macEvents {
|
||||
return macEvents{
|
||||
ApplicationDidBecomeActive: 1030,
|
||||
ApplicationDidChangeBackingProperties: 1031,
|
||||
ApplicationDidChangeEffectiveAppearance: 1032,
|
||||
ApplicationDidChangeIcon: 1033,
|
||||
ApplicationDidChangeOcclusionState: 1034,
|
||||
ApplicationDidChangeScreenParameters: 1035,
|
||||
ApplicationDidChangeStatusBarFrame: 1036,
|
||||
ApplicationDidBecomeActive: 1030,
|
||||
ApplicationDidChangeBackingProperties: 1031,
|
||||
ApplicationDidChangeEffectiveAppearance: 1032,
|
||||
ApplicationDidChangeIcon: 1033,
|
||||
ApplicationDidChangeOcclusionState: 1034,
|
||||
ApplicationDidChangeScreenParameters: 1035,
|
||||
ApplicationDidChangeStatusBarFrame: 1036,
|
||||
ApplicationDidChangeStatusBarOrientation: 1037,
|
||||
ApplicationDidFinishLaunching: 1038,
|
||||
ApplicationDidHide: 1039,
|
||||
ApplicationDidResignActiveNotification: 1040,
|
||||
ApplicationDidUnhide: 1041,
|
||||
ApplicationDidUpdate: 1042,
|
||||
ApplicationWillBecomeActive: 1043,
|
||||
ApplicationWillFinishLaunching: 1044,
|
||||
ApplicationWillHide: 1045,
|
||||
ApplicationWillResignActive: 1046,
|
||||
ApplicationWillTerminate: 1047,
|
||||
ApplicationWillUnhide: 1048,
|
||||
ApplicationWillUpdate: 1049,
|
||||
ApplicationDidChangeTheme: 1050,
|
||||
ApplicationShouldHandleReopen: 1051,
|
||||
WindowDidBecomeKey: 1052,
|
||||
WindowDidBecomeMain: 1053,
|
||||
WindowDidBeginSheet: 1054,
|
||||
WindowDidChangeAlpha: 1055,
|
||||
WindowDidChangeBackingLocation: 1056,
|
||||
WindowDidChangeBackingProperties: 1057,
|
||||
WindowDidChangeCollectionBehavior: 1058,
|
||||
WindowDidChangeEffectiveAppearance: 1059,
|
||||
WindowDidChangeOcclusionState: 1060,
|
||||
WindowDidChangeOrderingMode: 1061,
|
||||
WindowDidChangeScreen: 1062,
|
||||
WindowDidChangeScreenParameters: 1063,
|
||||
WindowDidChangeScreenProfile: 1064,
|
||||
WindowDidChangeScreenSpace: 1065,
|
||||
WindowDidChangeScreenSpaceProperties: 1066,
|
||||
WindowDidChangeSharingType: 1067,
|
||||
WindowDidChangeSpace: 1068,
|
||||
WindowDidChangeSpaceOrderingMode: 1069,
|
||||
WindowDidChangeTitle: 1070,
|
||||
WindowDidChangeToolbar: 1071,
|
||||
WindowDidChangeVisibility: 1072,
|
||||
WindowDidDeminiaturize: 1073,
|
||||
WindowDidEndSheet: 1074,
|
||||
WindowDidEnterFullScreen: 1075,
|
||||
WindowDidEnterVersionBrowser: 1076,
|
||||
WindowDidExitFullScreen: 1077,
|
||||
WindowDidExitVersionBrowser: 1078,
|
||||
WindowDidExpose: 1079,
|
||||
WindowDidFocus: 1080,
|
||||
WindowDidMiniaturize: 1081,
|
||||
WindowDidMove: 1082,
|
||||
WindowDidOrderOffScreen: 1083,
|
||||
WindowDidOrderOnScreen: 1084,
|
||||
WindowDidResignKey: 1085,
|
||||
WindowDidResignMain: 1086,
|
||||
WindowDidResize: 1087,
|
||||
WindowDidUpdate: 1088,
|
||||
WindowDidUpdateAlpha: 1089,
|
||||
WindowDidUpdateCollectionBehavior: 1090,
|
||||
WindowDidUpdateCollectionProperties: 1091,
|
||||
WindowDidUpdateShadow: 1092,
|
||||
WindowDidUpdateTitle: 1093,
|
||||
WindowDidUpdateToolbar: 1094,
|
||||
WindowDidUpdateVisibility: 1095,
|
||||
WindowShouldClose: 1096,
|
||||
WindowWillBecomeKey: 1097,
|
||||
WindowWillBecomeMain: 1098,
|
||||
WindowWillBeginSheet: 1099,
|
||||
WindowWillChangeOrderingMode: 1100,
|
||||
WindowWillClose: 1101,
|
||||
WindowWillDeminiaturize: 1102,
|
||||
WindowWillEnterFullScreen: 1103,
|
||||
WindowWillEnterVersionBrowser: 1104,
|
||||
WindowWillExitFullScreen: 1105,
|
||||
WindowWillExitVersionBrowser: 1106,
|
||||
WindowWillFocus: 1107,
|
||||
WindowWillMiniaturize: 1108,
|
||||
WindowWillMove: 1109,
|
||||
WindowWillOrderOffScreen: 1110,
|
||||
WindowWillOrderOnScreen: 1111,
|
||||
WindowWillResignMain: 1112,
|
||||
WindowWillResize: 1113,
|
||||
WindowWillUnfocus: 1114,
|
||||
WindowWillUpdate: 1115,
|
||||
WindowWillUpdateAlpha: 1116,
|
||||
WindowWillUpdateCollectionBehavior: 1117,
|
||||
WindowWillUpdateCollectionProperties: 1118,
|
||||
WindowWillUpdateShadow: 1119,
|
||||
WindowWillUpdateTitle: 1120,
|
||||
WindowWillUpdateToolbar: 1121,
|
||||
WindowWillUpdateVisibility: 1122,
|
||||
WindowWillUseStandardFrame: 1123,
|
||||
MenuWillOpen: 1124,
|
||||
MenuDidOpen: 1125,
|
||||
MenuDidClose: 1126,
|
||||
MenuWillSendAction: 1127,
|
||||
MenuDidSendAction: 1128,
|
||||
MenuWillHighlightItem: 1129,
|
||||
MenuDidHighlightItem: 1130,
|
||||
MenuWillDisplayItem: 1131,
|
||||
MenuDidDisplayItem: 1132,
|
||||
MenuWillAddItem: 1133,
|
||||
MenuDidAddItem: 1134,
|
||||
MenuWillRemoveItem: 1135,
|
||||
MenuDidRemoveItem: 1136,
|
||||
MenuWillBeginTracking: 1137,
|
||||
MenuDidBeginTracking: 1138,
|
||||
MenuWillEndTracking: 1139,
|
||||
MenuDidEndTracking: 1140,
|
||||
MenuWillUpdate: 1141,
|
||||
MenuDidUpdate: 1142,
|
||||
MenuWillPopUp: 1143,
|
||||
MenuDidPopUp: 1144,
|
||||
MenuWillSendActionToItem: 1145,
|
||||
MenuDidSendActionToItem: 1146,
|
||||
WebViewDidStartProvisionalNavigation: 1147,
|
||||
ApplicationDidFinishLaunching: 1038,
|
||||
ApplicationDidHide: 1039,
|
||||
ApplicationDidResignActiveNotification: 1040,
|
||||
ApplicationDidUnhide: 1041,
|
||||
ApplicationDidUpdate: 1042,
|
||||
ApplicationWillBecomeActive: 1043,
|
||||
ApplicationWillFinishLaunching: 1044,
|
||||
ApplicationWillHide: 1045,
|
||||
ApplicationWillResignActive: 1046,
|
||||
ApplicationWillTerminate: 1047,
|
||||
ApplicationWillUnhide: 1048,
|
||||
ApplicationWillUpdate: 1049,
|
||||
ApplicationDidChangeTheme: 1050,
|
||||
ApplicationShouldHandleReopen: 1051,
|
||||
WindowDidBecomeKey: 1052,
|
||||
WindowDidBecomeMain: 1053,
|
||||
WindowDidBeginSheet: 1054,
|
||||
WindowDidChangeAlpha: 1055,
|
||||
WindowDidChangeBackingLocation: 1056,
|
||||
WindowDidChangeBackingProperties: 1057,
|
||||
WindowDidChangeCollectionBehavior: 1058,
|
||||
WindowDidChangeEffectiveAppearance: 1059,
|
||||
WindowDidChangeOcclusionState: 1060,
|
||||
WindowDidChangeOrderingMode: 1061,
|
||||
WindowDidChangeScreen: 1062,
|
||||
WindowDidChangeScreenParameters: 1063,
|
||||
WindowDidChangeScreenProfile: 1064,
|
||||
WindowDidChangeScreenSpace: 1065,
|
||||
WindowDidChangeScreenSpaceProperties: 1066,
|
||||
WindowDidChangeSharingType: 1067,
|
||||
WindowDidChangeSpace: 1068,
|
||||
WindowDidChangeSpaceOrderingMode: 1069,
|
||||
WindowDidChangeTitle: 1070,
|
||||
WindowDidChangeToolbar: 1071,
|
||||
WindowDidChangeVisibility: 1072,
|
||||
WindowDidDeminiaturize: 1073,
|
||||
WindowDidEndSheet: 1074,
|
||||
WindowDidEnterFullScreen: 1075,
|
||||
WindowDidEnterVersionBrowser: 1076,
|
||||
WindowDidExitFullScreen: 1077,
|
||||
WindowDidExitVersionBrowser: 1078,
|
||||
WindowDidExpose: 1079,
|
||||
WindowDidFocus: 1080,
|
||||
WindowDidMiniaturize: 1081,
|
||||
WindowDidMove: 1082,
|
||||
WindowDidOrderOffScreen: 1083,
|
||||
WindowDidOrderOnScreen: 1084,
|
||||
WindowDidResignKey: 1085,
|
||||
WindowDidResignMain: 1086,
|
||||
WindowDidResize: 1087,
|
||||
WindowDidUpdate: 1088,
|
||||
WindowDidUpdateAlpha: 1089,
|
||||
WindowDidUpdateCollectionBehavior: 1090,
|
||||
WindowDidUpdateCollectionProperties: 1091,
|
||||
WindowDidUpdateShadow: 1092,
|
||||
WindowDidUpdateTitle: 1093,
|
||||
WindowDidUpdateToolbar: 1094,
|
||||
WindowDidUpdateVisibility: 1095,
|
||||
WindowShouldClose: 1096,
|
||||
WindowWillBecomeKey: 1097,
|
||||
WindowWillBecomeMain: 1098,
|
||||
WindowWillBeginSheet: 1099,
|
||||
WindowWillChangeOrderingMode: 1100,
|
||||
WindowWillClose: 1101,
|
||||
WindowWillDeminiaturize: 1102,
|
||||
WindowWillEnterFullScreen: 1103,
|
||||
WindowWillEnterVersionBrowser: 1104,
|
||||
WindowWillExitFullScreen: 1105,
|
||||
WindowWillExitVersionBrowser: 1106,
|
||||
WindowWillFocus: 1107,
|
||||
WindowWillMiniaturize: 1108,
|
||||
WindowWillMove: 1109,
|
||||
WindowWillOrderOffScreen: 1110,
|
||||
WindowWillOrderOnScreen: 1111,
|
||||
WindowWillResignMain: 1112,
|
||||
WindowWillResize: 1113,
|
||||
WindowWillUnfocus: 1114,
|
||||
WindowWillUpdate: 1115,
|
||||
WindowWillUpdateAlpha: 1116,
|
||||
WindowWillUpdateCollectionBehavior: 1117,
|
||||
WindowWillUpdateCollectionProperties: 1118,
|
||||
WindowWillUpdateShadow: 1119,
|
||||
WindowWillUpdateTitle: 1120,
|
||||
WindowWillUpdateToolbar: 1121,
|
||||
WindowWillUpdateVisibility: 1122,
|
||||
WindowWillUseStandardFrame: 1123,
|
||||
MenuWillOpen: 1124,
|
||||
MenuDidOpen: 1125,
|
||||
MenuDidClose: 1126,
|
||||
MenuWillSendAction: 1127,
|
||||
MenuDidSendAction: 1128,
|
||||
MenuWillHighlightItem: 1129,
|
||||
MenuDidHighlightItem: 1130,
|
||||
MenuWillDisplayItem: 1131,
|
||||
MenuDidDisplayItem: 1132,
|
||||
MenuWillAddItem: 1133,
|
||||
MenuDidAddItem: 1134,
|
||||
MenuWillRemoveItem: 1135,
|
||||
MenuDidRemoveItem: 1136,
|
||||
MenuWillBeginTracking: 1137,
|
||||
MenuDidBeginTracking: 1138,
|
||||
MenuWillEndTracking: 1139,
|
||||
MenuDidEndTracking: 1140,
|
||||
MenuWillUpdate: 1141,
|
||||
MenuDidUpdate: 1142,
|
||||
MenuWillPopUp: 1143,
|
||||
MenuDidPopUp: 1144,
|
||||
MenuWillSendActionToItem: 1145,
|
||||
MenuDidSendActionToItem: 1146,
|
||||
WebViewDidStartProvisionalNavigation: 1147,
|
||||
WebViewDidReceiveServerRedirectForProvisionalNavigation: 1148,
|
||||
WebViewDidFinishNavigation: 1149,
|
||||
WebViewDidCommitNavigation: 1150,
|
||||
WindowFileDraggingEntered: 1151,
|
||||
WindowFileDraggingPerformed: 1152,
|
||||
WindowFileDraggingExited: 1153,
|
||||
WebViewDidFinishNavigation: 1149,
|
||||
WebViewDidCommitNavigation: 1150,
|
||||
WindowFileDraggingEntered: 1151,
|
||||
WindowFileDraggingPerformed: 1152,
|
||||
WindowFileDraggingExited: 1153,
|
||||
}
|
||||
}
|
||||
|
||||
var Windows = newWindowsEvents()
|
||||
|
||||
type windowsEvents struct {
|
||||
SystemThemeChanged ApplicationEventType
|
||||
APMPowerStatusChange ApplicationEventType
|
||||
APMSuspend ApplicationEventType
|
||||
APMResumeAutomatic ApplicationEventType
|
||||
APMResumeSuspend ApplicationEventType
|
||||
APMPowerSettingChange ApplicationEventType
|
||||
ApplicationStarted ApplicationEventType
|
||||
SystemThemeChanged ApplicationEventType
|
||||
APMPowerStatusChange ApplicationEventType
|
||||
APMSuspend ApplicationEventType
|
||||
APMResumeAutomatic ApplicationEventType
|
||||
APMResumeSuspend ApplicationEventType
|
||||
APMPowerSettingChange ApplicationEventType
|
||||
ApplicationStarted ApplicationEventType
|
||||
WebViewNavigationCompleted WindowEventType
|
||||
WindowInactive WindowEventType
|
||||
WindowActive WindowEventType
|
||||
WindowClickActive WindowEventType
|
||||
WindowMaximise WindowEventType
|
||||
WindowUnMaximise WindowEventType
|
||||
WindowFullscreen WindowEventType
|
||||
WindowUnFullscreen WindowEventType
|
||||
WindowRestore WindowEventType
|
||||
WindowMinimise WindowEventType
|
||||
WindowUnMinimise WindowEventType
|
||||
WindowClose WindowEventType
|
||||
WindowSetFocus WindowEventType
|
||||
WindowKillFocus WindowEventType
|
||||
WindowDragDrop WindowEventType
|
||||
WindowDragEnter WindowEventType
|
||||
WindowDragLeave WindowEventType
|
||||
WindowDragOver WindowEventType
|
||||
WindowInactive WindowEventType
|
||||
WindowActive WindowEventType
|
||||
WindowClickActive WindowEventType
|
||||
WindowMaximise WindowEventType
|
||||
WindowUnMaximise WindowEventType
|
||||
WindowFullscreen WindowEventType
|
||||
WindowUnFullscreen WindowEventType
|
||||
WindowRestore WindowEventType
|
||||
WindowMinimise WindowEventType
|
||||
WindowUnMinimise WindowEventType
|
||||
WindowClose WindowEventType
|
||||
WindowSetFocus WindowEventType
|
||||
WindowKillFocus WindowEventType
|
||||
WindowDragDrop WindowEventType
|
||||
WindowDragEnter WindowEventType
|
||||
WindowDragLeave WindowEventType
|
||||
WindowDragOver WindowEventType
|
||||
}
|
||||
|
||||
func newWindowsEvents() windowsEvents {
|
||||
return windowsEvents{
|
||||
SystemThemeChanged: 1154,
|
||||
APMPowerStatusChange: 1155,
|
||||
APMSuspend: 1156,
|
||||
APMResumeAutomatic: 1157,
|
||||
APMResumeSuspend: 1158,
|
||||
APMPowerSettingChange: 1159,
|
||||
ApplicationStarted: 1160,
|
||||
SystemThemeChanged: 1154,
|
||||
APMPowerStatusChange: 1155,
|
||||
APMSuspend: 1156,
|
||||
APMResumeAutomatic: 1157,
|
||||
APMResumeSuspend: 1158,
|
||||
APMPowerSettingChange: 1159,
|
||||
ApplicationStarted: 1160,
|
||||
WebViewNavigationCompleted: 1161,
|
||||
WindowInactive: 1162,
|
||||
WindowActive: 1163,
|
||||
WindowClickActive: 1164,
|
||||
WindowMaximise: 1165,
|
||||
WindowUnMaximise: 1166,
|
||||
WindowFullscreen: 1167,
|
||||
WindowUnFullscreen: 1168,
|
||||
WindowRestore: 1169,
|
||||
WindowMinimise: 1170,
|
||||
WindowUnMinimise: 1171,
|
||||
WindowClose: 1172,
|
||||
WindowSetFocus: 1173,
|
||||
WindowKillFocus: 1174,
|
||||
WindowDragDrop: 1175,
|
||||
WindowDragEnter: 1176,
|
||||
WindowDragLeave: 1177,
|
||||
WindowDragOver: 1178,
|
||||
WindowInactive: 1162,
|
||||
WindowActive: 1163,
|
||||
WindowClickActive: 1164,
|
||||
WindowMaximise: 1165,
|
||||
WindowUnMaximise: 1166,
|
||||
WindowFullscreen: 1167,
|
||||
WindowUnFullscreen: 1168,
|
||||
WindowRestore: 1169,
|
||||
WindowMinimise: 1170,
|
||||
WindowUnMinimise: 1171,
|
||||
WindowClose: 1172,
|
||||
WindowSetFocus: 1173,
|
||||
WindowKillFocus: 1174,
|
||||
WindowDragDrop: 1175,
|
||||
WindowDragEnter: 1176,
|
||||
WindowDragLeave: 1177,
|
||||
WindowDragOver: 1178,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -577,3 +577,4 @@ var eventToJS = map[uint]string{
|
|||
1198: "common:WindowRuntimeReady",
|
||||
1199: "common:ThemeChanged",
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,10 @@ func (w Window) Hide() application.Window {
|
|||
return w
|
||||
}
|
||||
|
||||
func (w Window) IsFocused() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (w Window) IsFullscreen() bool {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue