Add Some WindowState (#1349)

* Add Check for WindowState IsMaximised, IsMinimized, IsNormal and IsFullscreen

Solve conflicts

# Conflicts:
#	v2/internal/frontend/desktop/darwin/WailsContext.m
#	v2/internal/frontend/desktop/darwin/frontend.go
#	v2/internal/frontend/desktop/linux/window.go
#	v2/internal/frontend/desktop/windows/window.go

* Add Check for WindowState IsMaximised, IsMinimized, IsNormal and IsFullscreen

Solve conflict
# Conflicts:
#	v2/pkg/runtime/window.go

* Forgot some function to use it

# Conflicts:
#	v2/internal/frontend/desktop/darwin/WailsContext.h
#	v2/internal/frontend/desktop/windows/win32/consts.go
#	v2/internal/frontend/desktop/windows/win32/window.go

* Modify the instructions

# Conflicts:
#	v2/internal/frontend/devserver/devserver.go

* Add Functions to DevServer

# Conflicts:
#	v2/internal/frontend/dispatcher/systemcalls.go
#	v2/internal/frontend/runtime/desktop/window.js
#	v2/internal/frontend/runtime/package-lock.json
#	v2/internal/frontend/runtime/runtime_prod_desktop.js
#	v2/internal/frontend/runtime/wrapper/runtime.d.ts
#	v2/internal/frontend/runtime/wrapper/runtime.js

* Add Callback and JavaScript Functions

# Conflicts:
#	v2/cmd/wails/internal/commands/initialise/templates/generate/assets/common/frontend/wailsjs/runtime/runtime.js
#	v2/internal/frontend/runtime/package-lock.json
#	v2/internal/frontend/runtime/runtime_dev_desktop.js

* Remove Merge lines

* Fix IsMaximised

* Add WindowState Docs

* Update docs

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
ZanderCodes
2022-08-30 06:52:01 +10:00
committed by GitHub
co-authored by Lea Anthony
parent d70d8055cc
commit 70c484f603
23 changed files with 1249 additions and 18 deletions
+28
View File
@@ -27,6 +27,13 @@ Restores the previous window dimensions and position prior to full screen.
Go: `WindowUnfullscreen(ctx context.Context)`<br/>
JS: `WindowUnfullscreen()`
### WindowIsFullscreen
Returns true if the window is full screen.
Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool`
### WindowCenter
Centers the window on the monitor the window is currently on.
@@ -89,6 +96,13 @@ Hides the window, if it is currently visible.
Go: `WindowHide(ctx context.Context)`<br/>
JS: `WindowHide()`
### WindowIsNormal
Returns true if the window not minimised, maximised or fullscreen.
Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool`
### WindowSetSize
Sets the width and height of the window.
@@ -158,6 +172,13 @@ Restores the window to the dimensions and position prior to maximising.
Go: `WindowUnmaximise(ctx context.Context)`<br/>
JS: `WindowUnmaximise()`
### WindowIsMaximised
Returns true if the window is maximised.
Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool`
### WindowToggleMaximise
Toggles between Maximised and UnMaximised.
@@ -179,6 +200,13 @@ Restores the window to the dimensions and position prior to minimising.
Go: `WindowUnminimise(ctx context.Context)`<br/>
JS: `WindowUnminimise()`
### WindowIsMinimised
Returns true if the window is minimised.
Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool`
### WindowSetBackgroundColour
Sets the background colour of the window to the given RGBA colour definition.