Documentation ¶
Index ¶
- Constants
- func BrowserOpenURL(ctx context.Context, url string)
- func ClipboardGetText(ctx context.Context) (string, error)
- func ClipboardSetText(ctx context.Context, text string) error
- func EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})
- func EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)
- func EventsOffAll(ctx context.Context)
- func EventsOn(ctx context.Context, eventName string, ...) func()
- func EventsOnMultiple(ctx context.Context, eventName string, ...) func()
- func EventsOnce(ctx context.Context, eventName string, ...) func()
- func Hide(ctx context.Context)
- func LogDebug(ctx context.Context, message string)
- func LogDebugf(ctx context.Context, format string, args ...interface{})
- func LogError(ctx context.Context, message string)
- func LogErrorf(ctx context.Context, format string, args ...interface{})
- func LogFatal(ctx context.Context, message string)
- func LogFatalf(ctx context.Context, format string, args ...interface{})
- func LogInfo(ctx context.Context, message string)
- func LogInfof(ctx context.Context, format string, args ...interface{})
- func LogPrint(ctx context.Context, message string)
- func LogPrintf(ctx context.Context, format string, args ...interface{})
- func LogSetLogLevel(ctx context.Context, level logger.LogLevel)
- func LogTrace(ctx context.Context, message string)
- func LogTracef(ctx context.Context, format string, args ...interface{})
- func LogWarning(ctx context.Context, message string)
- func LogWarningf(ctx context.Context, format string, args ...interface{})
- func MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)
- func MenuUpdateApplicationMenu(ctx context.Context)
- func MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)
- func OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)
- func OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)
- func OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)
- func Quit(ctx context.Context)
- func SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)
- func Show(ctx context.Context)
- func WindowCenter(ctx context.Context)
- func WindowExecJS(ctx context.Context, js string)
- func WindowFullscreen(ctx context.Context)
- func WindowGetPosition(ctx context.Context) (int, int)
- func WindowGetSize(ctx context.Context) (int, int)
- func WindowHide(ctx context.Context)
- func WindowIsFullscreen(ctx context.Context) bool
- func WindowIsMaximised(ctx context.Context) bool
- func WindowIsMinimised(ctx context.Context) bool
- func WindowIsNormal(ctx context.Context) bool
- func WindowMaximise(ctx context.Context)
- func WindowMinimise(ctx context.Context)
- func WindowPrint(ctx context.Context)
- func WindowReload(ctx context.Context)
- func WindowReloadApp(ctx context.Context)
- func WindowSetAlwaysOnTop(ctx context.Context, b bool)
- func WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)
- func WindowSetDarkTheme(ctx context.Context)
- func WindowSetLightTheme(ctx context.Context)
- func WindowSetMaxSize(ctx context.Context, width int, height int)
- func WindowSetMinSize(ctx context.Context, width int, height int)
- func WindowSetPosition(ctx context.Context, x int, y int)
- func WindowSetSize(ctx context.Context, width int, height int)
- func WindowSetSystemDefaultTheme(ctx context.Context)
- func WindowSetTitle(ctx context.Context, title string)
- func WindowShow(ctx context.Context)
- func WindowToggleMaximise(ctx context.Context)
- func WindowUnfullscreen(ctx context.Context)
- func WindowUnmaximise(ctx context.Context)
- func WindowUnminimise(ctx context.Context)
- type DialogType
- type EnvironmentInfo
- type FileFilter
- type MessageDialogOptions
- type OpenDialogOptions
- type SaveDialogOptions
- type Screen
Constants ¶
const ( InfoDialog = frontend.InfoDialog WarningDialog = frontend.WarningDialog ErrorDialog = frontend.ErrorDialog QuestionDialog = frontend.QuestionDialog )
Variables ¶
This section is empty.
Functions ¶
func BrowserOpenURL ¶
BrowserOpenURL uses the system default browser to open the url
func EventsEmit ¶
EventsEmit pass through
func EventsOff ¶
EventsOff unregisters a listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`
func EventsOffAll ¶
EventsOff unregisters a listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`
func EventsOn ¶
func EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{})) func()
EventsOn registers a listener for the given event name. It returns a function to cancel the listener
func EventsOnMultiple ¶
func EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int) func()
EventsOnMultiple registers a listener for the given event name, that may be called a maximum of 'counter' times. It returns a function to cancel the listener
func EventsOnce ¶
func EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{})) func()
EventsOnce registers a listener for the given event name. After the first callback, the listener is deleted. It returns a function to cancel the listener
func LogSetLogLevel ¶
LogSetLogLevel sets the log level
func LogWarning ¶
LogWarning prints a Warning level message
func LogWarningf ¶
LogWarningf prints a Warning level message
func MessageDialog ¶
func MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)
MessageDialog show a message dialog to the user
func OpenDirectoryDialog ¶
func OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)
OpenDirectoryDialog prompts the user to select a directory
func OpenFileDialog ¶
func OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)
OpenFileDialog prompts the user to select a file
func OpenMultipleFilesDialog ¶
func OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)
OpenMultipleFilesDialog prompts the user to select a file
func SaveFileDialog ¶
func SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)
SaveFileDialog prompts the user to select a file
func WindowCenter ¶
WindowCenter the window on the current screen
func WindowExecJS ¶
WindowExecJS executes the given Js in the window
func WindowFullscreen ¶
WindowFullscreen makes the window fullscreen
func WindowIsFullscreen ¶
WindowIsFullscreen get the window state is window Fullscreen
func WindowIsMaximised ¶
WindowIsMaximised get the window state is window Maximised
func WindowIsMinimised ¶
WindowIsMinimised get the window state is window Minimised
func WindowIsNormal ¶
WindowIsNormal get the window state is window Normal
func WindowPrint ¶
func WindowReload ¶
WindowReload will reload the window contents
func WindowReloadApp ¶
WindowReloadApp will reload the application
func WindowSetAlwaysOnTop ¶
WindowSetAlwaysOnTop sets the window AlwaysOnTop or not on top
func WindowSetDarkTheme ¶
func WindowSetLightTheme ¶
func WindowSetMaxSize ¶
WindowSetMaxSize sets the maximum size of the window
func WindowSetMinSize ¶
WindowSetMinSize sets the minimum size of the window
func WindowSetPosition ¶
WindowSetPosition sets the position of the window
func WindowSetSize ¶
WindowSetSize sets the size of the window
func WindowSetTitle ¶
WindowSetTitle sets the title of the window
func WindowToggleMaximise ¶
WindowToggleMaximise the window
func WindowUnfullscreen ¶
WindowUnfullscreen makes the window UnFullscreen
Types ¶
type DialogType ¶
type DialogType = frontend.DialogType
type EnvironmentInfo ¶
type EnvironmentInfo struct { BuildType string `json:"buildType"` Platform string `json:"platform"` Arch string `json:"arch"` }
EnvironmentInfo contains information about the environment
func Environment ¶
func Environment(ctx context.Context) EnvironmentInfo
Environment returns information about the environment
type FileFilter ¶
type FileFilter = frontend.FileFilter
FileFilter defines a filter for dialog boxes
type MessageDialogOptions ¶
type MessageDialogOptions = frontend.MessageDialogOptions
MessageDialogOptions contains the options for the Message dialogs, EG Info, Warning, etc runtime methods
type OpenDialogOptions ¶
type OpenDialogOptions = frontend.OpenDialogOptions
OpenDialogOptions contains the options for the OpenDialogOptions runtime method
type SaveDialogOptions ¶
type SaveDialogOptions = frontend.SaveDialogOptions
SaveDialogOptions contains the options for the SaveDialog runtime method