5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 16:20:53 +08:00
wails/v3/pkg/application/options_webview_window.go
stffabi c8d203d4d6
[v3, darwin] Fix leaking WebKit processes on Window close (#2574)
* [v3, darwin] Fix leaking WebKit processes on Window close

* [v3] Remove window from window map if closed
[v3] Implement `HideOnClose` and ensure it isn't removed when closed

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-12 21:33:00 +10:00

50 lines
1.3 KiB
Go

package application
type WindowState int
const (
WindowStateNormal WindowState = iota
WindowStateMinimised
WindowStateMaximised
WindowStateFullscreen
)
type WebviewWindowOptions struct {
Name string
Title string
Width, Height int
AlwaysOnTop bool
URL string
DisableResize bool
Frameless bool
MinWidth int
MinHeight int
MaxWidth int
MaxHeight int
StartState WindowState
Mac MacWindow
BackgroundColour *RGBA
HTML string
JS string
CSS string
X int
Y int
HideOnClose bool
FullscreenButtonEnabled bool
Hidden bool
EnableFraudulentWebsiteWarnings bool
Zoom float64
EnableDragAndDrop bool
}
var WebviewWindowDefaults = &WebviewWindowOptions{
Title: "",
Width: 800,
Height: 600,
URL: "",
}
type RGBA struct {
Red, Green, Blue, Alpha uint8
}