ui

package
v0.0.0-...-2dd5c5f Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions interface {
	TrayIconActions
}

Actions describe all actions which can be triggered by the UI

type TrayIcon

type TrayIcon interface {
	OnCommand(msg *winapi.Message)
	SetGrid(config *cmds.Config, index int)
	Shutdown()
}

TrayIcon is an abstraction for the tray icon of the application

func NewTrayIcon

func NewTrayIcon(hwnd winapi.Hwnd, actions TrayIconActions, config *cmds.Config) TrayIcon

NewTrayIcon creates a new tray for Grida encapsulating all tray related features

type TrayIconActions

type TrayIconActions interface {
	OnShowApplication()
	OnExitApplication()
	OnGridSelect(index int)
}

TrayIconActions defines all the actions which can be triggered by the user via the tray icon

type UI

type UI struct {
	MainWindow winapi.Hwnd
	// contains filtered or unexported fields
}

UI is the base instance for all ui related tasks

func New

func New(actions Actions, config *cmds.Config, onHotkey func(msg *winapi.Message)) (*UI, error)

New creates a new ui instance

func (*UI) Loop

func (ui *UI) Loop()

Loop will start the message loop and block until the application is closed

func (*UI) Quit

func (ui *UI) Quit()

Quit will close the message loop

func (*UI) SetGrid

func (ui *UI) SetGrid(config *cmds.Config, index int)

SetGrid will set the active grid to show in the menu

func (*UI) ShowMain

func (ui *UI) ShowMain()

ShowMain will show the main application window

Jump to

Keyboard shortcuts

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