WIP converting some functions into methods.

This commit is contained in:
Anna Rose Wiggins 2025-07-04 10:14:04 -04:00
parent f6162d0f7b
commit c14ec074d1
4 changed files with 104 additions and 54 deletions

View file

@ -44,11 +44,30 @@ type ProportionalAxisMappingRule struct {
LastEvent time.Time
}
type RuleTarget struct {
type RuleTarget interface {
NormalizeValue(int32) int32
CreateEvent(int32, *string) *evdev.InputEvent
}
type RuleTargetBase struct {
DeviceName string
ModeSelect []string
Device *evdev.InputDevice
Type evdev.EvType
Code evdev.EvCode
Inverted bool
}
type RuleTargetButton struct {
RuleTargetBase
}
type RuleTargetAxis struct {
RuleTargetBase
AxisStart int32
AxisEnd int32
Sensitivity float64
}
type RuleTargetModeSelect struct {
RuleTargetBase
ModeSelect []string
}