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_CONSTANTS_H 17 #define ACCESSIBILITY_CONSTANTS_H 18 19 #include <cstdint> 20 #include <string> 21 22 namespace OHOS { 23 namespace Accessibility { 24 // text move step 25 extern const std::string MOVE_UNIT_CHARACTER; 26 extern const std::string MOVE_UNIT_WORD; 27 extern const std::string MOVE_UNIT_LINE; 28 extern const std::string MOVE_UNIT_PAGE; 29 extern const std::string MOVE_UNIT_PARAGRAPH; 30 31 // Operation Arguments Type 32 extern const std::string ACTION_ARGU_INVALID; 33 extern const std::string ACTION_ARGU_SELECT_TEXT_START; 34 extern const std::string ACTION_ARGU_SELECT_TEXT_END; 35 extern const std::string ACTION_ARGU_SELECT_TEXT_INFORWARD; 36 extern const std::string ACTION_ARGU_SET_OFFSET; 37 extern const std::string ACTION_ARGU_HTML_ELEMENT; 38 extern const std::string ACTION_ARGU_SET_TEXT; 39 extern const std::string ACTION_ARGU_MOVE_UNIT; 40 extern const std::string ACTION_ARGU_SPAN_ID; 41 extern const std::string ACTION_ARGU_CLICK_ENHANCE_DATA; 42 extern const std::string ACTION_ARGU_CLICK_TIMESTAMP; 43 44 // HtmlItemType 45 extern const std::string HTML_ITEM_INVALID; 46 extern const std::string HTML_ITEM_LINK; 47 extern const std::string HTML_ITEM_CONTROL; 48 extern const std::string HTML_ITEM_GRAPHIC; 49 extern const std::string HTML_ITEM_LIST_ITEM; 50 extern const std::string HTML_ITEM_LIST; 51 extern const std::string HTML_ITEM_TABLE; 52 extern const std::string HTML_ITEM_COMBOX; 53 extern const std::string HTML_ITEM_HEADING; 54 extern const std::string HTML_ITEM_BUTTON; 55 extern const std::string HTML_ITEM_CHECKBOX; 56 extern const std::string HTML_ITEM_LANDMARK; 57 extern const std::string HTML_ITEM_TEXT_FIELD; 58 extern const std::string HTML_ITEM_FOCUSABLE; 59 extern const std::string HTML_ITEM_H1; 60 extern const std::string HTML_ITEM_H2; 61 extern const std::string HTML_ITEM_H3; 62 extern const std::string HTML_ITEM_H4; 63 extern const std::string HTML_ITEM_H5; 64 extern const std::string HTML_ITEM_H6; 65 extern const std::string HTML_ITEM_UNKOWN; 66 67 extern const std::string OHOS_PERMISSION_READ_ACCESSIBILITY_CONFIG; 68 extern const std::string OHOS_PERMISSION_WRITE_ACCESSIBILITY_CONFIG; 69 extern const std::string OHOS_PERMISSION_QUERY_ACCESSIBILITY_ELEMENT; 70 extern const std::string OHOS_PERMISSION_MANAGE_SECURE_SETTINGS; 71 extern const std::string OHOS_PERMISSION_MANAGE_SETTINGS; 72 extern const std::string OHOS_PERMISSION_ACCESSIBILITY_EXTENSION_ABILITY; 73 74 extern const int32_t PREFETCH_PREDECESSORS; 75 extern const int32_t PREFETCH_SIBLINGS; 76 extern const int32_t PREFETCH_CHILDREN; 77 extern const int32_t PREFETCH_RECURSIVE_CHILDREN; 78 extern const int32_t PREFETCH_RECURSIVE_CHILDREN_REDUCED; 79 extern const int32_t GET_SOURCE_MODE; 80 extern const int32_t UNDEFINED; 81 extern const int32_t GET_SOURCE_PREFETCH_MODE; 82 extern const int32_t UNDEFINED_SELECTION_INDEX; 83 extern const int32_t UNDEFINED_ITEM_ID; 84 extern const int32_t ROOT_ITEM_ID; 85 extern const int32_t MAX_TEXT_LENGTH; 86 extern const int32_t HOST_VIEW_ID; 87 extern const int64_t ROOT_NODE_ID; 88 89 // Focus types 90 extern const int32_t FOCUS_TYPE_INVALID; 91 extern const int32_t FOCUS_TYPE_INPUT; 92 extern const int32_t FOCUS_TYPE_ACCESSIBILITY; 93 94 // grid mode 95 extern const int32_t SELECTION_MODE_NONE; 96 extern const int32_t SELECTION_MODE_SINGLE; 97 extern const int32_t SELECTION_MODE_MULTIPLE; 98 99 extern const int32_t INVALID_WINDOW_ID; 100 extern const int32_t INVALID_TREE_ID; 101 extern const int32_t ANY_WINDOW_ID; 102 extern const int32_t ACTIVE_WINDOW_ID; 103 104 extern const uint32_t STATE_ACCESSIBILITY_ENABLED; 105 extern const uint32_t STATE_EXPLORATION_ENABLED; 106 extern const uint32_t STATE_CAPTION_ENABLED; 107 extern const uint32_t STATE_KEYEVENT_ENABLED; 108 extern const uint32_t STATE_GESTURE_ENABLED; 109 extern const uint32_t STATE_SCREENMAGNIFIER_ENABLED; 110 extern const uint32_t STATE_MOUSEKEY_ENABLED; 111 extern const uint32_t STATE_SHORTKEY_ENABLED; 112 extern const uint32_t STATE_HIGHCONTRAST_ENABLED; 113 extern const uint32_t STATE_INVETRTCOLOR_ENABLED; 114 extern const uint32_t STATE_ANIMATIONOFF_ENABLED; 115 extern const uint32_t STATE_DALTONIZATION_STATE_ENABLED; 116 extern const uint32_t STATE_AUDIOMONO_ENABLED; 117 extern const uint32_t STATE_IGNORE_REPEAT_CLICK_ENABLED; 118 extern const uint32_t STATE_SCREENREADER_ENABLED; 119 extern const uint32_t STATE_SINGLE_CLICK_MODE_ENABLED; 120 extern const uint32_t STATE_CONFIG_EVENT_CHANGE; 121 extern const int32_t INVALID_CHANNEL_ID; 122 extern const int32_t MAX_ALLOW_SIZE; 123 } // namespace Accessibility 124 } // namespace OHOS 125 #endif // ACCESSIBILITY_CONSTANTS_H