termbox_decorator

package
v0.0.0-...-00ef510 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTermBoxDecoratorClear = errors.New(`TermBoxDecorator.Clear: termbox.Clear returned error`)

ErrTermBoxDecoratorClear - termbox.Clear returned error

View Source
var ErrTermBoxDecoratorFlush = errors.New(`TermBoxDecorator.Flush: termbox.Flush returned error`)

ErrTermBoxDecoratorFlush - termbox.Flush returned error

View Source
var ErrTermBoxDecoratorInit = errors.New(`TermBoxDecorator.Flush: termbox.Init returned error`)

ErrTermBoxDecoratorInit - termbox.Init returned error

Functions

This section is empty.

Types

type TermBoxDecorator

type TermBoxDecorator interface {
	Clear() error
	Close()
	Flush() error
	Init() error
	PollEvent() termbox.Event
	SetCell(x, y int, ch rune, fg, bg termbox.Attribute)
	SetRune(x, y int, ch rune)
	Size() (width int, height int)
}

TermBoxDecorator decorates some methods of termbox module

func NewTermBoxDecorator

func NewTermBoxDecorator() TermBoxDecorator

NewTermBoxDecorator constructs a TermBoxDecorator object. You can mock it by mean not nil mock argument

type TermBoxDecoratorMock

type TermBoxDecoratorMock struct {
	FuncClear     func(fg, bg termbox.Attribute) error
	FuncClose     func()
	FuncFlush     func() error
	FuncInit      func() error
	FuncPollEvent func() termbox.Event
	FuncSetCell   func(x, y int, ch rune, fg, bg termbox.Attribute)
	FuncSetChar   func(x, y int, ch rune)
	FuncSize      func() (width int, height int)
}

TermBoxDecoratorMock contains mock methods of initialize mocked decorator object

func (TermBoxDecoratorMock) Create

Create creates mocked os decorator object

Jump to

Keyboard shortcuts

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