Documentation ¶
Overview ¶
package runtime contains all the methods and data structures related to the runtime library of Wails. This includes both Go and JS runtimes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialog ¶
type Dialog interface { Open(dialogOptions *dialogoptions.OpenDialog) []string Save(dialogOptions *dialogoptions.SaveDialog) string Message(dialogOptions *dialogoptions.MessageDialog) string }
Dialog defines all Dialog related operations
type Events ¶
type Events interface { On(eventName string, callback func(optionalData ...interface{})) Once(eventName string, callback func(optionalData ...interface{})) OnMultiple(eventName string, callback func(optionalData ...interface{}), maxCallbacks int) Emit(eventName string, optionalData ...interface{}) OnThemeChange(callback func(darkMode bool)) }
Events defines all events related operations
type Log ¶
type Log interface { Print(message string) Trace(message string) Debug(message string) Info(message string) Warning(message string) Error(message string) Fatal(message string) SetLogLevel(level logger.LogLevel) }
Log defines all Log related operations
type Menu ¶
type Menu interface { UpdateApplicationMenu() UpdateContextMenu(contextMenu *menu.ContextMenu) SetTrayMenu(trayMenu *menu.TrayMenu) DeleteTrayMenu(trayMenu *menu.TrayMenu) UpdateTrayMenuLabel(trayMenu *menu.TrayMenu) }
Menu defines all Menu related operations
type Options ¶
type Options struct { // The name of the store Name string // The runtime to attach the store to Runtime *Runtime // Indicates if notifying Go listeners should be notified of updates // synchronously (on the current thread) or asynchronously using // goroutines NotifySynchronously bool }
Options defines the optional data that may be used when creating a Store
type Runtime ¶
type Runtime struct { Browser Browser Events Events Window Window Dialog Dialog System System Menu Menu Store *StoreProvider Log Log // contains filtered or unexported fields }
Runtime is a means for the user to interact with the application at runtime
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is where we keep named data
func (*Store) Get ¶
func (s *Store) Get() interface{}
Get returns the value of the data that's kept in the current state / Store
type StoreProvider ¶
type StoreProvider struct {
// contains filtered or unexported fields
}
StoreProvider is a struct that creates Stores
func (*StoreProvider) New ¶
func (p *StoreProvider) New(name string, defaultValue interface{}) *Store
New creates a new store
type Window ¶
type Window interface { Close() Center() Show() Hide() Maximise() Unmaximise() Minimise() Unminimise() SetTitle(title string) SetSize(width int, height int) SetMinSize(width int, height int) SetMaxSize(width int, height int) SetPosition(x int, y int) Fullscreen() UnFullscreen() SetColour(colour int) }
Window defines all Window related operations