player

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player struct {
	emu.Terminal
	// contains filtered or unexported fields
}

func FromEvents

func FromEvents(events []sessions.Event) *Player

func New

func New() *Player

func (*Player) Acquire

func (p *Player) Acquire()

func (*Player) Commands

func (p *Player) Commands() []detect.Command

func (*Player) Events

func (p *Player) Events() []sessions.Event

func (*Player) Goto

func (p *Player) Goto(index, offset int)

func (*Player) Location

func (p *Player) Location() search.Address

func (*Player) Preview

func (p *Player) Preview(
	viewport, location geom.Vec2,
	highlights []movement.Highlight,
) *tty.State

Preview captures a preview with the size `viewport` at `location` in the scrollback of the terminal. You may also provide `highlights` that will be passed to the Flow renderer. Returns nil if the player is "in use", which is only used by replay mode to jump back in time.

func (*Player) Process

func (p *Player) Process(event sessions.Event) error

func (*Player) Release

func (p *Player) Release()

Jump to

Keyboard shortcuts

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