Documentation updates.
This commit is contained in:
parent
db848db810
commit
2e501db084
2 changed files with 20 additions and 4 deletions
|
@ -44,9 +44,21 @@ type ProportionalAxisMappingRule struct {
|
|||
LastEvent time.Time
|
||||
}
|
||||
|
||||
// RuleTargets represent either a device input to match on, or an output to produce.
|
||||
// Some RuleTarget types may work via side effects, such as RuleTargetModeSelect.
|
||||
type RuleTarget interface {
|
||||
// NormalizeValue takes the raw input value and possibly modifies it based on the Target settings.
|
||||
// (e.g., inverting the value if Inverted == true)
|
||||
NormalizeValue(int32) int32
|
||||
|
||||
// CreateEvent typically takes the (probably normalized) value and returns an event that can be emitted
|
||||
// on a virtual device.
|
||||
//
|
||||
// For RuleTargetModeSelect, this method modifies the active mode and returns nil.
|
||||
//
|
||||
// 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