Documentation ¶
Overview ¶
Package touch defines an event for touch input.
See the golang.org/x/mobile/app package for details on the event model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// X and Y are the touch location, in pixels.
X, Y float32
// Sequence is the sequence number. The same number is shared by all events
// in a sequence. A sequence begins with a single TypeBegin, is followed by
// zero or more TypeMoves, and ends with a single TypeEnd. A Sequence
// distinguishes concurrent sequences but its value is subsequently reused.
Sequence Sequence
// Type is the touch type.
Type Type
}
Event is a touch event.
type Type ¶
type Type byte
Type describes the type of a touch event.
const ( // TypeBegin is a user first touching the device. // // On Android, this is a AMOTION_EVENT_ACTION_DOWN. // On iOS, this is a call to touchesBegan. TypeBegin Type = iota // TypeMove is a user dragging across the device. // // A TypeMove is delivered between a TypeBegin and TypeEnd. // // On Android, this is a AMOTION_EVENT_ACTION_MOVE. // On iOS, this is a call to touchesMoved. TypeMove // TypeEnd is a user no longer touching the device. // // On Android, this is a AMOTION_EVENT_ACTION_UP. // On iOS, this is a call to touchesEnded. TypeEnd )
Click to show internal directories.
Click to hide internal directories.