5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 21:12:11 +08:00
Commit Graph

1042 Commits

Author SHA1 Message Date
Atterpac
94e8f8b8d7
[V3 Runtime] Ensure JS package has parity with various node versions (#3821)
node runtime parity
2024-10-13 18:06:06 +11:00
Atterpac
fc6f6bde1d
[V3] setURL bug fix (#3533)
setURL bug fix

s

s

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-10-10 19:45:07 +11:00
Atterpac
f16d1be955
[V3 Linux] Fix Keybind remit (#3797)
debounce linux keypress events  remits if held past a certain value
2024-10-02 08:21:14 +10:00
Etesam
77b8132591
Updated Id type to ID for Screen (#3779)
* 🏷️ Updated `Id` type to `ID` for `Screen`

* 📝 Updated changelog
2024-09-27 15:26:33 +10:00
Lea Anthony
df091f02ef [mac] fix rogue brace 2024-09-23 20:36:58 +10:00
Mohamed Gharib
efe0c8d534
[v3-Windows] New DIP system for Enhanced High DPI Monitor Support (#3665)
* [v3-Windows] New DIP system for Enhanced High DPI Monitor Support

* Update changelog

* Remove asset middleware

* Remove SetThreadDpiAwarenessContext()

* Fix macOS build.

* Fill missing screens fields (linux, darwin)

* Skip DPI transformation on unsupported platforms

* Simplify distanceFromRectSquared()

* Update v3/pkg/application/screenmanager.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-09-22 08:38:30 +10:00
Lea Anthony
d5a6d7719c
Update to go-webview2 v1.0.16 2024-09-22 08:12:02 +10:00
Lea Anthony
5367d056e2
Taskfile Refactor (#3748)
* Refactor taskfile

* Fix escaping

* Fix event error

* Fix dev mode

* Fixes for Windows

* Add docs. Improve docs build system

* Update v3/internal/commands/build_assets/Taskfile.darwin.yml

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update v3/internal/commands/build_assets/Taskfile.linux.yml

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Improve docs

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-09-21 20:49:25 +10:00
Lea Anthony
9bb5c4f64a
v3.0.0-alpha.7 2024-09-18 21:45:56 +10:00
Lea Anthony
cfdd612c8d
Fix linux build 2024-09-18 21:43:22 +10:00
Lea Anthony
40076c6246
Fix linux build 2024-09-18 06:23:53 +10:00
Lea Anthony
5670a4d7e7
Fix build 2024-09-18 06:07:59 +10:00
Lea Anthony
4386f5fcb2
# Conflicts:
#	mkdocs-website/docs/en/changelog.md
2024-09-18 05:55:49 +10:00
Lea O'Anthony
2c55110776
Improved menus.
Fixed warning on windows quit.
2024-09-17 21:19:00 +10:00
Etesam
b30cea0de0
[V3] fix drag n drop example not running (#3742)
* Replaced customEventProcessor with EmitEvent

* 📝 Added bug fix entry to changelog
2024-09-13 05:41:06 +10:00
Lea O'Anthony
6787ce9c40
Significant updates to mac menu items. More roles. More fixes to come. 2024-09-12 20:51:07 +10:00
Lea Anthony
ef8c886b10
Ignore internal service methods when binding (#3720)
* Ignore internal service methods when binding

* Updated changelog.md
2024-09-09 08:36:19 +10:00
Gabriel Lima
5481f3a684
[linux] fix: update for new events syntax (#3734)
Changed uses of deprecated `.On` to the current standard.
2024-09-08 20:22:42 +10:00
Lea Anthony
7fafee8a6c [mac] events updates 2024-09-08 20:14:45 +10:00
Lea Anthony
5cde12b42a
Refactored Events (#3731)
Experimental rename
2024-09-07 16:39:02 +10:00
Atterpac
5004aac259
[V3] Refactor linux ignore mouse events (#3721)
refactor linux ignore mouse events

changelog.md
2024-09-06 08:10:05 +10:00
DeltaLaboratory
2460b570fe
retry when shellnotifyicon fails (#3710)
* add retry mechanism for create shell notification icon

* add retry mechanism for create shell notification icon

* adjust delay and attempts

* added changelog

* Use application fatal handler instead of panic

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-09-02 19:33:17 +10:00
Atterpac
e316cd0719
[V3] Plugins implemenations (#3570)
* plugin handler and lifecycle

* rebase

* remove reflect

s

* remove Config and NewPlugin from plugin template

* Remove plugin manager, generation of plugin interface

* implement http handlers for services

remove log

trim path

prefix wails/services

* update plugine example

* Misc updates

* Ported plugins to services, rewritten example

* Added fileserver

* Update OnStartup and use a context for the application

* Rename PathPrefix to Route. Create docs.

* Use service config copy. Add Name to Service Options. Improve service generation.

* Use service config copy. Add Name to Service Options. Improve service generation. Update README

* Remove rogue db

* Update changelog.md

---------

Co-authored-by: Lea O'Anthony <lea.anthony@gmail.com>
2024-09-01 17:26:22 +10:00
Lea O'Anthony
60c9d1a070
More syscall fixes 2024-08-29 06:49:17 +10:00
Lea O'Anthony
46d7f399ff
windows dialog fixes 2024-08-28 07:07:16 +10:00
stendler
88c9017fdc
[v3,linux] fix: enable to run natively in wayland (#3614)
fix: enable to run natively in wayland

Incorporated from this v2 change:
https://github.com/wailsapp/wails/pull/1811
2024-08-25 21:39:22 +10:00
Windom
46dbbb3b84
[v3] Make Windows window class configurable (#3682) 2024-08-20 18:20:44 +10:00
Oleg Gulevskyy
b756bce67f
Set MacOS window levels (NSWindow) (#3674)
* set nswindow levels via mac options

* add changelog description

* update changelog to conform with others
2024-08-20 18:06:45 +10:00
bruxaodev
1ed6966cbe
Fix: Ensure Window Frame is Applied on First Call in setFrameless Function (#3691)
* fix: force update window frame

* Update changelog.md
2024-08-20 18:01:31 +10:00
bruxaodev
fbcce0b20c
[windows] Add support for click-through overlay window (#3667)
* [windows] Add support for click-through overlay window

* update changelog

* setIgnoreMouseEvents - exemple

* fix - remove unused import

* Add macOS+Linux support. Update example.

* Fix SetIgnoreMouseEvents before window created.

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-08-18 20:50:22 +10:00
Lea O'Anthony
96b97b25bf
Fix syso generation bug 2024-08-16 21:09:40 +10:00
Atterpac
cfab21bc81
fix syso icon generation (#3675)
update changelog.md
2024-08-10 07:26:37 +10:00
Lea O'Anthony
d405bd48f0
Fix tests for Windows 2024-08-05 05:22:00 +10:00
Lea Anthony
1cba1416a1 Fix tests 2024-08-04 21:28:15 +10:00
Lea Anthony
cd3b561623 Fix errors with raising errors! 2024-08-04 19:19:40 +10:00
Lea O'Anthony
5a61e1007f
Fix module dependencies 2024-07-30 22:10:44 +10:00
Lea O'Anthony
c88f02c5a5
Add build info tool 2024-07-30 22:03:01 +10:00
Lea Anthony
212f5c7270
Clean up footer 2024-07-30 07:57:25 +10:00
Atterpac
7941f00c35
https flag for dev mode (#3603) 2024-07-29 20:46:44 +10:00
Atterpac
76da9e55c9
Add fatalHandler() stubs to fix non-windows builds (#3642) 2024-07-29 19:32:15 +10:00
Lea Anthony
086c7ae32d
Add error handler. Use latest go-webview2. 2024-07-28 20:49:08 +10:00
Lea Anthony
d61bb9c79b
[Windows] Handle menu accelerators 2024-07-27 16:04:26 +10:00
Miklos Gabor
6c7cd651da Fix systemTray.setIcon crashing on Linux (#3636) 2024-07-25 12:34:10 -05:00
Lea Anthony
f94ecaba84
Fix random crash on linux 2024-07-20 08:40:52 +10:00
Atterpac
f0cec1cf37
[V3-Linux] fix resize and update @wailsio runtime (#3617) 2024-07-16 15:44:46 -05:00
Lea Anthony
d7e103de59
Fix nsis install 2024-07-16 06:25:05 +10:00
Lea Anthony
65b983dcb6
Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha 2024-07-16 06:00:50 +10:00
Mohamed Gharib
d5e289880f
[v3] Rename AbsolutePosition() to Position() (#3611) 2024-07-15 19:27:21 +10:00
Mohamed Gharib
e51a481219
[v3] Restore max size example (#3612) 2024-07-15 19:24:51 +10:00
Atterpac
62b795d472
fix resize messaging (#3606)
changelog.md
2024-07-14 16:47:18 +10:00
Lea Anthony
33a0c9e634
Fixed icon warning on Windows 2024-07-03 07:51:10 +10:00
Atterpac
5fcebd0274
fix windows file dialog panic when directory doesnt exist (#3582) 2024-07-02 18:49:19 +10:00
DeltaLaboratory
749c433ca6
feat: disable spinner in ci or non terminal (#3574)
* added nospinner flag to disable spinner in ci environment

Signed-off-by: delta <delta@deltalab.dev>

* deduplicated result message

Signed-off-by: delta <delta@deltalab.dev>

* removed flag and added terminal check

Signed-off-by: delta <delta@deltalab.dev>

* added changelog entry

Signed-off-by: delta <delta@deltalab.dev>

---------

Signed-off-by: delta <delta@deltalab.dev>
2024-07-02 18:35:39 +10:00
Travis McLane
cfe2424f4d
WindowDidMove / WindowDidResize events for Linux and Windows
* [linux] emit system specific event for theme change

Code was incorrectly emitting the `events.Common.ThemeChanged` event
instead of the OS Specific `events.Linux.SystemThemeChanged` event.
It is the reponsibility of the code in events_common_linux.go to map
it to the common variety.

* [linux] implement WindowDidMove

* [linux] implement debounce for WindowDidMove

* [example] listen for events.Common.WindowDidMove

* [windows] move WindowDidMove mapper outside of DnD guard

* WindowDidResize implementation

* windows: WindowDidResize

* chore: changelog update

* events.Common.WindowDidMove and events.Common.WindowDidResize
2024-06-30 16:11:45 -05:00
Lea Anthony
ed88987308
Added a new menu item to create window that listens to movement event. 2024-06-28 21:25:13 +10:00
Lea Anthony
86e43c92b3
[Windows] Check systray menu before destroying it 2024-06-26 21:05:46 +10:00
Lea Anthony
ae3b92f1ef
Add README.md to templates 2024-06-24 21:48:58 +10:00
Lea Anthony
932f1e9161
Remove unused command 2024-06-24 21:28:26 +10:00
Lea Anthony
b0ac644e9b
Update docs text 2024-06-24 21:27:30 +10:00
Lea Anthony
25cccc32db
Add docs and sponsor subcommands 2024-06-24 20:50:17 +10:00
Lea Anthony
2b5adacbb9
Remove OpenDirectoryDialog 2024-06-17 08:06:32 +10:00
Lea Anthony
ab06920e74 Fix non-windows build issues 2024-06-09 08:28:38 +10:00
Lea Anthony
c937c3bd8b
@wailsio/runtime v3.0.0-alpha.25 2024-06-08 20:45:53 +10:00
Lea Anthony
9d488c97e0
Support raw messages from JS 2024-06-08 20:43:24 +10:00
Lea Anthony
9d24c039fe Fix linux window button methods 2024-06-08 15:56:17 +10:00
Lea Anthony
f738f1e246 Add more macOS version checks 2024-06-08 15:16:33 +10:00
Lea Anthony
95c751d4ac Fix compilation issue on Darwin < 12.3 2024-06-08 13:53:31 +10:00
Lea Anthony
bf9e17a6c8
[WEP] Customise Window Titlebars (#3508)
* Add proposal.
Reference Mac implementation

* Add windows support. Update proposal.

* Update example

* Rename Active->Enable,Inactive->Disabled. Ensure window can get controls back after hiding close on windows. Added guide. Updated example.

* Add ExStyle option for setting titlebar style.

* Fix linux builds

* Tidy up
2024-06-08 13:42:27 +10:00
Lea Anthony
2baca5d57d Update dependencies 2024-06-08 13:39:00 +10:00
Lea Anthony
b0fb67451d Fix icon issue for darwin. 2024-06-08 13:05:06 +10:00
Lea Anthony
f454abf45a
Slight clarification to the WEP guidelines 2024-06-02 10:03:00 +10:00
Atterpac
0dd73e249d
Revert "Remove OpenContextMenu" (#3524)
This reverts commit 54140e9adb.
2024-06-02 06:30:17 +10:00
Lea Anthony
54140e9adb
Remove OpenContextMenu 2024-06-01 15:04:35 +10:00
Travis McLane
45195d5bd6
linux: theme handling bugfix (#3515)
* linux: theme handling bugfix

* update changelog
2024-05-28 11:06:30 -05:00
Lea Anthony
2a056a7855
Fix ctrl key accelerator on macOS 2024-05-25 16:33:43 +10:00
Atterpac
940d0f1906
fix windows cross volume init (#3512)
changelog
2024-05-25 16:20:42 +10:00
Lea Anthony
1d2e1b15ea
Update Linux docs + doctor to suggest webkit2gtk-4.1 2024-05-21 07:47:19 +10:00
Lea Anthony
e424a85a99
Menu improvements (#3492)
* Expose `DefaultApplicationMenu`.
Add `FindByLabel` and `ItemAt` for finding menu items in a menu

* Add `Menu.RemoveMenuItem()`, `MneuItem.GetAccelerator()` and `MenuItem.RemoveAccelerator()`

* Remove `Update`

* Iterate when removing menu items

* Add `GetSubmenu()`
2024-05-20 21:15:02 +10:00
Fabio Massaioli
939d22d670
[v3] Enforce stricter typing for generated bindings (#3498)
* Subject generator output to stricter TS linting

* Fix runtime support code typing

* Relax tsconfig for templates

* Update test data

* Update binding example
2024-05-19 23:28:45 +10:00
Fabio Massaioli
90b7ea944d
[v3] New binding generator (#3468)
* Support variadic arguments and slice, pointer types

* Fix computation of type namespaces

* Improve comments and general formatting

* Set default values correctly for composite types

* Add templates for bindings

Additionally:
* fixes generation of tuple return type
* improves imports and namespacing in JS mode
* general cleanup of generated code

* Simplify import list construction

* Refactor type generation code

Improves support for unknown types (encoded as any) and maps (using
Typescript index signatures)

* Support slices with pointer elements

* Match encoding/json behaviour in struct parser

* Update tests and example

* Add tests for complex method signatures and json tag parsing

* Add test `function_multiple_files`

* Attempt looking up idents with missing denotation

* Update test data

* fix quoted bool field

* Test quoted booleans

* Delete old parser code

* Remove old test data

* Update bindgen flags

* Makes call by ID the default

* Add package loading code

* Add static analyser

* Temporarily ignore binding generation code

* Add complex slice expressions test

* Fix variable reference analysis

* Unwrap casts to interface types

* Complete code comments

* Refactor static analyser

* Restrict options struct usage

* Update tests

* Fix method selector sink and source processing

* Improve Set API

* Add package info collector

* Rename analyser package to analyse

* Improve template functions

* Add index file templates

* Add glue code for binding generation

* Refactor collection and rendering code

* Implement binding generator

* Implement global index generation

* Improve marshaler and alias handling

* Use package path in binding calls by name

* Implement model collection and rendering

* Fix wrong exit condition in analyser

* Fix enum rendering

* Generate shortcuts for all packages.

* Implement generator tests

* Ignore non-pointer bound types

* Treat main package specially

* Compute stats

* Plug new API into generate command

* Support all named types

* Update JS runtime

* Report dual role types

* Remove go1.22 syntax

* Fix type assertion in TS bindings

* encoding/json compliance for arrays and slices

* Ignore got files in testdata

* Cleanup type rendering mechanism

* Update JS runtime

* Implement generic models

* Add missing field in renderer initialisation

* Improve generic creation code

* Add generic model test

* Add error reporting infrastructure

* Support configurable file names

* Detect file naming collisions

* Print final error report

* New shortcut file structure + collision detection

* Update test layout and data

* Autoconfiguration for analyser tests

* Live progress reporting

* Update code comments

* Fix model doc rendering

* Simplify name resolution

* Add test for out of tree types

* Fix generic creation code

* Fix potential collisions between methods and models

* Fix generic class alias rendering

* Report model discovery in debug mode

* Add interface mode for JS

* Collect interface method comments

* Add interface methods test

* Unwrap generic instantiations in method receivers

* Fix rendering of nullable types in interface mode

* Fix rendering of class aliases

* Expose promise cancel method to typescript

* Update test data

* Update binding example

* Fix rendering of aliased quoted type params

* Move to strongly typed bindings

* Implement lightweight analyser

* Update test cases

* Update binding example

* Add complex instantiation test

* Load full dependency tree

* Rewrite collector

* Update renderer to match new collector

* Update generator to match new collector

* Update test data

* Update binding example

* Configure includes and injections by language

* Improve system path resolution

* Support rich conditions in inject/include directives

* Fix error handling in Generator.Generate

* Retrieve compiled go file paths from fileset

* Do not rely on struct info in struct flattening algorithm

* Fix doc comment for findDeclaraion

* Fix bugs in embedded field handling

* Fix bugs and comments in package collection

* Remove useless fields from ServiceInfo

* Fix empty line at the beginning of TS indexes

* Remove global index and shortcuts

* Remove generation tests for individual packages

* Enforce lower-case file names

* Update test data

* Improve error reporting

* Update binding example

* Reintroduce go1.22 syntax

* Improve relative import path computation

* Improve alias support

* Add alias test

* Update test data

* Remove no services error

* Rename global analyser test

* Add workaround and test for bug in typeutil.Map

* Update test data

* Do not split fully qualified names

* Update typeutil package and remove workaround

* Unify alias/named type handling

* Fix rendering of generic named class aliases

* Fix rendering of array types

* Minor tweaks and cleanups

* Rmove namespaced export construct

* Update test data

* Update binding example

* Break type cycles

* Fix typo in comment

* Fix creation code for cyclic types

* Fix type of variadic params in interface mode

* Update test data

* Fix bad whitespace

* Refactor type assertions inside bound methods

* Update test data

* Rename field application.Options.Bind to Services

* Rename parser package to generator

* Update binding example

* Update test data

* Update generator readme

* Add typescript test harness

* Move test output to new subfolder

* Fix code generation bugs

* Use .js extensions in TS mode imports

* Update test data

* Revert default generator output dir to frontend/bindings

* Bump runtime package version

* Update templates

* Update changelog

* Improve newline handling

---------

Co-authored-by: Andreas Bichinger <andreas.bichinger@gmail.com>
2024-05-19 20:40:44 +10:00
Atterpac
04a33e2206
refresh version up (#3495)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-19 19:03:08 +10:00
Lea Anthony
95956f6362
Update WEP README 2024-05-19 16:02:22 +10:00
Lea Anthony
e5d82915dd
Update WEP 2024-05-19 15:55:57 +10:00
Lea Anthony
e3f673d9db
Update WEP 2024-05-19 11:44:30 +10:00
Lea Anthony
4fd21432c5
Add WEP docs 2024-05-18 07:10:51 +10:00
Atterpac
9c4b412aea
fix react template css (#3477)
changelog
2024-05-14 06:39:20 +10:00
Atterpac
71b2edc0fe
[V3-Linux] Upgrade to Webkitgtk4.1 (#3461)
* webkitgtk4.0->webkitgtk4.1

changelog

* Update mkdocs-website/docs/en/changelog.md

* Update deps in pipeline

* Update deps in pipeline

* Install 4.1 only when v3

* Install 4.1 only when v3

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-08 18:08:14 +10:00
Lea Anthony
7661cd189f
Fix Go version 2024-05-08 08:27:38 +10:00
Mike D Pilsbury
0833a6d6d3
[v3] Correct detection of npm with acceptable version (#3458)
* Correct detection of npm with acceptable version

* Update changelog
2024-05-06 08:29:28 +10:00
Lea Anthony
7d851d8434
Fix disable min/max buttons on windows 2024-05-06 08:26:41 +10:00
Atterpac
2c29e1ca76
update devmode to use types and yaml (#3454)
go mod update
2024-05-05 17:27:53 +10:00
Travis McLane
5a57ee99ac example: environment - change css
text was colored white and therefore invisible.
2024-05-03 12:52:15 -05:00
Travis McLane
735b6b6c87 noop: remove Println for events.Linux.ApplicationStartup 2024-05-02 15:31:49 -05:00
Travis McLane
7ea0601fc6 remove Println
unknown key codes shouldn't print out to stdout
2024-05-02 11:02:21 -05:00
Travis McLane
99537f2816 remove Register/UnregisterWindow functionality
- this is no longer needed
2024-05-02 09:37:23 -05:00
Harry Fox
b384bb885b
add missing map init from application.init() (#3426)
* add missing map init from `application.init()`

* add changelog entry for #3426

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-02 21:57:51 +10:00
abichinger
2255af1c45
[v3] Add port flag to dev command (#3429)
* Add `port` flag to dev command, ...

Add support for environment variable WAILS_VITE_PORT

* Check if port is already in use

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-02 21:48:50 +10:00
Fabio Massaioli
f55b781d86
[v3] Binding runtime fixes (#3431)
* Unmarshal arguments to appropriate type in binding calls

* Marshal multiple return values to arrays in binding calls

* Improve logging of remote method calls

* Add tests for `BoundMethod.Call`

* Fix return value if error is nil

* Update changelog

---------

Co-authored-by: Andreas Bichinger <andreas.bichinger@gmail.com>
2024-05-02 21:46:07 +10:00
Lea Anthony
38d9a9551f
Add -trimpath for production build in project taskfile 2024-04-29 17:58:48 +10:00
Lea Anthony
c38cee0a4a
More optimised production build in project taskfile 2024-04-29 17:40:46 +10:00
Lea Anthony
0f9c7b1bbf
Fix nanoid dep for npm package 2024-04-28 19:43:37 +10:00
Lea Anthony
32ddbd8e05
set target branch to v3-alpha 2024-04-28 17:13:59 +10:00
Lea Anthony
67c493f1a8
Fix example building 2024-04-27 17:43:58 +10:00
Lea Anthony
69c513e33d
Fix pipeline tests 2024-04-27 17:38:10 +10:00
Lea Anthony
5d0a58cc6a
Update GetRelative/AbsolutePosition to take border size into account 2024-04-25 15:59:33 +10:00
Lea Anthony
368ca13314
Update window interface 2024-04-25 15:26:31 +10:00
Lea Anthony
2cee1edcb5
Add window.GetBorderSizes 2024-04-25 15:22:01 +10:00
Travis McLane
1b288a0a1a removing experimental server plugin 2024-04-23 09:32:21 -05:00
Harry Fox
81aba310d0
update Taskfile.tmpl.yml to include darwin run task (#3417)
* update Taskfile.tmpl.yml to include darwin run task

* add changelog line for #3417
2024-04-23 18:19:25 +10:00
Atterpac
b050a07362
dev mode adapt to OS (#3412)
changelog
2024-04-22 12:44:10 +10:00
Travis McLane
021efab84d
allow for non-Window WailsEvent listeners (#3406)
* allow for non-Window WailsEvent listeners

- adds a RegisterListener function on the App struct such
  that code can listen for WailsEvent(s) even if it isn't a Window
- rename dispatchEventToWindows -> dispatchEventToListeners
- add all windows and WailsEventListeners to slice before emitting

* Update v3/pkg/application/application.go

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-04-20 09:39:57 +10:00
Atterpac
0a42a050bd
fix dev mode windows pipe (#3402) 2024-04-18 23:14:20 +10:00
abichinger
9ca1b30da1
[v3 alpha] Fix drag-n-drop on some linux distros (#3346)
* Fix drag and drop on linux

- Move C code

* Use GTK_DEST_DEFAULT_DROP

* Update changelog

* Move C code back into `linux_cgo.go`
2024-04-15 10:05:23 -05:00
Atterpac
220d5535f7
revert dialog channel close (#3395)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-04-15 18:03:35 +10:00
Atterpac
0895e6a508
refresh version up (#3391) 2024-04-15 16:57:19 +10:00
Lea Anthony
6f41dbf954
Merge branch 'refs/heads/v3-alpha-feature/plugin-updates' into v3-alpha 2024-04-14 21:42:16 +10:00
Lea Anthony
c7ed7e72d4
Major plugin updates 2024-04-14 21:41:33 +10:00
abichinger
7c921d6a81
[v3 alpha] implement setIcon on linux (#3354)
* implement `linuxApp.setIcon`

* Move code into `linux_cgo.go`
2024-04-09 11:04:54 -05:00
Travis McLane
16a029754f disable 'server' example
Doesn't compile currently.
Disabling such that the workflow succeeds
2024-04-08 13:29:42 -05:00
Travis McLane
3c9fd67fd0 doctor: correct compilation errors 2024-04-08 13:23:12 -05:00
atterpac
6f75b00463 Proper syncing and canceling of dialogs
s

s

s
2024-04-08 11:17:05 -05:00
Travis McLane
105d9f0d3a allow directory selection 2024-04-07 16:42:33 -05:00
atterpac
38f6b1297d Call linux dialog on main thread 2024-04-07 16:42:33 -05:00
Lea Anthony
cf130a6e25
[windows] Fix directory select in Open Dialog 2024-04-06 14:38:43 +11:00
Lea Anthony
e91c30fad0 Small doctor improvements 2024-04-03 20:48:55 +11:00
Lea Anthony
88ff84f5a5
[windows] Improve Set window icon when in debug mode 2024-04-01 05:02:39 +11:00
Lea Anthony
eee373f15a
[windows] Set window icon when in debug mode 2024-04-01 04:55:34 +11:00
Lea Anthony
c839c053cb
[windows] Fix min/max buttons 2024-03-29 21:44:59 +11:00
Lea Anthony
238b9ede78 Update plugin example 2024-03-26 21:11:35 +11:00
Lea Anthony
c7bd39abc7 Update plugin example 2024-03-26 21:02:26 +11:00
Lea Anthony
85b1f909a7 Plugin updates 2024-03-26 20:56:58 +11:00
Calle Gustafsson
675f502802
wails3 alpha windows: fix crash when systray icon is clicked without an attached window (#3271)
* Fix: #3270

removes an unnessecary check which returned a double nil wich in turned causes a crash if systray doesn't have an attached window.

* Add iconIsInFlyout method to systray_windows

and use it to determine if the icon is in the
flyout or not when positioning an attached window.

* optimize the windows systray window positioning

we only need to get the systray bounds if
the icon is in the flyout area.

* Use correct behavior for placing the window

if the systray icon is visible in the taskbar the
window should be centered on the systray icon
otherwise the icon is in a flyout are and the
window should be placed in the corner.

Added comments to explain placement logic

* consistent placing of systray menu on right vs left click

* add PR info in changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 17:04:40 +11:00
abichinger
db5553ec75
[linux] fix closing of custom context menu #3329 (#3330)
* [linux] fix closing of custom context menu

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 16:51:45 +11:00
Fabio Massaioli
413191411f
Remove class fields (#3333) 2024-03-24 16:42:41 +11:00
Fabio Massaioli
45b2681dfc
[v3] Fix binding generator output and import paths (#3334)
* Fix relative import path computation

* Fix models output path

* Add option to generate bindings using bundled runtime

* Update binding example

* Fix testdata

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-22 21:18:04 +11:00
Travis McLane
f0986a6441 chore: version.txt == v3.0.0-alpha.4 2024-03-21 14:16:39 -05:00
stffabi
e6645136f9 [windows] Set HiDPI size scaling before setting up chromium 2024-03-21 09:42:23 +01:00
stffabi
189820135a [windows] Use options for window name 2024-03-21 09:42:23 +01:00
Lea Anthony
f19cc528d4 Fix context menu example 2024-03-20 21:18:46 +11:00
Fabio Massaioli
2b9891da2c
[v3] Update and fix runtime JS API (#3295)
* Cleanup bundled runtime entry point

* Fix JS representation of Screen struct

* Expose IsFocused method in Window interface

* Update JS window API

* Fix cleanup of WML listeners

* Bundle runtime as ES module

* Update runtime dependencies

* Update runtime types and events

* Update bundled runtime

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-20 20:30:14 +11:00
Lea Anthony
d1968489b7 Don't build server plugin 2024-03-20 07:43:27 +11:00
Lea Anthony
33946a7aac Don't build server plugin 2024-03-19 21:56:54 +11:00
Lea Anthony
aba82cc527 Update system.Environment 2024-03-19 20:37:03 +11:00
atterpac
e92994d2e7
Refresh Version Update (CPU Thread Leak Fix) (#3322)
* Fix appimage file sourcing

Add findGTKFiles to source webkit files for appimage generation

s

* Update refresh version to fix CPU usage

s

* update changelong

* refresh version up

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-19 08:41:47 +11:00
Lea Anthony
98aff7778e Support ProgramName on linux 2024-03-17 21:09:20 +11:00
Lea Anthony
4ab6352504 Set default size for linux windows 2024-03-17 20:57:46 +11:00
Lea Anthony
b325381ca0 Normalise app/webview options
Update deps
2024-03-17 20:57:46 +11:00
Lea Anthony
bc0a9b2e52 Add BundledAssetFileServer for bundled /wails/runtime.js. Update examples. 2024-03-17 15:08:30 +11:00
atterpac
75c0236a04
[v3] Fix Dev mode <defunct> processes (#3320)
* Fix appimage file sourcing

Add findGTKFiles to source webkit files for appimage generation

s

* Update refresh version to fix CPU usage

s

* update changelong
2024-03-17 14:17:21 +11:00
atterpac
ec2ce3fcfb
Fix appimage file sourcing (#3306)
Add findGTKFiles to source webkit files for appimage generation

s
2024-03-17 11:17:17 +11:00
Lea Anthony
e9a9420e5c Refactor options.
Update deps
2024-03-17 09:42:27 +11:00
Travis McLane
209e097ba6 rename linux options file
`linux` suffix means it won't compile on non-Linux platforms.
Shorten the name to avoid:

../../pkg/application/options_webview_window.go:104:8: undefined: LinuxWindow
../../pkg/application/options_application.go:28:8: undefined: LinuxOptions
../../pkg/application/options_webview_window.go:104:8: undefined: LinuxWindow
2024-03-14 13:25:23 -05:00
Lea Anthony
8d234cc842 Update execjs signature 2024-03-14 08:57:10 +11:00
Lea Anthony
e6805707d8 Fix mac compilation issues 2024-03-14 08:52:10 +11:00
Lea Anthony
acd6f7af5b Merge remote-tracking branch 'origin/v3-alpha-linux' into v3-alpha 2024-03-14 08:39:19 +11:00
Josh Drake
f38532bcf5
Correctly compute 'startURL' when using a frontend development server. (#3299)
* Fix computing 'startURL' when 'FRONTEND_DEVSERVER_URL' is present.

* Respect provided URL when computing 'startURL' and 'FRONTEND_DEVSERVER_URL' is present.

* Update changelog.

* Correctly produce absolute URI in 'GetStartURL' when input is provided.
2024-03-08 18:06:14 +11:00
Travis McLane
4b2189ba51 allow keypress propagation
- this allows the webkit to add values to the `input` when typed
FIXME: does this need to be configurable?
2024-03-07 09:03:47 -06:00
Travis McLane
fb46cce963 simplify key handling logic 2024-03-07 09:03:32 -06:00
Travis McLane
eedd5eb7d2 reuse the 'wv' variable 2024-03-07 09:02:39 -06:00
Travis McLane
716f4af808 [linux] add missing implementations 2024-03-06 17:10:41 -06:00
Travis McLane
c21784037d wip: fixing rebase issue 2024-03-06 16:59:13 -06:00
Travis McLane
6d90c1678c move install_signal_handlers to proper location 2024-03-06 16:59:13 -06:00
Lea Anthony
a7fb568aff Fix signal handlers 2024-03-06 16:59:13 -06:00
Lea Anthony
065ca5f6d3 Move to latest webkit2 and remove older code.
Fix screen demo.
Update examples.
2024-03-06 16:59:13 -06:00
Lea Anthony
ab9eec12eb Update status. Make wml demo non-drag 2024-03-06 16:59:13 -06:00
Lea Anthony
430736a4f2 Remove need for javascriptcore 2024-03-06 16:59:13 -06:00
Lea Anthony
161444107a Support linux systrays, of sorts... 2024-03-06 16:59:13 -06:00
Lea Anthony
12e2e2101a fix screens 2024-03-06 16:59:13 -06:00
Lea Anthony
e39097a17e fix min/max 2024-03-06 16:59:13 -06:00
Lea Anthony
be7c723c47 Fix window close issues
Update docs
Make uri scheme registration thread safe
2024-03-06 16:59:13 -06:00
Lea Anthony
a60b198b03 Fix window close issues 2024-03-06 16:59:13 -06:00
Lea Anthony
e06df85f02 WindowID now correctly processed by postMessage calls. 2024-03-06 16:59:13 -06:00
Lea Anthony
288a4757f8 WindowID now correctly passed with webview request. 2024-03-06 16:59:13 -06:00
Lea Anthony
29363fc07f ToggleDevTools -> OpenDevTools
More refactor CGO methods.
2024-03-06 16:59:13 -06:00
Lea Anthony
02a1b540ce [WIP] refactor CGO methods 2024-03-06 15:43:50 -06:00
Lea Anthony
a048233f4c Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 15:40:28 -06:00
Lea Anthony
758c4c2c8d Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:52:06 -06:00
Lea Anthony
adae39efee Add webview GPU policy and update Linux options
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
2024-03-06 11:49:11 -06:00
Lea Anthony
84e1bb4d9b Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:48:26 -06:00
Lea Anthony
6b0daf3da9 Update windowSetupSignalHandlers & linux events 2024-03-06 11:44:55 -06:00
Lea Anthony
b6c5d90c9d Window Flash for Linux
Set Min/Max window buttons
2024-03-06 11:43:16 -06:00
Lea Anthony
a34ccbff33 ToggleDevTools -> OpenDevTools
More refactor CGO methods.
2024-03-06 11:43:12 -06:00
Lea Anthony
4cd4b46772 [WIP] refactor CGO methods 2024-03-06 11:42:19 -06:00
Lea Anthony
3d93c83920 Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 11:42:19 -06:00
Lea Anthony
809863d61a Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:42:19 -06:00
Lea Anthony
4c7b643295 Add webview GPU policy and update Linux options
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
2024-03-06 11:42:19 -06:00
Lea Anthony
05b16f1d63 Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:42:19 -06:00
Lea Anthony
bfa53dfd6c Update windowSetupSignalHandlers & linux events 2024-03-06 11:42:19 -06:00
stffabi
4467a1ffa2 [parser] Move context tests into a separate file 2024-03-04 12:38:21 +01:00
stffabi
bfe9a9d015 [runtime] Add cancelation of bound method calls and context passing 2024-03-04 10:34:14 +01:00
Fabio Massaioli
7e687750b2
[v3] Add option for showing the toolbar in fullscreen mode on macOS (#3282)
* Add option for showing the toolbar in fullscreen mode on macOS

* Add an example demonstrating the ShowToolbarWhenFullscreen option

* Update docs

* Add changelog entry

* Run go mod tidy
2024-03-02 20:10:25 +11:00
Fabio Massaioli
0c3025d695
[v3] Fix ordering of if branches in WebviewWindow.Restore method (#3279)
* Add JS Window API example

* Fix ordering of if branches in Window.Restore method

* Add changelog entry
2024-03-02 16:04:02 +11:00
5aaee9
a9c22f0588
fix: wrong baseURL if open window twice (#3273) 2024-02-29 08:47:25 +11:00
Fabio Massaioli
b8537d1c96
[v3] Restore ToggleMaximise method in Window interface (#3281)
* Add JS Window API example

* Add ToggleMaximise button to Window API example

* Restore ToggleMaximise method in Window interface

* Update docs and changelog
2024-02-29 08:42:57 +11:00
stffabi
1956f95f9f [templates] Update templates to latest assetserver options 2024-02-16 08:04:16 +01:00
stffabi
723dd976b4 [v3, assetServer] Use middlewares for runtime, caps and falgs instead of having the implementation in the assetserver 2024-02-16 07:38:28 +01:00
stffabi
65251cdafa [v3, assetServer] Remove fs.FS from options and always use a http.Handler 2024-02-16 07:38:27 +01:00
Lea Anthony
471d626043
Add control to disable window buttons on Mac
Three new options have been introduced in the application options for MacOS to disable the minimize, maximize, and close buttons on the window. Corresponding functionality has been added in the webview window for darwin to handle these new options. These changes have been showcased in the window example main.go file.
2024-02-08 08:31:58 +11:00
Lea Anthony
0b82968c0f
Add option to disable min/max windows buttons
This commit introduces the functionality to disable the minimise and maximise buttons on windows. These options have been added to the `application.WebviewWindowOptions` and integrated in the Windows application logic. Effectively, developers can now control the availability of these buttons in their windows applications.
2024-02-07 10:06:07 +11:00
Lea Anthony
1ec3b4ecab
v3.0.0-alpha.4 2024-02-01 21:09:03 +11:00