runtime

package
v2.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 10 Imported by: 0

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 ClipboardGetText

func ClipboardGetText(ctx context.Context) (string, error)

func ClipboardSetText

func ClipboardSetText(ctx context.Context, text string) error

func EventsEmit

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

EventsEmit pass through

func EventsOff

func EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)

EventsOff unregisters a listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`

func EventsOffAll

func EventsOffAll(ctx context.Context)

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 Hide

func Hide(ctx context.Context)

Hide the application

func LogDebug

func LogDebug(ctx context.Context, message string)

LogDebug prints a Debug level message

func LogDebugf

func LogDebugf(ctx context.Context, format string, args ...interface{})

LogDebugf prints a Debug level message

func LogError

func LogError(ctx context.Context, message string)

LogError prints a Error level message

func LogErrorf

func LogErrorf(ctx context.Context, format string, args ...interface{})

LogErrorf prints a Error level message

func LogFatal

func LogFatal(ctx context.Context, message string)

LogFatal prints a Fatal level message

func LogFatalf

func LogFatalf(ctx context.Context, format string, args ...interface{})

LogFatalf prints a Fatal level message

func LogInfo

func LogInfo(ctx context.Context, message string)

LogInfo prints a Info level message

func LogInfof

func LogInfof(ctx context.Context, format string, args ...interface{})

LogInfof prints a Info level message

func LogPrint

func LogPrint(ctx context.Context, message string)

LogPrint prints a Print level message

func LogPrintf

func LogPrintf(ctx context.Context, format string, args ...interface{})

LogPrintf 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 LogTracef

func LogTracef(ctx context.Context, format string, args ...interface{})

LogTracef prints a Trace level message

func LogWarning

func LogWarning(ctx context.Context, message string)

LogWarning prints a Warning level message

func LogWarningf

func LogWarningf(ctx context.Context, format string, args ...interface{})

LogWarningf 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 Show

func Show(ctx context.Context)

Show the application if it is hidden

func WindowCenter

func WindowCenter(ctx context.Context)

WindowCenter the window on the current screen

func WindowExecJS

func WindowExecJS(ctx context.Context, js string)

WindowExecJS executes the given Js in the window

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 WindowIsFullscreen

func WindowIsFullscreen(ctx context.Context) bool

WindowIsFullscreen get the window state is window Fullscreen

func WindowIsMaximised

func WindowIsMaximised(ctx context.Context) bool

WindowIsMaximised get the window state is window Maximised

func WindowIsMinimised

func WindowIsMinimised(ctx context.Context) bool

WindowIsMinimised get the window state is window Minimised

func WindowIsNormal

func WindowIsNormal(ctx context.Context) bool

WindowIsNormal get the window state is window Normal

func WindowMaximise

func WindowMaximise(ctx context.Context)

WindowMaximise the window

func WindowMinimise

func WindowMinimise(ctx context.Context)

WindowMinimise the window

func WindowPrint

func WindowPrint(ctx context.Context)

func WindowReload

func WindowReload(ctx context.Context)

WindowReload will reload the window contents

func WindowReloadApp

func WindowReloadApp(ctx context.Context)

WindowReloadApp will reload the application

func WindowSetAlwaysOnTop

func WindowSetAlwaysOnTop(ctx context.Context, b bool)

WindowSetAlwaysOnTop sets the window AlwaysOnTop or not on top

func WindowSetBackgroundColour

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

func WindowSetDarkTheme

func WindowSetDarkTheme(ctx context.Context)

func WindowSetLightTheme

func WindowSetLightTheme(ctx context.Context)

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 WindowSetSize

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

WindowSetSize sets the size of the window

func WindowSetSystemDefaultTheme

func WindowSetSystemDefaultTheme(ctx context.Context)

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"`
	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

type Screen

type Screen = frontend.Screen

func ScreenGetAll

func ScreenGetAll(ctx context.Context) ([]Screen, error)

ScreenGetAllScreens returns all screens

Jump to

Keyboard shortcuts

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