Documentation
¶
Overview ¶
Package binds maps typed input chords to window manager actions, with submaps and bind flags.
Index ¶
- Variables
- func Duplicates(binds []Bind) [][2]int
- func FlagNames() []string
- func Relevant(r Resolver) (uint32, error)
- type Bind
- type Button
- type Chord
- type Drive
- type Edge
- type Flags
- type Gate
- type GestureBind
- type GestureDirection
- type Key
- type Map
- type ModifierSet
- type Recognizer
- func (r *Recognizer) Begin(binds []GestureBind, kind backend.Gesture, fingers uint32, allowed bool) Step
- func (r *Recognizer) Drives(d Drive) bool
- func (r *Recognizer) End(cancelled bool) Step
- func (r *Recognizer) Pinch(scale float64) Step
- func (r *Recognizer) Swallow()
- func (r *Recognizer) Swipe(dx, dy float64) Step
- type Resolver
- type Scroll
- type ScrollDir
- type Step
- type Tap
- type Trigger
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadChord = errors.New("bad chord")
View Source
var ErrBadFlags = errors.New("bad bind flags")
Functions ¶
func Duplicates ¶
Types ¶
type Bind ¶
type Bind struct {
Submap string
Chord Chord
Text string
Description string
Flags Flags
Action wm.Action
}
func (Bind) Normalized ¶
type Flags ¶
type GestureBind ¶
type GestureBind struct {
Kind backend.Gesture
Fingers uint32
Direction GestureDirection
Drive Drive
Action wm.Action
Modifiers ModifierSet
Mods uint32
Edge Edge
Scope wm.OverviewScope
}
func HeldFor ¶
func HeldFor(dst, all []GestureBind, held uint32) []GestureBind
func ResolveGestures ¶
func ResolveGestures(all []GestureBind, r Resolver) ([]GestureBind, error)
func (GestureBind) Overlaps ¶
func (b GestureBind) Overlaps(o GestureBind) bool
type GestureDirection ¶
type GestureDirection uint8
const ( NoDirection GestureDirection = iota SwipeLeft SwipeRight SwipeUp SwipeDown SwipeHorizontal SwipeVertical PinchIn PinchOut PinchBoth SwipeAny )
func (GestureDirection) Horizontal ¶
func (d GestureDirection) Horizontal() bool
type ModifierSet ¶
type ModifierSet uint8
const ( ModShift ModifierSet = 1 << iota ModControl ModAlt ModSuper )
func ParseModifiers ¶
func ParseModifiers(text string) (ModifierSet, error)
func (ModifierSet) String ¶
func (s ModifierSet) String() string
type Recognizer ¶
type Recognizer struct {
// contains filtered or unexported fields
}
func (*Recognizer) Begin ¶
func (r *Recognizer) Begin(binds []GestureBind, kind backend.Gesture, fingers uint32, allowed bool) Step
func (*Recognizer) Drives ¶
func (r *Recognizer) Drives(d Drive) bool
func (*Recognizer) End ¶
func (r *Recognizer) End(cancelled bool) Step
func (*Recognizer) Pinch ¶
func (r *Recognizer) Pinch(scale float64) Step
func (*Recognizer) Swallow ¶
func (r *Recognizer) Swallow()
func (*Recognizer) Swipe ¶
func (r *Recognizer) Swipe(dx, dy float64) Step
type Tap ¶
type Tap struct{ Modifier ModifierSet }
Click to show internal directories.
Click to hide internal directories.