5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-06 01:21:25 +08:00
Commit Graph

111 Commits

Author SHA1 Message Date
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
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
Lea Anthony
85b1f909a7 Plugin updates 2024-03-26 20:56:58 +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
aba82cc527 Update system.Environment 2024-03-19 20:37:03 +11:00
Lea Anthony
bc0a9b2e52 Add BundledAssetFileServer for bundled /wails/runtime.js. Update examples. 2024-03-17 15:08:30 +11: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
6522657893
Refactor menu functions and streamline devtools toggle across systems
This update adds implementation to several menu item functions, replacing their previous 'not implemented' state. This includes actions for close, reload, forcing reload, toggling of fullscreen, reset zoom, and others. The update also includes modifications for the handling of developer tools toggle under different build configurations. This refactoring is aimed to standardize devtools configuration across different operating systems.
2024-01-21 20:52:32 +11:00
Lea Anthony
e5c14d24ae
Initial implementation of dev mode.
Huge thanks to @atterpac!
2024-01-19 21:34:49 +11:00
Lea Anthony
861ddea1b2
Add option to prevent application shutdown
This update allows the application shutdown to be cancelled. It implements the shouldQuit function, which can prevent the application from quitting if it returns false. Additional checks have been added to ensure cleanup and quit processes are performed only if required. The darwin delegate and linux and windows applications were modified to include this new functionality.
2024-01-17 20:45:30 +11:00
Lea Anthony
a6757c352f
Add shutdown tasks functionality to application
A new method OnShutdown was introduced to allow adding tasks to be run when the application shuts down. The shutdown tasks are run on the main thread and in the order they were added, with the application option `OnShutdown` being run first. This allows more controlled and managed shutdown of the application.
2024-01-14 08:17:17 +11:00
ALMAS
3cd26a2220
[v3] Improve OnShutdown (#3190)
* [v3] Improve OnShutdown

* add change log
2024-01-10 23:28:15 +11:00
Lea Anthony
6c3bd124ce
Added option to disable AssetServer logging.
An option to disable AssetServer logging has been introduced in the application options. This will suppress every request log from the AssetServer if set to true. This adjustment is useful for preventing log saturation in certain scenarios or environments.
2024-01-09 22:15:42 +11:00
Lea Anthony
68b12d4fff
Refactored application shutdown process to streamline app termination.
The application shutdown process has been significantly reworked to be more efficient and robust. The refactored code removes the event listener for the 'ApplicationTerminate' event. Instead, an in-process flag is added to the 'Quit' method to prevent recursive calls. Additionally, an optional 'OnShutdown' function variable is introduced to allow custom cleanup operations upon app termination.
2024-01-09 18:19:09 +11:00
Lea Anthony
1195464acb Improve window teardown on termination
This commit adds a robust teardown process for windows on application shutdown. It introduces a field to track the destruction state of each window and checks such before performing window operations. Also, it enhances the destroy functions within application for thorough clean up. Finally, redundant event handlers related to application termination were removed while fixing file generating challenge in go tasks.
2024-01-09 07:45:56 +11:00
Lea Anthony
68e779d64e
[darwin] add support for quitting app 2024-01-08 21:22:33 +11:00
stffabi
2f3eb70a4d [windows] Use msWebView2BrowserHitTransparent for non working NC area clicks on unfocused window
Without this patch there's a really strange behaviour if there are
multiple windows.
Having two windows with a webview open with an input field.
Focusing the input field on one window, then focusing the input
field on the second one. Then clicking directly on the non client
area of the first one, e.g. to trigger a minimze, the minimize is
not executed until the mouse is getting moved. As long as the
mouse is not moved the event for the click is blocked and not
executed.

Using this new mode fixes that problem, but we need to handle
‘alt+f4’ on our own.
2023-12-30 23:34:54 +01:00
Lea Anthony
9f567fe2bc
Application: increase message buffer sizes, process all messages in goroutine, Add IsDebug to environment info. 2023-12-29 12:48:26 +11:00
Lea Anthony
b08126d745
Radical JS runtime overhaul. New @wailsio/runtime package 2023-12-28 19:18:26 +11:00
ALMAS
e0b8da86ed
[v3] export SetIcon method (#3147)
* export `SetIcon` method

* add change log
2023-12-19 23:43:28 +11:00
Lea Anthony
8242834fbd
[windows] improvements to dev 2023-11-27 21:24:58 +11:00
Lea Anthony
814e1ec059
[windows] initial wails dev support 2023-11-27 20:38:42 +11:00
Travis McLane
46a0030387 [v3] noop: gofmt changes 2023-11-06 10:41:14 -06:00
Lea Anthony
8463c01123
[windows] Drag-n-drop support 2023-10-21 11:21:10 +11:00
Lea Anthony
8e0671306a
Mac examples + readme updated 2023-10-17 20:25:36 +11:00
5aaee9
a8641672cd
[v3] fix deadlock when quit (#2982)
* fix: dead lock when quit

* docs: update changelog
2023-10-14 20:34:00 +11:00
Lea Anthony
4c75b288bb
Add BrowserOpenURL and BrowserOpenFile to App.
Better WML assets for demo
Fix dialog responses.
Add `wml-openurl`
Rename: data-wml -> wml
Fix Alpha Feedback URL
2023-10-11 20:23:59 +11:00
Lea Anthony
83ed7fd2df
[windows] Fix production logger. Add alpha assets 2023-10-09 17:36:06 +11:00
Lea Anthony
ce6d587771
Fix multiple window weirdness. Update deps 2023-10-05 20:54:12 +11: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
1c48d567e1 [v3] NewWebviewWindow* return *WebviewWindow 2023-09-28 13:30:47 -05:00
Travis McLane
c87489adf3 [v3] implement Window interface 2023-09-28 11:39:39 -05:00
Lea Anthony
7cdab16ba9
Add API docs. Do small refactors 2023-09-24 08:57:40 +10:00
Lea Anthony
af8ee6703e [darwin] Support keybindings 2023-09-20 21:34:50 +10:00
Lea Anthony
793191a479
Initial key binding support 2023-09-17 20:48:30 +10:00
Lea Anthony
b49f135e31
Add context to application/common events 2023-09-15 17:12:35 +10:00
Lea Anthony
ed58949d24
try logging in goroutine 2023-09-13 16:47:14 +10:00
Lea Anthony
ea3509d2e7
Add LogLevel application option. Update log plugin to have log levels. 2023-09-13 09:44:37 +10:00
Travis McLane
2f7c6834d0 [v3 linux] use invokeSync 2023-09-11 17:12:57 -05:00
Lea Anthony
d44c8eba1c
[v3] Use system logger instead of println 2023-08-28 20:30:40 +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
3352ebef6e
[v3] Tidy up logging 2023-08-19 17:15:15 +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
946a4c56a0 [v3 mac] Better logging 2023-08-18 09:58:43 +10:00
Lea Anthony
763c7708f4
Fix HMR. Better logging. 2023-08-15 20:19:02 +10:00
Lea Anthony
e6c691a376
Support external asset server 2023-08-14 20:49:09 +10:00
Lea Anthony
db836b7a48
Move assetserver to internal 2023-08-14 08:31:55 +10:00
Lea Anthony
ec0731d5d8
Use slog.Logged in assethandler_external.go. Refactor runtime handler. 2023-08-14 08:28:31 +10:00