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_SCREEN_READER_STATE_CHANGED, 32 EVENT_TYPE_MAX, 33 }; 34 35 class AccessibilityStateObserver { 36 public: 37 /** 38 * @brief Destruct 39 * @since 3 40 * @sysCap Accessibility 41 */ 42 virtual ~AccessibilityStateObserver() = default; 43 44 /** 45 * @brief Receives notifications on accessibility status changes. 46 * @param state Indicates the status change. 47 * @since 3 48 * @sysCap Accessibility 49 */ 50 virtual void OnStateChanged(const bool state) = 0; 51 }; 52 } // namespace Accessibility 53 } // namespace OHOS 54 #endif // ACCESSIBILITY_STATE_EVENT_H