image

package
v0.0.0-...-aa7acec Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PixelW int
	PixelH int
)
View Source
var (
	// ErrNoBackend is returned if no backends
	// are available
	ErrNoBackend = errors.New("no backend")
)
View Source
var Errw3mUnavailable = errors.New("w3m unavailable")
View Source
var PossibleBackends = []Backend{
	&Ueberzug{},
	&W3M{},
}

PossibleBackends is a list of possible image backends

Functions

func Close

func Close()

Close has to be ran on exit!

func Listen

func Listen() (err error)

Types

type Backend

type Backend interface {
	// Available should return nil if an image
	// backend successfully runs. This could be
	// used for intializing backends.
	Available() error

	Spawn(image.Image, int, int) error

	Delete() error
}

Backend is the interface for various image backends

func New

func New(i image.Image) (backend Backend, err error)

New finds a backend and spawns the image

type Ueberzug

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

Ueberzug is the backend for ueberzug-go: https://gitlab.com/diamondburned/ueberzug-go

func (*Ueberzug) Available

func (u *Ueberzug) Available() error

func (*Ueberzug) Delete

func (u *Ueberzug) Delete() error

func (*Ueberzug) Spawn

func (u *Ueberzug) Spawn(i image.Image, x, y int) error

type W3M

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

func (*W3M) Available

func (w *W3M) Available() error

func (*W3M) Delete

func (w *W3M) Delete() error

func (*W3M) Spawn

func (w *W3M) Spawn(i image.Image, x, y int) error

Jump to

Keyboard shortcuts

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