ui

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SystrayIcon = "files/favicon.png"

SystrayIcon is the icon in the system tray or task bar.

Variables

View Source
var ErrUnsupported = errors.New("unsupported OS")

ErrUnsupported is just an error.

Functions

func Entry

func Entry(_, _, val string) (string, bool, error)

Entry wraps dlgs.Entry.

func Error

func Error(_, _ string, _ any) (bool, error)

Error wraps dlgs.Error.

func HasGUI

func HasGUI() bool

HasGUI returns false on Linux, true on Windows and optional on macOS.

func Info

func Info(_, _ string, _ any) (bool, error)

Info wraps dlgs.Info.

func OpenCmd

func OpenCmd(_ ...string) error

OpenCmd opens anything.

func OpenFile

func OpenFile(_ string) error

OpenFile open Config Files.

func OpenLog

func OpenLog(_ string) error

OpenLog opens Log Files.

func OpenURL

func OpenURL(_ string) error

OpenURL opens URL Links.

func Question

func Question(_ string, _ bool, _ string, _ any) (bool, error)

Question wraps dlgs.Question.

func StartCmd

func StartCmd(c string, v ...string) error

StartCmd starts a command.

func Warning

func Warning(_, _ string) (bool, error)

Warning wraps dlgs.Warning.

Types

type MenuItem interface {
	Check()
	Checked() bool
	Disable()
	Disabled() bool
	Enable()
	Hide()
	SetIcon(iconBytes []byte)
	SetTemplateIcon(templateIconBytes []byte, regularIconBytes []byte)
	SetTitle(title string)
	SetTooltip(tooltip string)
	Show()
	String() string
	Uncheck()
	Clicked() chan struct{}
}

MenuItem is an interface to allow exposing menu items to operating systems that do not have a menu or a GUI.

Jump to

Keyboard shortcuts

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