1 /* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef ACCESSIBILITY_STATE_EVENT_H 17 #define ACCESSIBILITY_STATE_EVENT_H 18 19 #include <cstdint> 20 21 namespace OHOS { 22 namespace Accessibility { 23 enum AccessibilityStateEventType : uint32_t { 24 EVENT_ACCESSIBILITY_STATE_CHANGED = 0x00000000, 25 EVENT_TOUCH_GUIDE_STATE_CHANGED, 26 EVENT_KEVEVENT_STATE_CHANGED, 27 EVENT_GESTURE_STATE_CHANGED, 28 EVENT_SCREEN_MAGNIFIER_CHANGED, 29 EVENT_AUTO_CLICK_CHANGED, 30 EVENT_SHORT_KEY_CHANGED, 31 EVENT_TYPE_MAX, 32 }; 33 34 class AccessibilityStateObserver { 35 public: 36 /** 37 * @brief Destruct 38 * @since 3 39 * @sysCap Accessibility 40 */ 41 virtual ~AccessibilityStateObserver() = default; 42 43 /** 44 * @brief Receives notifications on accessibility status changes. 45 * @param state Indicates the status change. 46 * @since 3 47 * @sysCap Accessibility 48 */ 49 virtual void OnStateChanged(const bool state) = 0; 50 }; 51 } // namespace Accessibility 52 } // namespace OHOS 53 #endif // ACCESSIBILITY_STATE_EVENT_H