gesture

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT, Unlicense Imports: 11 Imported by: 2 modules, 4 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Axis

type Axis uint8
const (
	Horizontal Axis = iota
	Vertical
	Both
)

func (Axis) String

func (a Axis) String() string

type Click

type Click struct {
	// contains filtered or unexported fields
}

func (*Click) Add

func (c *Click) Add(ops *op.Ops)

func (*Click) Hovered

func (c *Click) Hovered() bool

func (*Click) Pressed

func (c *Click) Pressed() bool

func (*Click) Update

func (c *Click) Update(q input.Source) (ClickEvent, bool)

type ClickEvent

type ClickEvent struct {
	Kind      ClickKind
	Position  image.Point
	Source    pointer.Source
	Modifiers key.Modifiers

	NumClicks int

	// Time is the event timestamp of the underlying pointer event, on the
	// same clock as pointer.Event.Time. It is zero for KindCancel events
	// synthesized without a pointer event.
	Time time.Duration
}

func (ClickEvent) ImplementsEvent

func (ClickEvent) ImplementsEvent()

type ClickKind

type ClickKind uint8
const (
	KindPress ClickKind = iota

	KindClick

	KindCancel
)

func (ClickKind) String

func (ct ClickKind) String() string

type Drag

type Drag struct {
	// contains filtered or unexported fields
}

func (*Drag) Add

func (d *Drag) Add(ops *op.Ops)

func (*Drag) Dragging

func (d *Drag) Dragging() bool

func (*Drag) Pressed

func (d *Drag) Pressed() bool

func (*Drag) Update

func (d *Drag) Update(cfg unit.Metric, q input.Source, axis Axis) (pointer.Event, bool)

type Hover

type Hover struct {
	// contains filtered or unexported fields
}

func (*Hover) Add

func (h *Hover) Add(ops *op.Ops)

func (*Hover) Update

func (h *Hover) Update(q input.Source) bool

type Scroll

type Scroll struct {
	// contains filtered or unexported fields
}

func (*Scroll) Add

func (s *Scroll) Add(ops *op.Ops)

func (*Scroll) State

func (s *Scroll) State() ScrollState

func (*Scroll) Stop

func (s *Scroll) Stop()

func (*Scroll) Update

func (s *Scroll) Update(cfg unit.Metric, q input.Source, t time.Time, axis Axis, scrollx, scrolly pointer.ScrollRange) int

type ScrollState

type ScrollState uint8
const (
	StateIdle ScrollState = iota

	StateDragging

	StateFlinging
)

func (ScrollState) String

func (s ScrollState) String() string

Jump to

Keyboard shortcuts

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