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

41 Commits

Author SHA1 Message Date
stffabi
3d24a9b4c4
[v2, darwin] Assign a unique requestId to every WKWebView request (#1681)
This makes sure we always use the correct WKURLSchemeTask during
processURLResponse. Only using the URL is not unique enough and
might result in pending requests if two requests with the same URL
are getting processed.
2022-08-01 18:55:25 +10:00
stffabi
53e875d96f
[v2, darwin] Make sure to copy the uri during processURLRequest (#1668)
There's no guarantee that the pointer is still valid when
processURLRequest is finished. So we might end up with an
invalid pointer when the request is asynchronously processed.
2022-07-28 08:56:11 +02:00
stffabi
229d36207c
[v2] Fix formatting of some error messages (#1665) 2022-07-27 19:20:30 +10:00
Lea Anthony
29912785fa
Add Show() and Hide() to runtime to show/hide application (#1599)
* Add Show() and Hide() to runtime to show/hide application

* Fix devserver

* Update API docs
2022-07-20 20:59:49 +10:00
skamensky
04d35410de
Expose screen dimensions (#1519)
* get dimensions working for linux

* Cleaning up some GTK code

I was getting the following errors due to some bad casts.

Gdk-CRITICAL **: 18:58:51.943: gdk_monitor_get_geometry: assertion 'GDK_IS_MONITOR (monitor)' failed
Gdk-CRITICAL **: 18:58:51.943: gdk_display_get_monitor_at_window: assertion 'GDK_IS_DISPLAY (display)' failed

This commit fixes these errors

* Adding Screen namespace along with linux implementation

* moving ScreenGetAll into a more appropriate place

* Fixing typescript definition mistake, documentation, ordering of functions, and formatting

* add ScreenGetAll to more templates

* moving screen into its own javascript file

* fixing bug where screen objects are not returned from the runtime function

* rebuilding frontend wrapper package

* adding windows implementation of ScreenGetAll

* adding screen get all implementation for darwin

* reverting a change that is unrelated to the work on expose-dimensions

* removing duplicate comparison

* changing GetNthScreen in screen API on macos

To use frame instead of visibleframe to keep into account the space the the dock takes up
We want to include that space in the calculation in order to keep the sizes of screens consistent across platforms

* Correcting screen jsdoc

It used to say it returned a single screen object. Now it says that it returns an array of screen objects

* Fixing typo in function name

* reverting pointless spacing change

* reverting pointless spacing change

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: shmuel.kamensky <shmuel.kamensky@shutterfly.com>
2022-07-16 12:33:37 +10:00
Lea Anthony
69016c6c6f
Fix OnBeforeClose code for Mac (#1558)
* Fix OnBeforeClose code for Mac

* Fix OnBeforeClose for linux
2022-07-14 21:04:45 +10:00
Lea Anthony
3e42d2da05
Rename WindowSetRGBA -> WindowSetBackgroundColour (#1506)
* Rename WindowSetRGBA -> WindowSetBackgroundColour

* Fix Typos
2022-06-29 22:31:49 +10:00
Lea Anthony
e504d1124a
Fix AlwaysOnTop code for Mac 2022-06-22 21:36:57 +10:00
chenxiao
072929689c
feature: add runtime func WindowSetAlwaysOnTop (#1442)
* feature: add runtime func WindowSetAlwaysOnTop

* add runtime WindowSetUnalwaysOnTop

* add  JavaScript runtime method  ,  docs update

* WindowSetAlwaysOnTop(b bool)

* Add AlwaysOnTop for MacOS

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-06-22 20:55:02 +10:00
stffabi
22d3f93b52
[v2, darwin] Initialize native variables on stack to prevent segfault (#1362) 2022-04-30 06:11:19 +10:00
stffabi
524411964f
[v2] WindowReloadApp should use the startURL of the frontend to support reloading when a frontend dev server is used (#1347) 2022-04-23 07:09:53 +10:00
Lea Anthony
f6257d3d31 Add Environment and WindowReloadApp calls to runtime. Updated default templates. 2022-04-20 20:28:41 +10:00
stffabi
6d09a45a30
[v2] Add support for AssetsHandler (#1325)
* [website] Fix devserver default value doc

* [v2] Add support for AssetsHandler

AssetsHandler is a http.Handler delegate, which gets called
as a fallback for all Non-GET requests and for GET requests
for which the Assets didn’t find the file.

Known Limitations on Linux:
- All requests are GET requests
- No request headers
- No request body
- No response status code, only StatusOK will be returned
- No response headers

Known Limitations on Windows:
-  Request body is leaking memory. Seems to be a bug in
    WebView2, investigation angoing.

Most of these limitations on Linux will be fixed in the future with
adding support for Webkit2Gtk 2.36.0+.

* [v2, linux] Add response streaming support

The complete response won’t be held anymore in memory and will
be streamed to WebKit2.

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-04-12 20:18:27 +10:00
Sebastian Bauer
7dd3f96915 [Feature/1149] Dark mode: functions for manually switching theme (#1291)
* [Feature/1149] Dark mode: functions for manually switching theme
2022-04-01 08:21:37 +11:00
stffabi
65fb42d9e7
[v2] Add support for external frontend dev servers (#1290)
* [v2] Consolidate AssetServers

* [v2] Support starturl for webview on linux and darwin

* [v2] Add support for frontend DevServer

* [v2] Activate frontend DevServer in svelte template

* [website] Add bleeding edge guide for PRs

* DoNotMerge: Bump Version for testing

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-03-31 00:40:44 +11:00
Lea Anthony
1048782eb4
Initial commit (#1241) 2022-03-10 21:20:41 +11:00
stffabi
c63b1f1981
[v2] Consolidate processRequest, improve logging and error handling (#1158) 2022-02-28 19:14:03 +11:00
Lea Anthony
93491eb2eb
Feature/align api (#1161)
* Fix WindowSetRGBA API

* Change WindowUnFullscreen -> WindowUnfullscreen for consistency
RGBA bugfix
2022-02-19 20:29:55 +11:00
Lea Anthony
f059c35d9e
Feature: WindowToggleMaximise (#1159)
* [windows] Add WindowToggleMaximise

* Add mac support

* Update docs

* [linux] Toggle Maximise
2022-02-18 20:28:16 +11:00
Lea Anthony
0971857e7e
Fix position runtime (#1123)
* [linux] Move SetTitle and startDrag to main thread

* [linux] Move SetPosition, Center, Fullscreen and UnFullscreen to main thread

* Fix runtime Window Get/Set Position signatures

* Fix vanilla template keyboard handling
2022-02-03 21:42:14 +11:00
Lea\Anthony
62adcab722 [mac] try dynamically linking UTIFramework during cgo build 2021-12-11 19:36:17 +11:00
ironpark
fda3323386 basic implement 2021-12-04 04:55:36 +09:00
stffabi
d827aafe89 [v2] Improve processRequest: Handle errors and behave more like a webserver
This also fixes that requests remain in "pending" state on
darwin if e.g. a file is not found or an error occurs during
loading of the file.
2021-12-03 16:41:51 +01:00
stffabi
8107a8bd1e [v2] Improve translation of URI to file to be loaded 2021-12-02 11:53:32 +01:00
stffabi
155f1fde49 [v2] Do not block during processing of messages
On windows blocking here results in a blocked main thread
and a blocked webview.
2021-12-01 13:24:19 +01:00
Lea Anthony
c9c6edeb84
[mac] Fix fullscreen / start fullscreen 2021-11-23 20:06:56 +11:00
Lea Anthony
28894868e3
[mac] Fix for file filters MacOS 11+. Some memory leak fixes. 2021-11-17 21:03:40 +11:00
Lea Anthony
1bed8234c9 [v2] Fix OnShutdown for production build 2021-11-11 06:05:50 +11:00
Lea Anthony
c90bfc310a
[mac] Fix lifecycle hooks 2021-11-06 10:40:02 +11:00
Lea Anthony
7ef445f526
[mac] Improve string/memory handling, dialog icon -> []byte 2021-10-31 08:50:14 +11:00
Lea Anthony
a88b3553ba
[mac] Support min/max 2021-10-30 10:34:55 +11:00
Lea Anthony
489b9b358b
[mac] menu support 2021-10-30 09:51:46 +11:00
Lea Anthony
32c3721b1b
[mac] Fix webviewistransparent and debug flag 2021-10-19 20:07:36 +11:00
Lea Anthony
38f37e817b
[mac] Get asset server hooked up, window drag, Window runtime. 2021-10-18 22:02:23 +11:00
Lea Anthony
3edbda313e
[mac] add SetRGBA and basic hooks for asset serving 2021-10-17 21:50:15 +11:00
Lea Anthony
450eb2e7ae
[mac] message passing, quit 2021-10-14 20:34:47 +11:00
Lea Anthony
a1323ce5e9
[mac] experimental 2021-10-13 22:01:35 +11:00
Lea Anthony
49629f6dc6
[mac] Fix build tags 2021-10-13 21:16:07 +11:00
unknown
9949420639 add template.JSEscapeString to ensure ExecJs normal execution 2021-10-05 09:45:36 +08:00
Lea Anthony
3ac4982fc5
[mac] Make it compile 2021-09-19 17:32:57 +10:00
Lea Anthony
badacdd45b
[mac] Get wails CLI to compile 2021-09-19 17:25:23 +10:00