1 /*
2  * Copyright (c) 2024 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 ARK_WEB_ACCESSIBILITY_NODE_INFO_H_
17 #define ARK_WEB_ACCESSIBILITY_NODE_INFO_H_
18 #pragma once
19 
20 #include "base/include/ark_web_base_ref_counted.h"
21 #include "base/include/ark_web_types.h"
22 
23 namespace OHOS::ArkWeb {
24 
25 /*--ark web(source=webcore)--*/
26 class ArkWebAccessibilityNodeInfo : public virtual ArkWebBaseRefCounted {
27 public:
28     /*--ark web()--*/
29     virtual ArkWebString GetHint() = 0;
30 
31     /*--ark web()--*/
32     virtual ArkWebString GetError() = 0;
33 
34     /*--ark web()--*/
35     virtual int32_t GetRectX() = 0;
36 
37     /*--ark web()--*/
38     virtual int32_t GetRectY() = 0;
39 
40     /*--ark web()--*/
41     virtual void SetPageId(int32_t page_id) = 0;
42 
43     /*--ark web()--*/
44     virtual int32_t GetPageId() = 0;
45 
46     /*--ark web()--*/
47     virtual ArkWebUint32Vector GetActions() = 0;
48 
49     /*--ark web()--*/
50     virtual ArkWebString GetContent() = 0;
51 
52     /*--ark web()--*/
53     virtual ArkWebInt64Vector GetChildIds() = 0;
54 
55     /*--ark web()--*/
56     virtual void SetParentId(int64_t parentId_id) = 0;
57 
58     /*--ark web()--*/
59     virtual int64_t GetParentId() = 0;
60 
61     /*--ark web()--*/
62     virtual bool GetIsHeading() = 0;
63 
64     /*--ark web()--*/
65     virtual bool GetIsChecked() = 0;
66 
67     /*--ark web()--*/
68     virtual bool GetIsEnabled() = 0;
69 
70     /*--ark web()--*/
71     virtual bool GetIsFocused() = 0;
72 
73     /*--ark web()--*/
74     virtual int32_t GetRectWidth() = 0;
75 
76     /*--ark web()--*/
77     virtual int32_t GetRectHeight() = 0;
78 
79     /*--ark web()--*/
80     virtual bool GetIsVisible() = 0;
81 
82     /*--ark web()--*/
83     virtual bool GetIsHinting() = 0;
84 
85     /*--ark web()--*/
86     virtual bool GetIsEditable() = 0;
87 
88     /*--ark web()--*/
89     virtual bool GetIsSelected() = 0;
90 
91     /*--ark web()--*/
92     virtual size_t GetItemCounts() = 0;
93 
94     /*--ark web()--*/
95     virtual int32_t GetLiveRegion() = 0;
96 
97     /*--ark web()--*/
98     virtual bool GetIsPassword() = 0;
99 
100     /*--ark web()--*/
101     virtual bool GetIsCheckable() = 0;
102 
103     /*--ark web()--*/
104     virtual bool GetIsClickable() = 0;
105 
106     /*--ark web()--*/
107     virtual bool GetIsFocusable() = 0;
108 
109     /*--ark web()--*/
110     virtual bool GetIsScrollable() = 0;
111 
112     /*--ark web()--*/
113     virtual bool GetIsDeletable() = 0;
114 
115     /*--ark web()--*/
116     virtual int64_t GetAccessibilityId() = 0;
117 
118     /*--ark web()--*/
119     virtual bool GetIsPopupSupported() = 0;
120 
121     /*--ark web()--*/
122     virtual bool GetIsContentInvalid() = 0;
123 
124     /*--ark web()--*/
125     virtual int32_t GetSelectionEnd() = 0;
126 
127     /*--ark web()--*/
128     virtual int32_t GetSelectionStart() = 0;
129 
130     /*--ark web()--*/
131     virtual float GetRangeInfoMin() = 0;
132 
133     /*--ark web()--*/
134     virtual float GetRangeInfoMax() = 0;
135 
136     /*--ark web()--*/
137     virtual float GetRangeInfoCurrent() = 0;
138 
139     /*--ark web()--*/
140     virtual int32_t GetInputType() = 0;
141 
142     /*--ark web()--*/
143     virtual ArkWebString GetComponentType() = 0;
144 
145     /*--ark web()--*/
146     virtual ArkWebString GetDescriptionInfo() = 0;
147 
148     /*--ark web()--*/
149     virtual int32_t GetGridRows() = 0;
150 
151     /*--ark web()--*/
152     virtual int32_t GetGridItemRow() = 0;
153 
154     /*--ark web()--*/
155     virtual int32_t GetGridColumns() = 0;
156 
157     /*--ark web()--*/
158     virtual int32_t GetGridItemColumn() = 0;
159 
160     /*--ark web()--*/
161     virtual int32_t GetGridItemRowSpan() = 0;
162 
163     /*--ark web()--*/
164     virtual int32_t GetGridSelectedMode() = 0;
165 
166     /*--ark web()--*/
167     virtual int32_t GetGridItemColumnSpan() = 0;
168 
169     /*--ark web()--*/
170     virtual bool GetIsAccessibilityFocus() = 0;
171 
172     /*--ark web()--*/
173     virtual bool GetIsPluralLineSupported() = 0;
174 
175     /**
176      * @Description: Get whether the acccessibility node is an accessibility group.
177      * @Return: Whether the acccessibility node is an accessibility group.
178      * @Since: 12005
179      */
180     /*--ark web()--*/
181     virtual bool GetIsAccessibilityGroup() = 0;
182 
183     /**
184      * @Description: Get the acccessibility level of the accessibility node.
185      * @Return: The acccessibility level of the accessibility node.
186      * @Since: 12005
187      */
188     /*--ark web()--*/
189     virtual ArkWebString GetAccessibilityLevel() = 0;
190 
191     /**
192      * @Description: Get the acccessibility description of the accessibility node.
193      * @Return: The acccessibility description of the accessibility node.
194      * @Since: 12005
195      */
196     /*--ark web()--*/
197     virtual ArkWebString GetAccessibilityDescription() = 0;
198 
199     /**
200      * @Description: Get the acccessibility text of the accessibility node.
201      * @Return: The acccessibility text of the accessibility node.
202      * @Since: 12005
203      */
204     /*--ark web()--*/
205     virtual ArkWebString GetAccessibilityText() = 0;
206 };
207 
208 } // namespace OHOS::ArkWeb
209 
210 #endif // ARK_WEB_ACCESSIBILITY_NODE_INFO_H_
211