Compare commits

...

32 Commits

Author SHA1 Message Date
Lea Anthony a11655c452 Merge master 2022-07-09 22:55:03 +10:00
Lea Anthony 11cbfb68f1 Merge branch 'master' into exp
# Conflicts:
#	v2/internal/frontend/desktop/windows/win32/consts.go
2022-07-09 22:50:01 +10:00
Lea Anthony 7a63464997 Update vscode template (#1398) 2022-07-08 20:33:49 +10:00
Lea Anthony bf2d83d939 Change: Order of generated bindings now consistent
Closes #1531
2022-07-08 20:18:31 +10:00
Lea Anthony 1cd31573a9 change: improve cli output for wails update
closes #1528
2022-07-08 19:53:13 +10:00
Lea Anthony 39cebffa87 Fix: use correct json value for buildtype 2022-07-08 10:58:38 +10:00
Ian M. Jones f4b4e4cdb8 Allow -appargs flag to pass flags to binary. (#1534) 2022-07-06 19:25:28 +10:00
Lea Anthony 73f5cc3b92 Update issue template with links 2022-07-05 08:50:05 +10:00
Lea Anthony c48ad9be67 doc: white screen fix for Mac. Closes #1508 2022-07-05 08:44:26 +10:00
Lea Anthony 4726b72708 feature: Add -windowsconsole flag 2022-07-04 22:52:50 +10:00
Lea Anthony 4c312b155d [docs] Update -debug flag 2022-07-04 22:33:03 +10:00
Lea Anthony cd35536a79 [linux] Fix SetBackgroundColour 2022-07-04 22:29:51 +10:00
Lea Anthony 91d6c23c71 Updated contribution guide 2022-07-03 15:37:21 +10:00
Lea Anthony 59f84b8905 Development -> Contributing 2022-07-03 14:52:37 +10:00
Lea Anthony a1a06a6198 Initial development guides 2022-07-03 12:06:35 +10:00
Lea Anthony 5292721517 Update Sponsors 2022-07-03 10:19:15 +10:00
stffabi 41d1bf3d10 [v2] Improvements to the dev command (#1510)
* [v2, darwin] Fix nullreference exception when dev watcher failed to start and the user stopped wails dev with ctrl-c

* [v2] Improve starting of dev watcher command

Wails dev now also fails if the dev watcher could not be started. Since
the dev watcher is used to start e.g. vite to serve the frontend, it does
not make much sense to let Wails dev be running if the dev
watcher failed to start.

* [v2] Improve killing and cleanup of debug binary

- Make sure to kill the debug process in all cases even if an error occured.
- Make sure to kill the last started binary process
2022-06-30 20:13:06 +10:00
Lea Anthony 3e42d2da05 Rename WindowSetRGBA -> WindowSetBackgroundColour (#1506)
* Rename WindowSetRGBA -> WindowSetBackgroundColour

* Fix Typos
2022-06-29 22:31:49 +10:00
Lea Anthony 7141c972fd Move WindowGet* to main thread (#1464) 2022-06-29 20:07:16 +10:00
Lea Anthony 7cc3652a39 Updated docs. Closes #1501 2022-06-29 08:08:12 +10:00
Lea Anthony 95082336cd changelog + doc fix 2022-06-27 21:09:07 +10:00
Lea Anthony 319d59296e Support loading images into Windows tray 2022-05-14 06:44:22 +10:00
Lea Anthony 368733b7cc WIP 2022-05-13 20:49:54 +10:00
Lea Anthony ee5ca1a84a Add SetLabel, minor api updates 2022-05-07 20:39:08 +10:00
Lea Anthony 1947a9a17a Hugely improved + darkmode bitmap support. Dynamic scaling factor support 2022-05-05 21:15:50 +10:00
Lea Anthony 13fb5352d8 Support sizing tray menu 2022-05-03 08:31:42 +10:00
Lea Anthony 58b6e4c335 Support retina images 2022-05-02 20:16:04 +10:00
Lea Anthony ae0933c82a Move TrayMenu from config to runtime
Support better tray menu API
Move object creation to main thread
2022-05-02 18:57:35 +10:00
Lea Anthony c1d4aeb3cd Merge branch 'master' into exp 2022-05-01 20:55:41 +10:00
Lea Anthony 1830c64c79 Better Checked implementation 2022-04-30 21:39:19 +10:00
Lea Anthony ee50170374 Support activation policy 2022-04-30 17:51:11 +10:00
Lea Anthony 3f82ceabba Initial Tray support for Mac 2022-04-30 12:00:00 +10:00
104 changed files with 1950 additions and 539 deletions
+3 -1
View File
@@ -11,7 +11,9 @@ body:
Before submitting this issue, please do the following:
- Do a web search for your error. This usually leads to a much better understanding of the issue.
- Prove that the error is indeed a Wails bug and not an application bug, with a specific set of steps to reproduce.
- Search both the issue tracker (even closed issues) and discussion forums.
- Search the issue tracker using [this link](https://github.com/wailsapp/wails/issues?q=is%3Aissue+).
- Search the [discussion forums](https://github.com/wailsapp/wails/discussions?discussions_q=type+your+issue+here).
- Read the [Troubleshooting Guide](https://wails.io/docs/next/guides/troubleshooting).
- Try to fix it yourself. Keep a list of things you have done to fix the problem.
If after doing all the above, the problem remains, please continue with this ticket providing *all* the information requested.
+1
View File
@@ -32,3 +32,4 @@ v2/test/kitchensink/frontend/package.json.md5
!v2/internal/ffenestri/windows/x64/WebView2Loader.dll
.idea/
v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
v2/internal/frontend/desktop/darwin/test.xcodeproj
+3
View File
@@ -197,6 +197,9 @@ This project is supported by these kind people / companies:
<a href="https://github.com/Bironou" style="width:55px">
<img src="https://github.com/Bironou.png?size=55" width="55"/>
</a>
<a href="https://github.com/Shackelford-Arden" style="width:55px">
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
</a>
<span id="nav-6"></span>
+3
View File
@@ -207,6 +207,9 @@ Wails v2 已针对所有 3 个平台发布了 Beta 版。如果您有兴趣尝
<a href="https://github.com/Bironou" style="width:55px">
<img src="https://github.com/Bironou.png?size=55" width="55"/>
</a>
<a href="https://github.com/Shackelford-Arden" style="width:55px">
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
</a>
<span id="nav-6"></span>
## 安装
@@ -102,6 +102,9 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
raceDetector := false
command.BoolFlag("race", "Build with Go's race detector", &raceDetector)
windowsConsole := false
command.BoolFlag("windowsconsole", "Keep the console when building for Windows", &windowsConsole)
command.Action(func() error {
quiet := verbosity == 0
@@ -184,6 +187,7 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
WebView2Strategy: wv2rtstrategy,
TrimPath: trimpath,
RaceDetector: raceDetector,
WindowsConsole: windowsConsole,
}
// Start a new tabwriter
+75 -46
View File
@@ -2,6 +2,7 @@ package dev
import (
"context"
"errors"
"fmt"
"io"
"net"
@@ -36,16 +37,25 @@ import (
)
func LogGreen(message string, args ...interface{}) {
if len(message) == 0 {
return
}
text := fmt.Sprintf(message, args...)
println(colour.Green(text))
}
func LogRed(message string, args ...interface{}) {
if len(message) == 0 {
return
}
text := fmt.Sprintf(message, args...)
println(colour.Red(text))
}
func LogDarkYellow(message string, args ...interface{}) {
if len(message) == 0 {
return
}
text := fmt.Sprintf(message, args...)
println(colour.DarkYellow(text))
}
@@ -103,7 +113,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
command.IntFlag("debounce", "The amount of time to wait to trigger a reload on change", &flags.debounceMS)
command.StringFlag("devserver", "The address of the wails dev server", &flags.devServer)
command.StringFlag("frontenddevserverurl", "The url of the external frontend dev server to use", &flags.frontendDevServerURL)
command.StringFlag("appargs", "arguments to pass to the underlying app (quoted and space searated)", &flags.appargs)
command.StringFlag("appargs", "arguments to pass to the underlying app (quoted and space separated)", &flags.appargs)
command.BoolFlag("save", "Save given flags as defaults", &flags.saveConfig)
command.BoolFlag("race", "Build with Go's race detector", &flags.raceDetector)
@@ -168,8 +178,6 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
buildOptions.Logger = logger
buildOptions.UserTags = internal.ParseUserTags(flags.tags)
var debugBinaryProcess *process.Process = nil
// Setup signal handler
quitChannel := make(chan os.Signal, 1)
signal.Notify(quitChannel, os.Interrupt, os.Kill, syscall.SIGTERM)
@@ -177,19 +185,23 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
// Do initial build
logger.Println("Building application for development...")
newProcess, appBinary, err := restartApp(buildOptions, debugBinaryProcess, flags, exitCodeChannel)
debugBinaryProcess, appBinary, err := restartApp(buildOptions, nil, flags, exitCodeChannel)
if err != nil {
return err
}
if newProcess != nil {
debugBinaryProcess = newProcess
}
defer func() {
if err := killProcessAndCleanupBinary(debugBinaryProcess, appBinary); err != nil {
LogDarkYellow("Unable to kill process and cleanup binary: %s", err)
}
}()
// frontend:dev:watcher command.
if command := projectConfig.DevWatcherCommand; command != "" {
var devCommandWaitGroup sync.WaitGroup
closer := runFrontendDevWatcherCommand(cwd, command, &devCommandWaitGroup)
defer closer(&devCommandWaitGroup)
closer, err := runFrontendDevWatcherCommand(cwd, command)
if err != nil {
return err
}
defer closer()
}
// open browser
@@ -221,22 +233,17 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
LogGreen("Using reload debounce setting of %d milliseconds", flags.debounceMS)
// Watch for changes and trigger restartApp()
doWatcherLoop(buildOptions, debugBinaryProcess, flags, watcher, exitCodeChannel, quitChannel, devServerURL)
debugBinaryProcess = doWatcherLoop(buildOptions, debugBinaryProcess, flags, watcher, exitCodeChannel, quitChannel, devServerURL)
// Kill the current program if running
if debugBinaryProcess != nil {
err := debugBinaryProcess.Kill()
if err != nil {
return err
}
}
// Remove dev binary
err = os.Remove(appBinary)
if err != nil {
// Kill the current program if running and remove dev binary
if err := killProcessAndCleanupBinary(debugBinaryProcess, appBinary); err != nil {
return err
}
// Reset the process and the binary so the defer knows about it and is a nop.
debugBinaryProcess = nil
appBinary = ""
LogGreen("Development mode exited")
return nil
@@ -244,6 +251,22 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
return nil
}
func killProcessAndCleanupBinary(process *process.Process, binary string) error {
if process != nil && process.Running {
if err := process.Kill(); err != nil {
return err
}
}
if binary != "" {
err := os.Remove(binary)
if err != nil && !errors.Is(err, os.ErrNotExist) {
return err
}
}
return nil
}
func syncGoModVersion(cwd string) error {
gomodFilename := filepath.Join(cwd, "go.mod")
gomodData, err := os.ReadFile(gomodFilename)
@@ -388,35 +411,39 @@ func loadAndMergeProjectConfig(cwd string, flags *devFlags) (*project.Project, e
}
// runFrontendDevWatcherCommand will run the `frontend:dev:watcher` command if it was given, ex- `npm run dev`
func runFrontendDevWatcherCommand(cwd string, devCommand string, wg *sync.WaitGroup) func(group *sync.WaitGroup) {
LogGreen("Running frontend dev watcher command: '%s'", devCommand)
func runFrontendDevWatcherCommand(cwd string, devCommand string) (func(), error) {
ctx, cancel := context.WithCancel(context.Background())
dir := filepath.Join(cwd, "frontend")
cmdSlice := strings.Split(devCommand, " ")
wg.Add(1)
cmd := exec.CommandContext(ctx, cmdSlice[0], cmdSlice[1:]...)
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
cmd.Dir = dir
setParentGID(cmd)
go func(ctx context.Context, devCommand string, cwd string, wg *sync.WaitGroup) {
err := cmd.Run()
if err != nil {
if err := cmd.Start(); err != nil {
cancel()
return nil, fmt.Errorf("Unable to start frontend DevWatcher: %w", err)
}
LogGreen("Running frontend DevWatcher command: '%s'", devCommand)
var wg sync.WaitGroup
wg.Add(1)
go func() {
if err := cmd.Wait(); err != nil {
if err.Error() != "exit status 1" {
LogRed("Error from '%s': %s", devCommand, err.Error())
LogRed("Error from DevWatcher '%s': %s", devCommand, err.Error())
}
}
LogGreen("Dev command exited!")
LogGreen("DevWatcher command exited!")
wg.Done()
}(ctx, devCommand, cwd, wg)
}()
return func(wg *sync.WaitGroup) {
return func() {
killProc(cmd, devCommand)
LogGreen("Dev command killed!")
LogGreen("DevWatcher command killed!")
cancel()
wg.Wait()
}
}, nil
}
// initialiseWatcher creates the project directory watcher that will trigger recompile
@@ -463,8 +490,13 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
appBinary, err := build.Build(buildOptions)
println()
if err != nil {
LogRed("Build error - continuing to run current version")
LogDarkYellow(err.Error())
LogRed("Build error - " + err.Error())
msg := "Continuing to run current version"
if debugBinaryProcess == nil {
msg = "No version running, build will be retriggered as soon as changes have been detected"
}
LogDarkYellow(msg)
return nil, "", nil
}
@@ -510,12 +542,8 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
}
// doWatcherLoop is the main watch loop that runs while dev is active
func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, flags devFlags, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL) {
func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, flags devFlags, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL) *process.Process {
// Main Loop
var (
err error
newBinaryProcess *process.Process
)
var extensionsThatTriggerARebuild = sliceToMap(strings.Split(flags.extensions, ","))
var dirsThatTriggerAReload []string
for _, dir := range strings.Split(flags.reloadDirs, ",") {
@@ -541,7 +569,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
assetDirURL := joinPath(devServerURL, "/wails/assetdir")
reloadURL := joinPath(devServerURL, "/wails/reload")
for quit == false {
//reload := false
// reload := false
select {
case exitCode := <-exitCodeChannel:
if exitCode == 0 {
@@ -586,7 +614,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
if item.Op&fsnotify.Create == fsnotify.Create {
// If this is a folder, add it to our watch list
if fs.DirExists(item.Name) {
//node_modules is BANNED!
// node_modules is BANNED!
if !strings.Contains(item.Name, "node_modules") {
err := watcher.Add(item.Name)
if err != nil {
@@ -601,7 +629,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
rebuild = false
LogGreen("[Rebuild triggered] files updated")
// Try and build the app
newBinaryProcess, _, err = restartApp(buildOptions, debugBinaryProcess, flags, exitCodeChannel)
newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, flags, exitCodeChannel)
if err != nil {
LogRed("Error during build: %s", err.Error())
continue
@@ -647,7 +675,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
}
if reload {
reload = false
_, err = http.Get(reloadURL)
_, err := http.Get(reloadURL)
if err != nil {
LogRed("Error during refresh: %s", err.Error())
}
@@ -657,6 +685,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
quit = true
}
}
return debugBinaryProcess
}
func joinPath(url *url.URL, subPath string) string {
@@ -6,6 +6,8 @@ package dev
import (
"os/exec"
"syscall"
"golang.org/x/sys/unix"
)
func setParentGID(cmd *exec.Cmd) {
@@ -15,6 +17,10 @@ func setParentGID(cmd *exec.Cmd) {
}
func killProc(cmd *exec.Cmd, devCommand string) {
if cmd == nil || cmd.Process == nil {
return
}
// Experiencing the same issue on macOS BigSur
// I'm using Vite, but I would imagine this could be an issue with Node (npm) in general
// Also, after several edit/rebuild cycles any abnormal shutdown (crash or CTRL-C) may still leave Node running
@@ -22,7 +28,7 @@ func killProc(cmd *exec.Cmd, devCommand string) {
// Not tested on *nix
pgid, err := syscall.Getpgid(cmd.Process.Pid)
if err == nil {
err := syscall.Kill(-pgid, 15) // note the minus sign
err := syscall.Kill(-pgid, unix.SIGTERM) // note the minus sign
if err != nil {
LogRed("Error from '%s' when attempting to kill the process: %s", devCommand, err.Error())
}
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
// Restores the window to the dimensions and position prior to minimising.
export function WindowUnminimise(): void;
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
// Opens the given URL in the system browser.
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
window.runtime.WindowUnminimise();
}
export function WindowSetRGBA(RGBA) {
window.runtime.WindowSetRGBA(RGBA);
export function WindowSetBackgroundColour(R, G, B, A) {
window.runtime.WindowSetBackgroundColour(R, G, B, A);
}
export function BrowserOpenURL(url) {
@@ -8,8 +8,7 @@
"mode": "exec",
"program": "${workspaceFolder}/{{.PathToDesktopBinary}}",
"preLaunchTask": "build",
"cwd": "${workspaceFolder}",
"env": {}
"cwd": "${workspaceFolder}"
},
{
"name": "Wails: Debug {{.ProjectName}}",
@@ -18,8 +17,16 @@
"mode": "exec",
"program": "${workspaceFolder}/{{.PathToDesktopBinary}}",
"preLaunchTask": "build debug",
"cwd": "${workspaceFolder}",
"env": {}
"cwd": "${workspaceFolder}"
},
{
"name": "Wails: Dev {{.ProjectName}}",
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${workspaceFolder}/{{.PathToDesktopBinary}}",
"preLaunchTask": "build dev",
"cwd": "${workspaceFolder}"
}
]
}
@@ -5,7 +5,25 @@
"label": "build",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
"cwd": "${workspaceFolder}",
"env": {
"CGO_ENABLED": "1"
}
},
"osx": {
"options": {
"env": {
"CGO_CFLAGS": "-mmacosx-version-min=10.13",
"CGO_LDFLAGS": "-framework UniformTypeIdentifiers -mmacosx-version-min=10.13"
}
}
},
"windows": {
"options": {
"env": {
"CGO_ENABLED": "0"
}
}
},
"command": "go",
"args": [
@@ -22,7 +40,25 @@
"label": "build debug",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
"cwd": "${workspaceFolder}",
"env": {
"CGO_ENABLED": "1"
}
},
"osx": {
"options": {
"env": {
"CGO_CFLAGS": "-mmacosx-version-min=10.13",
"CGO_LDFLAGS": "-framework UniformTypeIdentifiers -mmacosx-version-min=10.13"
}
}
},
"windows": {
"options": {
"env": {
"CGO_ENABLED": "0"
}
}
},
"command": "go",
"args": [
@@ -34,6 +70,41 @@
"-o",
"{{.PathToDesktopBinary}}"
]
},
{
"label": "build dev",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}",
"env": {
"CGO_ENABLED": "1"
}
},
"osx": {
"options": {
"env": {
"CGO_CFLAGS": "-mmacosx-version-min=10.13",
"CGO_LDFLAGS": "-framework UniformTypeIdentifiers -mmacosx-version-min=10.13"
}
}
},
"windows": {
"options": {
"env": {
"CGO_ENABLED": "0"
}
}
},
"command": "go",
"args": [
"build",
"-tags",
"dev",
"-gcflags",
"all=-N -l",
"-o",
"{{.PathToDesktopBinary}}"
]
}
]
}
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
// Restores the window to the dimensions and position prior to minimising.
export function WindowUnminimise(): void;
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
// Opens the given URL in the system browser.
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
window.runtime.WindowUnminimise();
}
export function WindowSetRGBA(RGBA) {
window.runtime.WindowSetRGBA(RGBA);
export function WindowSetBackgroundColour(R, G, B, A) {
window.runtime.WindowSetBackgroundColour(R, G, B, A);
}
export function BrowserOpenURL(url) {
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
// Restores the window to the dimensions and position prior to minimising.
export function WindowUnminimise(): void;
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
// Opens the given URL in the system browser.
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
window.runtime.WindowUnminimise();
}
export function WindowSetRGBA(RGBA) {
window.runtime.WindowSetRGBA(RGBA);
export function WindowSetBackgroundColour(R, G, B, A) {
window.runtime.WindowSetBackgroundColour(R, G, B, A);
}
export function BrowserOpenURL(url) {
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
// Restores the window to the dimensions and position prior to minimising.
export function WindowUnminimise(): void;
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
// Opens the given URL in the system browser.
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
window.runtime.WindowUnminimise();
}
export function WindowSetRGBA(RGBA) {
window.runtime.WindowSetRGBA(RGBA);
export function WindowSetBackgroundColour(R, G, B, A) {
window.runtime.WindowSetBackgroundColour(R, G, B, A);
}
export function BrowserOpenURL(url) {
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
// Restores the window to the dimensions and position prior to minimising.
export function WindowUnminimise(): void;
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
// Opens the given URL in the system browser.
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
window.runtime.WindowUnminimise();
}
export function WindowSetRGBA(RGBA) {
window.runtime.WindowSetRGBA(RGBA);
export function WindowSetBackgroundColour(R, G, B, A) {
window.runtime.WindowSetBackgroundColour(R, G, B, A);
}
export function BrowserOpenURL(url) {

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