Compare commits

..

552 Commits

Author SHA1 Message Date
Lea Anthony def40786c8 Refactored events 2023-10-05 21:44:13 +11:00
Lea Anthony d8e27aa5f9 Fix svelte template 2023-10-05 21:12:01 +11:00
Lea Anthony ce6d587771 Fix multiple window weirdness. Update deps 2023-10-05 20:54:12 +11:00
Lea Anthony 81d7bc2d68 Fix vue templates 2023-10-05 20:13:50 +11:00
Lea Anthony a49350f300 [windows] Remove unused code. 2023-10-05 20:12:28 +11:00
Lea Anthony 9ac6359e56 Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha 2023-10-05 19:19:26 +11:00
Lea Anthony 5958d9c646 [windows] Serve assets async 2023-10-05 19:18:32 +11:00
Lea Anthony 9b88c8afda Merge branch 'master' into v3-alpha
# Conflicts:
#	v2/internal/app/app_devtools.go
#	v2/internal/app/app_devtools_not.go
2023-10-04 20:23:23 +11:00
Lea Anthony 1b71fef89f Update v3 website frontpage 2023-10-04 20:22:20 +11:00
Lea Anthony 8ddd29d285 [linux] Implement events 2023-10-03 08:37:11 +11:00
Lea Anthony dc8cbcf410 [darwin] Refactor events into mac specific files 2023-10-03 08:33:58 +11:00
Travis McLane 757a4383e6 [v3] send dialog results over channels 2023-10-02 11:07:12 -05:00
Travis McLane 7c98ee329a [v3] move linux clipboard logic to linux_cgo 2023-10-02 11:07:12 -05:00
Lea Anthony 9d615463f4 [linux] support clipboard 2023-10-02 20:47:04 +11:00
Lea Anthony 1c9765096d Add webview2 error message to troubleshooting 2023-10-01 23:45:30 +11:00
Lea Anthony aea0db5919 [linux] Fix packagemap 2023-09-30 21:17:30 +10:00
Lea Anthony fc593d90cf Export Package map 2023-09-30 21:09:35 +10:00
Lea Anthony 2524f7b5a0 Remove old KitchenSink example 2023-09-30 21:09:10 +10:00
Lea Anthony 5a0cb1baef Fix svelte-ts template 2023-09-30 21:04:00 +10:00
ALMAS 18ee469c47 [v2/Mac] Change Window Level (#2944)
* Change Window Level in Mac
2023-09-30 20:59:50 +10:00
Lea Anthony 255690eee0 [darwin] Add webview preferences 2023-09-30 15:23:56 +10:00
Lea Anthony 86b6e10620 [darwin]AlwaysOnTop: NSStatusWindowLevel -> NSFloatingWindowLevel 2023-09-30 14:27:48 +10:00
Travis McLane b757292211 [v3 darwin] use NativeWindowHandle 2023-09-29 12:13:51 -05:00
Travis McLane af54419a0b [v3] use concrete *WebviewWindow 2023-09-29 11:40:43 -05:00
Travis McLane 7b84b1c79c [v3] Window fallout 2023-09-28 17:17:11 -05:00
Travis McLane d047c22526 [v3] change window back to *WebviewWindow 2023-09-28 17:10:17 -05:00
Travis McLane 6feab70a72 [v3 workflow] add libayatana dependency 2023-09-28 17:00:33 -05:00
Travis McLane 5e1b5ca4e8 [v3] typo - missing comma 2023-09-28 16:55:52 -05:00
Travis McLane 1726cdb0ad [v3] add ubuntu-latest to workflow 2023-09-28 16:48:23 -05:00
Travis McLane 2b2828ea41 [v3] goformat fixes 2023-09-28 16:47:04 -05:00
Travis McLane 29859ceedf [v3] correct return types for CurrentWindow
this shouldn't have been changed to Window
2023-09-28 16:46:19 -05:00
Travis McLane 8e2527ad35 [v3 linux] implement single_instance plugin 2023-09-28 15:53:28 -05:00
Travis McLane 92b26488da Merge branch 'v3-alpha-linux-systray' into v3-alpha 2023-09-28 14:52:12 -05:00
Travis McLane efa67cb01c [v3 linux] systray implementation
Linux requires a `gtk_menu_bar` for a gtk_window to display a menu.
For the `systray` a `gtk_menu` is needed instead.
This change creates the correct type of `impl` for the `Menu`
depending on how it is being used.
2023-09-28 14:50:38 -05:00
Travis McLane 71fc222059 [v3 linux] systray: cleanup + add basic menu 2023-09-28 13:31:09 -05:00
Travis McLane fa6adad4ab [v3 linux] wip: systray implementation 2023-09-28 13:31:09 -05:00
Travis McLane 1c48d567e1 [v3] NewWebviewWindow* return *WebviewWindow 2023-09-28 13:30:47 -05:00
Travis McLane 2c3216ba36 Merge branch 'v3-alpha-plugin-server' into v3-alpha 2023-09-28 12:15:11 -05:00
Travis McLane 74e2a7e225 [v3 examples] add server plugin to 'plugins' example 2023-09-28 12:14:54 -05:00
Travis McLane ff2c92451d [v3] go.* update 2023-09-28 12:14:54 -05:00
Travis McLane 2a83402d4a [v3 example/server] initial implementation 2023-09-28 12:14:54 -05:00
Travis McLane 2449b473c0 [v3 plugin/server] initial implementation 2023-09-28 12:14:54 -05:00
Travis McLane 60c44c44ff [v3 runtime] updated javascript 2023-09-28 12:14:54 -05:00
Travis McLane 7e1d685167 [v3 js] add and send x-wails-client-id
The constant x-wails-client-id is generated once on startup and then
sent with each request to the Wails host.  It is used primarily by
the server plugin to distinguish different remote sessions.
2023-09-28 12:14:54 -05:00
Travis McLane a9d4a393ba [v3 linux] add non-functional activeInstance implementation 2023-09-28 12:10:17 -05:00
Travis McLane a0953fea93 [v3] Merge feature Window interface 2023-09-28 11:52:23 -05:00
Travis McLane 02d76835c9 [v3 linux] noop: remove spurious print 2023-09-28 11:48:46 -05:00
Travis McLane dfe03f1347 [v3] WailsEvent expose ToJSON 2023-09-28 11:39:44 -05:00
Travis McLane c87489adf3 [v3] implement Window interface 2023-09-28 11:39:39 -05:00
Travis McLane a428a730d5 [v3] define Window interface
Define an interface that all Window(s) need to define.
Currently copies the WebviewWindow public api
2023-09-28 11:37:48 -05:00
Travis McLane 7f7c642339 [v3 linux] systray.openMenu 2023-09-28 10:02:44 -05:00
Travis McLane 03b79e9a67 [v3 linux] noop: handleKeyEvent skeleton 2023-09-27 16:31:59 -05:00
Travis McLane 56b0fcebba [v3 linux] use ifdef for APPLICATION_DEFAULT_FLAGS 2023-09-27 09:53:53 -05:00
stffabi e31ad83472 [docs] Merge changed section (#2940) 2023-09-26 19:12:57 +10:00
Mohamed Gharib 3f9067c815 [v2] Devtools tag doesn't enable default context-menu (#2923)
* Devtools tag doesn't enable default context-menu

* Update changelog
2023-09-26 07:43:18 +10:00
Lea Anthony d9a5130311 Use prettier on docs source 2023-09-25 20:56:29 +10:00
Lea Anthony 4663a45e59 Add raw API docs 2023-09-25 20:50:53 +10:00
David Haukeness ab0b0f8a7f filter the base directory from ignoreDirs (#2869)
* filter the base directory from ignoreDirs

* added PR 2869

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-09-25 19:50:17 +10:00
github-actions[bot] 6d1489bf8e chore: update sponsors.svg (#2938)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-09-25 19:25:51 +10:00
Fadi Khadra 05eddc65b1 [v2 mac] Allow to specify webview preferences (#2937)
* [mac] allow to specify webview preferences
2023-09-25 08:15:55 +10:00
Lea Anthony fb820bcdad Add some more API docs. Small refactors. 2023-09-24 17:23:24 +10:00
Lea Anthony 31c167b412 Add some more API docs. 2023-09-24 17:03:42 +10:00
Lea Anthony 7cdab16ba9 Add API docs. Do small refactors 2023-09-24 08:57:40 +10:00
FarDawn 787ca80770 Add minimal React template (#2935) 2023-09-23 19:06:31 +10:00
github-actions[bot] d228b2ad37 chore: update sponsors.svg (#2930)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-09-21 19:36:33 +10:00
Lea Anthony 05262134ca [darwin] Add systray.OpenMenu 2023-09-21 19:24:30 +10:00
Lea Anthony fe48b9d03d [windows] Add systray.OpenMenu 2023-09-21 19:14:44 +10:00
stffabi e9519269ca [v2] Bump go-webview2 to 1.0.7 (#2929) 2023-09-21 06:43:28 +10:00
Lea Anthony 013ec1d726 Fix compiler error. Add test. 2023-09-21 06:33:08 +10:00
Travis McLane 27b4a984d5 [v3] process pointer and non-pointer receiver functions 2023-09-20 15:09:15 -05:00
Travis McLane d6b6111395 noop: import sort 2023-09-20 15:09:15 -05:00
Mohamed Gharib 5a7b868e80 [Github] Exclude /website from language stats (#2927) 2023-09-21 05:48:19 +10:00
stffabi d370f72ede [v2, windows] Support async request processing on AssetServer (#2926) 2023-09-20 19:28:18 +02:00
Lea Anthony af8ee6703e [darwin] Support keybindings 2023-09-20 21:34:50 +10:00
Lea Anthony 3369327ad2 [v2] Support Enabling/Disabling swipe gestures (#2878)
* [v2] Support Enabling/Disabling swipe gestures

* [v2] Update change log

* [v2] Remove old call to PutIsSwipeNavigationEnabled

* Use latest webview2

* Update go-webview2 mod version
2023-09-20 08:23:38 +10:00
Denis Dvornikov eca6afc18c Describe a guide to build an app for all platforms in github actions (#2879)
* Describe a guide to build an app for all platforms in github actions

* Update changelog, remove tabs from an added guide

---------

Co-authored-by: Denis <denis@Deniss-Mac-mini.fritz.box>
2023-09-20 08:12:57 +10:00
Mohamed Gharib 34c725231c [v2] Refactor devtools (better naming to remove confusion) (#2921) 2023-09-19 20:56:49 +10:00
github-actions[bot] db519de1cd chore: update sponsors.svg (#2922)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-09-19 18:50:35 +10:00
Lea Anthony 6aa6762f12 Devtools hotkey (#2915)
* Add Ctrl/Cmd+Shift+F12 Hotkey to open devtools when `-devtools` flag used.
2023-09-19 05:56:14 +10:00
Lea Anthony 64e44b1b51 [docs] Add wrong webview2 architecture section in troubleshooting guide 2023-09-18 20:15:54 +10:00
Lea Anthony 793191a479 Initial key binding support 2023-09-17 20:48:30 +10:00
Lea Anthony efc86c1056 Delete wails binary 2023-09-16 15:00:20 +10:00
Lea Anthony 39d44d2644 Merge latest website changes 2023-09-16 14:58:24 +10:00
Lea Anthony 9584a2ce5a Merge latest v2 changes 2023-09-16 14:56:23 +10:00
Lea Anthony 95b8ceb87a Merge remote-tracking branch 'origin/master' into v3-alpha 2023-09-16 14:44:57 +10:00
ALMAS 37b99b9cb8 Update webview_window.go (#2912) 2023-09-16 07:20:49 +10:00
Lea Anthony 3116c1a622 Update favicon.ico 2023-09-15 20:47:14 +10:00
Lea Anthony 86354e9fc0 Support IsDarkMode in application event context. Fix bug with event mapping. 2023-09-15 20:10:09 +10:00
Lea Anthony b49f135e31 Add context to application/common events 2023-09-15 17:12:35 +10:00
github-actions[bot] c26f3ad7d1 chore: update sponsors.svg (#2909)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-09-15 16:35:00 +10:00
github-actions[bot] 40f645a864 chore: update sponsors.svg (#2903)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-09-14 08:33:15 +10:00
Travis McLane fff266f50d [v3 linux] remove unused dialog callbacks
If it turns out these are needed in the future
we can add them back in then.
2023-09-13 13:12:22 -05:00
Travis McLane 7cfea7c22c [v3 linux] file/directory dialogs 2023-09-13 13:12:22 -05:00
Travis McLane 6141e5a8ce [linux v3] purego: updates
- file/directory chooser dialog logic
- add name + css so that menu isn't transparent
2023-09-13 13:12:22 -05:00
Lea Anthony ed58949d24 try logging in goroutine 2023-09-13 16:47:14 +10:00
Lea Anthony c1d85bd3d9 Add generate constants tool 2023-09-13 16:45:19 +10:00
Lea Anthony 8d3324465e Revert flags change 2023-09-13 16:11:23 +10:00
Lea Anthony 8c72746edb Update log plugin to have log levels. 2023-09-13 09:45:26 +10:00
Lea Anthony ea3509d2e7 Add LogLevel application option. Update log plugin to have log levels. 2023-09-13 09:44:37 +10:00
Lea Anthony bb3a0cc54f Add WebviewWindow.IsFocused() 2023-09-13 08:57:20 +10:00
Travis McLane d808654d99 [v3 linux] update purego replace 2023-09-11 17:27:21 -05:00
Travis McLane a6cfdbb403 [v3 linux] const -> var 2023-09-11 17:26:59 -05:00
Travis McLane 2f7c6834d0 [v3 linux] use invokeSync 2023-09-11 17:12:57 -05:00
Travis McLane ebdd57a7c4 remove cmd/wails/wails binary 2023-09-11 17:12:57 -05:00
Lea Anthony 4ff6d74054 Remove plain template 2023-09-09 20:08:26 +10:00
Lea Anthony 0d8b4aafd5 Better vanilla taskfile. Better asset generation at init. 2023-09-09 17:31:48 +10:00
Lea Anthony 0cca7e9189 Fix syso tests. Add precommit task 2023-09-09 16:27:51 +10:00
Lea Anthony a5812578c5 Add generate build-assets. Update Taskfile for vanilla template 2023-09-09 10:25:56 +10:00
github-actions[bot] a419721dcd docs: sync translations (#2699)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-09-08 23:25:21 +10:00
Light e731e2591a Fix typo on https://wails.io/docs/reference/options#application-options (#2887)
* Update options.mdx

* Update changelog.mdx
2023-09-08 23:23:33 +10:00
Lea Anthony 350b411afe Update what's new section 2023-09-08 20:18:50 +10:00
Lea Anthony 9ca86c6093 Fix template versions 2023-09-08 18:51:39 +10:00
Lea Anthony 01729ae22a Add what's new section 2023-09-08 18:45:42 +10:00
Lea Anthony 9196dc2216 Remove ci flag 2023-09-08 14:49:50 +10:00
Lea Anthony b925335bbb Fix tests 2023-09-08 14:37:07 +10:00
Duoc Nguyen 59b25edb5c docs: make the install command easier to copy (#2891) 2023-09-08 13:56:40 +10:00
Lea Anthony 965f939967 Fix parser/generator tests 2023-09-08 12:03:55 +10:00
Lea Anthony 00feccbb77 Add MACOSX_DEPLOYMENT_TARGET to taskfiles 2023-09-08 11:23:38 +10:00
Lea Anthony b6fc66ba0d Improve workflow 2023-09-08 11:09:32 +10:00
Lea Anthony c40debc0e9 Disable linux tests 2023-09-08 11:04:59 +10:00
Lea Anthony 3b31d70865 Update doc dependencies 2023-09-08 11:00:15 +10:00
Lea Anthony afa8b62de7 Update doc dependencies 2023-09-08 10:57:47 +10:00
Lea Anthony 70fd15de2d fix workflow 2023-09-08 10:42:13 +10:00
Lea Anthony c54d330f89 fix workflow 2023-09-08 10:39:29 +10:00
Lea Anthony 4028560d12 fix workflow 2023-09-08 10:37:45 +10:00
Lea Anthony 3c28c28623 fix workflow 2023-09-08 10:36:48 +10:00
Lea Anthony a958fa06e7 Update docs 2023-09-08 10:31:16 +10:00
Lea Anthony 4d39e9e15a Update v3-docs.yml 2023-09-08 10:27:32 +10:00
Lea Anthony 679ec49e64 add v3 docs workflow 2023-09-08 10:24:01 +10:00
Travis McLane d98e1d3693 [v3 linux] Packagemap -> packagemap 2023-09-07 12:16:20 -05:00
Lea Anthony be3b7d754e add netlify config 2023-09-07 21:55:45 +10:00
Lea Anthony ae524c4f84 add workflow for v3 alpha 2023-09-07 21:37:50 +10:00
Lea Anthony d390cac8db Fix EnableFraudulentWebsiteWarnings for mac 2023-09-07 21:33:11 +10:00
Zámbó, Levente 647bc87600 [v2, Linux] fix menu background color (#2873)
* fix menu background color

* remove commented line

* handle transparent window and background color

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-09-07 21:25:02 +10:00
dependabot[bot] ebf56f6585 Bump semver from 5.7.1 to 5.7.2 in /website (#2808)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 21:22:43 +10:00
Lea Anthony 17e20ab029 [v3] Fix requirements.txt 2023-09-07 07:52:18 +10:00
Lea Anthony 34b9b9b508 Add status table to docs. 2023-09-06 20:59:45 +10:00
Lea Anthony 1644ee152e v2.6.0 2023-09-06 19:45:08 +10:00
David Haukeness 069fe18b9d Move watcher init to doWatcherLoop and implement -reloaddirs (#2871)
* remove random print statement

* move watcher into loop and implement reloaddirs

* Fixed -reloaddirs for issue #2829

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-09-06 19:33:22 +10:00
Lea Anthony acf8dea170 [chore] Big tidy up. Fix bullet point output. 2023-09-06 19:27:29 +10:00
github-actions[bot] 7a87b0476e chore: update sponsors.svg (#2885)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-09-06 19:16:31 +10:00
Lea Anthony 47fd06a445 More doc changes 2023-09-06 19:15:52 +10:00
Andreas Christou 886bcc7b47 Add print functionality to v2 (#2822)
* Add print functionality to v2

* Update changelog

* Update runtime docs

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-09-06 07:55:36 +10:00
Lea Anthony b140ce546f Add CPU detection in mac 2023-09-05 23:14:18 +10:00
Lea Anthony 08ec2beb7c Move menu to Windows window options. 2023-09-05 22:27:47 +10:00
Lea Anthony 5833f0f109 More docs. 2023-09-05 18:26:10 +10:00
Lea Anthony eb2ad258ed More docs. 2023-09-04 22:51:21 +10:00
ALMAS 708aef53e4 [v3] completing missing build tags (#2884)
* Update image.go

* Update popupmenu.go
2023-09-04 22:43:28 +10:00
Lea Anthony e893c1c205 More docs. 2023-09-04 22:40:40 +10:00
Lea Anthony 3e74255127 Update docs. 2023-09-04 21:27:59 +10:00
Lea Anthony b8d7eed607 Add awful CallByName method and update docs with warning. 2023-09-04 21:19:10 +10:00
Lea Anthony 8eb62fb483 Update bindings example 2023-09-04 21:01:00 +10:00
Lea Anthony ee67bff9e3 Docs update 2023-09-04 20:50:32 +10:00
Lea Anthony 21e47dcccf Fix version in debug build 2023-09-04 19:51:48 +10:00
Lea Anthony 38ddcf59f8 Support linux in doctor 2023-09-04 19:46:07 +10:00
Lea Anthony 4a62b6a5c7 Support Mac in wails doctor 2023-09-03 10:30:31 +10:00
Lea Anthony 6afbcb69f3 Improve doctor 2023-09-03 10:09:16 +10:00
Lea Anthony 4bb522d303 Add doctor. 2023-09-03 08:42:12 +10:00
Lea Anthony f107173a73 Update README.md 2023-09-03 06:53:10 +10:00
Lea Anthony eb5aff755f Update docs 2023-09-02 15:12:35 +10:00
Lea Anthony 2384ae0819 Improve docs tooling 2023-09-02 09:10:35 +10:00
Lea Anthony 4a5663c1cb Merge branch 'master' into v3-alpha 2023-09-02 08:38:48 +10:00
Travis McLane 9416e01042 [v3 linux] start_at_login initial implementation 2023-09-01 16:04:25 -05:00
Travis McLane 54fcacfed1 [v3 linux] correct transparency setting 2023-09-01 15:57:13 -05:00
Lea Anthony 69ac5caa4b Fix production build 2023-09-01 22:06:43 +10:00
Lea Anthony cecbc156d5 Update deps 2023-09-01 20:14:06 +10:00
Oleg Gulevskyy d599fd80cb POC of mkdocs barebones (#2769)
* POC of mkdocs barebones

* Add more stuff!

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-09-01 20:11:43 +10:00
David Haukeness 2e9f57a60d No go rebuild (#2870)
* add flag option for NoGoRebuild
2023-08-30 21:24:05 +10:00
Lea Anthony 8ca550cc9e [v3] Add swipe gesture support 2023-08-30 20:57:12 +10:00
stffabi 44c291b297 [v2, build] Fixed support for Go 1.21 go.mod files (#2876) 2023-08-30 18:24:41 +10:00
Nobleman 4ad4d7c7e3 postbuild hook fix (#2839)
postbuildhook should only run if application was built
2023-08-29 18:47:14 +10:00
Nobleman dab762937b Update changelog.mdx (#2868)
Added changes for https://github.com/wailsapp/wails/pull/2836
2023-08-29 18:46:12 +10:00
IAFEnvoy 4e539188e0 Update window.mdx (#2859) 2023-08-29 08:12:10 +10:00
Александр e705e539c6 Add Russian README.md (#2840) 2023-08-29 08:05:42 +10:00
Lea Anthony d44c8eba1c [v3] Use system logger instead of println 2023-08-28 20:30:40 +10:00
Lea Anthony 6edd667bdf [v3] Fix application runtime mappings 2023-08-28 20:29:25 +10:00
Vilsol 499ff50903 fix: use string formatting in gtk_message_dialog_new (#2865) 2023-08-28 19:34:24 +10:00
Miclle Zheng fcfe278f95 Fix typo (#2795)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-08-28 08:52:56 +10:00
Nobleman 93a616ceef [bugfix] build hook command parsing (#2836)
* fix build hook command parsing

use `shlex`, rather than `strings` package, to split build command

* fix compiler error
2023-08-28 08:50:13 +10:00
Diógenes Rodrigues 7bc4d5f7e8 feat: add readme pt-br (#2835)
* feat: add readme pt-br

* update READMEs with link to the Portuguese version

* update the readmes with the Portuguese
2023-08-28 08:43:15 +10:00
Light 63b9cab96f Add updated svelte template (#2858)
* Add new svelte template

Added an updated svelte template

* Update changelog.mdx
2023-08-28 08:41:21 +10:00
Zámbó, Levente 427e41f190 fix disable window resize (#2863)
* fix disable window resize

* change issue number in changelog

* change pull request number in changelog
2023-08-28 08:40:28 +10:00
Lea Anthony 5e1f29eda3 [v3] Support //wails:methodID <uint32> directive in bound method comments. 2023-08-27 21:16:30 +10:00
Lea Anthony e5571defb7 [v3] Support bound methodID aliases. Support []any for bindings generation. Use CallByID in bindings. 2023-08-27 20:39:35 +10:00
Lea Anthony 125d8a6f78 [v3] Update Task to v3.29.1. 2023-08-27 17:14:36 +10:00
Kermout Ayoub 72290a2d58 Added wails-qwik-template to 3rd party templates (#2860)
* Added wails-qwik-template to 3rd party templates

* fix typo

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-08-27 17:13:49 +10:00
github-actions[bot] 92470f262e chore: update sponsors.svg (#2843)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-08-27 17:10:19 +10:00
Lea Anthony 21790dc3ee [v3] Add CallByID method to runtime. 2023-08-27 16:59:18 +10:00
Lea Anthony cdf48e0589 [v3] Fix bindings 2023-08-27 15:54:01 +10:00
stffabi 761efed84d [v2] Introduce size and physical size of screens (#2856) 2023-08-26 10:11:01 +10:00
Phil Richards 427fe7e8d3 Init GTK in NewFrontend, not init (#2841)
* Init GTK in `NewFrontend`, not `init`

So apps that have a headless / non-gui mode will be able to run, since
they needn't call `NewFrontend` (which is called by `CreateApp`).
Previously, `init` would call `C.gtk_init` regardless of whether
CreateApp was called.

Also change to call `C.gtk_init_check` with a panic, instead of
`C.gtk_init`, since `gtk_init` just exits the process if it fails,
without a sensible error message.

Fixes #2628.

* Update changelog
2023-08-26 06:41:53 +10:00
Oussama Sethoum 98bb3b6361 add instructions to run wails v3 examples. (#2854)
* add instructions to run wails v3 examples.

* Update README.md
2023-08-26 06:40:40 +10:00
Travis McLane 2f9f63771b [v3 examples] add README 2023-08-25 09:39:24 -05:00
Zámbó, Levente 5a4eae968f set the background color for window (#2853)
* set the background color for window

* update changelog for #2853
2023-08-25 08:27:52 +10:00
Lea Anthony 93335b3843 [v3] Support ANSI label on Mac. Update example. 2023-08-25 06:53:08 +10:00
Zámbó, Levente 9085e1edbb Bugfix/2848 window set position timing (#2850)
* run WindowSetPosition on main thread

* remove wait group from SetPosition it is not neaded

* update changelog
2023-08-25 05:50:26 +10:00
David Haukeness 8700d225c1 add wails-sveltekit-ts (#2851)
* add wails-sveltekit-ts

* add clog entry
2023-08-25 05:49:12 +10:00
Travis McLane f50c8f447e [v3 assetserver] cleanup logging
- remove type assertions
- update contentTypeSniffer to capture the status code
- move logic in ServeHTTP to serveHTTP
- wrap serveHTTP with ServeHTTP adding logging & duration calculation
2023-08-24 12:44:13 -05:00
Travis McLane bd9f7deb98 [v3 linux] correct minimum zoom 2023-08-23 14:10:22 -05:00
Travis McLane 2171192934 [v3 linux] noop: remove println 2023-08-23 14:09:44 -05:00
github-actions[bot] c2b36de510 chore: update sponsors.svg (#2827)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-08-19 20:42:05 +10:00
Lea Anthony 3352ebef6e [v3] Tidy up logging 2023-08-19 17:15:15 +10:00
Lea Anthony 2a51ddadfc [v3] Tidy up plugin init 2023-08-19 17:09:38 +10:00
Lea Anthony 0745aea4d6 [v3] Move to integer call ids for bound methods. 2023-08-19 14:25:36 +10:00
Travis McLane 4804b34208 [v3 linux] api changes (#2830) 2023-08-19 06:12:34 +10:00
Lea Anthony 841289f1d1 [v3 windows] Support isDarkMode. Add common application event mapping 2023-08-18 19:50:57 +10:00
Lea Anthony c367ef461e [v3 windows] Support isDarkMode 2023-08-18 19:45:59 +10:00
Lea Anthony ffed41553a [v3 mac] Add IsDarkMode to application and JS runtime. Add Common.ThemeChanged event 2023-08-18 17:36:14 +10:00
Lea Anthony 79deb37675 Fix return code in logging 2023-08-18 11:15:02 +10:00
Lea Anthony 77ca8fe9e6 Move webview2 options to application. Improve logging. 2023-08-18 11:06:25 +10:00
Lea Anthony 25e58edf28 [v3] Add dev example 2023-08-18 10:51:02 +10:00
Lea Anthony 0f2d19c56e Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha
# Conflicts:
#	v3/internal/operatingsystem/os.go
#	v3/internal/operatingsystem/os_darwin.go
2023-08-18 10:36:01 +10:00
Lea Anthony 8bde3d7522 [v3 mac] Improved operating system detection 2023-08-18 10:34:32 +10:00
Lea Anthony c169d26d95 [v3] Port operating system detection 2023-08-18 10:24:45 +10:00
Lea Anthony 946a4c56a0 [v3 mac] Better logging 2023-08-18 09:58:43 +10:00
Lea Anthony 23e87e0ad7 Add dev tasks to Taskfile template 2023-08-15 21:48:04 +10:00
Lea Anthony 7d678154c6 Example prod/debug options 2023-08-15 21:40:50 +10:00
Lea Anthony 0b9fec3f87 Add checkport tool for checking open ports 2023-08-15 21:40:01 +10:00
Lea Anthony 763c7708f4 Fix HMR. Better logging. 2023-08-15 20:19:02 +10:00
Lea Anthony 5f2c1f4534 Remove optional prod options - use build tags instead 2023-08-15 20:19:02 +10:00
Lea Anthony 3ac557ccb1 [v3] plugin.toml -> plugin.yaml 2023-08-15 06:39:55 +10:00
Lea Anthony e6c691a376 Support external asset server 2023-08-14 20:49:09 +10:00
Lea Anthony ee8eb001c2 Merge branch 'master' into v3-alpha
# Conflicts:
#	v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create.go
2023-08-14 18:08:52 +10:00
Lea Anthony db836b7a48 Move assetserver to internal 2023-08-14 08:31:55 +10:00
Lea Anthony 543b18dd54 Revert v3 changes in v2 asset server 2023-08-14 08:28:32 +10:00
Lea Anthony ec0731d5d8 Use slog.Logged in assethandler_external.go. Refactor runtime handler. 2023-08-14 08:28:31 +10:00
Lea Anthony cc5c7d1d29 Log git hash if using replaced module 2023-08-14 08:28:25 +10:00
Lea Anthony e79c1b7ea3 Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha 2023-08-13 20:43:07 +10:00
Lea Anthony 6cbead5bfe Improved logging++ 2023-08-13 16:52:39 +10:00
Lea Anthony 429bb2bf17 Refactor application creation. Remove internal logger package. 2023-08-13 15:28:30 +10:00
Lea Anthony c03c41cb21 Add version command 2023-08-13 15:13:01 +10:00
Lea Anthony ee29faecbf Log if native Go webview loader is used 2023-08-12 16:36:08 +10:00
Lea Anthony d1d0105276 Remove jsonBindings option. Only add ipc in debug mode. 2023-08-12 14:57:01 +10:00
Lea Anthony 1059e36b52 Run go mod tidy on project creation. Use better method of relative module location. 2023-08-12 14:32:52 +10:00
Lea Anthony 15f602f867 Move v2 assetserver to v3 2023-08-12 14:16:53 +10:00
github-actions[bot] 7fae22b50c chore: update sponsors.svg (#2819)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-08-12 13:07:09 +10:00
Lea Anthony 13be4a333f Move to slog logger for application and log plugin 2023-08-10 22:04:13 +10:00
Lea Anthony 2553fa1f74 Update templates to use Go 1.21 2023-08-10 21:32:18 +10:00
Lea Anthony f0f5011484 Remove log from runtime (there's a plugin for that) 2023-08-10 21:29:42 +10:00
Lea Anthony 5671f3527b Add ProductionOverrides option so any option can be overridden in production builds 2023-08-10 20:42:25 +10:00
Lea Anthony adb26fa99f Add Hook doc 2023-08-10 19:57:12 +10:00
Kin NG 7b098fd522 Docs: add spanish readme translation (#2812)
* spanish readme translation

add spanish to readme

remove line

* change Spanish to Español

* Add links to README.es.md to the other language translations
2023-08-10 07:52:29 +10:00
Zámbó, Levente e72e4aa179 add new programName option to linux options (#2817)
* add new programName option to linux options

* modify changelog

* free program name string
2023-08-10 07:48:09 +10:00
Lea Anthony 805429a7c6 Support remote templates 2023-08-09 21:53:10 +10:00
Lea Anthony 39af86e59d Improve project creation.
Add `template.json` to templates.
Update dependencies.
2023-08-09 21:30:06 +10:00
Lea Anthony b48579892b [docs] Add mac flash troubleshooting guide 2023-08-05 17:45:08 +10:00
Lea Anthony ecf970d6fe [v3 mac] ANSI systray label [WIP] 2023-08-05 14:04:49 +10:00
Lea Anthony 083e6b03f3 Update Screen docs 2023-08-04 08:18:34 +10:00
Lea Anthony 2859143b2f Add Screen docs 2023-08-03 08:35:34 +10:00
Andreas Christou 027edad51b Create-React-App documentation updates (#2805)
* Add documentation for running a create-react-app project in watch mode

* Fix build warning
2023-08-02 08:58:05 +10:00
Lea Anthony a96d51be02 Update project-config.mdx 2023-07-29 12:04:41 +10:00
github-actions[bot] fe479876c5 chore: update sponsors.svg (#2794)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-07-28 08:15:00 +10:00
Li Yang 84d2576e06 Update README.zh-Hans.md (#2791)
Fixed a link error
2023-07-26 20:32:43 +10:00
Aranggi J. Toar 48b35aaafe chore: update npm and docker package names for dnf package manager (#2790)
* chore: update package names for dnf package manager

* chore: update changelog
2023-07-24 19:53:24 +10:00
Lea Anthony c9ce17a4d5 [v3] Fix Assets options in templates 2023-07-21 08:24:38 +10:00
github-actions[bot] 7f402bf0c4 chore: update sponsors.svg (#2778)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2023-07-18 23:04:16 +10:00
Lea Anthony 1e76b0b52e Remove markdown formatter 2023-07-18 21:47:26 +10:00
stffabi a6e279f0d3 [v3 panicHandler] Let the default go panic handler handle the panic if there's no panicHandler set in options 2023-07-15 23:57:19 +02:00
stffabi 842bc3733e [v3 windows] Fix missing panic stacktraces during message loop 2023-07-15 23:56:26 +02:00
figuerom16 e0a92712fe SvelteKit Guide: Manual installation, Bash installation, Usage Notes. (#2771)
* Create SvelteKit.mdx

* Rename SvelteKit.mdx to sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update sveltekit.mdx

* Update changelog.mdx
2023-07-15 23:52:33 +10:00
guangwu 150dac9ead chore: slice replace loop (#2757)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-07-13 23:13:47 +10:00
Ethan Reesor 22cfcbd5a1 Override error formatting (#2717) 2023-07-13 20:40:22 +10:00
Lea Anthony 5e76a5e76a [v3 mac] Fix event callback signatures 2023-07-12 21:29:01 +10:00
Lea Anthony 52c3c49f25 [v3] Add window close hook example 2023-07-12 21:27:58 +10:00
Lea Anthony 705239ad7d [v3] Use WindowEvent rather than WindowEventContext 2023-07-12 20:50:01 +10:00
Lea Anthony dc865404a9 [v3] Initial hooks implementation 2023-07-12 20:31:13 +10:00
Lea Anthony ba7ab2e607 [v3 windows] Fix translucency. Update example. 2023-07-11 23:04:22 +10:00
Lea Anthony d6cfe4414d [v3 Windows] Add WebviewWindow.Flash() 2023-07-11 20:10:18 +10:00
Lea Anthony ecbb135949 [v3] Update plugin.js 2023-07-10 20:56:07 +10:00
Lea Anthony fcb98e6523 [v3] Update docs 2023-07-10 20:46:08 +10:00
Lea Anthony e7e5597c95 [v3 mac] Fix right click. Slight refactor. 2023-07-10 20:44:30 +10:00
Lea Anthony 7f0479d8b4 [v3 mac] Fix right click menu when window attached. 2023-07-10 20:21:19 +10:00
Lea Anthony f5c78f365d [v3] Fix oauth bug. Added logout capability 2023-07-09 20:13:29 +10:00
Lea Anthony 1fc5f9b12d [v3] Update readme for oauth plugin 2023-07-09 12:33:57 +10:00
Lea Anthony 3f55ce6dfc [v3] Add provider methods, provide default login window, update readme for oauth plugin 2023-07-09 12:30:36 +10:00
Lea Anthony 1d562d3c27 [v3] Add oauth plugin 2023-07-08 22:56:25 +10:00
Lea Anthony f3974deb88 [v3] Add Get for application instance 2023-07-08 22:51:33 +10:00
Lea Anthony 1945616328 [v3 windows] Fix WindowClose defaults 2023-07-08 20:28:19 +10:00
Lea Anthony 7db6604227 [v3 windows] Add HideOnTaskbar flag to WebviewWindow 2023-07-08 11:27:36 +10:00
Lea Anthony 12ce6c5ac3 [v3] Add systray.AttachWindow 2023-07-06 20:43:08 +10:00
Lea Anthony 5d9bc4ca81 [v3 mac] Fix systray example toggle 2023-07-05 21:09:48 +10:00
Lea Anthony c0b4a3ff35 [v3] Fix generation of common events 2023-07-05 20:39:35 +10:00
Lea Anthony f0bf8cd827 [v3 windows] Refactor events + mappings. Fix app.Quit(). Make systray example work slightly better 2023-07-05 20:35:45 +10:00
Lea Anthony 10144adf61 [v3 windows] Fix window lose focus events. 2023-07-04 20:43:21 +10:00
Lea Anthony 3efab5ba23 [v3 windows] Prevent window close events when the window was just opened 2023-07-04 20:01:06 +10:00
Lea Anthony 3d323ab9d2 [v3] Fix systray example. PositionWindow now takes an offset. EventApplicationDidResignActive -> EventApplicationDidResignActiveNotification 2023-07-04 19:26:00 +10:00
Lea Anthony 16ce9e562f [v3 mac] Window alignment to systray 2023-07-03 20:15:45 +10:00
Lea Anthony 90e66a7ad4 [v3] Add PanicHandler application option. 2023-07-03 19:52:50 +10:00
Lea Anthony 6b59216b32 [v3] Better panic support for methods run on mainthread 2023-07-01 21:56:21 +10:00
Lea Anthony 9764ba6334 [v3] Add CHANGELOG.md. Add instructions for PRs in DEVELOPMENT.md. 2023-07-01 11:09:09 +10:00
Mohamed Gharib da5929ff34 [v3] Fix examples background color (#2750) 2023-07-01 10:55:10 +10:00
Mohamed Gharib e419822c77 [v3] Fix default context-menu in selected disabled inputs (#2753)
* [v3] Fix default context-menu in selected disabled inputs

* [v3] Update Task to v3.27.1. Add `wails3 task -version` and `wails3 task taskfile:update`.

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-07-01 10:52:55 +10:00
Lea Anthony b62ce4440e [v3 windows] Setup chromium sooner 2023-07-01 09:23:19 +10:00
Lea Anthony 3c81fb06e8 [v3 windows] Position window above systray 2023-06-30 21:17:50 +10:00
Lea Anthony c27366a270 [v3] rename cli to wails3 2023-06-29 18:26:04 +10:00
Lea Anthony 5b6f6c1bff [v3] Default context menu always shows in debug/dev 2023-06-28 18:47:39 +10:00
Lea Anthony 3fcac435b2 [v3] Support window events in JS. Fix ExecJS blocking issues. 2023-06-26 22:10:31 +10:00
Lea Anthony 03a3edcdc9 [v3] Create experimental plugin directory 2023-06-26 08:39:02 +10:00
Lea Anthony 5737b3cc7b [v3 mac] Fix merge issues 2023-06-25 10:13:20 +10:00
Lea Anthony b898b79aaf [v3 windows] Initial support for start_on_login plugin for windows 2023-06-24 21:12:24 +10:00
Lea Anthony 3827ca2d78 [v3] Move dialogs out of application 2023-06-24 13:57:51 +10:00
Lea Anthony 4de5e1b9f1 [v3] Add WindowUnFocus event 2023-06-24 13:23:50 +10:00
Travis McLane eb18f02fd2 Merge branch 'v3-alpha-linux' into v3-alpha 2023-06-23 21:51:21 -05:00
Travis McLane 1a7d105917 [v3 linux] GetAbsolutePosition 2023-06-23 21:50:51 -05:00
Travis McLane de5cff799e [v3 linux] setEnabled 2023-06-23 21:50:51 -05:00
Travis McLane 67cada78f6 [v3 linux] purego: windowGetRelativePosition 2023-06-23 21:50:51 -05:00
Travis McLane 5a40f25d03 [v3 linux] webview setAbsolutePosition 2023-06-23 21:50:51 -05:00
Travis McLane 1a09a8a4c8 [v3 linux/cgo] open/save file dialog stub 2023-06-23 21:50:51 -05:00
Travis McLane daa0cf83d9 [v3 linux] noop: remove fmt.Println 2023-06-23 21:50:51 -05:00
Travis McLane e92858f64d [v3 linux/purego] initial file/directory dialogs impl 2023-06-23 21:50:51 -05:00
Travis McLane d52c26e82f [v3 linux] implement missing functions 2023-06-23 21:50:51 -05:00
Travis McLane 83900b03d4 [v3 linux] purego cleanup + dialog images 2023-06-23 21:50:51 -05:00
Travis McLane c123430f22 [v3 linux] dialog fixes 2023-06-23 21:50:51 -05:00
Travis McLane 33e20cbc77 [v3 linux] allow menu setting on Linux 2023-06-23 21:50:51 -05:00
Travis McLane e942312c4c [v3 menuitem] bug: avoid setting if nil 2023-06-23 21:50:51 -05:00
Travis McLane de2e78b507 [v3 linux] purego implementation 2023-06-23 21:50:51 -05:00
Travis McLane da4a7ac64b [v2] assetserver/webview purego implementation 2023-06-23 21:50:51 -05:00
Travis McLane e44fbc26ba [v3 linux] STATUS.md 2023-06-23 21:50:51 -05:00
Travis McLane bef454f950 [v3 linux] initial linux implementation 2023-06-23 21:50:51 -05:00
Travis McLane 94e1ec91ad Revert "Merge branch 'v3-alpha_linux' into v3-alpha"
This reverts commit b317efaf2c, reversing
changes made to 29b9c5200f.
2023-06-23 21:50:51 -05:00
Lea Anthony 56d11ab419 [v3] Update Wails API 2023-06-24 12:11:48 +10:00
Lea Anthony c96cccab2e [v3] Add Window AbsolutePosition/SetAbsolutePosition 2023-06-23 21:14:26 +10:00
Lea Anthony 989ef1b4a8 [v3] Update STATUS.md 2023-06-23 20:50:54 +10:00
Lea Anthony 45cfbe917e [v3] Position/GetPosition -> RelativePosition/GetRelativePosition 2023-06-23 20:49:27 +10:00
Lea Anthony 2e313005e0 [v3] Add window attachment for open/save dialogs. Fix filter bug. 2023-06-23 20:33:35 +10:00
Lea Anthony 722c3a653c [v3] Allow message dialogs to be attached to windows. JS dialogs default attached. wml confirm dialog attached. 2023-06-23 20:19:29 +10:00
Lea Anthony 76672facfe [v3] Add window Enabled method. Fix dialog attachment 2023-06-23 19:48:04 +10:00
Lea Anthony 8f075b5d8d [v3] Fix merge issues 2023-06-22 19:56:35 +10:00
Lea Anthony b317efaf2c Merge branch 'v3-alpha_linux' into v3-alpha
# Conflicts:
#	v3/STATUS.md
#	v3/examples/menu/main.go
#	v3/go.mod
#	v3/pkg/application/application.go
#	v3/pkg/application/webview_window.go
2023-06-22 19:46:10 +10:00
Lea Anthony 29b9c5200f [v3] Update context menu example. Allow menu for disabled/read only iputs 2023-06-21 20:21:10 +10:00
Lea Anthony 4d2b4b4ee7 [v3] Update dev guide. Remove implLock. 2023-06-21 19:37:39 +10:00
Lea Anthony 9f8f095a78 [v3] Update dev guide. 2023-06-21 19:23:14 +10:00
Lea Anthony 59c09ebee1 [v3] Better default context menu. Started dev guide. 2023-06-21 19:21:41 +10:00
Lea Anthony 5f81a87912 [v3] Add smart context menu example 2023-06-20 21:35:41 +10:00
Lea Anthony 7f6151d573 [v3] Enable default context menu for certain elements. Use CSS to customise. 2023-06-20 21:11:37 +10:00
Lea Anthony 9816960995 [v3] Support "--default-contextmenu" style. Fix URL handling in Windows. 2023-06-20 19:44:01 +10:00
Lea Anthony 3355d5f0af [v3] Add EnableDevTools option 2023-06-20 08:49:25 +10:00
Lea Anthony ab38b20444 [v3] Status Update 2023-06-20 08:36:39 +10:00
Lea Anthony f278229179 Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha 2023-06-20 08:12:42 +10:00
Lea Anthony 552390fb84 [v3 mac] Tidy up 2023-06-19 17:53:16 +10:00
Lea Anthony 68573cdc48 [v3 windows] Focus webview on Show/Restore/Maximise/FullScreen 2023-06-19 07:35:11 +10:00
Lea Anthony cdf397aaa9 [v3 mac] Implement print() 2023-06-19 07:15:53 +10:00
Lea Anthony ed27558011 [v3 windows] Add WebviewWindow.Print() 2023-06-18 17:13:07 +10:00
Lea Anthony 50387948df [v3 mac] Refactor drag to use common code 2023-06-18 12:24:44 +10:00
Lea Anthony 9b48cc1799 [v3 mac] Fix window drag example 2023-06-18 12:12:01 +10:00
Lea Anthony 86f2ac0e96 [v3 mac] Fix WindowShouldClose bug 2023-06-18 11:25:38 +10:00
Lea Anthony 1537a002cc [v3] Add ShouldClose window method. Remove hideOnClose flag. 2023-06-18 11:12:53 +10:00
Lea Anthony ae9b158b04 [v3 windows] improve main thread calls 2023-06-16 21:04:44 +10:00
Lea Anthony 72ec10b181 [v3 mac] Fix window close bug 2023-06-16 21:01:17 +10:00
Lea Anthony eed4002a4a [v3 mac] Fix GetPosition Y coordinate 2023-06-16 20:54:53 +10:00
Lea Anthony 155e34c7a8 [v3 mac] Better main thread calls 2023-06-16 20:48:57 +10:00
Lea Anthony 22cc649e81 [v3 mac] translate window position for SetPosition 2023-06-16 20:20:18 +10:00
Lea Anthony 367ca745c3 [v3 windows] Fix frameless window drag. Add better resize for corners. 2023-06-15 21:06:14 +10:00
Lea Anthony 01e2e46e0d [v3 windows] Support frameless drag. Add /wails/flags endpoint. 2023-06-15 19:08:08 +10:00
Lea Anthony c03078ca16 [v3] Add capabilities, move to app-region css for drag, support native drag on Windows 2023-06-14 18:12:37 +10:00
Lea Anthony 49e62aebe3 [v3 windows] Support frameless drag 2023-06-13 17:44:07 +10:00
Lea Anthony dc4daaebac [v3 windows] Support title bar button events 2023-06-13 17:42:14 +10:00
stffabi f855b30c9f [v3 windows] Consolidate WM_SIZE/WM_SIZING message handling 2023-06-12 08:26:09 +02:00
stffabi b614e2b100 [v3 windows] An initially hidden window should show chromium when it is getting unhidden 2023-06-12 05:41:55 +02:00
stffabi eafbbab233 [v3 windows] Do not Hide/Show chromium on every load of the frontend 2023-06-12 05:12:49 +02:00
Lea Anthony 72a4e9cf6e [v3] Update STATUS.md 2023-06-12 10:46:31 +10:00
Lea Anthony 1dbe100a43 [v3] Restore window example 2023-06-12 10:45:26 +10:00
Lea Anthony 287d3d066c [v3] Update WML demo to include restore 2023-06-12 10:45:03 +10:00
Lea Anthony 9387d18e88 [v3 windows] Change how chromium redraw works 2023-06-12 10:44:33 +10:00
Lea Anthony 1600bcb1d0 [v3] Add Restore to JS runtime 2023-06-12 10:44:05 +10:00
Lea Anthony 2b2defb7c0 [v3 windows] Fix chromium redraw bug 2023-06-12 10:28:35 +10:00
Lea Anthony 6d786902eb [v3] Add some common window events 2023-06-12 10:27:30 +10:00
Lea Anthony 286ce206f0 [v3 windows] Prevent crash when nulls in strings 2023-06-12 09:10:47 +10:00
Lea Anthony 7535f098bd [v3 windows] Fix clipboard example 2023-06-11 11:57:47 +10:00
Lea Anthony b517461fbe [v3 windows] Fix screen example 2023-06-11 11:54:32 +10:00
Lea Anthony ffbe67e21f [v3 windows] Fix clipboard js runtime call 2023-06-11 11:47:50 +10:00
Lea Anthony 833671d30c [v3 windows] Add clipboard support 2023-06-10 13:01:10 +10:00
Lea Anthony ae691b8e52 [v3 windows] Small icon updates 2023-06-10 10:19:33 +10:00
Lea Anthony 2b56b7b6b9 [v3] Update status and log plugin readme 2023-06-09 20:44:24 +10:00
Lea Anthony 81a5380f67 [v3 windows] Handle null result from callbacks. Call results should respond on main thread. 2023-06-09 20:34:11 +10:00
Lea Anthony 7c45e3ac13 [v3 mac] Fixed drag 2023-06-09 17:00:07 +10:00
Lea Anthony d1932c36ce Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha
# Conflicts:
#	v2/internal/app/app_dev.go
#	v3/STATUS.md
#	v3/Taskfile.yaml
#	v3/examples/binding/go.mod
#	v3/examples/binding/go.sum
#	v3/examples/menu/main.go
#	v3/examples/window/main.go
#	v3/go.mod
#	v3/go.sum
#	v3/pkg/application/application_windows.go
#	v3/pkg/application/dialogs_windows.go
#	v3/pkg/application/menuitem_windows.go
#	v3/pkg/application/options_webview_window.go
#	v3/pkg/application/options_win.go
#	v3/pkg/application/popupmenu_windows.go
#	v3/pkg/application/systemtray_windows.go
#	v3/pkg/application/webview_window.go
#	v3/pkg/application/webview_window_windows.go
#	v3/pkg/events/events.go
#	v3/pkg/events/events.txt
#	v3/pkg/w32/constants.go
#	v3/pkg/w32/popupmenu.go
#	v3/pkg/w32/screen.go
#	v3/pkg/w32/typedef.go
#	v3/pkg/w32/user32.go
#	website/src/pages/changelog.mdx
2023-06-07 08:19:25 +10:00
Lea Anthony adb7ddf8d2 [v3] Update go mod for plugins examples 2023-06-06 21:07:28 +10:00
Lea Anthony 3b0a57ca6d [v3 plugins] Support single-instance on Windows 2023-06-06 21:06:52 +10:00
Lea Anthony 4ee75e93c9 [v3] Improve examples 2023-06-06 20:41:28 +10:00
Lea Anthony ff218e5323 [v3 windows] Support systray.Destroy() 2023-06-06 20:40:56 +10:00
Lea Anthony df0969d1c6 [v3 windows] Support About box. Improve app menu handling. 2023-06-06 20:40:38 +10:00
Lea Anthony 23d7ac0e58 [v3 windows] Add MessageBoxIndirect 2023-06-06 20:39:24 +10:00
Lea Anthony f9a87944cf [v3] icons.ico -> icon.ico 2023-06-06 20:38:45 +10:00
Lea Anthony eff456aa1a [v3 windows] Improve systray locking 2023-06-06 20:38:01 +10:00
Lea Anthony 1ce07cd67c [v3 windows] Update Taskfile in templates 2023-06-06 20:37:15 +10:00
Lea Anthony fc7952ff3b [v3 windows] Update examples. Add example table to STATUS.md 2023-06-05 20:34:52 +10:00
Lea Anthony bb28bdf565 [v3 windows] Fix resize bug when using setSize 2023-06-05 20:33:45 +10:00
Lea Anthony 04d5842124 [v3 windows] Add package:windows task 2023-06-05 19:57:40 +10:00
Lea Anthony 1a12890556 [v3 windows] Add Webview2NavigationCompleted event. Support CSS + JS injection 2023-06-05 08:58:53 +10:00
Lea Anthony d021d885ca [v3 windows] Update STATUS.md 2023-06-04 14:08:27 +10:00
Lea Anthony 3433b8ce8f [v3 windows] Support context menus 2023-06-04 14:05:19 +10:00
Lea Anthony 6092730acc [v3 windows] Support Close and take into account HideOnClose option 2023-06-03 15:23:10 +10:00
Lea Anthony ba4ffe4ecc [v3 windows] Support devtools on startup 2023-06-03 15:19:38 +10:00
Lea Anthony 55b3e2d35a [v3 windows] Update STATUS.md 2023-06-03 15:08:50 +10:00
Lea Anthony 6b926ec463 [v3 windows] Support setURL, execJS, reload, zoomIn/Out/Reset, get/setZoom, setHTML, 2023-06-03 15:03:26 +10:00
Lea Anthony 9b686b5417 [v3 windows] Support Application Menu, hiding menu items 2023-06-01 22:52:04 +10:00
Lea Anthony 82ec56bc7d [v3 windows] Support GetScreens and GetPrimaryScreen 2023-06-01 22:52:03 +10:00
Lea Anthony 798e51d4d3 [v3 windows] Fix window ID processing 2023-06-01 22:52:02 +10:00
Lea Anthony 35c41552de [v3 mac] Basic common event support. Taskfile refactor 2023-06-01 22:51:25 +10:00
Lea Anthony 19be7f61ac [v3 windows] Fix resizing. Add resize debouncing 2023-05-30 16:36:00 +08:00
Misite Bao bbf0e8cdad chore: split Taskfile (#2654) 2023-05-30 16:35:59 +08:00
Lea Anthony 7e2d2a29a1 [v3 windows] Initial webview2 working 2023-05-30 16:33:34 +08:00
Lea Anthony 671dc2aa3a [v3 windows] Implement start x/y + parent window for dialogs 2023-05-30 16:33:34 +08:00
Lea Anthony 294a2c701e [v3] Update esbuild 2023-05-30 16:33:34 +08:00
Lea Anthony 01f03c552d [v3] Improve invoke 2023-05-30 16:33:33 +08:00
Lea Anthony dc46154d94 [v3 mac] Support drag 2023-05-30 16:33:33 +08:00
Lea Anthony 87737c23eb [v3 mac] DisableWindowShadow -> DisableShadow 2023-05-30 16:33:33 +08:00
Lea Anthony 6e6f099a99 [v3 mac] Basic common event support. Taskfile refactor 2023-05-30 16:33:32 +08:00
Lea Anthony 4cb3321c39 [v3 mac] Update README 2023-05-30 16:32:02 +08:00
Lea Anthony 6a2343a1a0 [v3 mac] Add DisableWindowShadow option 2023-05-30 16:32:01 +08:00
Lea Anthony f2d6dba2cf [v3 windows] initial dialog support. Refactor button callback name 2023-05-30 16:32:01 +08:00
stffabi dd1ef7fae9 [v3 darwin] Add darwin identifier darwin only file 2023-05-30 16:32:01 +08:00
stffabi 527cff9ec3 [v3 darwin] Add darwin identifier to all C files of darwin 2023-05-30 16:32:00 +08:00
stffabi ba150eccae [v3 windows] Add close handling: HideOnClose, QuitOnLastWindowClosed and DisableQuitOnLastWindowClosed 2023-05-30 16:32:00 +08:00
Travis McLane fa74986f1e [v3 example] menu text toggle 2023-05-30 16:32:00 +08:00
Travis McLane d1085b5bea [v3 example] add menuitem.Hidden / setHidden example 2023-05-30 16:31:59 +08:00
Travis McLane 4d0a14d2eb [v3 darwin] menuitem.setHidden implementation 2023-05-30 16:31:59 +08:00
Travis McLane 8c3439b733 [dialogs] remove default title
without this removal a user would have to call `SetTitle("")` in order to
erase the default if they desire a title-less dialog.
2023-05-30 16:31:59 +08:00
stffabi a0534d527a [v3 application] Fix race conditions between starting a window/systray and starting the application
Make sure a window is never run before the windowCreated hooks have been executed.
2023-05-30 16:31:59 +08:00
Lea Anthony a5b52f2795 [v3 windows] initial systray support 2023-05-30 16:31:58 +08:00
Lea Anthony b526ebd679 [v3 mac] Update api. New template icon. 2023-05-30 16:31:58 +08:00
Lea Anthony 51b9315ae9 [v3 windows] update status 2023-05-30 16:31:58 +08:00
Lea Anthony 8edf44dc31 [v3 windows] New icons 2023-05-30 16:31:57 +08:00
Lea Anthony 9b7626e59e [v3 windows] Move icons to own package, systray dark mode icon, window.Focus(), 2023-05-30 16:31:57 +08:00
Lea Anthony 6dd092c7a9 [v3 windows] Rename systray callback handlers 2023-05-30 16:31:57 +08:00
Lea Anthony 46a0d467c0 [v3 windows] Dialogs to use invokeSync 2023-05-30 16:31:56 +08:00
Lea Anthony e3b164ae93 [v3 windows] Systray callback handlers 2023-05-30 16:31:56 +08:00
stffabi d8f58ab20f [v3 windows] Fix wndproc default case with WMMessageToString 2023-05-30 16:31:56 +08:00
stffabi 0de2bccd28 [v3 windows] Do not disable WndProc messaging for systray when updating icon 2023-05-30 16:31:55 +08:00
Lea Anthony 2eaf724710 [v3 windows] Fix systray icon size 2023-05-30 16:31:55 +08:00
Lea Anthony 58138ac09b [v3 windows] Initial systray support 2023-05-30 16:31:55 +08:00
Lea Anthony 143f090422 [v3] Use invokeSync for systray methods 2023-05-30 16:31:55 +08:00
Lea Anthony f8f466ba7e [v3 windows] Support irregular shaped windows. Centered option. 2023-05-30 16:31:54 +08:00
Lea Anthony cb28de47f8 [v3 windows] Support irregular shaped windows 2023-05-30 16:31:54 +08:00
stffabi 4ad2475ed6 [v3] Add some missing methods for darwin and windows 2023-05-30 16:31:54 +08:00
Travis McLane 0172078536 [w32] move windows specific code to impl file 2023-05-30 16:31:53 +08:00
Travis McLane 0bb1fb512a [w32] add missing build constraint 2023-05-30 16:31:53 +08:00
Lea Anthony b6940d95a2 [v3 windows] Add frameless resize 2023-05-30 16:31:53 +08:00
stffabi 75f0457375 [v3 windows] Add HiDPI awareness 2023-05-30 16:31:52 +08:00
stffabi ffe31b6265 [v3 windows] Add frameless support 2023-05-30 16:31:52 +08:00
Lea Anthony 8963610722 [v3 windows] Implement getScreen 2023-05-30 16:31:52 +08:00
Lea Anthony 66bfcf0e36 [v3] Ensure impl calls from WebvieWindow are on the main thread. Support size. 2023-05-30 16:31:52 +08:00
Lea Anthony 0b3559abfe [v3] Fix examples 2023-05-30 16:31:51 +08:00
Lea Anthony 773389ee5e [v3] Update examples to use correct options. 2023-05-30 16:31:51 +08:00
Lea Anthony 4c04991d4d [v3] Change WebviewWindow options to be a value, not a pointer. Support Un/Fullscreen. Remove main thread switching. Use parent options instead of local variables. 2023-05-30 16:31:51 +08:00
Lea Anthony d56bb59b72 [v3 Windows] Support application hide/show. Add WebviewWindow.IsVisible(). 2023-05-30 16:31:50 +08:00
Lea Anthony 6e92a4f71e [v3 Windows] Support setMin/MaxSize, setPosition 2023-05-30 16:31:50 +08:00
Lea Anthony 1f6217c0d8 [v3 Windows] Add Support for SetTitle, Center, Un/Minimise/Maximise, IsMin/Maximised, IsNormal, Show/Hide 2023-05-30 16:31:50 +08:00
Lea Anthony 17204bebd0 [v3 Breaking Change] Add NativeWindowHandle method to WebviewWindow. 2023-05-30 16:31:49 +08:00
Lea Anthony 728e2019d8 [v3 windows] Moved w32 from internal to pkg so it may be used by applications 2023-05-30 16:31:49 +08:00
Lea Anthony 7f3fdd6977 [v3 windows] Add WndProcInterceptor for custom message processing 2023-05-30 16:31:49 +08:00
Lea Anthony e8798f8371 [v3 windows] Rename options_windows.go -> options_win.go 2023-05-30 16:31:48 +08:00
Lea Anthony 402b743553 [v3 windows] Add APM Events 2023-05-30 16:31:48 +08:00
Lea Anthony f08ae2fc62 [v3] Update application.On and window.On to return functions that unregister the listener. WebviewWindow.onApplicationEvent is a helper which will manage the unregistering for you on window destroy. 2023-05-30 16:31:48 +08:00
Lea Anthony 178ea9c8c5 [windows] Split out wndProc. Generate windows events, support per-window themes 2023-05-30 16:31:48 +08:00
Lea Anthony 7c63cee9e8 [windows] Support AlwaysOnTop, EnableResize at runtime. Added Solid/Transparent/Translucent options. 2023-05-30 16:31:47 +08:00
stffabi 4a60dfc373 [v3, windows] Add MainThread dispatching and fixes the blocking window 2023-05-30 16:31:47 +08:00
Lea Anthony 829a829cb4 [windows] WIP 2023-05-30 16:31:47 +08:00
Travis McLane 34896ccb4e [darwin] add getPrimaryScreen/getScreens to impl (#2618) 2023-05-30 16:31:46 +08:00
Lea Anthony 5df5eb6a04 Fix module path for non-modified repo 2023-05-30 16:31:46 +08:00
Lea Anthony 31ba36baf3 [windows] Initial commit 2023-05-30 16:31:46 +08:00
Lea Anthony bf10f71760 [windows] Fix paths for wails init 2023-05-30 16:31:45 +08:00
Lea Anthony 8aa61fff6d Intial STATUS.md commit 2023-05-30 16:31:45 +08:00
Lea Anthony f645b530da [v3] Update esbuild 2023-05-19 07:58:25 +10:00
Lea Anthony 27573d191e [v3] Improve invoke 2023-05-18 19:18:20 +10:00
Lea Anthony d6b4fdf979 [v3 mac] Support drag 2023-05-17 21:09:27 +10:00
Lea Anthony 39c834b83f [v3 mac] DisableWindowShadow -> DisableShadow 2023-05-17 08:13:05 +10:00
Lea Anthony f210357bfe [v3 mac] Basic common event support. Taskfile refactor 2023-05-17 07:58:40 +10:00
Lea Anthony 3094c19cf3 [v3 mac] Update README 2023-05-16 18:00:17 +10:00
Lea Anthony 225437f1e8 [v3 mac] Add DisableWindowShadow option 2023-05-16 17:54:34 +10:00
Lea Anthony a23bb1e350 [v3 windows] initial dialog support. Refactor button callback name 2023-05-12 20:56:22 +10:00
stffabi 2fbb21a84e [v3 darwin] Add darwin identifier darwin only file 2023-05-12 11:02:15 +02:00
stffabi 5c08fcb43e [v3 darwin] Add darwin identifier to all C files of darwin 2023-05-12 09:25:50 +02:00
stffabi cc59655cb1 [v3 windows] Add close handling: HideOnClose, QuitOnLastWindowClosed and DisableQuitOnLastWindowClosed 2023-05-12 08:06:05 +02:00
Travis McLane 8ff0a2b0ff [v3 example] menu text toggle 2023-05-11 11:10:17 -05:00
Travis McLane fe549af784 [v3 example] add menuitem.Hidden / setHidden example 2023-05-11 10:56:19 -05:00
Travis McLane a4549c94c1 [v3 darwin] menuitem.setHidden implementation 2023-05-11 10:51:52 -05:00
Travis McLane 706256d3f0 [dialogs] remove default title
without this removal a user would have to call `SetTitle("")` in order to
erase the default if they desire a title-less dialog.
2023-05-11 08:54:38 -05:00
stffabi 3049773e7f [v3 application] Fix race conditions between starting a window/systray and starting the application
Make sure a window is never run before the windowCreated hooks have been executed.
2023-05-11 07:00:42 +02:00
Travis McLane 9da5df354e make it compilable again 2023-05-10 09:10:03 -05:00
Travis McLane 54ba6d47f4 Revert "[linux] dispatchOnMainThread"
This reverts commit 346517a185640aa40bc8710b815cf3e5ff7dc4a8.
2023-05-10 09:10:03 -05:00
Travis McLane 17647e2c2f [linux/cgo] hide/show implementation 2023-05-10 09:10:03 -05:00
Travis McLane 9da5cea88d [linux/cgo] bugfix 2023-05-10 09:10:03 -05:00
Travis McLane 3784746ddb [linux] STATUS.md 2023-05-10 09:10:03 -05:00
Travis McLane 281f6335c1 [linux] dispatchOnMainThread 2023-05-10 09:10:03 -05:00
Travis McLane 5129c0f4e2 [fixup] remove 'activate' 2023-05-10 09:10:03 -05:00
Travis McLane 5078e89a71 [darwin] implement isNormal 2023-05-10 09:10:03 -05:00
Travis McLane 41aef27631 [linux] use getNativeApplication 2023-05-10 09:10:03 -05:00
Travis McLane 754d0934bf [darwin] systray basic darkmode implementation 2023-05-10 09:10:03 -05:00
Travis McLane be2d616190 [linux] getNativeApplication 2023-05-10 09:10:03 -05:00
Travis McLane ba34e47c4b [linux/purego] updates 2023-05-10 09:10:03 -05:00
Travis McLane a485b188b3 [linux/cgo] updates 2023-05-10 09:10:03 -05:00
Travis McLane 718e89ad1e [core/menu] prevent nil impl crash 2023-05-10 09:10:03 -05:00
Travis McLane 9453a60254 [linux] window registration + default menu 2023-05-10 09:10:03 -05:00
Travis McLane f87ec9d401 [purego] 2023-05-10 09:10:03 -05:00
Travis McLane cb1859a710 [cgo] registerWindow 2023-05-10 09:10:03 -05:00
Travis McLane 1ed95164db [purego] 2023-05-10 09:10:03 -05:00
Travis McLane ac5d0e54f0 [purego] assethandler updates 2023-05-10 09:10:03 -05:00
Travis McLane b1e79411e7 [examples] update label on click 2023-05-10 09:10:03 -05:00
Travis McLane a9d834d715 [examples] update label on click 2023-05-10 09:10:03 -05:00
Travis McLane 68cfd130d3 [linux/cgo] initial implementation 2023-05-10 09:10:03 -05:00
Travis McLane 93a4b823c8 [linux/purego] initial port 2023-05-10 09:10:03 -05:00
Travis McLane 769662d77a [v2] assetserver/webview purego implementation 2023-05-10 09:10:03 -05:00
Lea Anthony 7fd627f169 [v3 windows] initial systray support 2023-05-10 19:35:40 +10:00
Lea Anthony b91468b6f2 [v3 mac] Update api. New template icon. 2023-05-09 21:55:17 +10:00
Lea Anthony 0b9cd4be5d [v3 windows] update status 2023-05-09 21:47:22 +10:00
Lea Anthony 4c587ee1b8 [v3 windows] New icons 2023-05-09 19:53:01 +10:00
Lea Anthony 19e1e8b8a6 [v3 windows] Move icons to own package, systray dark mode icon, window.Focus(), 2023-05-09 19:52:33 +10:00
Lea Anthony 67e9522c67 [v3 windows] Rename systray callback handlers 2023-05-08 20:16:25 +10:00
Lea Anthony a829b38a34 [v3 windows] Dialogs to use invokeSync 2023-05-08 20:11:51 +10:00
Lea Anthony c8dae94b5b [v3 windows] Systray callback handlers 2023-05-08 19:43:58 +10:00
stffabi 87267758ac [v3 windows] Fix wndproc default case with WMMessageToString 2023-05-07 22:17:43 +02:00
stffabi 5f72df81fb [v3 windows] Do not disable WndProc messaging for systray when updating icon 2023-05-07 21:40:40 +02:00
Lea Anthony 1ed270fe05 [v3 windows] Fix systray icon size 2023-05-07 20:19:37 +10:00
Lea Anthony 19a654a2b1 [v3 windows] Initial systray support 2023-05-07 19:13:07 +10:00
Lea Anthony f9bbc11711 [v3] Use invokeSync for systray methods 2023-05-07 10:34:08 +10:00
Lea Anthony 42b1807c36 [v3 windows] Support irregular shaped windows. Centered option. 2023-05-06 20:22:28 +10:00
Lea Anthony 647982de1a [v3 windows] Support irregular shaped windows 2023-05-06 15:05:00 +10:00
Lea Anthony f5557c612a Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha 2023-05-05 06:41:04 +10:00
stffabi f4749db8b3 [v3] Add some missing methods for darwin and windows 2023-05-02 21:56:40 +02:00
Travis McLane 86a1de6788 [w32] move windows specific code to impl file 2023-05-02 10:52:21 -05:00
Travis McLane 792c5e2d95 [w32] add missing build constraint 2023-05-02 10:52:09 -05:00
Lea Anthony 6758580be9 [v3 windows] Add frameless resize 2023-05-02 23:18:22 +10:00
stffabi 6f246eed4a [v3 windows] Add HiDPI awareness 2023-05-02 09:45:21 +02:00
stffabi fc3725d3f4 [v3 windows] Add frameless support 2023-05-02 09:29:47 +02:00
Lea Anthony 00c6f0dfdb [v3 windows] Implement getScreen 2023-05-01 21:11:40 +10:00
Lea Anthony cf7b4e2458 [v3] Ensure impl calls from WebvieWindow are on the main thread. Support size. 2023-05-01 20:28:46 +10:00
Lea Anthony f682e44367 [v3] Fix examples 2023-05-01 18:24:24 +10:00
Lea Anthony 9d1f86c410 [v3] Update examples to use correct options. 2023-05-01 18:21:22 +10:00
Lea Anthony dac281ac32 [v3] Change WebviewWindow options to be a value, not a pointer. Support Un/Fullscreen. Remove main thread switching. Use parent options instead of local variables. 2023-05-01 18:20:28 +10:00
Lea Anthony 29a58086a3 [v3 Windows] Support application hide/show. Add WebviewWindow.IsVisible(). 2023-05-01 11:34:06 +10:00
Lea Anthony cb8eb755a7 [v3 Windows] Support setMin/MaxSize, setPosition 2023-05-01 10:52:46 +10:00
Lea Anthony 1e8fc29ee4 [v3 Windows] Add Support for SetTitle, Center, Un/Minimise/Maximise, IsMin/Maximised, IsNormal, Show/Hide 2023-04-30 20:55:51 +10:00
Lea Anthony 9a05b49e3d [v3 Breaking Change] Add NativeWindowHandle method to WebviewWindow. 2023-04-30 10:17:03 +10:00
Lea Anthony 79f8d92084 [v3 windows] Moved w32 from internal to pkg so it may be used by applications 2023-04-30 10:02:00 +10:00
Lea Anthony 6e56542586 [v3 windows] Add WndProcInterceptor for custom message processing 2023-04-30 09:49:50 +10:00
Lea Anthony c53443b62b [v3 windows] Rename options_windows.go -> options_win.go 2023-04-30 09:10:00 +10:00
Lea Anthony 1128662c89 [v3 windows] Add APM Events 2023-04-29 20:33:33 +10:00
Lea Anthony 676787417f [v3] Update application.On and window.On to return functions that unregister the listener. WebviewWindow.onApplicationEvent is a helper which will manage the unregistering for you on window destroy. 2023-04-29 19:39:05 +10:00
Lea Anthony 57422dccf3 [windows] Split out wndProc. Generate windows events, support per-window themes 2023-04-29 12:14:12 +10:00
Lea Anthony 7f3f51e36b [windows] Support AlwaysOnTop, EnableResize at runtime. Added Solid/Transparent/Translucent options. 2023-04-28 21:11:49 +10:00
stffabi ef184ec8bf [v3, windows] Add MainThread dispatching and fixes the blocking window 2023-04-26 21:06:54 +02:00
Lea Anthony 9bfe3094dd [windows] WIP 2023-04-26 21:07:04 +10:00
stffabi 3547b4d010 [v2, darwin] Add some missing default shortcuts (#2586)
* [v2, darwin] Add "Hide, Hide Others, Show All“ to appmenu

This also includes shortcuts support for those commands.
Arrange the menu items in the well known MacOS order.

* [v2, darwin] Add Window menu with well known shortcuts Minimize, Full-Screen and Zoom.
2023-04-26 21:07:04 +10:00
stffabi 1222e3aa1b [v2, dev] Use custom schemes for in-app dev mode (#2610)
This fixes some long-standing inconsistencies between
dev mode builds and production builds but is a breaking
change. Dev mode uses custom scheme for Vite versions >= 3.0.0
and for older it still behaves in the old way.
2023-04-26 21:07:03 +10:00
stffabi cff3ee5079 [assetServer] Improve release/close handling of webview requests (#2612) 2023-04-26 21:07:03 +10:00
Travis McLane c91aa462aa [darwin] add getPrimaryScreen/getScreens to impl (#2618) 2023-04-24 09:34:44 +10:00
Lea Anthony 62b3775e2f Fix module path for non-modified repo 2023-04-19 08:22:58 +10:00
Lea Anthony 54bf8c1142 [windows] Initial commit 2023-04-18 21:27:09 +10:00
Lea Anthony c4f613e4c5 [windows] Fix paths for wails init 2023-04-18 20:41:59 +10:00
Lea Anthony a66d9ab0b1 Intial STATUS.md commit 2023-04-18 18:53:39 +10:00
1227 changed files with 90625 additions and 6066 deletions
+120
View File
@@ -0,0 +1,120 @@
name: Build + Test v3 alpha
on:
push:
branches: [v3-alpha]
paths-ignore:
- 'mkdocs-website/**/*'
workflow_dispatch:
jobs:
test_go:
name: Run Go Tests
if: github.repository == 'wailsapp/wails'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
go-version: [1.21]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev build-essential pkg-config
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Run tests (mac)
if: matrix.os == 'macos-latest'
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
working-directory: ./v3
run: go test -v ./...
- name: Run tests (!mac)
if: matrix.os != 'macos-latest'
working-directory: ./v3
run: go test -v ./...
test_js:
name: Run JS Tests
if: github.repository == 'wailsapp/wails'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
working-directory: v2/internal/frontend/runtime
- name: Run tests
run: npm test
working-directory: v2/internal/frontend/runtime
test_templates:
name: Test Templates
needs: test_go
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
template:
[
svelte,
svelte-ts,
vue,
vue-ts,
react,
react-ts,
preact,
preact-ts,
lit,
lit-ts,
vanilla,
vanilla-ts,
]
go-version: [1.21]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Build Wails3 CLI
run: |
cd ./v3/cmd/wails3
go install
wails3 -help
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev build-essential pkg-config
- name: Generate template '${{ matrix.template }}'
run: |
go install github.com/go-task/task/v3/cmd/task@latest
mkdir -p ./test-${{ matrix.template }}
cd ./test-${{ matrix.template }}
wails3 init -n ${{ matrix.template }} -t ${{ matrix.template }}
cd ${{ matrix.template }}
wails3 build
@@ -1,33 +0,0 @@
name: Format Markdown Files
jobs:
format_markdown_files:
runs-on: ubuntu-latest
if: github.repository == 'wailsapp/wails'
steps:
- uses: actions/checkout@v3
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Format All Markdown Files
run: task format-all-md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "docs: format document"
title: "docs: format document"
body: "- [x] Format all Markdown(x) documents"
branch: chore/format-markdown-files
delete-branch: true
draft: false
+35
View File
@@ -0,0 +1,35 @@
name: v3 docs
on:
push:
branches:
- v3-alpha
paths:
- 'mkdocs-website/**/*'
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
defaults:
run:
working-directory: ./mkdocs-website
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: sudo apt-get install pngquant
- run: pip install pillow cairosvg
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
- run: mkdocs build --config-file mkdocs.insiders.yml
- run: mkdocs gh-deploy --force
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
+3
View File
@@ -36,3 +36,6 @@ v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
/v3/examples/build/bin/testapp
/websitev3/site/
/v3/examples/plugins/bin/testapp
# Temporary called mkdocs, should be renamed to more standard -website or similar
/mkdocs-website/site
+168
View File
@@ -0,0 +1,168 @@
<p align="center" style="text-align: center">
<img src="./assets/images/logo-universal.png" width="55%"><br/>
</p>
<p align="center">
Construye aplicaciones de escritorio usando Go y tecnologías web.
<br/>
<br/>
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
</a>
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
</a>
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
</a>
<a href="https://github.com/wailsapp/wails/issues">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
</a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
</a>
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
</a>
<a href="https://discord.gg/BrRSWTaxVK">
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
</a>
<br/>
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
</a>
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
</a>
</p>
<div align="center">
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
[Русский](README.ru.md)
</samp>
</strong>
</div>
## Tabla de Contenidos
- [Tabla de Contenidos](#tabla-de-contenidos)
- [Introducción](#introducción)
- [Funcionalidades](#funcionalidades)
- [Plan de Trabajo](#plan-de-trabajo)
- [Empezando](#empezando)
- [Patrocinadores](#patrocinadores)
- [Preguntas Frecuentes](#preguntas-frecuentes)
- [Estrellas a lo Largo del Tiempo](#estrellas-a-lo-largo-del-tiempo)
- [Colaboradores](#colaboradores)
- [Licencia](#licencia)
- [Inspiración](#inspiración)
## Introducción
El método tradicional para proveer una interfaz web en programas hechos con Go
es a través del servidor web incorporado. Wails ofrece un enfoque diferente al
permitir combinar el código hecho en Go con un frontend web en un solo archivo
binario. Las herramientas que proporcionamos facilitan este trabajo para ti, al
crear, compilar y empaquetar tu proyecto. ¡Lo único que debes hacer es ponerte
creativo!
## Funcionalidades
- Utiliza Go estándar para el backend
- Utiliza cualquier tecnología frontend con la que ya estés familiarizado para
construir tu interfaz de usuario
- Crea rápidamente interfaces de usuario enriquecidas para tus programas en Go
utilizando plantillas predefinidas
- Invoca fácilmente métodos de Go desde Javascript
- Definiciones de Typescript generadas automáticamente para tus structs y
métodos de Go
- Diálogos y menús nativos
- Soporte nativo de modo oscuro / claro
- Soporte de translucidez y efectos de ventana esmerilada
- Sistema de eventos unificado entre Go y Javascript
- Herramienta CLI potente para generar y construir tus proyectos rápidamente
- Multiplataforma
- Usa motores de renderizado nativos - ¡_sin navegador integrado_!
### Plan de Trabajo
El plan de trabajo se puede encontrar
[aqui](https://github.com/wailsapp/wails/discussions/1484). Por favor,
consúltalo antes de abrir una solicitud de mejora.
## Empezando
Las instrucciones de instalacion se encuentran en nuestra
[pagina web oficial](https://wails.io/docs/gettingstarted/installation).
## Patrocinadores
Este Proyecto cuenta con el apoyo de estas amables personas/ compañías:
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
<p align="center">
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
</p>
## Preguntas Frecuentes
- ¿Es esta una alternativa a Electron?
Depende de tus requisitos. Está diseñado para facilitar a los programadores de
Go la creación de aplicaciones de escritorio livianas o agregar una interfaz
gráfica a sus aplicaciones existentes. Wails ofrece elementos nativos como
menús y diálogos, por lo que podría considerarse una alternativa liviana a
Electron.
- ¿A quien esta dirigido este proyecto?
El proyecto esta dirigido a programadores de Go que desean integrar una
interfaz HMTL/JS/CSS en sus aplicaciones, sin tener que recurrir a la creación
de un servidor y abrir el navegador para visualizarla.
- ¿Cual es el significado del nombre?
Cuando vi WebView, pensé: "Lo que realmente quiero es una herramienta para
construir una aplicación WebView, algo similar a lo que Rails es para Ruby".
Así que inicialmente fue un juego de palabras (WebView en Rails). Además, por
casualidad, también es homófono del nombre en inglés del
[país](https://en.wikipedia.org/wiki/Wales) del que provengo. Así que se quedó
con ese nombre.
## Estrellas a lo Largo del Tiempo
[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
## Colaboradores
¡La lista de colaboradores se está volviendo demasiado grande para el archivo
readme! Todas las personas increíbles que han contribuido a este proyecto tienen
su propia página [aqui](https://wails.io/credits#contributors).
## Licencia
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
## Inspiración
Este proyecto fue construido mientras se escuchaban estos álbumes:
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
[Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
+3 -1
View File
@@ -42,7 +42,9 @@
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
[Русский](README.ru.md)
</samp>
</strong>
+3 -1
View File
@@ -42,7 +42,9 @@
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
[Русский](README.ru.md)
</samp>
</strong>
+3 -1
View File
@@ -40,7 +40,9 @@
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
[Русский](README.ru.md)
</samp>
</strong>
+150
View File
@@ -0,0 +1,150 @@
<p align="center" style="text-align: center">
<img src="./assets/images/logo-universal.png" width="55%"><br/>
</p>
<p align="center">
Crie aplicativos de desktop usando Go e tecnologias Web.
<br/>
<br/>
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
</a>
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
</a>
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
</a>
<a href="https://github.com/wailsapp/wails/issues">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
</a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
</a>
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
</a>
<a href="https://discord.gg/BrRSWTaxVK">
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
</a>
<br/>
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
</a>
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
</a>
</p>
<div align="center">
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md)
</samp>
</strong>
</div>
## Índice
- [Índice](#índice)
- [Introdução](#introdução)
- [Recursos e funcionalidades](#recursos-e-funcionalidades)
- [Plano de trabalho](#plano-de-trabalho)
- [Iniciando](#iniciando)
- [Patrocinadores](#patrocinadores)
- [Perguntas frequentes](#perguntas-frequentes)
- [Estrelas ao longo do tempo](#estrelas-ao-longo-do-tempo)
- [Colaboradores](#colaboradores)
- [Licença](#licença)
- [Inspiração](#inspiração)
## Introdução
O método tradicional de fornecer interfaces da Web para programas Go é por meio de um servidor da Web integrado. Wails oferece uma
abordagem: fornece a capacidade de agrupar o código Go e um front-end da Web em um único binário. As ferramentas são fornecidas para
que torne isso mais fácil para você lidando com a criação, compilação e agrupamento de projetos. Tudo o que você precisa fazer é ser criativo!
## Recursos e funcionalidades
- Use Go padrão para o back-end
- Use qualquer tecnologia de front-end com a qual você já esteja familiarizado para criar sua interface do usuário
- Crie rapidamente um front-end avançado para seus programas Go usando modelos pré-construídos
- Chame facilmente métodos Go com JavaScript
- Definições TypeScript geradas automaticamente para suas estruturas e métodos Go
- Diálogos e menus nativos
- Suporte nativo ao modo escuro/claro
- Suporta translucidez moderna e efeitos de "janela fosca"
- Sistema de eventos unificado entre Go e JavaScript
- Poderosa ferramenta cli para gerar e construir rapidamente seus projetos
- Multiplataforma
- Usa mecanismos de renderização nativos - _sem navegador incorporado_!
### Plano de trabalho
O plano de trabalho do projeto pode ser encontrado [aqui](https://github.com/wailsapp/wails/discussions/1484). Por favor consulte
isso antes de abrir um pedido de melhoria.
## Iniciando
As instruções de instalação estão no [site oficial](https://wails.io/docs/gettingstarted/installation).
## Patrocinadores
Este projeto é apoiado por estas simpáticas pessoas/empresas:
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
<p align="center">
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
</p>
## Perguntas frequentes
- Esta é uma alternativa ao Electron?
Depende de seus requisitos. Ele foi projetado para tornar mais fácil para os programadores Go criar aplicações desktop
e adicionar um front-end aos seus aplicativos existentes. O Wails oferece elementos nativos, como menus
e diálogos, por isso pode ser considerada uma alternativa leve, se comparado ao Electron.
- A quem se destina este projeto?
Programadores Go que desejam agrupar um front-end HTML/JS/CSS com seus aplicativos, sem recorrer à criação de um
servidor e abrir um navegador para visualizá-lo.
- Qual é o significado do nome?
Quando vi o WebView, pensei "O que eu realmente quero é ferramentas para construir um aplicativo WebView, algo semelhante ao que Rails é para Ruby". Portanto, inicialmente era um jogo de palavras (WebView on Rails). Por acaso, também era um homófono do
Nome em inglês para o [país](https://en.wikipedia.org/wiki/Wales) de onde eu sou. Então ficou com esse nome.
## Estrelas ao longo do tempo
[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
## Colaboradores
A lista de colaboradores está ficando grande demais para o arquivo readme! Todas as pessoas incríveis que contribuíram para o
projeto tem sua própria página [aqui](https://wails.io/credits#contributors).
## Licença
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
## Inspiração
Este projeto foi construído ouvindo esses álbuns:
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
+153
View File
@@ -0,0 +1,153 @@
<p align="center" style="text-align: center">
<img src="./assets/images/logo-universal.png" width="55%"><br/>
</p>
<p align="center">
Собирайте Desktop приложения используя Go и Web технологии
<br/>
<br/>
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
</a>
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
</a>
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
</a>
<a href="https://github.com/wailsapp/wails/issues">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
</a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
</a>
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
</a>
<a href="https://discord.gg/BrRSWTaxVK">
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
</a>
<br/>
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
</a>
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
</a>
</p>
<div align="center">
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
[한국어](README.ko.md) · [Español](README.es.md) · [Русский](README.ru.md)
</samp>
</strong>
</div>
## Содержание
- [Содержание](#содержание)
- [Вступление](#вступление)
- [Особенности](#особенности)
- [Roadmap](#roadmap)
- [Быстрый старт](#быстрый-старт)
- [Спонсоры](#спонсоры)
- [FAQ](#faq)
- [График звёздочек](#график-звёздочек-репозитория-относительно-времени)
- [Контребьюторы](#контребьюторы)
- [Лицензия](#лицензия)
- [Вдохновение](#вдохновение)
## Вступление
Обычно, веб-интерфейсы для программ Go - это встроенный веб-сервер и веб-браузер.
У Walls другой подход: он оборачивает как код Go, так и веб-интерфейс в один бинарник (EXE файл).
Облегчает вам создание вашего приложения, управляя созданием, компиляцией и объединением проектов.
Все ограничивается лишь вашей фантазией!
## Особенности
- Использование Go для backend
- Поддержка любой frontend технологии, с которой вы уже знакомы для создания вашего UI
- Быстрое создание frontend для ваших программ, используя готовые шаблоны
- Очень лёгкий вызов функция Go из JavaScript
- Автогене рация TypeScript типов для Go структур и функций
- Нативные диалоги и меню
- Нативная поддержка тёмной и светлой темы
- Поддержка современной прозрачности и эффекта "матового окна"
- Единая система Эвентов для Go и JavaScript
- Мощный CLI для быстрого создания ваших проектов
- Мультиплатформенность
- Использование нативного движка рендеринга - нет встроенному браузеру!
### Roadmap
Roadmap проекта вы можете найти [здесь](https://github.com/wailsapp/wails/discussions/1484).
Пожалуйста, проконсультируйтесь перед предложением улучшения.
## Быстрый старт
Инструкции по установке находятся на [официальном сайте](https://wails.io/docs/gettingstarted/installation).
## Спонсоры
Проект поддерживается этими добрыми людьми / компаниями:
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
<p align="center">
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
</p>
## FAQ
- Это альтернатива Electron?
Зависит от ваших требований. Wails разработан для легкого создания Desktop приложений или расширения интерфейсной
части к своим существующим приложениям программистам Go. Wails действительно предлагает встроенные элементы, такие как
меню и диалоги, так что его можно считать облегченной альтернативой Electron.
- Для кого нацелен этот проект?
Для Golang программистов, которые хотят создавать приложение используя HTML JS и CSS, без создания Web сервера и
открытия браузера для его просмотра.
- Что это за название?
Когда я увидел WebView, я подумал: "Что мне действительно нужно, так это инструменты для создания приложения WebView,
немного похожие на Rails для Ruby". Итак, изначально это была игра слов (Webview on Rails). Просто так получилось, что
это также омофон английского названия для [Страны](https://en.wikipedia.org/wiki/Wales) от куда я родом. Так что это
прижилось.
## График звёздочек репозитория, относительно времени
[![График звёзд](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
## Контребьюторы
Список участников слишком большой для README! У всех замечательных людей, которые внесли свой вклад в этот
проект, есть своя [страничка](https://wails.io/credits#contributors).
## Лицензия
[![Статус FOSSA](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
## Вдохновение
Этот проект был создан, в основном, под эти альбомы:
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
+4 -2
View File
@@ -42,7 +42,9 @@
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
[Русский](README.ru.md)
</samp>
</strong>
@@ -87,7 +89,7 @@
## 快速入门
使用说明在 [官网](https://wails.io/docs/gettingstarted/installation)。
使用说明在 [官网](https://wails.io/zh-Hans/docs/gettingstarted/installation/)。
## 赞助商
+5
View File
@@ -16,6 +16,11 @@ includes:
dir: v3
optional: true
docs:
taskfile: mkdocs-website
dir: mkdocs-website
optional: true
tasks:
contributors:check:
cmds:
+45
View File
@@ -0,0 +1,45 @@
# v3 Docs
This is the documentation for Wails v3. It is currently a work in progress.
If you do not wish to build it locally, it is available online at
[https://wailsapp.github.io/wails/](https://wailsapp.github.io/wails/).
## Recommended Setup Steps
Install the wails3 CLI if you haven't already:
```shell
go install github.com/wailsapp/wails/v3/cmd/wails3@latest
```
The documentation uses mkdocs, so you will need to install
[Python](https://www.python.org/). Once installed, you can setup the
documentation by running the following command:
```bash
wails3 task docs:setup
```
This will install the required dependencies for you.
If you have installed the wails3 CLI, you can run the following command to build
the documentation and serve it locally:
```bash
wails3 task docs:serve
```
### Manual Setup
To install manually, you will need to do the following:
- Install [Python](https://www.python.org/)
- Run `pip install -r requirements.txt` to install the required dependencies
- Run `mkdocs serve` to serve the documentation locally
- Run `mkdocs build` to build the documentation
## Contributing
If you would like to contribute to the documentation, please feel free to open a
PR!
+59
View File
@@ -0,0 +1,59 @@
# https://taskfile.dev
version: '3'
tasks:
setup:
summary: Setup the project
preconditions:
- sh: python{{exeExt}} --version
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
cmds:
- python -m pip install -r requirements.txt --user
setup:insiders:
summary: Setup the project (insiders)
preconditions:
- sh: python{{exeExt}} --version
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
cmds:
- python -m pip install -r requirements.insiders.txt --user
upgrade:insiders:
summary: Upgrade the project (insiders)
preconditions:
- sh: python{{exeExt}} --version
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
cmds:
- python -m pip install -r requirements.insiders.txt --upgrade --user
build:
summary: Builds the documentation
preconditions:
- sh: mkdocs --version
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
cmds:
- mkdocs build
serve:
summary: Builds the documentation and serves it locally
preconditions:
- sh: mkdocs --version
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
cmds:
- mkdocs serve
serve:insiders:
summary: Builds the documentation and serves it locally
preconditions:
- sh: mkdocs --version
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
cmds:
- mkdocs serve --config-file mkdocs.insiders.yml
update:api:
summary: Updates the API documentation
dir: generate
cmds:
- go run .
+359
View File
@@ -0,0 +1,359 @@
# Application
The application API assists in creating an application using the Wails
framework.
### New
API: `New(appOptions Options) *App`
`New(appOptions Options)` creates a new application using the given application
options . It applies default values for unspecified options, merges them with
the provided ones, initializes and returns an instance of the application.
In case of an error during initialization, the application is stopped with the
error message provided.
It should be noted that if a global application instance already exists, that
instance will be returned instead of creating a new one.
```go title="main.go" hl_lines="6-9"
package main
import "github.com/wailsapp/wails/v3/pkg/application"
func main() {
app := application.New(application.Options{
Name: "WebviewWindow Demo",
// Other options
})
// Rest of application
}
```
### Get
`Get()` returns the global application instance. It's useful when you need to
access the application from different parts of your code.
```go
// Get the application instance
app := application.Get()
```
### Capabilities
API: `Capabilities() capabilities.Capabilities`
`Capabilities()` retrieves a map of capabilities that the application currently
has. Capabilities can be about different features the operating system provides,
like webview features.
```go
// Get the application capabilities
capabilities := app.Capabilities()
if capabilities.HasNativeDrag {
// Do something
}
```
### GetPID
API: `GetPID() int`
`GetPID()` returns the Process ID of the application.
```go
pid := app.GetPID()
```
### Run
API: `Run() error`
`Run()` starts the execution of the application and its components.
```go
app := application.New(application.Options{
//options
})
// Run the application
err := application.Run()
if err != nil {
// Handle error
}
```
### Quit
API: `Quit()`
`Quit()` quits the application by destroying windows and potentially other
components.
```go
// Quit the application
app.Quit()
```
### IsDarkMode
API: `IsDarkMode() bool`
`IsDarkMode()` checks if the application is running in dark mode. It returns a
boolean indicating whether dark mode is enabled.
```go
// Check if dark mode is enabled
if app.IsDarkMode() {
// Do something
}
```
### Hide
API: `Hide()`
`Hide()` hides the application window.
```go
// Hide the application window
app.Hide()
```
### Show
API: `Show()`
`Show()` shows the application window.
```go
// Show the application window
app.Show()
```
### NewWebviewWindow
API: `NewWebviewWindow() *WebviewWindow`
`NewWebviewWindow()` creates a new Webview window with default options, and
returns it.
```go
// Create a new webview window
window := app.NewWebviewWindow()
```
### NewWebviewWindowWithOptions
API:
`NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) *WebviewWindow`
`NewWebviewWindowWithOptions()` creates a new webview window with custom
options. The newly created window is added to a map of windows managed by the
application.
```go
// Create a new webview window with custom options
window := app.NewWebviewWindowWithOptions(WebviewWindowOptions{
Name: "Main",
Title: "My Window",
Width: 800,
Height: 600,
})
```
### OnWindowCreation
API: `OnWindowCreation(callback func(window *WebviewWindow))`
`OnWindowCreation()` registers a callback function to be called when a window is
created.
```go
// Register a callback to be called when a window is created
app.OnWindowCreation(func(window *WebviewWindow) {
// Do something
})
```
### GetWindowByName
API: `GetWindowByName(name string) *WebviewWindow`
`GetWindowByName()` fetches and returns a window with a specific name.
```go
// Get a window by name
window := app.GetWindowByName("Main")
```
### CurrentWindow
API: `CurrentWindow() *WebviewWindow`
`CurrentWindow()` fetches and returns a pointer to the currently active window
in the application. If there is no window, it returns nil.
```go
// Get the current window
window := app.CurrentWindow()
```
### RegisterContextMenu
API: `RegisterContextMenu(name string, menu *Menu)`
`RegisterContextMenu()` registers a context menu with a given name. This menu
can be used later in the application.
```go
// Create a new menu
ctxmenu := app.NewMenu()
// Register the menu as a context menu
app.RegisterContextMenu("MyContextMenu", ctxmenu)
```
### SetMenu
API: `SetMenu(menu *Menu)`
`SetMenu()` sets the menu for the application. On Mac, this will be the global
menu. For Windows and Linux, this will be the default menu for any new window
created.
```go
// Create a new menu
menu := app.NewMenu()
// Set the menu for the application
app.SetMenu(menu)
```
### ShowAboutDialog
API: `ShowAboutDialog()`
`ShowAboutDialog()` shows an "About" dialog box. It can show the application's
name, description and icon.
```go
// Show the about dialog
app.ShowAboutDialog()
```
### Info
API: `InfoDialog()`
`InfoDialog()` creates and returns a new instance of `MessageDialog` with an
`InfoDialogType`. This dialog is typically used to display informational
messages to the user.
### Question
API: `QuestionDialog()`
`QuestionDialog()` creates and returns a new instance of `MessageDialog` with a
`QuestionDialogType`. This dialog is often used to ask a question to the user
and expect a response.
### Warning
API: `WarningDialog()`
`WarningDialog()` creates and returns a new instance of `MessageDialog` with a
`WarningDialogType`. As the name suggests, this dialog is primarily used to
display warning messages to the user.
### Error
API: `ErrorDialog()`
`ErrorDialog()` creates and returns a new instance of `MessageDialog` with an
`ErrorDialogType`. This dialog is designed to be used when you need to display
an error message to the user.
### OpenFile
API: `OpenFileDialog()`
`OpenFileDialog()` creates and returns a new `OpenFileDialogStruct`. This dialog
prompts the user to select one or more files from their file system.
### SaveFile
API: `SaveFileDialog()`
`SaveFileDialog()` creates and returns a new `SaveFileDialogStruct`. This dialog
prompts the user to choose a location on their file system where a file should
be saved.
### OpenDirectory
API: `OpenDirectoryDialog()`
`OpenDirectoryDialog()` creates and returns a new instance of `MessageDialog`
with an `OpenDirectoryDialogType`. This dialog enables the user to choose a
directory from their file system.
### On
API:
`On(eventType events.ApplicationEventType, callback func(event *Event)) func()`
`On()` registers an event listener for specific application events. The callback
function provided will be triggered when the corresponding event occurs. The
function returns a function that can be called to remove the listener.
### RegisterHook
API:
`RegisterHook(eventType events.ApplicationEventType, callback func(event *Event)) func()`
`RegisterHook()` registers a callback to be run as a hook during specific
events. These hooks are run before listeners attached with `On()`. The function
returns a function that can be called to remove the hook.
### GetPrimaryScreen
API: `GetPrimaryScreen() (*Screen, error)`
`GetPrimaryScreen()` returns the primary screen of the system.
### GetScreens
API: `GetScreens() ([]*Screen, error)`
`GetScreens()` returns information about all screens attached to the system.
This is a brief summary of the exported methods in the provided `App` struct. Do
note that for more detailed functionality or considerations, refer to the actual
Go code or further internal documentation.
## Options
```go title="application_options.go"
--8<--
../v3/pkg/application/options_application.go
--8<--
```
### Windows Options
```go title="application_options_windows.go"
--8<--
../v3/pkg/application/options_application_win.go
--8<--
```
### Mac Options
```go title="options_application_mac.go"
--8<--
../v3/pkg/application/options_application_mac.go
--8<--
```
File diff suppressed because it is too large Load Diff
+50
View File
@@ -0,0 +1,50 @@
# Main Thread Functions
These methods are utility functions to run code on the main thread. This is
required when you want to run custom code on the UI thread.
### InvokeSync
API: `InvokeSync(fn func())`
This function runs the passed function (`fn`) synchronously. It uses a WaitGroup
(`wg`) to ensure that the main thread waits for the `fn` function to finish
before it continues. If a panic occurs inside `fn`, it will be passed to the
handler function `PanicHandler`, defined in the application options.
### InvokeSyncWithResult
API: `InvokeSyncWithResult[T any](fn func() T) (res T)`
This function works similarly to `InvokeSync(fn func())`, however, it yields a
result. Use this for calling any function with a single return.
### InvokeSyncWithError
API: `InvokeSyncWithError(fn func() error) (err error)`
This function runs `fn` synchronously and returns any error that `fn` produces.
Note that this function will recover from a panic if one occurs during `fn`'s
execution.
### InvokeSyncWithResultAndError
API:
`InvokeSyncWithResultAndError[T any](fn func() (T, error)) (res T, err error)`
This function runs `fn` synchronously and returns both a result of type `T` and
an error.
### InvokeAsync
API: `InvokeAsync(fn func())`
This function runs `fn` asynchronously. It runs the given function on the main
thread. If a panic occurs inside `fn`, it will be passed to the handler function
`PanicHandler`, defined in the application options.
---
_Note_: These functions will block execution until `fn` has finished. It's
critical to ensure that `fn` doesn't block. If you need to run a function that
blocks, use `InvokeAsync` instead.
+69
View File
@@ -0,0 +1,69 @@
# Menu
Menus can be created and added to the application. They can be used to create
context menus, system tray menus and application menus.
To create a new menu, call:
```go
// Create a new menu
menu := app.NewMenu()
```
The following operations are then available on the `Menu` type:
### Add
API: `Add(label string) *MenuItem`
This method takes a `label` of type `string` as an input and adds a new
`MenuItem` with the given label to the menu. It returns the `MenuItem` added.
### AddSeparator
API: `AddSeparator()`
This method adds a new separator `MenuItem` to the menu.
### AddCheckbox
API: `AddCheckbox(label string, enabled bool) *MenuItem`
This method takes a `label` of type `string` and `enabled` of type `bool` as
inputs and adds a new checkbox `MenuItem` with the given label and enabled state
to the menu. It returns the `MenuItem` added.
### AddRadio
API: `AddRadio(label string, enabled bool) *MenuItem`
This method takes a `label` of type `string` and `enabled` of type `bool` as
inputs and adds a new radio `MenuItem` with the given label and enabled state to
the menu. It returns the `MenuItem` added.
### Update
API: `Update()`
This method processes any radio groups and updates the menu if a menu
implementation is not initialized.
### AddSubmenu
API: `AddSubmenu(s string) *Menu`
This method takes a `s` of type `string` as input and adds a new submenu
`MenuItem` with the given label to the menu. It returns the submenu added.
### AddRole
API: `AddRole(role Role) *Menu`
This method takes `role` of type `Role` as input, adds it to the menu if it is
not `nil` and returns the `Menu`.
### SetLabel
API: `SetLabel(label string)`
This method sets the `label` of the `Menu`.
+112
View File
@@ -0,0 +1,112 @@
# System Tray
The system tray houses notification area on a desktop environment, which can
contain both icons of currently-running applications and specific system
notifications.
You create a system tray by calling `app.NewSystemTray()`:
```go
// Create a new system tray
tray := app.NewSystemTray()
```
The following methods are available on the `SystemTray` type:
### SetLabel
API: `SetLabel(label string)`
The `SetLabel` method sets the tray's label.
### Label
API: `Label() string`
The `Label` method retrieves the tray's label.
### PositionWindow
API: `PositionWindow(*WebviewWindow, offset int) error`
The `PositionWindow` method calls both `AttachWindow` and `WindowOffset`
methods.
### SetIcon
API: `SetIcon(icon []byte) *SystemTray`
The `SetIcon` method sets the system tray's icon.
### SetDarkModeIcon
API: `SetDarkModeIcon(icon []byte) *SystemTray`
The `SetDarkModeIcon` method sets the system tray's icon when in dark mode.
### SetMenu
API: `SetMenu(menu *Menu) *SystemTray`
The `SetMenu` method sets the system tray's menu.
### Destroy
API: `Destroy()`
The `Destroy` method destroys the system tray instance.
### OnClick
API: `OnClick(handler func()) *SystemTray`
The `OnClick` method sets the function to execute when the tray icon is clicked.
### OnRightClick
API: `OnRightClick(handler func()) *SystemTray`
The `OnRightClick` method sets the function to execute when right-clicking the
tray icon.
### OnDoubleClick
API: `OnDoubleClick(handler func()) *SystemTray`
The `OnDoubleClick` method sets the function to execute when double-clicking the
tray icon.
### OnRightDoubleClick
API: `OnRightDoubleClick(handler func()) *SystemTray`
The `OnRightDoubleClick` method sets the function to execute when right
double-clicking the tray icon.
### AttachWindow
API: `AttachWindow(window *WebviewWindow) *SystemTray`
The `AttachWindow` method attaches a window to the system tray. The window will
be shown when the system tray icon is clicked.
### WindowOffset
API: `WindowOffset(offset int) *SystemTray`
The `WindowOffset` method sets the gap in pixels between the system tray and the
window.
### WindowDebounce
API: `WindowDebounce(debounce time.Duration) *SystemTray`
The `WindowDebounce` method sets a debounce time. In the context of Windows,
this is used to specify how long to wait before responding to a mouse up event
on the notification icon.
### OpenMenu
API: `OpenMenu()`
The `OpenMenu` method opens the menu associated with the system tray.
+114
View File
@@ -0,0 +1,114 @@
# Window
To create a window, use
[Application.NewWebviewWindow](application.md#newwebviewwindow) or
[Application.NewWebviewWindowWithOptions](application.md#newwebviewwindowwithoptions).
The former creates a window with default options, while the latter allows you to
specify custom options.
These methods are callable on the returned WebviewWindow object:
### SetTitle
API: `SetTitle(title string) *WebviewWindow`
This method updates the window title to the provided string. It returns the
WebviewWindow object, allowing for method chaining.
### Name
API: `Name() string`
This function returns the name of the WebviewWindow.
### SetSize
API: `SetSize(width, height int) *WebviewWindow`
This method sets the size of the WebviewWindow to the provided width and height
parameters. If the dimensions provided exceed the constraints, they are adjusted
appropriately.
### SetAlwaysOnTop
API: `SetAlwaysOnTop(b bool) *WebviewWindow`
This function sets the window to stay on top based on the boolean flag provided.
### Show
API: `Show() *WebviewWindow`
`Show` method is used to make the window visible. If the window is not running,
it first invokes the `run` method to start the window and then makes it visible.
### Hide
API: `Hide() *WebviewWindow`
`Hide` method is used to hide the window. It sets the hidden status of the
window to true and emits the window hide event.
### SetURL
API: `SetURL(s string) *WebviewWindow`
`SetURL` method is used to set the URL of the window to the given URL string.
### SetZoom
API: `SetZoom(magnification float64) *WebviewWindow`
`SetZoom` method sets the zoom level of the window content to the provided
magnification level.
### GetZoom
API: `GetZoom() float64`
`GetZoom` function returns the current zoom level of the window content.
### GetScreen
API: `GetScreen() (*Screen, error)`
`GetScreen` method returns the screen on which the window is displayed.
#### SetFrameless
API: `SetFrameless(frameless bool) *WebviewWindow`
This function is used to remove the window frame and title bar. It toggles the
framelessness of the window according to the boolean value provided (true for
frameless, false for framed).
#### RegisterContextMenu
API: `RegisterContextMenu(name string, menu *Menu)`
This function is used to register a context menu and assigns it the given name.
#### NativeWindowHandle
API: `NativeWindowHandle() (uintptr, error)`
This function is used to fetch the platform native window handle for the window.
#### Focus
API: `Focus()`
This function is used to focus the window.
#### SetEnabled
API: `SetEnabled(enabled bool)`
This function is used to enable/disable the window based on the provided boolean
value.
#### SetAbsolutePosition
API: `SetAbsolutePosition(x int, y int)`
This function sets the absolute position of the window in the screen.

Some files were not shown because too many files have changed in this diff Show More