gesture

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT, Unlicense Imports: 11 Imported by: 4

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
}

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