finger

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listens

func Listens(m driver.EventMask) bool

Listens reports whether a view reporting events m listens to touches.

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

func (f *Fingers) Cancel(p driver.Point) (driver.Event, bool)

Cancel reports the mouse's touches taken away, such as by another window capturing the mouse, at p.

func (*Fingers) CancelTouches

func (f *Fingers) CancelTouches() (driver.Event, bool)

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

func (f *Fingers) Down(listening bool, p driver.Point) (driver.Event, bool)

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) Move

func (f *Fingers) Move(p driver.Point) (driver.Event, bool)

Move reports the mouse moving to p while the button is down.

func (*Fingers) TouchAt

func (f *Fingers) TouchAt(key uintptr) (driver.Point, bool)

TouchAt returns where touch key was last reported, and whether it is down.

func (*Fingers) TouchCancel

func (f *Fingers) TouchCancel(key uintptr, p driver.Point) (driver.Event, bool)

TouchCancel reports touch key taken away at p.

func (*Fingers) TouchDown

func (f *Fingers) TouchDown(key uintptr, listening bool, p driver.Point) (driver.Event, bool)

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.

func (*Fingers) TouchMove

func (f *Fingers) TouchMove(key uintptr, p driver.Point) (driver.Event, bool)

TouchMove reports touch key moving to p.

func (*Fingers) TouchUp

func (f *Fingers) TouchUp(key uintptr, p driver.Point) (driver.Event, bool)

TouchUp reports touch key lifting at p.

func (*Fingers) Up

func (f *Fingers) Up(p driver.Point) (driver.Event, bool)

Up reports the mouse's button going up at p.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL