mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 11:10:47 +08:00

# Conflicts: # v3/V3 Changes.md # v3/examples/events/assets/index.html # v3/examples/events/main.go # v3/internal/runtime/desktop/main.js # v3/internal/runtime/package-lock.json # v3/internal/runtime/package.json # v3/internal/runtime/runtime_debug_desktop_darwin.js # v3/internal/runtime/runtime_debug_desktop_linux.js # v3/internal/runtime/runtime_debug_desktop_windows.js # v3/internal/runtime/runtime_production_desktop_darwin.js # v3/internal/runtime/runtime_production_desktop_linux.js # v3/internal/runtime/runtime_production_desktop_windows.js # v3/pkg/application/application.go # v3/pkg/application/messageprocessor.go # v3/pkg/application/messageprocessor_window.go # v3/pkg/application/options_webview_window.go # v3/pkg/application/webview_window.go # v3/pkg/application/webview_window_darwin.go # v3/pkg/options/application.go
63 lines
1.6 KiB
Go
63 lines
1.6 KiB
Go
package options
|
|
|
|
import (
|
|
"io/fs"
|
|
"net/http"
|
|
)
|
|
|
|
type WindowState int
|
|
|
|
const (
|
|
WindowStateNormal WindowState = iota
|
|
WindowStateMinimised
|
|
WindowStateMaximised
|
|
WindowStateFullscreen
|
|
)
|
|
|
|
type WebviewWindow 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
|
|
Assets Assets
|
|
HTML string
|
|
JS string
|
|
CSS string
|
|
X int
|
|
Y int
|
|
FullscreenButtonEnabled bool
|
|
Hidden bool
|
|
EnableFraudulentWebsiteWarnings bool
|
|
Zoom float64
|
|
}
|
|
|
|
var WindowDefaults = &WebviewWindow{
|
|
Title: "",
|
|
Width: 800,
|
|
Height: 600,
|
|
URL: "",
|
|
}
|
|
|
|
type Assets struct {
|
|
// FS to use for loading assets from
|
|
FS fs.FS
|
|
// Handler is a custom handler to use for serving assets. If this is set, the `URL` and `FS` fields are ignored.
|
|
Handler http.Handler
|
|
// Middleware is a custom middleware to use for serving assets. If this is set, the `URL` and `FS` fields are ignored.
|
|
Middleware func(http.Handler) http.Handler
|
|
}
|
|
|
|
type RGBA struct {
|
|
Red, Green, Blue, Alpha uint8
|
|
}
|