Start rulemapping refactor to be more explicit about typing intentions.
This commit is contained in:
parent
08fc828b46
commit
a0949e719f
10 changed files with 128 additions and 100 deletions
|
@ -3,8 +3,7 @@ package mappingrules
|
|||
import "github.com/holoplot/go-evdev"
|
||||
|
||||
type MappingRule interface {
|
||||
MatchEvent(*evdev.InputDevice, *evdev.InputEvent, *string) *evdev.InputEvent
|
||||
OutputName() string
|
||||
MatchEvent(*evdev.InputDevice, *evdev.InputEvent, *string) (*evdev.InputDevice, *evdev.InputEvent)
|
||||
}
|
||||
|
||||
// RuleTargets represent either a device input to match on, or an output to produce.
|
||||
|
@ -21,8 +20,4 @@ type RuleTarget interface {
|
|||
//
|
||||
// TODO: should we normalize inside this function to simplify the interface?
|
||||
CreateEvent(int32, *string) *evdev.InputEvent
|
||||
|
||||
GetCode() evdev.EvCode
|
||||
GetDeviceName() string
|
||||
GetDevice() *evdev.InputDevice
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue