touchinput

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 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

Overview

Package touchinput is the session-to-widget bridge for the non-pointer devices every input surface embeds (app windows, popups): it implements wlsession.SurfaceTouchHandler, SurfaceGestureHandler and SurfaceTabletHandler over a widget.TouchTracker, the router's gestures, and its stylus samples.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	// Tracker turns contacts into pointer emulation, gestures, and
	// scrolling; its Router must be set, its Pointer optionally.
	Tracker widget.TouchTracker
	// Pointer reports where the pointer is, for touchpad gestures.
	Pointer func() widget.Point
	// Blocked, when set and true, drops input (a modal elsewhere).
	Blocked func() bool
	// Changed runs after every routed event (request a frame).
	Changed func()
	// Serial records the last touch-down serial (a frame grab wants it).
	Serial uint32
	// contains filtered or unexported fields
}

Input routes one surface's touch contacts and touchpad gestures.

func (*Input) HandlePointerGesture

func (in *Input) HandlePointerGesture(g wlsession.PointerGesture)

HandlePointerGesture implements wlsession.SurfaceGestureHandler: the touchpad gesture at the pointer, its per-event rotation accumulated into the widget gesture's since-start rotation.

func (*Input) HandleTabletFrame

func (in *Input) HandleTabletFrame(s wlsession.TabletSample)

HandleTabletFrame implements wlsession.SurfaceTabletHandler: the tool drives the pointer - in range it hovers, its tip presses and releases, leaving range leaves - and then the sample goes to the widget under it (Router.Stylus).

func (*Input) HandleTouchCancel

func (in *Input) HandleTouchCancel()

HandleTouchCancel implements wlsession.SurfaceTouchHandler.

func (*Input) HandleTouchDown

func (in *Input) HandleTouchDown(id int32, x, y float64, serial uint32)

HandleTouchDown implements wlsession.SurfaceTouchHandler.

func (*Input) HandleTouchMotion

func (in *Input) HandleTouchMotion(id int32, x, y float64)

HandleTouchMotion implements wlsession.SurfaceTouchHandler.

func (*Input) HandleTouchUp

func (in *Input) HandleTouchUp(id int32)

HandleTouchUp implements wlsession.SurfaceTouchHandler.

Jump to

Keyboard shortcuts

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