1885b47fbSopenharmony_ci/*
2885b47fbSopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd.
3885b47fbSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4885b47fbSopenharmony_ci * you may not use this file except in compliance with the License.
5885b47fbSopenharmony_ci * You may obtain a copy of the License at
6885b47fbSopenharmony_ci *
7885b47fbSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8885b47fbSopenharmony_ci *
9885b47fbSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10885b47fbSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11885b47fbSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12885b47fbSopenharmony_ci * See the License for the specific language governing permissions and
13885b47fbSopenharmony_ci * limitations under the License.
14885b47fbSopenharmony_ci */
15885b47fbSopenharmony_ci
16885b47fbSopenharmony_ci#include "accessibility_constants.h"
17885b47fbSopenharmony_ci
18885b47fbSopenharmony_cinamespace OHOS {
19885b47fbSopenharmony_cinamespace Accessibility {
20885b47fbSopenharmony_ci// text move step
21885b47fbSopenharmony_ciconst std::string MOVE_UNIT_CHARACTER = "char";
22885b47fbSopenharmony_ciconst std::string MOVE_UNIT_WORD = "word";
23885b47fbSopenharmony_ciconst std::string MOVE_UNIT_LINE = "line";
24885b47fbSopenharmony_ciconst std::string MOVE_UNIT_PAGE = "page";
25885b47fbSopenharmony_ciconst std::string MOVE_UNIT_PARAGRAPH = "paragraph";
26885b47fbSopenharmony_ci
27885b47fbSopenharmony_ci// Operation Arguments Type
28885b47fbSopenharmony_ciconst std::string ACTION_ARGU_INVALID = "invalid";
29885b47fbSopenharmony_ciconst std::string ACTION_ARGU_SELECT_TEXT_START = "selectTextBegin";
30885b47fbSopenharmony_ciconst std::string ACTION_ARGU_SELECT_TEXT_END = "selectTextEnd";
31885b47fbSopenharmony_ciconst std::string ACTION_ARGU_SELECT_TEXT_INFORWARD = "selectTextInForWard";
32885b47fbSopenharmony_ciconst std::string ACTION_ARGU_SET_OFFSET = "offset";
33885b47fbSopenharmony_ciconst std::string ACTION_ARGU_HTML_ELEMENT = "htmlItem";
34885b47fbSopenharmony_ciconst std::string ACTION_ARGU_SET_TEXT = "setText";
35885b47fbSopenharmony_ciconst std::string ACTION_ARGU_MOVE_UNIT = "textMoveUnit";
36885b47fbSopenharmony_ciconst std::string ACTION_ARGU_SPAN_ID = "spanId";
37885b47fbSopenharmony_ci
38885b47fbSopenharmony_ci// HtmlItemType
39885b47fbSopenharmony_ciconst std::string HTML_ITEM_INVALID = "invalid";
40885b47fbSopenharmony_ciconst std::string HTML_ITEM_LINK = "link";
41885b47fbSopenharmony_ciconst std::string HTML_ITEM_CONTROL = "control";
42885b47fbSopenharmony_ciconst std::string HTML_ITEM_GRAPHIC = "graphic";
43885b47fbSopenharmony_ciconst std::string HTML_ITEM_LIST_ITEM = "listItem";
44885b47fbSopenharmony_ciconst std::string HTML_ITEM_LIST = "list";
45885b47fbSopenharmony_ciconst std::string HTML_ITEM_TABLE = "table";
46885b47fbSopenharmony_ciconst std::string HTML_ITEM_COMBOX = "combox";
47885b47fbSopenharmony_ciconst std::string HTML_ITEM_HEADING = "heading";
48885b47fbSopenharmony_ciconst std::string HTML_ITEM_BUTTON = "button";
49885b47fbSopenharmony_ciconst std::string HTML_ITEM_CHECKBOX = "checkBox";
50885b47fbSopenharmony_ciconst std::string HTML_ITEM_LANDMARK = "landmark";
51885b47fbSopenharmony_ciconst std::string HTML_ITEM_TEXT_FIELD = "textField";
52885b47fbSopenharmony_ciconst std::string HTML_ITEM_FOCUSABLE = "focusable";
53885b47fbSopenharmony_ciconst std::string HTML_ITEM_H1 = "h1";
54885b47fbSopenharmony_ciconst std::string HTML_ITEM_H2 = "h2";
55885b47fbSopenharmony_ciconst std::string HTML_ITEM_H3 = "h3";
56885b47fbSopenharmony_ciconst std::string HTML_ITEM_H4 = "h4";
57885b47fbSopenharmony_ciconst std::string HTML_ITEM_H5 = "h5";
58885b47fbSopenharmony_ciconst std::string HTML_ITEM_H6 = "h6";
59885b47fbSopenharmony_ciconst std::string HTML_ITEM_UNKOWN = "unknown";
60885b47fbSopenharmony_ci
61885b47fbSopenharmony_ciconst std::string OHOS_PERMISSION_READ_ACCESSIBILITY_CONFIG = "ohos.permission.READ_ACCESSIBILITY_CONFIG";
62885b47fbSopenharmony_ciconst std::string OHOS_PERMISSION_WRITE_ACCESSIBILITY_CONFIG = "ohos.permission.WRITE_ACCESSIBILITY_CONFIG";
63885b47fbSopenharmony_ciconst std::string OHOS_PERMISSION_QUERY_ACCESSIBILITY_ELEMENT = "ohos.permission.QUERY_ACCESSIBILITY_ELEMENT";
64885b47fbSopenharmony_ci
65885b47fbSopenharmony_ciconst int32_t PREFETCH_PREDECESSORS = 1 << 0;
66885b47fbSopenharmony_ciconst int32_t PREFETCH_SIBLINGS = 1 << 1;
67885b47fbSopenharmony_ciconst int32_t PREFETCH_CHILDREN = 1 << 2;
68885b47fbSopenharmony_ciconst int32_t PREFETCH_RECURSIVE_CHILDREN = 1 << 3;
69885b47fbSopenharmony_ciconst int32_t GET_SOURCE_MODE = PREFETCH_RECURSIVE_CHILDREN | PREFETCH_PREDECESSORS;
70885b47fbSopenharmony_ciconst int32_t UNDEFINED = -1;
71885b47fbSopenharmony_ciconst int32_t GET_SOURCE_PREFETCH_MODE = PREFETCH_PREDECESSORS | PREFETCH_SIBLINGS | PREFETCH_CHILDREN;
72885b47fbSopenharmony_ciconst int32_t UNDEFINED_SELECTION_INDEX = -1;
73885b47fbSopenharmony_ciconst int32_t UNDEFINED_ITEM_ID = 0x1FFFFFF;
74885b47fbSopenharmony_ciconst int32_t ROOT_ITEM_ID = -1;
75885b47fbSopenharmony_ciconst int32_t MAX_TEXT_LENGTH = 500;
76885b47fbSopenharmony_ciconst int32_t HOST_VIEW_ID = -1;
77885b47fbSopenharmony_ciconst int64_t ROOT_NODE_ID = -1;
78885b47fbSopenharmony_ci
79885b47fbSopenharmony_ci// Focus types
80885b47fbSopenharmony_ciconst int32_t FOCUS_TYPE_INVALID = -1;
81885b47fbSopenharmony_ciconst int32_t FOCUS_TYPE_INPUT = 1 << 0;
82885b47fbSopenharmony_ciconst int32_t FOCUS_TYPE_ACCESSIBILITY = 1 << 1;
83885b47fbSopenharmony_ci
84885b47fbSopenharmony_ci// grid mode
85885b47fbSopenharmony_ciconst int32_t SELECTION_MODE_NONE = 0;
86885b47fbSopenharmony_ciconst int32_t SELECTION_MODE_SINGLE = 1;
87885b47fbSopenharmony_ciconst int32_t SELECTION_MODE_MULTIPLE = 2;
88885b47fbSopenharmony_ci
89885b47fbSopenharmony_ciconst int32_t INVALID_WINDOW_ID = -1;
90885b47fbSopenharmony_ciconst int32_t INVALID_TREE_ID = -1;
91885b47fbSopenharmony_ciconst int32_t ANY_WINDOW_ID = -2;
92885b47fbSopenharmony_ciconst int32_t ACTIVE_WINDOW_ID = 0x7FFFFFFF;
93885b47fbSopenharmony_ci
94885b47fbSopenharmony_ciconst uint32_t STATE_ACCESSIBILITY_ENABLED = 0x00000001;
95885b47fbSopenharmony_ciconst uint32_t STATE_EXPLORATION_ENABLED = 0x00000002;
96885b47fbSopenharmony_ciconst uint32_t STATE_CAPTION_ENABLED = 0x00000004;
97885b47fbSopenharmony_ciconst uint32_t STATE_KEYEVENT_ENABLED = 0x00000008;
98885b47fbSopenharmony_ciconst uint32_t STATE_GESTURE_ENABLED = 0x00000010;
99885b47fbSopenharmony_ciconst uint32_t STATE_SCREENMAGNIFIER_ENABLED = 0x00000020;
100885b47fbSopenharmony_ciconst uint32_t STATE_MOUSEKEY_ENABLED = 0x00000040;
101885b47fbSopenharmony_ciconst uint32_t STATE_SHORTKEY_ENABLED = 0x00000080;
102885b47fbSopenharmony_ciconst uint32_t STATE_HIGHCONTRAST_ENABLED = 0x00000100;
103885b47fbSopenharmony_ciconst uint32_t STATE_INVETRTCOLOR_ENABLED = 0x00000200;
104885b47fbSopenharmony_ciconst uint32_t STATE_ANIMATIONOFF_ENABLED = 0x00000400;
105885b47fbSopenharmony_ciconst uint32_t STATE_AUDIOMONO_ENABLED = 0x00000800;
106885b47fbSopenharmony_ciconst uint32_t STATE_DALTONIZATION_STATE_ENABLED = 0x00001000;
107885b47fbSopenharmony_ciconst uint32_t STATE_IGNORE_REPEAT_CLICK_ENABLED = 0x00002000;
108885b47fbSopenharmony_ci
109885b47fbSopenharmony_ciconst int32_t INVALID_CHANNEL_ID = 0xFFFFFFFF;
110885b47fbSopenharmony_ci} // namespace Accessibility
111885b47fbSopenharmony_ci} // namespace OHOS