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 
42 // HtmlItemType
43 extern const std::string HTML_ITEM_INVALID;
44 extern const std::string HTML_ITEM_LINK;
45 extern const std::string HTML_ITEM_CONTROL;
46 extern const std::string HTML_ITEM_GRAPHIC;
47 extern const std::string HTML_ITEM_LIST_ITEM;
48 extern const std::string HTML_ITEM_LIST;
49 extern const std::string HTML_ITEM_TABLE;
50 extern const std::string HTML_ITEM_COMBOX;
51 extern const std::string HTML_ITEM_HEADING;
52 extern const std::string HTML_ITEM_BUTTON;
53 extern const std::string HTML_ITEM_CHECKBOX;
54 extern const std::string HTML_ITEM_LANDMARK;
55 extern const std::string HTML_ITEM_TEXT_FIELD;
56 extern const std::string HTML_ITEM_FOCUSABLE;
57 extern const std::string HTML_ITEM_H1;
58 extern const std::string HTML_ITEM_H2;
59 extern const std::string HTML_ITEM_H3;
60 extern const std::string HTML_ITEM_H4;
61 extern const std::string HTML_ITEM_H5;
62 extern const std::string HTML_ITEM_H6;
63 extern const std::string HTML_ITEM_UNKOWN;
64 
65 extern const std::string OHOS_PERMISSION_READ_ACCESSIBILITY_CONFIG;
66 extern const std::string OHOS_PERMISSION_WRITE_ACCESSIBILITY_CONFIG;
67 extern const std::string OHOS_PERMISSION_QUERY_ACCESSIBILITY_ELEMENT;
68 
69 extern const int32_t PREFETCH_PREDECESSORS;
70 extern const int32_t PREFETCH_SIBLINGS;
71 extern const int32_t PREFETCH_CHILDREN;
72 extern const int32_t PREFETCH_RECURSIVE_CHILDREN;
73 extern const int32_t GET_SOURCE_MODE;
74 extern const int32_t UNDEFINED;
75 extern const int32_t GET_SOURCE_PREFETCH_MODE;
76 extern const int32_t UNDEFINED_SELECTION_INDEX;
77 extern const int32_t UNDEFINED_ITEM_ID;
78 extern const int32_t ROOT_ITEM_ID;
79 extern const int32_t MAX_TEXT_LENGTH;
80 extern const int32_t HOST_VIEW_ID;
81 extern const int64_t ROOT_NODE_ID;
82 
83 // Focus types
84 extern const int32_t FOCUS_TYPE_INVALID;
85 extern const int32_t FOCUS_TYPE_INPUT;
86 extern const int32_t FOCUS_TYPE_ACCESSIBILITY;
87 
88 // grid mode
89 extern const int32_t SELECTION_MODE_NONE;
90 extern const int32_t SELECTION_MODE_SINGLE;
91 extern const int32_t SELECTION_MODE_MULTIPLE;
92 
93 extern const int32_t INVALID_WINDOW_ID;
94 extern const int32_t INVALID_TREE_ID;
95 extern const int32_t ANY_WINDOW_ID;
96 extern const int32_t ACTIVE_WINDOW_ID;
97 
98 extern const uint32_t STATE_ACCESSIBILITY_ENABLED;
99 extern const uint32_t STATE_EXPLORATION_ENABLED;
100 extern const uint32_t STATE_CAPTION_ENABLED;
101 extern const uint32_t STATE_KEYEVENT_ENABLED;
102 extern const uint32_t STATE_GESTURE_ENABLED;
103 extern const uint32_t STATE_SCREENMAGNIFIER_ENABLED;
104 extern const uint32_t STATE_MOUSEKEY_ENABLED;
105 extern const uint32_t STATE_SHORTKEY_ENABLED;
106 extern const uint32_t STATE_HIGHCONTRAST_ENABLED;
107 extern const uint32_t STATE_INVETRTCOLOR_ENABLED;
108 extern const uint32_t STATE_ANIMATIONOFF_ENABLED;
109 extern const uint32_t STATE_DALTONIZATION_STATE_ENABLED;
110 extern const uint32_t STATE_AUDIOMONO_ENABLED;
111 extern const uint32_t STATE_IGNORE_REPEAT_CLICK_ENABLED;
112 extern const int32_t INVALID_CHANNEL_ID;
113 } // namespace Accessibility
114 } // namespace OHOS
115 #endif // ACCESSIBILITY_CONSTANTS_H