shell

package
v0.0.0-...-0fb2adb Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module *module

Functions

func IsShortcutRegistered

func IsShortcutRegistered(accelerator string) (exists bool)

func ReadClipboard

func ReadClipboard() string

func RegisterShortcut

func RegisterShortcut(accelerator string) bool

func ShowFilePicker

func ShowFilePicker(fd FileDialog) []string

func ShowMessage

func ShowMessage(msg MessageDialog) bool

func ShowNotification

func ShowNotification(n Notification)

func UnregisterAllShortcuts

func UnregisterAllShortcuts()

func UnregisterShortcut

func UnregisterShortcut(accelerator string) bool

func WriteClipboard

func WriteClipboard(text string) bool

Types

type FileDialog

type FileDialog struct {
	Title     string
	Directory string
	Filename  string
	Mode      string   // pickfile, pickfiles, pickfolder, savefile
	Filters   []string // each string is comma delimited (go,rs,toml) with optional label prefix (text:go,txt)
}

type MessageDialog

type MessageDialog struct {
	Title   string
	Body    string
	Level   string // info, warning, error
	Buttons string // ok, okcancel, yesno
}

type Notification

type Notification struct {
	Title    string
	Subtitle string // for MacOS only
	Body     string
}

Jump to

Keyboard shortcuts

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