runtime

package
v2.0.0-beta.34 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 10 Imported by: 179

Documentation

Index

Constants

View Source
const (
	InfoDialog     = frontend.InfoDialog
	WarningDialog  = frontend.WarningDialog
	ErrorDialog    = frontend.ErrorDialog
	QuestionDialog = frontend.QuestionDialog
)

Variables

This section is empty.

Functions

func BrowserOpenURL

func BrowserOpenURL(ctx context.Context, url string)

BrowserOpenURL uses the system default browser to open the url

func EventsEmit

func EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})

EventsEmit pass through

func EventsOff

func EventsOff(ctx context.Context, eventName string)

EventsOff unregisters a listener for the given event name

func EventsOn

func EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))

EventsOn registers a listener for the given event name

func EventsOnMultiple

func EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)

EventsOnMultiple registers a listener for the given event name, that may be called a maximum of 'counter' times

func EventsOnce

func EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))

EventsOnce registers a listener for the given event name. After the first callback, the listener is deleted.

func LogDebug

func LogDebug(ctx context.Context, message string)

LogDebug prints a Debug level message

func LogError

func LogError(ctx context.Context, message string)

LogError prints a Error level message

func LogFatal

func LogFatal(ctx context.Context, message string)

LogFatal prints a Fatal level message

func LogInfo

func LogInfo(ctx context.Context, message string)

LogInfo prints a Info level message

func LogPrint

func LogPrint(ctx context.Context, message string)

LogPrint prints a Print level message

func LogSetLogLevel

func LogSetLogLevel(ctx context.Context, level logger.LogLevel)

LogSetLogLevel sets the log level

func LogTrace

func LogTrace(ctx context.Context, message string)

LogTrace prints a Trace level message

func LogWarning

func LogWarning(ctx context.Context, message string)

LogWarning prints a Warning level message

func MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)
func MenuUpdateApplicationMenu(ctx context.Context)

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 Quit

func Quit(ctx context.Context)

Quit the application

func SaveFileDialog

func SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)

SaveFileDialog prompts the user to select a file

func WindowCenter

func WindowCenter(ctx context.Context)

WindowCenter the window on the current screen

func WindowFullscreen

func WindowFullscreen(ctx context.Context)

WindowFullscreen makes the window fullscreen

func WindowGetPosition

func WindowGetPosition(ctx context.Context) (int, int)

func WindowGetSize

func WindowGetSize(ctx context.Context) (int, int)

func WindowHide

func WindowHide(ctx context.Context)

WindowHide the window

func WindowMaximise

func WindowMaximise(ctx context.Context)

WindowMaximise the window

func WindowMinimise

func WindowMinimise(ctx context.Context)

WindowMinimise the window

func WindowReload

func WindowReload(ctx context.Context)

WindowReload will reload the window contents

func WindowSetMaxSize

func WindowSetMaxSize(ctx context.Context, width int, height int)

WindowSetMaxSize sets the maximum size of the window

func WindowSetMinSize

func WindowSetMinSize(ctx context.Context, width int, height int)

WindowSetMinSize sets the minimum size of the window

func WindowSetPosition

func WindowSetPosition(ctx context.Context, x int, y int)

WindowSetPosition sets the position of the window

func WindowSetRGBA

func WindowSetRGBA(ctx context.Context, R, G, B, A uint8)

func WindowSetSize

func WindowSetSize(ctx context.Context, width int, height int)

WindowSetSize sets the size of the window

func WindowSetTitle

func WindowSetTitle(ctx context.Context, title string)

WindowSetTitle sets the title of the window

func WindowShow

func WindowShow(ctx context.Context)

WindowShow shows the window if hidden

func WindowToggleMaximise

func WindowToggleMaximise(ctx context.Context)

WindowToggleMaximise the window

func WindowUnfullscreen

func WindowUnfullscreen(ctx context.Context)

WindowUnfullscreen makes the window UnFullscreen

func WindowUnmaximise

func WindowUnmaximise(ctx context.Context)

WindowUnmaximise the window

func WindowUnminimise

func WindowUnminimise(ctx context.Context)

WindowUnminimise the window

Types

type DialogType

type DialogType = frontend.DialogType

type EnvironmentInfo

type EnvironmentInfo struct {
	BuildType string `json:"buildtype"`
}

func Environment

func Environment(ctx context.Context) EnvironmentInfo

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

Jump to

Keyboard shortcuts

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