class GestureHandler

Defined at line 24 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.h

A GestureHandler binds gestures to actions, and allows gestures to call these

actions when necessary.

Public Methods

void GestureHandler (AddRecognizerToArenaCallback add_recognizer_callback)

Defined at line 26 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

bool BindMFingerNTapAction (uint32_t num_fingers, uint32_t num_taps, OnGestureCallback on_recognize)

Binds the action defined in |on_recognize| with the m-finger-n-tap gesture

corresponding to |num_fingers| and |num_taps|.

Defined at line 55 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

void ~GestureHandler ()

Defined at line 56 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.h

bool BindOneFingerSingleTapAction (OnGestureCallback callback)

Binds the action defined in |callback| with the gesture |kOneFingerSingleTap|. The action is

invoked only after the gesture is detected.

Defined at line 106 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

bool BindOneFingerDoubleTapAction (OnGestureCallback callback)

Binds the action defined in |callback| with the gesture |kOneFingerDoubleTap|. The action is

invoked only after the gesture is detected.

Defined at line 110 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

bool BindOneFingerDragAction (OnGestureCallback on_start, OnGestureCallback on_update, OnGestureCallback on_complete)

Binds the actions with the gesture |kOneFingerDrag|.

They are called when the drag starts, updates and completes, respectively.

Defined at line 143 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

bool BindTwoFingerDragAction (OnGestureCallback on_start, OnGestureCallback on_update, OnGestureCallback on_complete)

Binds the actions with the gesture |kTwoFingerDrag|.

They are called when the drag starts, updates and completes, respectively.

Defined at line 168 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

bool BindSwipeAction (OnGestureCallback callback, GestureType gesture_type)

Binds the action defined in |callback| with the |gesture_type|. Returns true if the |callback|

is bound, false otherwise

Defined at line 193 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

bool BindTwoFingerSingleTapAction (OnGestureCallback callback)

Binds the action defined in |callback| with the |kTwoFingerSingleTap|. The

action is invoked only after the gesture is detected.

Defined at line 339 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

bool BindMFingerNTapDragAction (OnGestureCallback on_start, OnGestureCallback on_update, OnGestureCallback on_complete, uint32_t num_fingers, uint32_t num_taps)

Binds the actions with the corresponding m-finger-n-tap-drag gesture.

Defined at line 357 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

void ConsumeAll ()

Binds a recognizer that consumes everything.

Defined at line 412 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.cc

Protected Methods

void GestureHandler ()

Constructor for mocks.

Defined at line 99 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.h

Enumerations

enum GestureType
Name Value
kUnknown 0
kOneFingerSingleTap 1
kOneFingerDoubleTap 2
kOneFingerTripleTap 3
kOneFingerDoubleTapDrag 4
kOneFingerTripleTapDrag 5
kOneFingerDrag 6
kOneFingerUpSwipe 7
kOneFingerDownSwipe 8
kOneFingerLeftSwipe 9
kOneFingerRightSwipe 10
kThreeFingerUpSwipe 11
kThreeFingerDownSwipe 12
kThreeFingerLeftSwipe 13
kThreeFingerRightSwipe 14
kThreeFingerDoubleTap 15
kThreeFingerDoubleTapDrag 16
kTwoFingerSingleTap 17
kTwoFingerDrag 18

The high-level gestures identified by this class.

Defined at line 30 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.h

enum GestureEvent
Name Value
kRecognize 0
kUpdate 1
kComplete 2

Defined at line 108 of file ../../src/ui/a11y/lib/gesture_manager/gesture_handler.h

Records