class OneFingerNTapRecognizer

Defined at line 18 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_recognizer.h

OneFingerNTapRecognizer class is responsible for implementing one finger N tap gesture.

Public Methods

void OneFingerNTapRecognizer (OnFingerTapGesture callback, int number_of_taps, zx::duration tap_timeout, zx::duration timeout_between_taps)

Constructor of this class takes in following parameters:

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

is the winner in gesture arena.

2. number_of_taps: Number of tap gesture recognizer will detect.

3. tap_timeout: Tap timeout is the maximum time a finger can be in contact with the screen to

be considered a tap.

4. timeout_between_taps: Timeout between taps is the maximum time that is allowed between the

end of first tap and the start of the other. Callback will be invoked, when gesture is

detected and the recognizer is the winner in gesture arena.

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 35 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_recognizer.cc

void ~OneFingerNTapRecognizer ()

Defined at line 43 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_recognizer.cc

std::string DebugName ()

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

Defined at line 157 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_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 45 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_recognizer.cc

void OnWin ()

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

Defined at line 133 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_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 138 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_recognizer.cc

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

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

This also resets the state of the recognizer.

Defined at line 151 of file ../../src/ui/a11y/lib/gesture_manager/recognizers_v2/one_finger_n_tap_recognizer.cc