spinner

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Duration time.Duration
	Frames   []rune
	Style    vaxis.Style
	// contains filtered or unexported fields
}

Model is a spinner. It has a duration and a set of frames. It will request partial-draws using the last provided Surface at the duration specified

func New

func New(vx *vaxis.Vaxis, dur time.Duration) *Model

New creates a new spinner

func (*Model) Draw

func (m *Model) Draw(w vaxis.Window)

func (*Model) Start

func (m *Model) Start()

Start the spinner. Start is thread safe and non-blocking

func (*Model) Stop

func (m *Model) Stop()

Stop the spinner. Stop is thread safe and non-blocking

func (*Model) Toggle

func (m *Model) Toggle()

Toggle the spinner. Stop is thread safe and non-blocking

Jump to

Keyboard shortcuts

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