ui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Msg

type Msg struct {
	Level   MsgLevel
	Message string
}

Msg is a message to be displayed in some form to the user. Gtk is not threadsafe, so I send Msg values through a channel, and a timeout in the GUI fetches and displays them regularly.

type MsgLevel

type MsgLevel uint8

MsgLevel indicates what to do with a Message

const (
	MsgStatusbar MsgLevel = iota
	MsgDialog
	MsgLog
)

MsgStatusbar - display the message in the statusbar MsgDialog - display the message in a Dialog MsgLog - write the message to the Log

type SWin

type SWin struct {
	MsgQ chan Msg
	// contains filtered or unexported fields
}

SWin is wraps up the UI main window, all of its contents, and all associated state.

func Create

func Create() (*SWin, error)

Create creates a new UI instance and returns it.

func (*SWin) Run

func (g *SWin) Run()

Run executes gtk's main event loop.

Jump to

Keyboard shortcuts

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