class MFingerNTapDragRecognizer

Defined at line 16 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.h

Public Members

static const float kDefaultDragDisplacementThreshold
static const float kDefaultUpdateDisplacementThreshold

Public Methods

void MFingerNTapDragRecognizer (OnMFingerNTapDragCallback on_recognize, OnMFingerNTapDragCallback on_update, OnMFingerNTapDragCallback on_complete, uint32_t number_of_fingers, uint32_t number_of_taps, float drag_displacement_threshold, float update_displacement_threshold)

Constructor of this class takes in following parameters:

1. on_recognize: Callback will be invoked, when the gesture is detected and the recognizer

is the winner in gesture arena.

2. on_update: Callback invoked on CHANGE events after the gesture has

claimed the win (and only if hold_last_tap = true).

3. on_complete: Callback invoked on the last REMOVE event after the gesture

has claimed the win (and ony if hold_last_tap = true).

4. number_of_fingers: Number of fingers in gesture.

5. number_of_taps: Number of taps gesture recognizer will detect.

When the gesture starts, we schedule a timeout on the default dispatcher. If gesture is

recognized in this timeout period, then the scheduled task is cancelled. If not recognized,

scheduled tasks will get executed which will declare defeat for the current recognizer.

Defined at line 58 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.cc

void ~MFingerNTapDragRecognizer ()

Defined at line 70 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.cc

std::string DebugName ()

A human-readable string name for the recognizer to be used in logs only.

Defined at line 312 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.cc

void HandleEvent (const fuchsia::ui::pointer::augment::TouchEventWithLocalHit & event)

Processes incoming touch events to detect tap gestures like (Single, double, etc.).

Defined at line 164 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.cc

void OnWin ()

This method gets called when the recognizer has won the arena.

Defined at line 291 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.cc

void OnDefeat ()

This method gets called when the recognizer has lost the arena.

It resets the state of the participation token.

Defined at line 304 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.cc

void OnContestStarted (std::unique_ptr<ParticipationTokenInterface> token)

At the start of every arena contest this method will be called.

This also resets the state of the recognizer.

Defined at line 306 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/m_finger_n_tap_drag_recognizer.cc