Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &App{ Width: 1024, Height: 768, Logger: logger.NewDefaultLogger(), LogLevel: logger.INFO, LogLevelProduction: logger.ERROR, CSSDragProperty: "--wails-draggable", CSSDragValue: "drag", }
Default options for creating the App
Functions ¶
func MergeDefaults ¶
func MergeDefaults(appoptions *App)
MergeDefaults will set the minimum default values for an application
Types ¶
type App ¶
type App struct {
Title string
Width int
Height int
DisableResize bool
Fullscreen bool
Frameless bool
MinWidth int
MinHeight int
MaxWidth int
MaxHeight int
StartHidden bool
HideWindowOnClose bool
AlwaysOnTop bool
// BackgroundColour is the background colour of the window
// You can use the options.NewRGB and options.NewRGBA functions to create a new colour
BackgroundColour *RGBA
// Deprecated: Use AssetServer.Assets instead.
Assets fs.FS
// Deprecated: Use AssetServer.Handler instead.
AssetsHandler http.Handler
// AssetServer configures the Assets for the application
AssetServer *assetserver.Options
Menu *menu.Menu
Logger logger.Logger `json:"-"`
LogLevel logger.LogLevel
LogLevelProduction logger.LogLevel
OnStartup func(ctx context.Context) `json:"-"`
OnDomReady func(ctx context.Context) `json:"-"`
OnShutdown func(ctx context.Context) `json:"-"`
OnBeforeClose func(ctx context.Context) (prevent bool) `json:"-"`
Bind []interface{}
WindowStartState WindowStartState
// CSS property to test for draggable elements. Default "--wails-draggable"
CSSDragProperty string
// The CSS Value that the CSSDragProperty must have to be draggable, EG: "drag"
CSSDragValue string
Windows *windows.Options
Mac *mac.Options
Linux *linux.Options
// Experimental options
Experimental *Experimental
// Debug options for debug builds. These options will be ignored in a production build.
Debug Debug
}
App contains options for creating the App
type Debug ¶ added in v2.3.0
type Debug struct {
// OpenInspectorOnStartup opens the inspector on startup of the app.
OpenInspectorOnStartup bool
}
Debug options which are taken into account in debug builds.
type Experimental ¶
type Experimental struct {
}
type RGBA ¶
type SystemTray ¶ added in v2.3.0
type SystemTray struct {
LightModeIcon *SystemTrayIcon
DarkModeIcon *SystemTrayIcon
Title string
Tooltip string
StartHidden bool
Menu *menu.Menu
OnLeftClick func()
OnRightClick func()
OnLeftDoubleClick func()
OnRightDoubleClick func()
OnMenuClose func()
OnMenuOpen func()
}
SystemTray contains options for the system tray
type SystemTrayIcon ¶ added in v2.3.0
type SystemTrayIcon struct {
Data []byte
}
SystemTrayIcon represents a system tray icon
type WindowStartState ¶
type WindowStartState int
const ( Normal WindowStartState = 0 Maximised WindowStartState = 1 Minimised WindowStartState = 2 Fullscreen WindowStartState = 3 )
Click to show internal directories.
Click to hide internal directories.