Documentation ¶
Overview ¶
Package gesture implements common pointer gestures.
Gestures accept low level pointer Events from an event Queue and detect higher level actions such as clicks and scrolling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Click ¶
type Click struct {
// contains filtered or unexported fields
}
Click detects click gestures in the form of ClickEvents.
type ClickEvent ¶
type ClickEvent struct { Type ClickType Position f32.Point Source pointer.Source Modifiers key.Modifiers }
ClickEvent represent a click action, either a TypePress for the beginning of a click or a TypeClick for a completed click.
type ClickState ¶
type ClickState uint8
const ( // StateNormal is the default click state. StateNormal ClickState = iota // StateFocused is reported when a pointer // is hovering over the handler. StateFocused // StatePressed is then a pointer is pressed. StatePressed )
func (ClickState) String ¶
func (cs ClickState) String() string
type Scroll ¶
type Scroll struct {
// contains filtered or unexported fields
}
Scroll detects scroll gestures and reduces them to scroll distances. Scroll recognizes mouse wheel movements as well as drag and fling touch gestures.
type ScrollState ¶
type ScrollState uint8
const ( // StateIdle is the default scroll state. StateIdle ScrollState = iota // StateDrag is reported during drag gestures. StateDragging // StateFlinging is reported when a fling is // in progress. StateFlinging )
func (ScrollState) String ¶
func (s ScrollState) String() string
Click to show internal directories.
Click to hide internal directories.