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 ¶
Click detects click gestures in the form of ClickEvents.
func (*Click) Events ¶
func (c *Click) Events(q event.Queue) []ClickEvent
Events returns the next click event, if any.
type ClickEvent ¶
type ClickEvent struct { Type ClickType Position f32.Point Source pointer.Source Modifiers key.Modifiers // NumClicks records successive clicks occurring // within a short duration of each other. NumClicks int Button pointer.Buttons }
ClickEvent represent a click action, either a TypePress for the beginning of a click or a TypeClick for a completed click.
func (ClickEvent) ImplementsEvent ¶
func (ClickEvent) ImplementsEvent()
type ClickState ¶
type ClickState uint8
type Drag ¶
type Drag struct {
// contains filtered or unexported fields
}
Drag detects drag gestures in the form of pointer.Drag events.
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.