class TwoFingerDragRecognizer

Defined at line 25 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.h

TwoFingerDragRecognizer class implements logic to recognize and react to one finger drag

gestures.

Minimal effort is taken towards ignoring 2-finger gestures. For feature parity, while a second

finger is down, events will be suppressed. When it is released, the remaining pointer must be the

original. This requirement should probably be dropped in the future.

Public Members

static const float kDragDisplacementThreshold
static const float kFingerSeparationThresholdFactor

Public Methods

void TwoFingerDragRecognizer (DragGestureCallback on_drag_started, DragGestureCallback on_drag_update, DragGestureCallback on_drag_complete, zx::duration drag_gesture_delay)

on_drag_started: Callback invoked at most once when the recognizer has won the arena. Callback

only occurs if at least one pointer is on the screen.

on_drag_update: Callback invoked as new MOVE events are handled AFTER the drag gesture is

recognized and has won the arena. Callbacks only occur while exactly one pointer is on the

screen.

on_drag_complete: Callback invoked when the drag gesture is completed (as finger is lifted from

screen, or after this recognizer is awarded the win if this occurs after the gesture has

ended).

drag_gesture_delay: Minimum time a finger can be in contact with the screen to be considered a

drag. Once this delay elapses, the recognizer tries to aggressively accept the gesture in the

arena.

Defined at line 31 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.cc

void ~TwoFingerDragRecognizer ()

Defined at line 40 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.cc

void HandleEvent (const fuchsia::ui::input::accessibility::PointerEvent & pointer_event)

Defined at line 42 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.cc

void OnWin ()

Defined at line 145 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.cc

void OnDefeat ()

Defined at line 164 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.cc

void OnContestStarted (std::unique_ptr<ContestMember> contest_member)

Defined at line 203 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.cc

std::string DebugName ()

Defined at line 208 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/two_finger_drag_recognizer.cc