search

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	// The index of the event
	Index int
	// The byte offset at which (after parsing) the match either appeared
	// or disappeared
	Offset int
}

Address refers to a point inside of a recording.

type ScreenReader

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

An io.RuneReader that provides a sequence of runes corresponding to the cells on the screen of an emu.Terminal. Runes are read from top to bottom, left to right, starting at the ScreenReader's initial cell.

func NewScreenReader

func NewScreenReader(term emu.Terminal, start geom.Vec2, initialSize int) *ScreenReader

func (*ScreenReader) GetLocation

func (s *ScreenReader) GetLocation(index int) geom.Vec2

func (*ScreenReader) NumRead

func (s *ScreenReader) NumRead() int

func (*ScreenReader) ReadRune

func (s *ScreenReader) ReadRune() (r rune, size int, err error)

func (*ScreenReader) Reset

func (s *ScreenReader) Reset(next geom.Vec2)

Reset the position of the ScreenReader.

func (*ScreenReader) Resize

func (s *ScreenReader) Resize(size int)

Resize the location mapping.

type SearchResult

type SearchResult struct {
	// The location of the result in time
	Begin, End Address
	// The location of the result on the screen
	From, To geom.Vec2
}
func Search(events []sessions.Event, pattern string) (results []SearchResult, err error)

Jump to

Keyboard shortcuts

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