options

package
v2.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 7 Imported by: 257

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &App{
	Width:    1024,
	Height:   768,
	Logger:   logger.NewDefaultLogger(),
	LogLevel: logger.INFO,
}

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
	RGBA              *RGBA
	Assets            embed.FS
	Menu              *menu.Menu
	Logger            logger.Logger `json:"-"`
	LogLevel          logger.LogLevel
	OnStartup         func(ctx context.Context) `json:"-"`
	OnDomReady        func(ctx context.Context) `json:"-"`
	OnShutdown        func(ctx context.Context) `json:"-"`
	Bind              []interface{}

	//ContextMenus []*menu.ContextMenu
	//TrayMenus    []*menu.TrayMenu
	Windows *windows.Options
}

App contains options for creating the App

type RGBA

type RGBA struct {
	R uint8 `json:"r"`
	G uint8 `json:"g"`
	B uint8 `json:"b"`
	A uint8 `json:"a"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL