modules

package
v0.0.0-...-88d6830 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BLACK   = vaxis.IndexColor(0)
	URGENT  = vaxis.IndexColor(9)
	WARNING = vaxis.IndexColor(11)
	GOOD    = vaxis.IndexColor(2)
	ACTIVE  = vaxis.IndexColor(15)
	COOL    = vaxis.RGBColor(173, 216, 230)
	SPECIAL = vaxis.RGBColor(0, 100, 0)
)
View Source
var (
	ECSPACE = EventCell{
		C:          vaxis.Cell{Character: vaxis.Characters(" ")[0]},
		Metadata:   "",
		Mod:        nil,
		MouseShape: "",
	}
	ECDOT = EventCell{
		C:          vaxis.Cell{Character: vaxis.Characters(".")[0]},
		Metadata:   "",
		Mod:        nil,
		MouseShape: "",
	}
	ECELLIPSIS = EventCell{
		C:          vaxis.Cell{Character: vaxis.Characters("…")[0]},
		Metadata:   "",
		Mod:        nil,
		MouseShape: "",
	}
)

Functions

func Cell

func Cell(r rune, s vaxis.Style) vaxis.Cell

func Init

func Init(left, middle, right []Module) (
	chan Module,
	[]Module,
	[]Module,
	[]Module,
)

Types

type Event

type Event struct {
	Cell       EventCell
	VaxisEvent vaxis.Event
}

type EventCell

type EventCell struct {
	C          vaxis.Cell
	Metadata   string
	Mod        Module
	MouseShape vaxis.MouseShape
}

type FocusIn

type FocusIn struct {
	NewMod  Module
	PrevMod Module
}

func (FocusIn) String

func (FocusIn) String() string

type FocusOut

type FocusOut struct {
	NewMod  Module
	PrevMod Module
}

func (FocusOut) String

func (FocusOut) String() string

type Module

type Module interface {
	Render() []EventCell
	Run() (<-chan bool, chan<- Event, error)
	Channels() (<-chan bool, chan<- Event)
	Name() string
	Dependencies() []string
}

type StaticModule

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

func NewStaticModule

func NewStaticModule(name string, cells []EventCell, deps []string) *StaticModule

func (*StaticModule) Channels

func (sm *StaticModule) Channels() (<-chan bool, chan<- Event)

func (*StaticModule) Dependencies

func (sm *StaticModule) Dependencies() []string

func (*StaticModule) Name

func (sm *StaticModule) Name() string

func (*StaticModule) Render

func (sm *StaticModule) Render() []EventCell

func (*StaticModule) Run

func (sm *StaticModule) Run() (<-chan bool, chan<- Event, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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