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