Documentation
¶
Overview ¶
Package finger reports the fingers of core.EventTouch for the desktop backends: a mouse's primary button is finger 0, going down, moving while down and going up, and each touch of a touchscreen is a finger of its own, numbered from 1 while it is down, as iOS, Android and the web report every finger.
Index ¶
- func Listens(m driver.EventMask) bool
- type Fingers
- func (f *Fingers) Cancel(p driver.Point) (driver.Event, bool)
- func (f *Fingers) CancelTouches() (driver.Event, bool)
- func (f *Fingers) Down(listening bool, p driver.Point) (driver.Event, bool)
- func (f *Fingers) Move(p driver.Point) (driver.Event, bool)
- func (f *Fingers) TouchAt(key uintptr) (driver.Point, bool)
- func (f *Fingers) TouchCancel(key uintptr, p driver.Point) (driver.Event, bool)
- func (f *Fingers) TouchDown(key uintptr, listening bool, p driver.Point) (driver.Event, bool)
- func (f *Fingers) TouchMove(key uintptr, p driver.Point) (driver.Event, bool)
- func (f *Fingers) TouchUp(key uintptr, p driver.Point) (driver.Event, bool)
- func (f *Fingers) Up(p driver.Point) (driver.Event, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fingers ¶
type Fingers struct {
driver.TouchTracker
// contains filtered or unexported fields
}
Fingers follows one mouse's primary button and a touchscreen's touches. A touch is known by the platform's key for it while it is down: a pointer ID on Windows, an event sequence on Linux.
func (*Fingers) Cancel ¶
Cancel reports the mouse's touches taken away, such as by another window capturing the mouse, at p.
func (*Fingers) CancelTouches ¶
CancelTouches reports every touch down taken away at once, where it is, such as by a scroll view that takes them; the mouse stays down.
func (*Fingers) Down ¶
Down reports the mouse's button going down at p, in surface points, when a view listens; the touches it starts are reported until the button goes up.
func (*Fingers) TouchAt ¶
TouchAt returns where touch key was last reported, and whether it is down.
func (*Fingers) TouchCancel ¶
TouchCancel reports touch key taken away at p.
func (*Fingers) TouchDown ¶
TouchDown reports touch key going down at p when a view listens. It takes the lowest ID from 1 that no finger down has, and keeps it until the touch lifts.