mayhem-party/src/device/input/input.go

22 lines
386 B
Go

package input
import (
"context"
"mayhem-party/src/device/input/button"
"mayhem-party/src/device/input/parse"
"mayhem-party/src/device/input/raw"
"mayhem-party/src/device/input/wrap"
)
type Input interface {
Read() []button.Button
Close()
}
func New(ctx context.Context) Input {
src := raw.New(ctx)
return wrap.New(ctx, func() wrap.Wrap {
return parse.New(ctx, src)
})
}