vtio

package
v0.0.0-...-e2c65c2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package vtio provides a tool for drawing a ANSI stream onto a virtualized display.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisplayWriter

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

DisplayWriter captures ANSI terminal commands and draws them onto a virtual display.

func NewDisplayWriter

func NewDisplayWriter(rect image.Rectangle) *DisplayWriter

NewDisplayWriter creates an IO writer into which you can write virtual terminal codes (ANSI) and capture the resulting virtualized display state. The implementation of the ANSI language is far from complete.

func (*DisplayWriter) C

func (d *DisplayWriter) C() <-chan struct{}

C returns a read channel. This channel will receive a non-blocking write whenever the underlying display changes.

func (*DisplayWriter) Draw

func (d *DisplayWriter) Draw(e *display.Display, r image.Rectangle)

Draw captures the current display state.

func (*DisplayWriter) Resize

func (d *DisplayWriter) Resize(rect image.Rectangle)

Resize reallocates the display with different dimensions.

func (*DisplayWriter) Write

func (d *DisplayWriter) Write(buf []byte) (int, error)

Write draws ANSI virtual terminal bytes onto the underlying virtual display.

Jump to

Keyboard shortcuts

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