1885b47fbSopenharmony_ci/* 2885b47fbSopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3885b47fbSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4885b47fbSopenharmony_ci * you may not use this file except in compliance with the License. 5885b47fbSopenharmony_ci * You may obtain a copy of the License at 6885b47fbSopenharmony_ci * 7885b47fbSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8885b47fbSopenharmony_ci * 9885b47fbSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10885b47fbSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11885b47fbSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12885b47fbSopenharmony_ci * See the License for the specific language governing permissions and 13885b47fbSopenharmony_ci * limitations under the License. 14885b47fbSopenharmony_ci */ 15885b47fbSopenharmony_ci 16885b47fbSopenharmony_ci#ifndef ACCESSIBILITY_GESTURE_RECOGNIZER_H 17885b47fbSopenharmony_ci#define ACCESSIBILITY_GESTURE_RECOGNIZER_H 18885b47fbSopenharmony_ci 19885b47fbSopenharmony_ci#include <cmath> 20885b47fbSopenharmony_ci#include <vector> 21885b47fbSopenharmony_ci 22885b47fbSopenharmony_ci#ifdef OHOS_BUILD_ENABLE_DISPLAY_MANAGER 23885b47fbSopenharmony_ci#include "accessibility_display_manager.h" 24885b47fbSopenharmony_ci#endif 25885b47fbSopenharmony_ci#include "accessibility_event_info.h" 26885b47fbSopenharmony_ci#include "accessible_ability_manager_service.h" 27885b47fbSopenharmony_ci#include "event_handler.h" 28885b47fbSopenharmony_ci#include "event_runner.h" 29885b47fbSopenharmony_ci#include "pointer_event.h" 30885b47fbSopenharmony_ci#include "singleton.h" 31885b47fbSopenharmony_ci 32885b47fbSopenharmony_cinamespace OHOS { 33885b47fbSopenharmony_cinamespace Accessibility { 34885b47fbSopenharmony_ciconst int64_t GESTURE_STARTED_TIME_THRESHOLD = 300000; // microsecond 35885b47fbSopenharmony_ciconst int64_t GESTURE_NOT_STARTED_TIME_THRESHOLD = 200000; // microsecond 36885b47fbSopenharmony_ciconst float DOUBLE_TAP_SLOP = 100.0f; 37885b47fbSopenharmony_ciconst int64_t MIN_DOUBLE_TAP_TIME = 40000; // microsecond 38885b47fbSopenharmony_ciconst int64_t DOUBLE_TAP_TIMEOUT = 300000; // microsecond 39885b47fbSopenharmony_ciconst int64_t LONG_PRESS_TIMEOUT = 300000; // microsecond 40885b47fbSopenharmony_ciconst int64_t TAP_INTERVAL_TIMEOUT = 100000; // microsecond 41885b47fbSopenharmony_ciconst float DEGREES_THRESHOLD = 0.0f; 42885b47fbSopenharmony_ciconst int32_t DIRECTION_NUM = 4; 43885b47fbSopenharmony_ciconst int64_t US_TO_MS = 1000; 44885b47fbSopenharmony_ciconst int32_t MM_PER_CM = 10; 45885b47fbSopenharmony_ci#define CALCULATION_DIMENSION(xdpi) ((xdpi) * 0.25f) 46885b47fbSopenharmony_ci#define MIN_PIXELS(xyDpi) ((xyDpi) * 0.1f) 47885b47fbSopenharmony_ci 48885b47fbSopenharmony_cistruct Pointer { 49885b47fbSopenharmony_ci float px_; 50885b47fbSopenharmony_ci float py_; 51885b47fbSopenharmony_ci}; 52885b47fbSopenharmony_ci 53885b47fbSopenharmony_ciclass AccessibilityGestureRecognizer; 54885b47fbSopenharmony_ciclass GestureHandler : public AppExecFwk::EventHandler { 55885b47fbSopenharmony_cipublic: 56885b47fbSopenharmony_ci GestureHandler(const std::shared_ptr<AppExecFwk::EventRunner> &runner, AccessibilityGestureRecognizer &server); 57885b47fbSopenharmony_ci virtual ~GestureHandler() = default; 58885b47fbSopenharmony_ci /** 59885b47fbSopenharmony_ci * @brief Process the event of install system bundles. 60885b47fbSopenharmony_ci * @param event Indicates the event to be processed. 61885b47fbSopenharmony_ci */ 62885b47fbSopenharmony_ci virtual void ProcessEvent(const AppExecFwk::InnerEvent::Pointer &event) override; 63885b47fbSopenharmony_ciprivate: 64885b47fbSopenharmony_ci AccessibilityGestureRecognizer &server_; 65885b47fbSopenharmony_ci}; 66885b47fbSopenharmony_ci 67885b47fbSopenharmony_ciclass AccessibilityGestureRecognizeListener { 68885b47fbSopenharmony_cipublic: 69885b47fbSopenharmony_ci /** 70885b47fbSopenharmony_ci * @brief A destructor used to delete the listener instance. 71885b47fbSopenharmony_ci */ 72885b47fbSopenharmony_ci virtual ~AccessibilityGestureRecognizeListener() = default; 73885b47fbSopenharmony_ci 74885b47fbSopenharmony_ci /** 75885b47fbSopenharmony_ci * @brief The callback function when lifted the finger on the second tap of a double tap. 76885b47fbSopenharmony_ci * 77885b47fbSopenharmony_ci * @param event the touch event received. 78885b47fbSopenharmony_ci * @return true if the event is consumed, else false 79885b47fbSopenharmony_ci */ 80885b47fbSopenharmony_ci virtual bool OnDoubleTap(MMI::PointerEvent &event); 81885b47fbSopenharmony_ci 82885b47fbSopenharmony_ci /** 83885b47fbSopenharmony_ci * @brief The callback function when recognized an event stream as a gesture. 84885b47fbSopenharmony_ci * @return true if the event is consumed, else false 85885b47fbSopenharmony_ci */ 86885b47fbSopenharmony_ci virtual bool OnStarted(); 87885b47fbSopenharmony_ci 88885b47fbSopenharmony_ci /** 89885b47fbSopenharmony_ci * @brief The callback function when recognized an event stream as a multi finger gesture. 90885b47fbSopenharmony_ci * @param isTwoFingerGesture whether the gesture is triggered by two finger. 91885b47fbSopenharmony_ci */ 92885b47fbSopenharmony_ci virtual void MultiFingerGestureOnStarted(bool isTwoFingerGesture); 93885b47fbSopenharmony_ci 94885b47fbSopenharmony_ci /** 95885b47fbSopenharmony_ci * @brief The callback function when decided the event stream is a gesture. 96885b47fbSopenharmony_ci * @param gestureId the recognized gesture ID. 97885b47fbSopenharmony_ci * @return true if the event is consumed, else false 98885b47fbSopenharmony_ci */ 99885b47fbSopenharmony_ci virtual bool OnCompleted(GestureType gestureId); 100885b47fbSopenharmony_ci 101885b47fbSopenharmony_ci /** 102885b47fbSopenharmony_ci * @brief The callback function when decided the event stream is a multi finger gesture. 103885b47fbSopenharmony_ci * @param gestureId the recognized gesture ID. 104885b47fbSopenharmony_ci */ 105885b47fbSopenharmony_ci virtual void MultiFingerGestureOnCompleted(GestureType gestureId); 106885b47fbSopenharmony_ci 107885b47fbSopenharmony_ci /** 108885b47fbSopenharmony_ci * @brief The callback function when decided an event stream doesn't match any known gesture. 109885b47fbSopenharmony_ci * @param event the touch event received. 110885b47fbSopenharmony_ci * @return true if the event is consumed, else false 111885b47fbSopenharmony_ci */ 112885b47fbSopenharmony_ci virtual bool OnCancelled(MMI::PointerEvent &event); 113885b47fbSopenharmony_ci 114885b47fbSopenharmony_ci /** 115885b47fbSopenharmony_ci * @brief The callback function when decided an event stream doesn't match any known multi finger gesture. 116885b47fbSopenharmony_ci * @param isNoDelayFlag whether the gesture recognize process is immediately canceled. 117885b47fbSopenharmony_ci */ 118885b47fbSopenharmony_ci virtual void MultiFingerGestureOnCancelled(const bool isNoDelayFlag); 119885b47fbSopenharmony_ci}; 120885b47fbSopenharmony_ci 121885b47fbSopenharmony_ciclass AccessibilityGestureRecognizer : public AppExecFwk::EventHandler { 122885b47fbSopenharmony_cipublic: 123885b47fbSopenharmony_ci static constexpr uint32_t LONG_PRESS_MSG = 1; 124885b47fbSopenharmony_ci static constexpr uint32_t SINGLE_TAP_MSG = 2; 125885b47fbSopenharmony_ci 126885b47fbSopenharmony_ci /** 127885b47fbSopenharmony_ci * @brief A constructor used to create a accessibilityGestureRecognizer instance. 128885b47fbSopenharmony_ci */ 129885b47fbSopenharmony_ci AccessibilityGestureRecognizer(); 130885b47fbSopenharmony_ci 131885b47fbSopenharmony_ci /** 132885b47fbSopenharmony_ci * @brief A destructor used to delete the accessibilityGestureRecognizer instance. 133885b47fbSopenharmony_ci */ 134885b47fbSopenharmony_ci ~AccessibilityGestureRecognizer() {} 135885b47fbSopenharmony_ci 136885b47fbSopenharmony_ci /** 137885b47fbSopenharmony_ci * @brief Register GestureRecognizeListener. 138885b47fbSopenharmony_ci * @param listener the listener from touchguide 139885b47fbSopenharmony_ci */ 140885b47fbSopenharmony_ci void RegisterListener(AccessibilityGestureRecognizeListener& listener); 141885b47fbSopenharmony_ci 142885b47fbSopenharmony_ci /** 143885b47fbSopenharmony_ci * @brief Register GestureRecognizeListener. 144885b47fbSopenharmony_ci * @param listener the listener from touchguide 145885b47fbSopenharmony_ci */ 146885b47fbSopenharmony_ci void UnregisterListener(); 147885b47fbSopenharmony_ci 148885b47fbSopenharmony_ci /** 149885b47fbSopenharmony_ci * @brief Determine whether a single tap has occurred. 150885b47fbSopenharmony_ci * @return true if a single tap has occurred, else false. 151885b47fbSopenharmony_ci */ 152885b47fbSopenharmony_ci bool IsfirstTap() 153885b47fbSopenharmony_ci { 154885b47fbSopenharmony_ci return isFirstTapUp_; 155885b47fbSopenharmony_ci } 156885b47fbSopenharmony_ci 157885b47fbSopenharmony_ci /** 158885b47fbSopenharmony_ci * @brief Determine whether a double tap has occurred. 159885b47fbSopenharmony_ci * @return true if a double tap has occurred, else false. 160885b47fbSopenharmony_ci */ 161885b47fbSopenharmony_ci bool GetIsDoubleTap() 162885b47fbSopenharmony_ci { 163885b47fbSopenharmony_ci return isDoubleTap_; 164885b47fbSopenharmony_ci } 165885b47fbSopenharmony_ci 166885b47fbSopenharmony_ci /** 167885b47fbSopenharmony_ci * @brief Determine whether a longpress has occurred. 168885b47fbSopenharmony_ci * @return true if longpress has occurred, else false. 169885b47fbSopenharmony_ci */ 170885b47fbSopenharmony_ci bool GetIsLongpress() 171885b47fbSopenharmony_ci { 172885b47fbSopenharmony_ci return isLongpress_; 173885b47fbSopenharmony_ci } 174885b47fbSopenharmony_ci 175885b47fbSopenharmony_ci /** 176885b47fbSopenharmony_ci * @brief Handle a touch event. If an action is completed, the appropriate callback is called. 177885b47fbSopenharmony_ci * 178885b47fbSopenharmony_ci * @param event the touch event to be handled. 179885b47fbSopenharmony_ci * @param rawEvent The raw touch event. 180885b47fbSopenharmony_ci * @return true if the gesture be recognized, else false 181885b47fbSopenharmony_ci */ 182885b47fbSopenharmony_ci bool OnPointerEvent(MMI::PointerEvent &event); 183885b47fbSopenharmony_ci 184885b47fbSopenharmony_ci /** 185885b47fbSopenharmony_ci * @brief Clear state. 186885b47fbSopenharmony_ci */ 187885b47fbSopenharmony_ci void Clear(); 188885b47fbSopenharmony_ci 189885b47fbSopenharmony_ci /** 190885b47fbSopenharmony_ci * @brief Judge whether the double click and long press gesture is recognized. 191885b47fbSopenharmony_ci * @param event the touch event from touchguide 192885b47fbSopenharmony_ci */ 193885b47fbSopenharmony_ci void MaybeRecognizeLongPress(MMI::PointerEvent &event); 194885b47fbSopenharmony_ci 195885b47fbSopenharmony_ci /** 196885b47fbSopenharmony_ci * @brief If a single tap completed. 197885b47fbSopenharmony_ci */ 198885b47fbSopenharmony_ci void SingleTapDetected(); 199885b47fbSopenharmony_ci 200885b47fbSopenharmony_ci /** 201885b47fbSopenharmony_ci * @brief Set isLongpress_ flag; 202885b47fbSopenharmony_ci * @param value set isLongpress_ flag 203885b47fbSopenharmony_ci */ 204885b47fbSopenharmony_ci void SetIsLongpress (bool value) 205885b47fbSopenharmony_ci { 206885b47fbSopenharmony_ci isLongpress_ = value; 207885b47fbSopenharmony_ci } 208885b47fbSopenharmony_ci 209885b47fbSopenharmony_ci /** 210885b47fbSopenharmony_ci * @brief Get pCurDown_ ptr. 211885b47fbSopenharmony_ci */ 212885b47fbSopenharmony_ci std::shared_ptr<MMI::PointerEvent> GetCurDown() 213885b47fbSopenharmony_ci { 214885b47fbSopenharmony_ci return pCurDown_; 215885b47fbSopenharmony_ci } 216885b47fbSopenharmony_ci 217885b47fbSopenharmony_ci /** 218885b47fbSopenharmony_ci * @brief Get continueDown_ flag. 219885b47fbSopenharmony_ci */ 220885b47fbSopenharmony_ci bool GetContinueDown() 221885b47fbSopenharmony_ci { 222885b47fbSopenharmony_ci return continueDown_; 223885b47fbSopenharmony_ci } 224885b47fbSopenharmony_ci 225885b47fbSopenharmony_ciprivate: 226885b47fbSopenharmony_ci /** 227885b47fbSopenharmony_ci * @brief Recognize the standard gesture. 228885b47fbSopenharmony_ci * @param event the touch event from touchguide 229885b47fbSopenharmony_ci * @return true if the standard gesture be recognized, else false 230885b47fbSopenharmony_ci */ 231885b47fbSopenharmony_ci bool StandardGestureRecognizer(MMI::PointerEvent &event); 232885b47fbSopenharmony_ci 233885b47fbSopenharmony_ci /** 234885b47fbSopenharmony_ci * @brief A double tap has occurred, call OnDoubleTap callback. 235885b47fbSopenharmony_ci * @param event the touch event from touchguide 236885b47fbSopenharmony_ci * @return true if the DoubleTap be recognized, else false 237885b47fbSopenharmony_ci */ 238885b47fbSopenharmony_ci bool DoubleTapRecognized(MMI::PointerEvent &event); 239885b47fbSopenharmony_ci 240885b47fbSopenharmony_ci /** 241885b47fbSopenharmony_ci * @brief Recognize gestures based on the sequence of motions. 242885b47fbSopenharmony_ci * @param event the touch event from touchguide 243885b47fbSopenharmony_ci * @return true if the Direction be recognized, else false 244885b47fbSopenharmony_ci */ 245885b47fbSopenharmony_ci bool recognizeDirectionGesture(MMI::PointerEvent &event); 246885b47fbSopenharmony_ci 247885b47fbSopenharmony_ci /** 248885b47fbSopenharmony_ci * @brief Handle the down event from touchguide. 249885b47fbSopenharmony_ci * @param event the touch event from touchguide 250885b47fbSopenharmony_ci */ 251885b47fbSopenharmony_ci void HandleTouchDownEvent(MMI::PointerEvent &event); 252885b47fbSopenharmony_ci 253885b47fbSopenharmony_ci /** 254885b47fbSopenharmony_ci * @brief Handle the move event from touchguide. 255885b47fbSopenharmony_ci * @param event the touch event from touchguide 256885b47fbSopenharmony_ci */ 257885b47fbSopenharmony_ci bool HandleTouchMoveEvent(MMI::PointerEvent &event); 258885b47fbSopenharmony_ci 259885b47fbSopenharmony_ci /** 260885b47fbSopenharmony_ci * @brief Handle the up event from touchguide. 261885b47fbSopenharmony_ci * @param event the touch event from touchguide 262885b47fbSopenharmony_ci */ 263885b47fbSopenharmony_ci bool HandleTouchUpEvent(MMI::PointerEvent &event); 264885b47fbSopenharmony_ci 265885b47fbSopenharmony_ci /** 266885b47fbSopenharmony_ci * @brief Check if it's double tap. 267885b47fbSopenharmony_ci * @param event the touch event from touchguide 268885b47fbSopenharmony_ci * @return true if it's double tap, else false 269885b47fbSopenharmony_ci */ 270885b47fbSopenharmony_ci bool isDoubleTap(MMI::PointerEvent &event); 271885b47fbSopenharmony_ci 272885b47fbSopenharmony_ci /** 273885b47fbSopenharmony_ci * @brief Cancel the gesture. 274885b47fbSopenharmony_ci */ 275885b47fbSopenharmony_ci void StandardGestureCanceled(); 276885b47fbSopenharmony_ci 277885b47fbSopenharmony_ci /** 278885b47fbSopenharmony_ci * @brief Add position to pointer route. 279885b47fbSopenharmony_ci * @param pointerIterm the touch item from touchguide 280885b47fbSopenharmony_ci */ 281885b47fbSopenharmony_ci void AddSwipePosition(MMI::PointerEvent::PointerItem &pointerIterm); 282885b47fbSopenharmony_ci 283885b47fbSopenharmony_ci /** 284885b47fbSopenharmony_ci * @brief Calculate the move threshold for the double tap gesture. 285885b47fbSopenharmony_ci * @param densityDpi the physical density 286885b47fbSopenharmony_ci */ 287885b47fbSopenharmony_ci float GetDoubleTapMoveThreshold(float densityDpi); 288885b47fbSopenharmony_ci 289885b47fbSopenharmony_ci /** 290885b47fbSopenharmony_ci * @brief Get pointer path. 291885b47fbSopenharmony_ci * @param route all pointer route 292885b47fbSopenharmony_ci * @return the vector of PointerPath 293885b47fbSopenharmony_ci */ 294885b47fbSopenharmony_ci std::vector<Pointer> GetPointerPath(std::vector<Pointer> &route); 295885b47fbSopenharmony_ci 296885b47fbSopenharmony_ci /** 297885b47fbSopenharmony_ci * @brief Get swipe direction. 298885b47fbSopenharmony_ci * @param firstP the start point 299885b47fbSopenharmony_ci * @param secondP the endpoint 300885b47fbSopenharmony_ci * @return the type of swipe direction 301885b47fbSopenharmony_ci */ 302885b47fbSopenharmony_ci int32_t GetSwipeDirection(Pointer firstP, Pointer secondP); 303885b47fbSopenharmony_ci 304885b47fbSopenharmony_ci static constexpr int32_t SWIPE_UP = 0; 305885b47fbSopenharmony_ci static constexpr int32_t SWIPE_DOWN = 1; 306885b47fbSopenharmony_ci static constexpr int32_t SWIPE_LEFT = 2; 307885b47fbSopenharmony_ci static constexpr int32_t SWIPE_RIGHT = 3; 308885b47fbSopenharmony_ci 309885b47fbSopenharmony_ci static constexpr GestureType GESTURE_DIRECTION[DIRECTION_NUM] = { 310885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_UP, 311885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_DOWN, 312885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_LEFT, 313885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_RIGHT 314885b47fbSopenharmony_ci }; 315885b47fbSopenharmony_ci 316885b47fbSopenharmony_ci static constexpr GestureType GESTURE_DIRECTION_TO_ID[DIRECTION_NUM][DIRECTION_NUM] = { 317885b47fbSopenharmony_ci { 318885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_UP, 319885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_UP_THEN_DOWN, 320885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_UP_THEN_LEFT, 321885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_UP_THEN_RIGHT, 322885b47fbSopenharmony_ci }, 323885b47fbSopenharmony_ci { 324885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_DOWN_THEN_UP, 325885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_DOWN, 326885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_DOWN_THEN_LEFT, 327885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_DOWN_THEN_RIGHT, 328885b47fbSopenharmony_ci 329885b47fbSopenharmony_ci }, 330885b47fbSopenharmony_ci { 331885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_LEFT_THEN_UP, 332885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_LEFT_THEN_DOWN, 333885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_LEFT, 334885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_LEFT_THEN_RIGHT, 335885b47fbSopenharmony_ci 336885b47fbSopenharmony_ci }, 337885b47fbSopenharmony_ci { 338885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_RIGHT_THEN_UP, 339885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_RIGHT_THEN_DOWN, 340885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_RIGHT_THEN_LEFT, 341885b47fbSopenharmony_ci GestureType::GESTURE_SWIPE_RIGHT 342885b47fbSopenharmony_ci } 343885b47fbSopenharmony_ci }; 344885b47fbSopenharmony_ci 345885b47fbSopenharmony_ci bool continueDown_ = false; 346885b47fbSopenharmony_ci bool isLongpress_ = false; 347885b47fbSopenharmony_ci bool isDoubleTapdetecting_ = false; 348885b47fbSopenharmony_ci bool isTapDown_ = false; 349885b47fbSopenharmony_ci bool isFirstTapUp_ = false; 350885b47fbSopenharmony_ci bool isDoubleTap_ = false; 351885b47fbSopenharmony_ci bool isRecognizingGesture_ = false; 352885b47fbSopenharmony_ci bool isGestureStarted_ = false; 353885b47fbSopenharmony_ci int64_t startTime_ = 0; // microsecond 354885b47fbSopenharmony_ci float xMinPixels_ = 0; 355885b47fbSopenharmony_ci float yMinPixels_ = 0; 356885b47fbSopenharmony_ci float threshold_ = 0; 357885b47fbSopenharmony_ci int32_t doubleTapScaledSlop_ = 0; 358885b47fbSopenharmony_ci MMI::PointerEvent::PointerItem prePointer_ = {}; 359885b47fbSopenharmony_ci MMI::PointerEvent::PointerItem startPointer_ = {}; 360885b47fbSopenharmony_ci std::vector<Pointer> pointerRoute_ {}; 361885b47fbSopenharmony_ci AccessibilityGestureRecognizeListener *listener_ = nullptr; 362885b47fbSopenharmony_ci std::unique_ptr<MMI::PointerEvent> pPreUp_ = nullptr; 363885b47fbSopenharmony_ci std::shared_ptr<MMI::PointerEvent> pCurDown_ = nullptr; 364885b47fbSopenharmony_ci std::shared_ptr<GestureHandler> handler_ = nullptr; 365885b47fbSopenharmony_ci std::shared_ptr<AppExecFwk::EventRunner> runner_ = nullptr; 366885b47fbSopenharmony_ci}; 367885b47fbSopenharmony_ci} // namespace Accessibility 368885b47fbSopenharmony_ci} // namespace OHOS 369885b47fbSopenharmony_ci#endif // ACCESSIBILITY_GESTURE_RECOGNIZER_H