class OneFingerNTapRecognizer
Defined at line 15 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/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 29 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/one_finger_n_tap_recognizer.cc
void ~OneFingerNTapRecognizer ()
Defined at line 37 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/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 155 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/one_finger_n_tap_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 39 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/one_finger_n_tap_recognizer.cc
void OnWin ()
This method gets called when the recognizer has won the arena.
Defined at line 132 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/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 contest member.
Defined at line 137 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/one_finger_n_tap_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 150 of file ../../src/ui/a11y/lib/gesture_manager/recognizers/one_finger_n_tap_recognizer.cc