mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 22:13:36 +08:00
Rename WindowSetRGBA -> WindowSetBackgroundColour (#1506)
* Rename WindowSetRGBA -> WindowSetBackgroundColour * Fix Typos
This commit is contained in:
parent
7141c972fd
commit
3e42d2da05
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
10
v2/go.mod
10
v2/go.mod
@ -9,7 +9,7 @@ require (
|
|||||||
github.com/go-git/go-billy/v5 v5.2.0 // indirect
|
github.com/go-git/go-billy/v5 v5.2.0 // indirect
|
||||||
github.com/go-git/go-git/v5 v5.3.0
|
github.com/go-git/go-git/v5 v5.3.0
|
||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
||||||
github.com/google/uuid v1.1.2 // indirect
|
github.com/google/uuid v1.1.2
|
||||||
github.com/imdario/mergo v0.3.12
|
github.com/imdario/mergo v0.3.12
|
||||||
github.com/jackmordaunt/icns v1.0.0
|
github.com/jackmordaunt/icns v1.0.0
|
||||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e
|
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e
|
||||||
@ -37,15 +37,17 @@ require (
|
|||||||
golang.org/x/tools v0.1.0
|
golang.org/x/tools v0.1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require github.com/bitfield/script v0.19.0
|
require (
|
||||||
|
github.com/bep/debounce v1.2.1
|
||||||
|
github.com/bitfield/script v0.19.0
|
||||||
|
github.com/go-ole/go-ole v1.2.6
|
||||||
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
bitbucket.org/creachadair/shell v0.0.7 // indirect
|
bitbucket.org/creachadair/shell v0.0.7 // indirect
|
||||||
github.com/Microsoft/go-winio v0.4.16 // indirect
|
github.com/Microsoft/go-winio v0.4.16 // indirect
|
||||||
github.com/bep/debounce v1.2.1 // indirect
|
|
||||||
github.com/emirpasic/gods v1.12.0 // indirect
|
github.com/emirpasic/gods v1.12.0 // indirect
|
||||||
github.com/go-git/gcfg v1.5.0 // indirect
|
github.com/go-git/gcfg v1.5.0 // indirect
|
||||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
|
||||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||||
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
|
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
|
||||||
github.com/kr/pretty v0.3.0 // indirect
|
github.com/kr/pretty v0.3.0 // indirect
|
||||||
|
@ -38,7 +38,6 @@ github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbK
|
|||||||
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
|
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
|
||||||
github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc=
|
github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc=
|
||||||
github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw=
|
github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw=
|
||||||
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
|
||||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||||
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||||
@ -48,7 +47,6 @@ github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
|||||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
|
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
|
||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
|
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
|
||||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
||||||
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
|
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
|
||||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
||||||
|
@ -16,6 +16,8 @@ func (a *App) Run() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *App) Shutdown() {}
|
||||||
|
|
||||||
// CreateApp creates the app!
|
// CreateApp creates the app!
|
||||||
func CreateApp(_ *options.App) (*App, error) {
|
func CreateApp(_ *options.App) (*App, error) {
|
||||||
return nil, fmt.Errorf(`Wails applications will not build without the correct build tags.`)
|
return nil, fmt.Errorf(`Wails applications will not build without the correct build tags.`)
|
||||||
|
@ -16,6 +16,8 @@ func (a *App) Run() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *App) Shutdown() {}
|
||||||
|
|
||||||
// CreateApp creates the app!
|
// CreateApp creates the app!
|
||||||
func CreateApp(_ *options.App) (*App, error) {
|
func CreateApp(_ *options.App) (*App, error) {
|
||||||
return nil, fmt.Errorf(`Wails applications will not build without the correct build tags.`)
|
return nil, fmt.Errorf(`Wails applications will not build without the correct build tags.`)
|
||||||
|
@ -17,6 +17,8 @@ func (a *App) Run() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *App) Shutdown() {}
|
||||||
|
|
||||||
// CreateApp creates the app!
|
// CreateApp creates the app!
|
||||||
func CreateApp(_ *options.App) (*App, error) {
|
func CreateApp(_ *options.App) (*App, error) {
|
||||||
result := w32.MessageBox(0,
|
result := w32.MessageBox(0,
|
||||||
|
@ -36,7 +36,7 @@ void Maximise(void* ctx);
|
|||||||
void UnMaximise(void* ctx);
|
void UnMaximise(void* ctx);
|
||||||
void Hide(void* ctx);
|
void Hide(void* ctx);
|
||||||
void Show(void* ctx);
|
void Show(void* ctx);
|
||||||
void SetRGBA(void* ctx, int r, int g, int b, int a);
|
void SetBackgroundColour(void* ctx, int r, int g, int b, int a);
|
||||||
void ExecJS(void* ctx, const char*);
|
void ExecJS(void* ctx, const char*);
|
||||||
void Quit(void*);
|
void Quit(void*);
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ void SetTitle(void* inctx, const char *title) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetRGBA(void *inctx, int r, int g, int b, int a) {
|
void SetBackgroundColour(void *inctx, int r, int g, int b, int a) {
|
||||||
WailsContext *ctx = (__bridge WailsContext*) inctx;
|
WailsContext *ctx = (__bridge WailsContext*) inctx;
|
||||||
ON_MAIN_THREAD(
|
ON_MAIN_THREAD(
|
||||||
[ctx SetRGBA:r :g :b :a];
|
[ctx SetBackgroundColour:r :g :b :a];
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
- (void) Maximise;
|
- (void) Maximise;
|
||||||
- (void) ToggleMaximise;
|
- (void) ToggleMaximise;
|
||||||
- (void) UnMaximise;
|
- (void) UnMaximise;
|
||||||
- (void) SetRGBA:(int)r :(int)g :(int)b :(int)a;
|
- (void) SetBackgroundColour:(int)r :(int)g :(int)b :(int)a;
|
||||||
- (void) HideMouse;
|
- (void) HideMouse;
|
||||||
- (void) ShowMouse;
|
- (void) ShowMouse;
|
||||||
- (void) Hide;
|
- (void) Hide;
|
||||||
|
@ -299,7 +299,7 @@
|
|||||||
[self.webview loadRequest:wkRequest];
|
[self.webview loadRequest:wkRequest];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) SetRGBA:(int)r :(int)g :(int)b :(int)a {
|
- (void) SetBackgroundColour:(int)r :(int)g :(int)b :(int)a {
|
||||||
float red = r/255.0;
|
float red = r/255.0;
|
||||||
float green = g/255.0;
|
float green = g/255.0;
|
||||||
float blue = b/255.0;
|
float blue = b/255.0;
|
||||||
|
@ -217,11 +217,11 @@ func (f *Frontend) WindowSetMaxSize(width int, height int) {
|
|||||||
f.mainWindow.SetMaxSize(width, height)
|
f.mainWindow.SetMaxSize(width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Frontend) WindowSetRGBA(col *options.RGBA) {
|
func (f *Frontend) WindowSetBackgroundColour(col *options.RGBA) {
|
||||||
if col == nil {
|
if col == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
f.mainWindow.SetRGBA(col.R, col.G, col.B, col.A)
|
f.mainWindow.SetBackgroundColour(col.R, col.G, col.B, col.A)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Frontend) Quit() {
|
func (f *Frontend) Quit() {
|
||||||
|
@ -220,7 +220,7 @@ int main(int argc, const char * argv[]) {
|
|||||||
int startsHidden = 0;
|
int startsHidden = 0;
|
||||||
WailsContext *result = Create("OI OI!",400,400, frameless, resizable, fullscreen, fullSizeContent, hideTitleBar, titlebarAppearsTransparent, hideTitle, useToolbar, hideToolbarSeparator, webviewIsTransparent, alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, debug, windowStartState,
|
WailsContext *result = Create("OI OI!",400,400, frameless, resizable, fullscreen, fullSizeContent, hideTitleBar, titlebarAppearsTransparent, hideTitle, useToolbar, hideToolbarSeparator, webviewIsTransparent, alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, debug, windowStartState,
|
||||||
startsHidden, 400, 400, 600, 600);
|
startsHidden, 400, 400, 600, 600);
|
||||||
SetRGBA(result, 255, 0, 0, 255);
|
SetBackgroundColour(result, 255, 0, 0, 255);
|
||||||
void *m = NewMenu("");
|
void *m = NewMenu("");
|
||||||
SetAbout(result, "Fake title", "I am a description", _Users_username_Pictures_SaltBae_png, _Users_username_Pictures_SaltBae_png_len);
|
SetAbout(result, "Fake title", "I am a description", _Users_username_Pictures_SaltBae_png, _Users_username_Pictures_SaltBae_png_len);
|
||||||
// AddMenuByRole(result, 1);
|
// AddMenuByRole(result, 1);
|
||||||
|
@ -93,7 +93,7 @@ func NewWindow(frontendOptions *options.App, debugMode bool) *Window {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if frontendOptions.BackgroundColour != nil {
|
if frontendOptions.BackgroundColour != nil {
|
||||||
result.SetRGBA(frontendOptions.BackgroundColour.R, frontendOptions.BackgroundColour.G, frontendOptions.BackgroundColour.B, frontendOptions.BackgroundColour.A)
|
result.SetBackgroundColour(frontendOptions.BackgroundColour.R, frontendOptions.BackgroundColour.G, frontendOptions.BackgroundColour.B, frontendOptions.BackgroundColour.A)
|
||||||
}
|
}
|
||||||
|
|
||||||
if frontendOptions.Mac != nil && frontendOptions.Mac.About != nil {
|
if frontendOptions.Mac != nil && frontendOptions.Mac.About != nil {
|
||||||
@ -129,8 +129,8 @@ func (w *Window) Quit() {
|
|||||||
C.Quit(w.context)
|
C.Quit(w.context)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Window) SetRGBA(r uint8, g uint8, b uint8, a uint8) {
|
func (w *Window) SetBackgroundColour(r uint8, g uint8, b uint8, a uint8) {
|
||||||
C.SetRGBA(w.context, C.int(r), C.int(g), C.int(b), C.int(a))
|
C.SetBackgroundColour(w.context, C.int(r), C.int(g), C.int(b), C.int(a))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Window) ExecJS(js string) {
|
func (w *Window) ExecJS(js string) {
|
||||||
|
@ -209,11 +209,11 @@ func (f *Frontend) WindowSetMaxSize(width int, height int) {
|
|||||||
f.mainWindow.SetMaxSize(width, height)
|
f.mainWindow.SetMaxSize(width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Frontend) WindowSetRGBA(col *options.RGBA) {
|
func (f *Frontend) WindowSetBackgroundColour(col *options.RGBA) {
|
||||||
if col == nil {
|
if col == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
f.mainWindow.SetRGBA(col.R, col.G, col.B, col.A)
|
f.mainWindow.SetBackgroundColour(col.R, col.G, col.B, col.A)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Frontend) Quit() {
|
func (f *Frontend) Quit() {
|
||||||
|
@ -433,7 +433,7 @@ typedef struct RGBAOptions {
|
|||||||
void *webview;
|
void *webview;
|
||||||
} RGBAOptions;
|
} RGBAOptions;
|
||||||
|
|
||||||
void setRGBA(void* data) {
|
void setBackgroundColour(void* data) {
|
||||||
RGBAOptions* options = (RGBAOptions*)data;
|
RGBAOptions* options = (RGBAOptions*)data;
|
||||||
GdkRGBA colour = {options->r / 255.0, options->g / 255.0, options->b / 255.0, options->a / 255.0};
|
GdkRGBA colour = {options->r / 255.0, options->g / 255.0, options->b / 255.0, options->a / 255.0};
|
||||||
webkit_web_view_set_background_color(WEBKIT_WEB_VIEW(options->webview), &colour);
|
webkit_web_view_set_background_color(WEBKIT_WEB_VIEW(options->webview), &colour);
|
||||||
@ -638,7 +638,7 @@ func NewWindow(appoptions *options.App, debug bool) *Window {
|
|||||||
|
|
||||||
// Set background colour
|
// Set background colour
|
||||||
RGBA := appoptions.BackgroundColour
|
RGBA := appoptions.BackgroundColour
|
||||||
result.SetRGBA(RGBA.R, RGBA.G, RGBA.B, RGBA.A)
|
result.SetBackgroundColour(RGBA.R, RGBA.G, RGBA.B, RGBA.A)
|
||||||
|
|
||||||
// Setup window
|
// Setup window
|
||||||
result.SetKeepAbove(appoptions.AlwaysOnTop)
|
result.SetKeepAbove(appoptions.AlwaysOnTop)
|
||||||
@ -779,7 +779,7 @@ func (w *Window) IsMaximised() bool {
|
|||||||
return result > 0
|
return result > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Window) SetRGBA(r uint8, g uint8, b uint8, a uint8) {
|
func (w *Window) SetBackgroundColour(r uint8, g uint8, b uint8, a uint8) {
|
||||||
data := C.RGBAOptions{
|
data := C.RGBAOptions{
|
||||||
r: C.uchar(r),
|
r: C.uchar(r),
|
||||||
g: C.uchar(g),
|
g: C.uchar(g),
|
||||||
@ -787,7 +787,7 @@ func (w *Window) SetRGBA(r uint8, g uint8, b uint8, a uint8) {
|
|||||||
a: C.uchar(a),
|
a: C.uchar(a),
|
||||||
webview: w.webview,
|
webview: w.webview,
|
||||||
}
|
}
|
||||||
invokeOnMainThread(func() { C.setRGBA(unsafe.Pointer(&data)) })
|
invokeOnMainThread(func() { C.setBackgroundColour(unsafe.Pointer(&data)) })
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ func (f *Frontend) WindowSetMaxSize(width int, height int) {
|
|||||||
f.mainWindow.SetMaxSize(width, height)
|
f.mainWindow.SetMaxSize(width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Frontend) WindowSetRGBA(col *options.RGBA) {
|
func (f *Frontend) WindowSetBackgroundColour(col *options.RGBA) {
|
||||||
if col == nil {
|
if col == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -399,7 +399,7 @@ func (f *Frontend) setupChromium() {
|
|||||||
onFocus.Bind(f.onFocus)
|
onFocus.Bind(f.onFocus)
|
||||||
|
|
||||||
// Set background colour
|
// Set background colour
|
||||||
f.WindowSetRGBA(f.frontendOptions.BackgroundColour)
|
f.WindowSetBackgroundColour(f.frontendOptions.BackgroundColour)
|
||||||
|
|
||||||
chromium.SetGlobalPermission(edge.CoreWebView2PermissionStateAllow)
|
chromium.SetGlobalPermission(edge.CoreWebView2PermissionStateAllow)
|
||||||
chromium.AddWebResourceRequestedFilter("*", edge.COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL)
|
chromium.AddWebResourceRequestedFilter("*", edge.COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL)
|
||||||
|
@ -243,8 +243,8 @@ func (d *DevWebServer) WindowUnfullscreen() {
|
|||||||
d.desktopFrontend.WindowUnfullscreen()
|
d.desktopFrontend.WindowUnfullscreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *DevWebServer) WindowSetRGBA(col *options.RGBA) {
|
func (d *DevWebServer) WindowSetBackgroundColour(col *options.RGBA) {
|
||||||
d.desktopFrontend.WindowSetRGBA(col)
|
d.desktopFrontend.WindowSetBackgroundColour(col)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *DevWebServer) MenuSetApplicationMenu(menu *menu.Menu) {
|
func (d *DevWebServer) MenuSetApplicationMenu(menu *menu.Menu) {
|
||||||
|
@ -70,7 +70,7 @@ func (d *Dispatcher) processWindowMessage(message string, sender frontend.Fronte
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
go sender.WindowSetRGBA(&rgba)
|
go sender.WindowSetBackgroundColour(&rgba)
|
||||||
case 'M':
|
case 'M':
|
||||||
go sender.WindowMaximise()
|
go sender.WindowMaximise()
|
||||||
case 't':
|
case 't':
|
||||||
|
@ -86,7 +86,7 @@ type Frontend interface {
|
|||||||
WindowSetMaxSize(width int, height int)
|
WindowSetMaxSize(width int, height int)
|
||||||
WindowFullscreen()
|
WindowFullscreen()
|
||||||
WindowUnfullscreen()
|
WindowUnfullscreen()
|
||||||
WindowSetRGBA(col *options.RGBA)
|
WindowSetBackgroundColour(col *options.RGBA)
|
||||||
WindowReload()
|
WindowReload()
|
||||||
WindowReloadApp()
|
WindowReloadApp()
|
||||||
WindowSetSystemDefaultTheme()
|
WindowSetSystemDefaultTheme()
|
||||||
|
@ -11,7 +11,7 @@ The electron alternative for Go
|
|||||||
/* jshint esversion: 9 */
|
/* jshint esversion: 9 */
|
||||||
|
|
||||||
|
|
||||||
import { Call } from "./calls";
|
import {Call} from "./calls";
|
||||||
|
|
||||||
export function WindowReload() {
|
export function WindowReload() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
@ -213,7 +213,6 @@ export function WindowUnminimise() {
|
|||||||
window.WailsInvoke('Wu');
|
window.WailsInvoke('Wu');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the background colour of the window
|
* Sets the background colour of the window
|
||||||
*
|
*
|
||||||
@ -223,8 +222,8 @@ export function WindowUnminimise() {
|
|||||||
* @param {number} B Blue
|
* @param {number} B Blue
|
||||||
* @param {number} A Alpha
|
* @param {number} A Alpha
|
||||||
*/
|
*/
|
||||||
export function WindowSetRGBA(R, G, B, A) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
let rgba = JSON.stringify({ r: R || 0, g: G || 0, b: B || 0, a: A || 255 });
|
let rgba = JSON.stringify({r: R || 0, g: G || 0, b: B || 0, a: A || 255});
|
||||||
window.WailsInvoke('Wr:' + rgba);
|
window.WailsInvoke('Wr:' + rgba);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
|||||||
// Restores the window to the dimensions and position prior to minimising.
|
// Restores the window to the dimensions and position prior to minimising.
|
||||||
export function WindowUnminimise(): void;
|
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.
|
// 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)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
|
@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
|||||||
window.runtime.WindowUnminimise();
|
window.runtime.WindowUnminimise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function WindowSetRGBA(RGBA) {
|
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||||
window.runtime.WindowSetRGBA(RGBA);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
|
@ -139,7 +139,8 @@ func WindowUnminimise(ctx context.Context) {
|
|||||||
appFrontend.WindowUnminimise()
|
appFrontend.WindowUnminimise()
|
||||||
}
|
}
|
||||||
|
|
||||||
func WindowSetRGBA(ctx context.Context, R, G, B, A uint8) {
|
// WindowSetBackgroundColour sets the colour of the window background
|
||||||
|
func WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8) {
|
||||||
appFrontend := getFrontend(ctx)
|
appFrontend := getFrontend(ctx)
|
||||||
col := &options.RGBA{
|
col := &options.RGBA{
|
||||||
R: R,
|
R: R,
|
||||||
@ -147,5 +148,5 @@ func WindowSetRGBA(ctx context.Context, R, G, B, A uint8) {
|
|||||||
B: B,
|
B: B,
|
||||||
A: A,
|
A: A,
|
||||||
}
|
}
|
||||||
appFrontend.WindowSetRGBA(col)
|
appFrontend.WindowSetBackgroundColour(col)
|
||||||
}
|
}
|
||||||
|
@ -184,10 +184,10 @@ JS Signature: `WindowUnminimise()`
|
|||||||
|
|
||||||
Restores the window to the dimensions and position prior to minimising.
|
Restores the window to the dimensions and position prior to minimising.
|
||||||
|
|
||||||
### WindowSetRGBA
|
### WindowSetBackgroundColour
|
||||||
Go Signature: `WindowSetRGBA(ctx context.Context, R, G, B, A uint8)`
|
Go Signature: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
|
||||||
|
|
||||||
JS Signature: `WindowSetRGBA(R, G, B, A)`
|
JS Signature: `WindowSetBackgroundColour(R, G, B, A)`
|
||||||
|
|
||||||
Sets the background colour of the window to the given RGBA colour definition.
|
Sets the background colour of the window to the given RGBA colour definition.
|
||||||
This colour will show through for all transparent pixels.
|
This colour will show through for all transparent pixels.
|
||||||
|
Loading…
Reference in New Issue
Block a user