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 ¶
- type Input
- func (in *Input) HandlePointerGesture(g wlsession.PointerGesture)
- func (in *Input) HandleTabletFrame(s wlsession.TabletSample)
- func (in *Input) HandleTouchCancel()
- func (in *Input) HandleTouchDown(id int32, x, y float64, serial uint32)
- func (in *Input) HandleTouchMotion(id int32, x, y float64)
- func (in *Input) HandleTouchUp(id int32)
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 ¶
HandleTouchDown implements wlsession.SurfaceTouchHandler.
func (*Input) HandleTouchMotion ¶
HandleTouchMotion implements wlsession.SurfaceTouchHandler.
func (*Input) HandleTouchUp ¶
HandleTouchUp implements wlsession.SurfaceTouchHandler.