class MFingerNTapDragRecognizer

Defined at line 15 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/m_finger_n_tap_drag_recognizer.h

MFingerNTapRecognizer class is responsible for implementing m-finger-n-tap-drag gesture.

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 MOVE events after the gesture has

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

3. on_complete: Callback invoked on the last UP 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 46 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/m_finger_n_tap_drag_recognizer.cc

void ~MFingerNTapDragRecognizer ()

Defined at line 58 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/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 299 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/m_finger_n_tap_drag_recognizer.cc

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

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

Defined at line 152 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/m_finger_n_tap_drag_recognizer.cc

void OnWin ()

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

Defined at line 279 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/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 contest member.

Defined at line 292 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/m_finger_n_tap_drag_recognizer.cc

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

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

This also resets the state of the recognizer.

Defined at line 294 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/m_finger_n_tap_drag_recognizer.cc