runtime

package
v1.7.2-0...-f26baa4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessEncoding

func ProcessEncoding(text string) string

ProcessEncoding attempts to convert CKJ strings to UTF-8

Types

type Browser

type Browser struct{}

Browser exposes browser methods to the runtime

func NewBrowser

func NewBrowser() *Browser

NewBrowser creates a new runtime Browser struct

func (*Browser) OpenFile

func (r *Browser) OpenFile(filePath string) error

OpenFile opens the given file in the system's default browser

func (*Browser) OpenURL

func (r *Browser) OpenURL(url string) error

OpenURL opens the given url in the system's default browser

type Dialog

type Dialog struct {
	// contains filtered or unexported fields
}

Dialog exposes an interface to native dialogs

func NewDialog

func NewDialog(renderer interfaces.Renderer) *Dialog

NewDialog creates a new Dialog struct

func (*Dialog) SelectDirectory

func (r *Dialog) SelectDirectory() string

SelectDirectory prompts the user to select a directory

func (*Dialog) SelectFile

func (r *Dialog) SelectFile(params ...string) string

SelectFile prompts the user to select a file

func (*Dialog) SelectSaveFile

func (r *Dialog) SelectSaveFile(params ...string) string

SelectSaveFile prompts the user to select a file for saving

type Events

type Events struct {
	// contains filtered or unexported fields
}

Events exposes the events interface

func NewEvents

func NewEvents(eventManager interfaces.EventManager) *Events

NewEvents creates a new Events struct

func (*Events) Emit

func (r *Events) Emit(eventName string, optionalData ...interface{})

Emit pass through

func (*Events) On

func (r *Events) On(eventName string, callback func(optionalData ...interface{}))

On pass through

type FileSystem

type FileSystem struct{}

FileSystem exposes file system utilities to the runtime

func NewFileSystem

func NewFileSystem() *FileSystem

NewFileSystem creates a new FileSystem struct

func (*FileSystem) HomeDir

func (r *FileSystem) HomeDir() (string, error)

HomeDir returns the user's home directory

type Log

type Log struct{}

Log exposes the logging interface to the runtime

func NewLog

func NewLog() *Log

NewLog creates a new Log struct

func (*Log) New

func (r *Log) New(prefix string) *logger.CustomLogger

New creates a new logger

type Window

type Window struct {
	// contains filtered or unexported fields
}

Window exposes an interface for manipulating the window

func NewWindow

func NewWindow(renderer interfaces.Renderer) *Window

NewWindow creates a new Window struct

func (*Window) Close

func (r *Window) Close()

Close shuts down the window and therefore the app

func (*Window) Fullscreen

func (r *Window) Fullscreen()

Fullscreen makes the window fullscreen

func (*Window) SetColour

func (r *Window) SetColour(colour string) error

SetColour sets the the window colour

func (*Window) SetTitle

func (r *Window) SetTitle(title string)

SetTitle sets the the window title

func (*Window) UnFullscreen

func (r *Window) UnFullscreen()

UnFullscreen attempts to restore the window to the size/position before fullscreen

Jump to

Keyboard shortcuts

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