5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 02:02:55 +08:00
Commit Graph

259 Commits

Author SHA1 Message Date
Lea Anthony
547e30f025
Default panic handler should fatal. Update docs and example. 2025-01-21 06:44:28 +11:00
Lea Anthony
8ba623f5fe
Fix build issue 2025-01-17 21:21:32 +11:00
Lea Anthony
be8159d410
# Conflicts:
#	docs/src/content/docs/changelog.mdx
#	v3/pkg/application/menuitem.go
2025-01-17 21:19:23 +11:00
Fabio Massaioli
f01b4b9a21
[v3] Fix binding generator bugs (#4001)
* Add some clarifying comments

* Remove special handling of window parameters

* Improve internal method exclusion

* Add test for internal method exclusion

* Remove useless blank field from app options

This is a leftover from an older version of the static analyser. It should have been removed long ago.

* Remove redundant godebug setting

gotypesalias=1 is the default starting with go1.23

* Use new range for syntax to simplify code

* Remove generator dependency on github.com/samber/lo

* Ensure generator testing tasks do not use the test cache

* Rename cyclic types test

* Test for cyclic imports

* Fix import cycle between model files

* Sort class aliases after their aliased class

* Test class aliases

* Fix length of default value for array types

* Test array initialization

* Add changelog

* Update changelog

* Fix contrived marking technique in model sorting algorithm

* Update binding example

* Update test data

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-01-17 18:56:07 +11:00
Lea Anthony
e668c81806
Improved panic handling. Added guide. 2025-01-16 22:08:18 +11:00
Lea Anthony
f6ebd6b3de
Breaking Change: Service method names 2025-01-16 07:47:23 +11:00
Lea Anthony
33ac88dc2a
Add window to context when calling a service method. Add window-call example to demonstrate how to know which window is calling a service. Fix Window ID skip issue. 2025-01-15 19:32:15 +11:00
Lea Anthony
c6f9ebe22d
Add -clean option for bindings generation. 2025-01-11 14:31:57 +11:00
Lea Anthony
773dca77d4
Single Instance feature.
Fix missing events on darwin.
2024-12-30 21:02:43 +11:00
Lea Anthony
0d4cb4698f
Improve frameless example 2024-12-27 09:37:55 +11:00
Lea Anthony
acd9241819
Better logo in systray-menu example 2024-12-27 09:23:39 +11:00
Lea Anthony
27480bc6cb
Reduce flicker. 2024-12-27 09:09:00 +11:00
Lea Anthony
a90764891f
Update systray-custom to show keep-alive after window kill 2024-12-23 20:55:29 +11:00
Lea Anthony
65f95b0380
Removed OnShouldClose: Create single way of handling conditional and unconditional close. 2024-12-23 08:23:07 +11:00
Lea Anthony
7aa6abfefe
Documentation updates.
New `-git` flag for `wails3 init`.
New `wails3 generate webview2bootstrapper` command.
2024-12-16 20:00:56 +11:00
Lea Anthony
6e84337898
Fix dialog directory chooser example.
Remove debug output.
2024-12-14 15:11:40 +11:00
Lea Anthony
a0b2ab7c0a
Fix default index.html serving.
Support multi-language default.
Remove default page from production builds.
Improve defaultindex.html.
2024-12-14 11:10:07 +11:00
Lea Anthony
beacf06c7d
Fix macOS systray DPI scaling and offset.
Added new systray examples.
2024-12-13 23:46:27 +11:00
Atterpac
d27e75c57f
[V3-Linux] Systray OnClick on initial icon click (#3907)
Support linux systrays first click to open

- Convert event handling to switch statement for better readability
- Fix menu event handlers to properly trigger open/close callbacks
- Update click behavior to use doubleClickHandler for Activate

CHANGELOG.md
2024-11-24 07:46:14 +11:00
Anshuman
abcc37f9a1
Add darwin universal build and package (#3902)
* Added Support for darwin universal builds and packages

* Fix universal task

* Added the missing Taskfile.tmpl.yml file
2024-11-23 23:15:10 +11:00
Lea Anthony
a98bf32b24
Fix syso naming issue 2024-11-18 20:43:03 +11:00
Lea Anthony
99d538ea97
V3 alpha feature/3659 support webview options (#3766)
* [windows] Add GeneralAutofillEnabled and PasswordAutosaveEnabled options

* Use latest go-webview2

* Updates

* Fix changelog
2024-11-16 12:30:33 +11:00
Lea Anthony
3e00b390c1
V3 alpha feature/start window position (#3885)
* New InitialPosition setting

* Fix mac inverted Y issue.
Fix mac centering issue.

* Change position text in example

* Update changelog.md
2024-11-16 10:10:40 +11:00
Lea Anthony
b4a61e11fa
Add devmode config to config.yml.
Remove devmode.config.yaml.
Update Watcher command.
Update templates.
2024-11-09 09:35:13 +11:00
Lea Anthony
d18b7bc4b8
V3 alpha feature/file association port (#3873)
* Update nsis template

* Move app data into config.yml

* mac support

* Add FileAssociations application config option
Support `ApplicationOpenedWithFile` event on Windows
Add docs

* Add FileAssociations application config option
Support `ApplicationOpenedWithFile` event on Windows
Add docs
Add test project

* Update example & docs.
Fix show window bug.

* Fix window show event bug

* Update changelog
2024-11-09 08:58:20 +11:00
Omar Ferro
f9d80323dd
[v3 alpha test] HTML Drag and Drop API test (#3856)
* [v3 example] HTML dnd API test

* Update v3/examples/html-dnd-api/main.go

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

* docs: add entry to changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-10-29 20:15:36 +11:00
Lea Anthony
b27aed2497
[mac] fix always on top during window creation (#3841)
* [mac] fix always on top during window creation

* Update changelog.md
2024-10-20 13:14:26 +11: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
4386f5fcb2
# Conflicts:
#	mkdocs-website/docs/en/changelog.md
2024-09-18 05:55:49 +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
Lea Anthony
5cde12b42a
Refactored Events (#3731)
Experimental rename
2024-09-07 16:39:02 +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
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 Anthony
212f5c7270
Clean up footer 2024-07-30 07:57:25 +10:00
Lea Anthony
d61bb9c79b
[Windows] Handle menu accelerators 2024-07-27 16:04:26 +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
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
ab06920e74 Fix non-windows build issues 2024-06-09 08:28:38 +10:00
Lea Anthony
9d488c97e0
Support raw messages from JS 2024-06-08 20:43:24 +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
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
Travis McLane
5a57ee99ac example: environment - change css
text was colored white and therefore invisible.
2024-05-03 12:52:15 -05: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
Lea Anthony
c7ed7e72d4
Major plugin updates 2024-04-14 21:41:33 +10:00