1 /*
2  * Copyright (C) 2022-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 ACCESSIBILITY_ELEMENT_INFO_H
17 #define ACCESSIBILITY_ELEMENT_INFO_H
18 
19 #include <map>
20 #include <set>
21 #include <vector>
22 #include "accessibility_def.h"
23 
24 namespace OHOS {
25 namespace Accessibility {
26 static std::set<std::string> EXTRA_ELEMENTINFO_SET = {
27     "CheckboxGroupSelectedStatus",
28     "Row",
29     "Column",
30     "SideBarContainerStates",
31     "ListItemIndex"
32 };
33 
34 /*
35 * class define the action on Accessibility info
36 */
37 class AccessibleAction {
38 public:
39     /**
40      * @brief Construct
41      */
AccessibleAction()42     AccessibleAction() {}
43 
44     /**
45      * @brief Construct
46      * @param actionType The type of action, refer to [ActionType]
47      * @param description The description message of action.
48      */
49     AccessibleAction(ActionType actionType, const std::string &description);
50 
51     /**
52      * @brief Gets the action type.
53      * @return The type of action, refer to [ActionType]
54      */
55     ActionType GetActionType() const;
56 
57     /**
58      * @brief Gets the action description.
59      * @return The description message of action.
60      */
61     const std::string &GetDescriptionInfo() const;
62 
63 protected:
64     ActionType actionType_ = ACCESSIBILITY_ACTION_INVALID;
65     std::string description_ = "";
66 };
67 
68 /**
69  * @brief  Define the RangInfo for progress bar
70  * @note
71  * @retval None
72  */
73 class RangeInfo {
74 public:
75     /**
76      * @brief Construct
77      */
RangeInfo()78     RangeInfo() {}
79 
80     /**
81      * @brief Construct
82      * @param min The min value
83      * @param max The max value
84      * @param current current value
85      */
86     RangeInfo(double min, double max, double current);
87 
88     /**
89      * @brief Gets the min value.
90      * @return min value
91      */
92     double GetMin() const;
93 
94     /**
95      * @brief Gets the max value.
96      * @return max value.
97      */
98     double GetMax() const;
99 
100     /**
101      * @brief Gets the current value.
102      * @return current value.
103      */
104     double GetCurrent() const;
105 
106     /**
107      * @brief Sets the min value.
108      * @param min min value
109      */
110     void SetMin(double min);
111 
112     /**
113      * @brief Sets the max value.
114      * @param max max value.
115      */
116     void SetMax(double max);
117 
118     /**
119      * @brief Sets the current value.
120      * @param current current value
121      */
122     void SetCurrent(double current);
123 
124 protected:
125     double min_ = 0;
126     double max_ = 0;
127     double current_ = 0;
128 };
129 
130 /**
131  * @brief  Define the list/grid component
132  * @note
133  * @retval None
134  */
135 class GridInfo {
136 public:
137     /**
138      * @brief Construct
139      * @since 3
140      * @sysCap Accessibility
141      */
GridInfo()142     GridInfo() {}
143 
144     /**
145      * @brief Construct
146      * @param rowCount The number of row
147      * @param columnCount The number of column
148      * @param mode 0: select one line only, otherwise select multilines.
149      * @since 3
150      * @sysCap Accessibility
151      */
152     GridInfo(int32_t rowCount, int32_t columnCount, int32_t mode);
153 
154     /**
155      * @brief Set the grid object
156      * @param rowCount The number of row
157      * @param columnCount The number of column
158      * @param mode 0: select one line only, otherwise select multilines.
159      * @since 3
160      * @sysCap Accessibility
161      */
162     void SetGrid(int32_t rowCount, int32_t columnCount, int32_t mode);
163 
164     /**
165      * @brief Copy grid object.
166      * @param other The copied grid
167      * @since 3
168      * @sysCap Accessibility
169      */
170     void SetGrid(GridInfo other);
171 
172     /**
173      * @brief Gets the number of rows.
174      * @return number of rows.
175      * @since 3
176      * @sysCap Accessibility
177      */
178     int32_t GetRowCount() const;
179 
180     /**
181      * @brief Gets the number of columns.
182      * @return number of columns.
183      * @since 3
184      * @sysCap Accessibility
185      */
186     int32_t GetColumnCount() const;
187 
188     /**
189      * @brief Get the mode of grid
190      * @return 0: Selected by one line, otherwise is multilines.
191      * @since 3
192      * @sysCap Accessibility
193      */
194     int32_t GetSelectionMode() const;
195 
196 protected:
197     int32_t rowCount_ = 0;
198     int32_t columnCount_ = 0;
199     int32_t selectionMode_ = 0;
200 };
201 
202 class GridItemInfo {
203 public:
204     /**
205      * @brief Construct
206      * @since 3
207      * @sysCap Accessibility
208      */
GridItemInfo()209     GridItemInfo() {}
210 
211     /**
212      * @brief Construct
213      * @param rowIndex The index of row.
214      * @param rowSpan  The row spanned.
215      * @param columnIndex The index of column
216      * @param columnSpan THe column spanned
217      * @param heading true:The item isHeading, otherwise is not
218      * @param selected true:The item is selected,otherwise is not
219      * @since 3
220      * @sysCap Accessibility
221      */
222     GridItemInfo(int32_t rowIndex, int32_t rowSpan, int32_t columnIndex, int32_t columnSpan,
223         bool heading, bool selected);
224 
225     /**
226      * @brief Copy the GridItemInfo
227      * @param other The object of GridItemInfo copied.
228      * @since 3
229      * @sysCap Accessibility
230      */
231     void SetGridItemInfo(GridItemInfo other);
232 
233     /**
234      * @brief Set grid object
235      * @param rowIndex The index of row.
236      * @param rowSpan  The row spanned.
237      * @param columnIndex The index of column
238      * @param columnSpan THe column spanned
239      * @param heading true:The item isHeading, otherwise is not
240      * @param selected true:The item is selected,otherwise is not
241      * @since 3
242      * @sysCap Accessibility
243      */
244     void SetGridItemInfo(int32_t rowIndex, int32_t rowSpan, int32_t columnIndex, int32_t columnSpan,
245         bool heading, bool selected);
246 
247     /**
248      * @brief Gets the column index at which the item is located.
249      * @return The column index.
250      * @since 3
251      * @sysCap Accessibility
252      */
253     int32_t GetColumnIndex() const;
254 
255     /**
256      * @brief Gets the row index at which the item is located.
257      * @return The row index.
258      * @since 3
259      * @sysCap Accessibility
260      */
261     int32_t GetRowIndex() const;
262 
263     /**
264      * @brief Gets the number of columns the item spans.
265      * @return The column span.
266      * @since 3
267      * @sysCap Accessibility
268      */
269     int32_t GetColumnSpan() const;
270 
271     /**
272      * @brief Gets the number of rows the item spans.
273      * @return The row span.
274      * @since 3
275      * @sysCap Accessibility
276      */
277     int32_t GetRowSpan() const;
278 
279     /**
280      * @brief Checks if the grid item is a heading.
281      * @return true:If the item is a heading, otherwise is not.
282      * @since 3
283      * @sysCap Accessibility
284      */
285     bool IsHeading() const;
286 
287     /**
288      * @brief Checks if the grid item is a selected.
289      * @return true:If the item is a selected, otherwise is not.
290      * @since 3
291      * @sysCap Accessibility
292      */
293     bool IsSelected() const;
294 
295 protected:
296     bool heading_ = false;
297     int32_t columnIndex_ = 0;
298     int32_t rowIndex_ = 0;
299     int32_t columnSpan_ = 0;
300     int32_t rowSpan_ = 0;
301     bool selected_ = false;
302 };
303 
304 
305 /*
306 * class define the extra elementinfo
307 */
308 class ExtraElementInfo {
309 public:
310     /**
311      * @brief Construct
312      */
ExtraElementInfo()313     ExtraElementInfo() {}
314 
315     /**
316      * @brief Construct
317      * @param extraElementValueStr The map of extraElement.
318      * @param extraElementValueInt  The map of extraElement.
319      * @sysCap Accessibility
320      */
321     ExtraElementInfo(const std::map<std::string, std::string> extraElementValueStr,
322         const std::map<std::string, int32_t> extraElementValueInt);
323 
324     /**
325      * @brief Copy the ExtraElementInfo
326      * @param keyStr The key of extraElementValueStr.
327      * @param valueStr The val of extraElementValueStr.
328      * @sysCap Accessibility
329      */
330     RetError SetExtraElementInfo(const std::string keyStr, const std::string valueStr);
331 
332     /**
333      * @brief Copy the ExtraElementInfo
334      * @param keyStr The key of extraElementValueInt.
335      * @param valueInt The val of extraElementValueInt.
336      * @sysCap Accessibility
337      */
338     RetError SetExtraElementInfo(const std::string keyStr, const int32_t valueInt);
339 
340     /**
341      * @brief Gets the map of extraElementValueStr.
342      * @return The extraElementValueStr map.
343      * @sysCap Accessibility
344      */
345     const std::map<std::string, std::string> &GetExtraElementInfoValueStr() const;
346 
347     /**
348      * @brief Gets the map of extraElementValueInt.
349      * @return The extraElementValueInt map.
350      * @sysCap Accessibility
351      */
352     const std::map<std::string, int32_t> &GetExtraElementInfoValueInt() const;
353 
354 protected:
355     std::map<std::string, std::string> extraElementValueStr_ = {};
356     std::map<std::string, int32_t> extraElementValueInt_ = {};
357 };
358 
359 class Rect {
360 public:
361     /**
362      * @brief Construct
363      * @since 3
364      * @sysCap Accessibility
365      */
Rect()366     Rect() {}
367 
368     /**
369      * @brief Destruct
370      * @since 3
371      * @sysCap Accessibility
372      */
373     virtual ~Rect() = default;
374 
375     /**
376      * @brief Construct
377      * @param leftTopX : The left top x pixel coordinates
378      * @param leftTopY : The left top y pixel coordinates
379      * @param rightBottomY : The right bottom y pixel coordinates
380      * @param rightBottomX : The right bottom x pixel coordinates
381      * @since 3
382      * @sysCap Accessibility
383      */
Rect(int32_t leftTopX,int32_t leftTopY,int32_t rightBottomX,int32_t rightBottomY)384     Rect(int32_t leftTopX, int32_t leftTopY, int32_t rightBottomX, int32_t rightBottomY)
385     {
386         leftTopX_ = leftTopX;
387         leftTopY_ = leftTopY;
388         rightBottomX_ = rightBottomX;
389         rightBottomY_ = rightBottomY;
390     }
391 
392     /**
393      * @brief Get the left top point's pixel coordinates
394      * @return The left top x pixel coordinates
395      * @since 3
396      * @sysCap Accessibility
397      */
GetLeftTopXScreenPostion()398     int32_t GetLeftTopXScreenPostion() const
399     {
400         return leftTopX_;
401     }
402 
403     /**
404      * @brief Get the left top point's pixel coordinates
405      * @return The left top y pixel coordinates
406      * @since 3
407      * @sysCap Accessibility
408      */
GetLeftTopYScreenPostion()409     int32_t GetLeftTopYScreenPostion() const
410     {
411         return leftTopY_;
412     }
413 
414     /**
415      * @brief Get the right bottom point's pixel coordinates
416      * @return The bottom x pixel coordinates
417      * @since 3
418      * @sysCap Accessibility
419      */
GetRightBottomXScreenPostion()420     int32_t GetRightBottomXScreenPostion() const
421     {
422         return rightBottomX_;
423     }
424 
425     /**
426      * @brief Get the right bottom point's pixel coordinates
427      * @return The bottom y pixel coordinates
428      * @since 3
429      * @sysCap Accessibility
430      */
GetRightBottomYScreenPostion()431     int32_t GetRightBottomYScreenPostion() const
432     {
433         return rightBottomY_;
434     }
435     /**
436      * @brief Set the left top point's pixel coordinates
437      * @param leftTopX The left top x pixel coordinates
438      * @param leftTopY The left top y pixel coordinates
439      * @since 3
440      * @sysCap Accessibility
441      */
SetLeftTopScreenPostion(int32_t leftTopX,int32_t leftTopY)442     void SetLeftTopScreenPostion(int32_t leftTopX, int32_t leftTopY)
443     {
444         leftTopY_ = leftTopY;
445         leftTopX_ = leftTopX;
446     }
447 
448     /**
449      * @brief Set the right bottom point's pixel coordinates
450      * @param rightBottomX The right bottom x pixel coordinates
451      * @param rightBottomY The right bottom y pixel coordinates
452      * @since 3
453      * @sysCap Accessibility
454      */
SetRightBottomScreenPostion(int32_t rightBottomX,int32_t rightBottomY)455     void SetRightBottomScreenPostion(int32_t rightBottomX, int32_t rightBottomY)
456     {
457         rightBottomY_ = rightBottomY;
458         rightBottomX_ = rightBottomX;
459     }
460 
461 protected:
462     int32_t leftTopX_ = 0;
463     int32_t leftTopY_ = 0;
464     int32_t rightBottomX_ = 0;
465     int32_t rightBottomY_ = 0;
466 };
467 
468 /*
469 * class define the span info
470 */
471 class SpanInfo {
472 public:
473     /**
474      * @brief Construct
475      */
SpanInfo()476     SpanInfo() {}
477 
478     /**
479      * @brief Construct
480      * @param spanId The span Id.
481      * @param spanText The text of span.
482      * @param accessibilityText The accessibility text of span.
483      * @param accessibilityDescription The accessibility description of span.
484      * @param accessibilityLevel The accessibility level of span.
485      */
486     SpanInfo(const int32_t &spanId, const std::string &spanText, const std::string &accessibilityText,
487         const std::string &accessibilityDescription, const std::string &accessibilityLevel);
488 
489     /**
490      * @brief Sets the span Id of spanInfo.
491      * @param spanId The span Id.
492      */
493     void SetSpanId(const int32_t spanId);
494 
495     /**
496      * @brief Sets the Text of spanInfo.
497      * @param spanText The span text.
498      */
499     void SetSpanText(const std::string spanText);
500 
501     /**
502      * @brief Sets the accessibility text of spanInfo.
503      * @param accessibilityText The accessibility text.
504      */
505     void SetAccessibilityText(const std::string accessibilityText);
506 
507     /**
508      * @brief Sets the accessibilityDescription of spanInfo.
509      * @param accessibilityDescription The accessibility description.
510      */
511     void SetAccessibilityDescription(const std::string accessibilityDescription);
512 
513     /**
514      * @brief Sets the accessibilityLevel of spanInfo.
515      * @param accessibilityLevel The accessibility level.
516      */
517     void SetAccessibilityLevel(const std::string accessibilityLevel);
518 
519     /**
520      * @brief Gets the span id.
521      * @return The id of span.
522      */
523     int32_t GetSpanId() const;
524 
525     /**
526      * @brief Gets the span Text.
527      * @return The Text of span.
528      */
529     const std::string &GetSpanText() const;
530 
531     /**
532      * @brief Gets the accessibility text.
533      * @return The accessibility text of span.
534      */
535     const std::string &GetAccessibilityText() const;
536 
537     /**
538      * @brief Gets the accessibility description.
539      * @return The accessibility description of span.
540      */
541     const std::string &GetAccessibilityDescription() const;
542 
543     /**
544      * @brief Gets the accessibility level.
545      * @return The accessibility level of span.
546      */
547     const std::string &GetAccessibilityLevel() const;
548 
549 protected:
550     int32_t spanId_;
551     std::string spanText_;
552     std::string accessibilityText_;
553     std::string accessibilityDescription_;
554     std::string accessibilityLevel_;
555 };
556 
557 /*
558 * The class supply the api to set/get ui component property
559 */
560 class AccessibilityElementInfo {
561 public:
562     static constexpr int64_t UNDEFINED_ACCESSIBILITY_ID = -1;
563     static constexpr int32_t UNDEFINED_TREE_ID = -1;
564     static constexpr int32_t UNDEFINED_WINID_ID = -1;
565     static constexpr int32_t MAX_SIZE = 50;
566     static constexpr int64_t ROOT_PARENT_ID = -2100000;
567 
568     /**
569      * @brief Construct
570      * @since 3
571      * @sysCap Accessibility
572      */
573     AccessibilityElementInfo();
574 
575     /**
576      * @brief Set the id of AccessibilityElementInfo
577      * @param componentId The id of component.
578      * @since 3
579      * @sysCap Accessibility
580      */
581     void SetComponentId(const int64_t componentId);
582 
583     /**
584      * @brief Get the child's accessibility Id by index.
585      * @param index The index of child
586      * @return The child's accessibility Id
587      * @since 3
588      * @sysCap Accessibility
589      */
590     int64_t GetChildId(const int32_t index) const;
591 
592     /**
593      * @brief Gets the number of children
594      * @return The number of children
595      * @since 3
596      * @sysCap Accessibility
597      */
598     int32_t GetChildCount() const;
599 
600     /**
601      * @brief Gets the id of children
602      * @return The list of children id
603      * @since 3
604      * @sysCap Accessibility
605      */
606     const std::vector<int64_t> &GetChildIds() const;
607 
608     /**
609      * @brief Add child node information
610      * @param childId The id of child node
611      * @since 3
612      * @sysCap Accessibility
613      */
614     void AddChild(const int64_t childId);
615 
616     /**
617      * @brief Remove child specified.
618      * @param childId The child to removed.
619      * @return true:Removed succeed, otherwise is not.
620      * @since 3
621      * @sysCap Accessibility
622      */
623     bool RemoveChild(const int64_t childId);
624 
625     /**
626      * @brief Gets an action list.
627      * @return action list.  Refer to AccessibleAction
628      * @since 3
629      * @sysCap Accessibility
630      */
631     const std::vector<AccessibleAction> &GetActionList() const;
632 
633     /**
634      * @brief Add action on the component
635      * @param action The action on the component.
636      * @since 3
637      * @sysCap Accessibility
638      */
639     void AddAction(AccessibleAction &action);
640 
641     /**
642      * @brief Remove action on the component
643      * @param action The action object.
644      * @since 3
645      * @sysCap Accessibility
646      */
647     void DeleteAction(AccessibleAction &action);
648 
649     /**
650      * @brief Remove the action on the component.
651      * @param actionType The action type.
652      * @return true:successfully deleted, otherwise is not.
653      * @since 3
654      * @sysCap Accessibility
655      */
656     bool DeleteAction(ActionType &actionType);
657 
658     /**
659      * @brief Remove all the action on the component.
660      * @since 3
661      * @sysCap Accessibility
662      */
663     void DeleteAllActions();
664 
665     /**
666      * @brief Sets the maximum length of text allowed for this node.
667      * @param max The maximum length of text
668      * @since 3
669      * @sysCap Accessibility
670      */
671     void SetTextLengthLimit(const int32_t max);
672 
673     /**
674      * @brief Gets the maximum length of text allowed for this node.
675      * @return The maximum length of text
676      * @since 3
677      * @sysCap Accessibility
678      */
679     int32_t GetTextLengthLimit() const;
680 
681     /**
682      * @brief Get the window Id of the component that belongs to the window.
683      * @return window id
684      * @since 3
685      * @sysCap Accessibility
686      */
687     int32_t GetWindowId() const;
688 
689     /**
690      * @brief Set the window Id of the component that belongs to the window.
691      * @param windowId The window Id
692      * @since 3
693      * @sysCap Accessibility
694      */
695     void SetWindowId(const int32_t windowId);
696 
697     /**
698      * @brief Get parent accessibility Id.
699      * @return The accessibility Id of parent.
700      * @since 3
701      * @sysCap Accessibility
702      */
703     int64_t GetParentNodeId() const;
704 
705     /**
706      * @brief Set parent node information
707      * @param parentId Parent node id
708      * @since 3
709      * @sysCap Accessibility
710      */
711     void SetParent(const int64_t parentId);
712 
713     /**
714      * @brief Gets the rectangular area of this accessibility node control in the screen.
715      * @return The rectangular area of this accessibility node
716      * @since 3
717      * @sysCap Accessibility
718      */
719     const Rect &GetRectInScreen() const;
720 
721     /**
722      * @brief Set the rectangular area of this accessibility node control in the screen.
723      * @param bounds The rectangular area of this accessibility node
724      * @since 3
725      * @sysCap Accessibility
726      */
727     void SetRectInScreen(Rect &bounds);
728 
729     /**
730      * @brief Checks whether this node (a check box as an example) is checkable.
731      * @return true:the node is checkable, otherwise is not.
732      * @since 3
733      * @sysCap Accessibility
734      */
735     bool IsCheckable() const;
736 
737     /**
738      * @brief Set whether this node (a check box as an example) is checkable.
739      * @param checkable true:the node is checkable, otherwise is not.
740      * @since 3
741      * @sysCap Accessibility
742      */
743     void SetCheckable(const bool checkable);
744 
745     /**
746      * @brief Checks whether this node is checked.
747      * @return true : Is checked, otherwise is not.
748      * @since 3
749      * @sysCap Accessibility
750      */
751     bool IsChecked() const;
752 
753     /**
754      * @brief Set whether this node is checked.
755      * @param checked true:Is checked, otherwise is not.
756      * @since 3
757      * @sysCap Accessibility
758      */
759     void SetChecked(const bool checked);
760 
761     /**
762      * @brief Checks whether this node can be focused.
763      * @return true : Can be focused, otherwise is not.
764      * @since 3
765      * @sysCap Accessibility
766      */
767     bool IsFocusable() const;
768 
769     /**
770      * @brief Set whether this node can be focused.
771      * @param focusable true : Can be focused, otherwise is not.
772      * @since 3
773      * @sysCap Accessibility
774      */
775     void SetFocusable(const bool focusable);
776 
777     /**
778      * @brief Checks whether this node has gained focus.
779      * @return true:Focused, otherwise is not.
780      * @since 3
781      * @sysCap Accessibility
782      */
783     bool IsFocused() const;
784 
785     /**
786      * @brief Set whether this node has gained focus.
787      * @param focused true : Focused, otherwise is not.
788      * @since 3
789      * @sysCap Accessibility
790      */
791     void SetFocused(const bool focused);
792 
793     /**
794      * @brief Checks whether this node is visible to users.
795      * @return true : visible, otherwise is not.
796      * @since 3
797      * @sysCap Accessibility
798      */
799     bool IsVisible() const;
800 
801     /**
802      * @brief Set whether this node is visible to users.
803      * @param visible true:visible, otherwise is not.
804      * @since 3
805      * @sysCap Accessibility
806      */
807     void SetVisible(const bool visible);
808 
809     /**
810      * @brief Checks whether this node has gained accessibility focus.
811      * @return true:Gained accessibility focus, otherwise is not.
812      * @since 3
813      * @sysCap Accessibility
814      */
815     bool HasAccessibilityFocus() const;
816 
817     /**
818      * @brief Set whether this node has gained accessibility focus.
819      * @param focused true:Gained accessibility focus, otherwise is not.
820      * @since 3
821      * @sysCap Accessibility
822      */
823     void SetAccessibilityFocus(const bool focused);
824 
825     /**
826      * @brief Checks whether this node is selected.
827      * @return true:selected, otherwise is not.
828      * @since 3
829      * @sysCap Accessibility
830      */
831     bool IsSelected() const;
832 
833     /**
834      * @brief Set whether this node is selected.
835      * @param selected true: selected, otherwise is not.
836      * @since 3
837      * @sysCap Accessibility
838      */
839     void SetSelected(const bool selected);
840 
841     /**
842      * @brief Checks whether this node is clickable.
843      * @return true: clickable, otherwise is not.
844      * @since 3
845      * @sysCap Accessibility
846      */
847     bool IsClickable() const;
848 
849     /**
850      * @brief Set whether this node is clickable.
851      * @param clickable true:clickable, otherwise is not.
852      * @since 3
853      * @sysCap Accessibility
854      */
855     void SetClickable(const bool clickable);
856 
857     /**
858      * @brief Checks whether this node is long clickable.
859      * @return true: long clickable, otherwise is not.
860      * @since 3
861      * @sysCap Accessibility
862      */
863     bool IsLongClickable() const;
864 
865     /**
866      * @brief Set whether this node is long clickable.
867      * @param longClickable true: long clickable, otherwise is not.
868      * @since 3
869      * @sysCap Accessibility
870      */
871     void SetLongClickable(const bool longClickable);
872 
873     /**
874      * @brief Checks whether this node is enabled.
875      * @return true:enabled, otherwise is not.
876      * @since 3
877      * @sysCap Accessibility
878      */
879     bool IsEnabled() const;
880 
881     /**
882      * @brief Set whether this node is enabled.
883      * @param enabled true: enabled, otherwise is not.
884      * @since 3
885      * @sysCap Accessibility
886      */
887     void SetEnabled(const bool enabled);
888 
889     /**
890      * @brief Checks whether the content in this node is a password.
891      * @return true: password, otherwise is not.
892      * @since 3
893      * @sysCap Accessibility
894      */
895     bool IsPassword() const;
896 
897     /**
898      * @brief Set whether the content in this node is a password
899      * @param type true:password, otherwise is not.
900      * @since 3
901      * @sysCap Accessibility
902      */
903     void SetPassword(const bool type);
904 
905     /**
906      * @brief Checks whether this node is scrollable.
907      * @return true: scrollable, otherwise is not.
908      * @since 3
909      * @sysCap Accessibility
910      */
911     bool IsScrollable() const;
912 
913     /**
914      * @brief Set whether this node is scrollable.
915      * @param scrollable true: scrollable, otherwise is not.
916      * @since 3
917      * @sysCap Accessibility
918      */
919     void SetScrollable(const bool scrollable);
920 
921     /**
922      * @brief Checks whether this node is editable.
923      * @return true:editable, otherwise is not.
924      * @since 3
925      * @sysCap Accessibility
926      */
927     bool IsEditable() const;
928 
929     /**
930      * @brief Set whether this node is editable.
931      * @param editable true: editable, otherwise is not.
932      * @since 3
933      * @sysCap Accessibility
934      */
935     void SetEditable(const bool editable);
936 
937     /**
938      * @brief Checks whether this node can display text in multiple lines.
939      * @return true: multilines, otherwise is not.
940      * @since 3
941      * @sysCap Accessibility
942      */
943     bool IsPluraLineSupported() const;
944 
945     /**
946      * @brief Set whether this node can display text in multiple lines.
947      * @param multiLine true:multilines, otherwise is not.
948      * @since 3
949      * @sysCap Accessibility
950      */
951     void SetPluraLineSupported(const bool multiLine);
952 
953     /**
954      * @brief Checks whether pop-up windows are supported.
955      * @return true: Support popup, otherwise is not.
956      * @since 3
957      * @sysCap Accessibility
958      */
959     bool IsPopupSupported() const;
960 
961     /**
962      * @brief Set whether pop-up windows are supported.
963      * @param supportPopup true: Support popup, otherwise is not.
964      * @since 3
965      * @sysCap Accessibility
966      */
967     void SetPopupSupported(const bool supportPopup);
968 
969     /**
970      * @brief Checks whether this node is deletable.
971      * @return true:deletable, otherwise is not.
972      * @since 3
973      * @sysCap Accessibility
974      */
975     bool IsDeletable() const;
976 
977     /**
978      * @brief Set whether this node is deletable.
979      * @param deletable true:deletable, otherwise is not.
980      * @since 3
981      * @sysCap Accessibility
982      */
983     void SetDeletable(const bool deletable);
984 
985     /**
986      * @brief Checks whether this node is essential to users.
987      * @return true: essential to user, otherwise is not.
988      * @since 3
989      * @sysCap Accessibility
990      */
991     bool IsEssential() const;
992 
993     /**
994      * @brief Set whether this node is essential to users.
995      * @param essential true:essential to user, otherwise is not.
996      * @since 3
997      * @sysCap Accessibility
998      */
999     void SetEssential(const bool essential);
1000 
1001     /**
1002      * @brief Checks whether this node is displaying a hint.
1003      * @return true:displaying a hint, otherwise is not.
1004      * @since 3
1005      * @sysCap Accessibility
1006      */
1007     bool IsGivingHint() const;
1008 
1009     /**
1010      * @brief Set whether this node is displaying a hint.
1011      * @param hinting true:displaying a hint, otherwise is not.
1012      * @since 3
1013      * @sysCap Accessibility
1014      */
1015     void SetHinting(const bool hinting);
1016 
1017     /**
1018      * @brief Gets the bundle name of application target.
1019      * @return bundle name
1020      * @since 3
1021      * @sysCap Accessibility
1022      */
1023     const std::string &GetBundleName() const;
1024 
1025     /**
1026      * @brief Set the bundle name of application target.
1027      * @param bundleName The bundle name of application target.
1028      * @since 3
1029      * @sysCap Accessibility
1030      */
1031     void SetBundleName(const std::string &bundleName);
1032 
1033     /**
1034      * @brief Get component type.
1035      * @return The component type.
1036      * @since 3
1037      * @sysCap Accessibility
1038      */
1039     const std::string &GetComponentType() const;
1040 
1041     /**
1042      * @brief Set component type.
1043      * @param className The component type.
1044      * @since 3
1045      * @sysCap Accessibility
1046      */
1047     void SetComponentType(const std::string &className);
1048 
1049     /**
1050      * @brief Gets the text of node.
1051      * @return The text of node
1052      * @since 3
1053      * @sysCap Accessibility
1054      */
1055     const std::string &GetContent() const;
1056 
1057     /**
1058      * @brief Set the text of node.
1059      * @param text The text of node
1060      * @since 3
1061      * @sysCap Accessibility
1062      */
1063     void SetContent(const std::string &text);
1064 
1065     /**
1066      * @brief Gets the hint information.
1067      * @return the hint information.
1068      * @since 3
1069      * @sysCap Accessibility
1070      */
1071     const std::string &GetHint() const;
1072 
1073     /**
1074      * @brief Sets the hint information.
1075      * @param hintText the hint information.
1076      * @since 3
1077      * @sysCap Accessibility
1078      */
1079     void SetHint(const std::string &hintText);
1080 
1081     /**
1082      * @brief Gets the description of the accessibility node.
1083      * @return the description of the accessibility node.
1084      * @since 3
1085      * @sysCap Accessibility
1086      */
1087     const std::string &GetDescriptionInfo() const;
1088 
1089     /**
1090      * @brief Set the description of the accessibility node.
1091      * @param contentDescription the description of the accessibility node.
1092      * @since 3
1093      * @sysCap Accessibility
1094      */
1095     void SetDescriptionInfo(const std::string &contentDescription);
1096 
1097     /**
1098      * @brief Set the resource name of the component.
1099      * @param viewIdResName The resource name.
1100      * @since 3
1101      * @sysCap Accessibility
1102      */
1103     void SetComponentResourceId(const std::string &viewIdResName);
1104 
1105     /**
1106      * @brief Gets the resource name.
1107      * @return the resource name.
1108      * @since 3
1109      * @sysCap Accessibility
1110      */
1111     const std::string &GetComponentResourceId() const;
1112 
1113     /**
1114      * @brief Set whether this node has live region
1115      * @param liveRegion live region: 0: not live region; 1: interrupt current talk back; 2: talk back by order
1116      * @since 3
1117      * @sysCap Accessibility
1118      */
1119     void SetLiveRegion(const int32_t liveRegion);
1120 
1121     /**
1122      * @brief Get the live region of the node
1123      * @return The live region of the node
1124      * @since 3
1125      * @sysCap Accessibility
1126      */
1127     int32_t GetLiveRegion() const;
1128 
1129     /**
1130      * @brief Set whether this node has content Invalid.
1131      * @note If the node has content Invalid,when input invalid information, it will be talkbacked. such as:
1132      * The editbox permit number only, you input character("a"), The invalid information will be talkbacked.
1133      * @param contentInvalid true:the content is invalid; false:the content is valid
1134      * @since 3
1135      * @sysCap Accessibility
1136      */
1137     void SetContentInvalid(const bool contentInvalid);
1138 
1139     /**
1140      * @brief Get whether this node has content Invalid.
1141      * @return true:the content is invalid; false:the content is valid
1142      * @since 3
1143      * @sysCap Accessibility
1144      */
1145     bool GetContentInvalid() const;
1146 
1147     /**
1148      * @brief Set error information, it used with contentInvalid is setted true.
1149      * @param error error information
1150      * @since 3
1151      * @sysCap Accessibility
1152      */
1153     void SetError(const std::string &error);
1154 
1155     /**
1156      * @brief Get error information,it used with contentInvalid is setted true.
1157      * @return error information
1158      * @since 3
1159      * @sysCap Accessibility
1160      */
1161     const std::string &GetError() const;
1162 
1163     /**
1164      * @brief Set the id of component labeled
1165      * @param componentId the id of component
1166      * @since 3
1167      * @sysCap Accessibility
1168      */
1169     void SetLabeled(const int64_t componentId);
1170 
1171     /**
1172      * @brief Get labeled accessibility Id
1173      * @return accessibility Id
1174      * @since 3
1175      * @sysCap Accessibility
1176      */
1177     int64_t GetLabeledAccessibilityId() const;
1178 
1179     /**
1180      * @brief Set accessibility Id
1181      * @param componentId The id of component
1182      * @since 3
1183      * @sysCap Accessibility
1184      */
1185     void SetAccessibilityId(const int64_t componentId);
1186 
1187     /**
1188      * @brief Get accessibility Id
1189      * @return accessibility Id
1190      * @since 3
1191      * @sysCap Accessibility
1192      */
1193     int64_t GetAccessibilityId() const;
1194 
1195     /**
1196      * @brief Get the object of RangeInfo
1197      * @return the object of RangeInfo
1198      * @since 3
1199      * @sysCap Accessibility
1200      */
1201     const RangeInfo &GetRange() const;
1202 
1203     /**
1204      * @brief Set the object of RangeInfo
1205      * @param rangeInfo the object of RangeInfo
1206      * @since 3
1207      * @sysCap Accessibility
1208      */
1209     void SetRange(RangeInfo &rangeInfo);
1210 
1211     /**
1212      * @brief Set the start location of text selected.
1213      * @param start the start location of text selected.
1214      * @since 3
1215      * @sysCap Accessibility
1216      */
1217     void SetSelectedBegin(const int32_t start);
1218 
1219     /**
1220      * @brief Get the start location of text selected.
1221      * @return the start location of text selected.
1222      * @since 3
1223      * @sysCap Accessibility
1224      */
1225     int32_t GetSelectedBegin() const;
1226 
1227     /**
1228      * @brief Set the end location of text selected.
1229      * @param end the end location of text selected.
1230      * @since 3
1231      * @sysCap Accessibility
1232      */
1233     void SetSelectedEnd(const int32_t end);
1234 
1235     /**
1236      * @brief Get the end location of text selected.
1237      * @return the end location of text selected.
1238      * @since 3
1239      * @sysCap Accessibility
1240      */
1241     int32_t GetSelectedEnd() const;
1242 
1243     /**
1244      * @brief Get the object of GridInfo
1245      * @return the object of GridInfo
1246      * @since 3
1247      * @sysCap Accessibility
1248      */
1249     const GridInfo &GetGrid() const;
1250 
1251     /**
1252      * @brief Set the object of GridInfo
1253      * @param grid the object of GridInfo
1254      * @since 3
1255      * @sysCap Accessibility
1256      */
1257     void SetGrid(const GridInfo &grid);
1258 
1259     /**
1260      * @brief Get the object of GridItemInfo
1261      * @return the object of GridItemInfo
1262      * @since 3
1263      * @sysCap Accessibility
1264      */
1265     const GridItemInfo &GetGridItem() const;
1266 
1267     /**
1268      * @brief Set the object of GridItemInfo
1269      * @param gridItem the object of GridItemInfo
1270      * @since 3
1271      * @sysCap Accessibility
1272      */
1273     void SetGridItem(const GridItemInfo &gridItem);
1274 
1275     /**
1276      * @brief Get the current index of list or location text
1277      * @return the current index of list or location text
1278      * @since 3
1279      * @sysCap Accessibility
1280      */
1281     int32_t GetCurrentIndex() const;
1282 
1283     /**
1284      * @brief Set the current index of list or location text
1285      * @param index the current index of list or location text
1286      * @since 3
1287      * @sysCap Accessibility
1288      */
1289     void SetCurrentIndex(const int32_t index);
1290 
1291     /**
1292      * @brief Get the start index of list or location text
1293      * @return the start index of list or location text
1294      * @since 3
1295      * @sysCap Accessibility
1296      */
1297     int32_t GetBeginIndex() const;
1298 
1299     /**
1300      * @brief Set the start index of list or location text
1301      * @param index the start index of list or location text
1302      * @since 3
1303      * @sysCap Accessibility
1304      */
1305     void SetBeginIndex(const int32_t index);
1306 
1307     /**
1308      * @brief Get the end index of list or location text
1309      * @return the end index of list or location text
1310      * @since 3
1311      * @sysCap Accessibility
1312      */
1313     int32_t GetEndIndex() const;
1314 
1315     /**
1316      * @brief Set the end index of list or location text
1317      * @param index the end index of list or location text
1318      * @since 3
1319      * @sysCap Accessibility
1320      */
1321     void SetEndIndex(const int32_t index);
1322 
1323     /**
1324      * @brief Get the input type of text
1325      * @return The input type of text
1326      * @since 3
1327      * @sysCap Accessibility
1328      */
1329     int32_t GetInputType() const;
1330 
1331     /**
1332      * @brief Set the input type of text
1333      * @param inputType The input type of text
1334      * @since 3
1335      * @sysCap Accessibility
1336      */
1337     void SetInputType(const int32_t inputType);
1338 
1339     /**
1340      * @brief Check whether this node is valid
1341      * @return true:valid, otherwise is not.
1342      * @since 3
1343      * @sysCap Accessibility
1344      */
1345     bool IsValidElement() const;
1346 
1347     /**
1348      * @brief Set whether this node is valid
1349      * @param valid true:valid, otherwise is not.
1350      * @since 3
1351      * @sysCap Accessibility
1352      */
1353     void SetValidElement(const bool valid);
1354 
1355     /**
1356      * @brief Set inspector key
1357      * @param inspector The inspector key.
1358      * @since 3
1359      * @sysCap Accessibility
1360      */
1361     void SetInspectorKey(const std::string &key);
1362 
1363     /**
1364      * @brief Get inspector key
1365      * @return The inspector key
1366      * @since 3
1367      * @sysCap Accessibility
1368      */
1369     const std::string &GetInspectorKey() const;
1370 
1371     /**
1372      * @brief Set the path of page.
1373      * @param path The unique identification of one page.
1374      * @sysCap Accessibility
1375      */
1376     void SetPagePath(const std::string &path);
1377 
1378     /**
1379      * @brief Get the path of page
1380      * @return Page path
1381      * @sysCap Accessibility
1382      */
1383     const std::string &GetPagePath() const;
1384 
1385     /**
1386      * @brief Set page id
1387      * @param pageId page id.
1388      * @sysCap Accessibility
1389      */
1390     void SetPageId(const int32_t pageId);
1391 
1392     /**
1393      * @brief Get page id
1394      * @return page id
1395      * @sysCap Accessibility
1396      */
1397     int32_t GetPageId() const;
1398 
1399     /**
1400      * @brief Set the text movement step
1401      * @param granularity text moving unit
1402      * @sysCap Accessibility
1403      */
1404     void SetTextMovementStep(const TextMoveUnit granularity);
1405 
1406     /**
1407      * @brief Get the text movement step
1408      * @return Text moving unit
1409      * @sysCap Accessibility
1410      */
1411     TextMoveUnit GetTextMovementStep() const;
1412 
1413     /**
1414      * @brief Set item count
1415      * @param itemCounts The count of item
1416      * @sysCap Accessibility
1417      */
1418     void SetItemCounts(const int32_t itemCounts);
1419 
1420     /**
1421      * @brief Get item count
1422      * @return The count of item
1423      * @sysCap Accessibility
1424      */
1425     int32_t GetItemCounts() const;
1426 
1427     // The following methods are only used when the target application uses
1428     // the sendEvent interface to send event data.
1429     /**
1430      * @brief Set trigger action
1431      * @param action The trigger action
1432      * @sysCap Accessibility
1433      */
1434     void SetTriggerAction(const ActionType action);
1435 
1436     /**
1437      * @brief Get trigger action
1438      * @return The trigger action
1439      * @sysCap Accessibility
1440      */
1441     ActionType GetTriggerAction() const;
1442 
1443     /**
1444      * @brief Set content list
1445      * @param contentList The list of content
1446      * @sysCap Accessibility
1447      */
1448     void SetContentList(const std::vector<std::string> &contentList);
1449 
1450     /**
1451      * @brief Get content list
1452      * @param contentList(out) The list of content
1453      * @sysCap Accessibility
1454      */
1455     void GetContentList(std::vector<std::string> &contentList) const;
1456 
1457     /**
1458      * @brief Set latest content
1459      * @param content The latest content
1460      * @sysCap Accessibility
1461      */
1462     void SetLatestContent(const std::string &content);
1463 
1464     /**
1465      * @brief Get latest content
1466      * @return The latest content
1467      * @sysCap Accessibility
1468      */
1469     const std::string &GetLatestContent() const;
1470 
1471     /**
1472      * @brief Set accessibility text
1473      * @param accessibilityText The accessibility text of node
1474      * @sysCap Accessibility
1475      */
1476     void SetAccessibilityText(const std::string &accessibilityText);
1477 
1478     /**
1479      * @brief Get accessibility text
1480      * @return The accessibility text of node
1481      * @sysCap Accessibility
1482      */
1483     const std::string &GetAccessibilityText() const;
1484 
1485     /**
1486      * @brief Set text type
1487      * @param textType The text type of node
1488      * @sysCap Accessibility
1489      */
1490     void SetTextType(const std::string &textType);
1491 
1492     /**
1493      * @brief Get text type
1494      * @return The text type of node
1495      * @sysCap Accessibility
1496      */
1497     const std::string &GetTextType() const;
1498 
1499     /**
1500      * @brief Set offset
1501      * @param offset The offset of scroll
1502      * @sysCap Accessibility
1503      */
1504     void SetOffset(const float offset);
1505 
1506     /**
1507      * @brief Get offset
1508      * @return The offset of scroll
1509      * @sysCap Accessibility
1510      */
1511     float GetOffset() const;
1512 
1513     /**
1514      * @brief Set the child tree Id and the child window Id of the component that belongs to the window.
1515      * @param iChildTreeId The child tree Id
1516      * @param iChildWindowId The child window Id
1517      * @sysCap Accessibility
1518     */
1519     void SetChildTreeIdAndWinId(const int32_t iChildTreeId, const int32_t iChildWindowId);
1520 
1521     /**
1522      * @brief Get the child tree Id of the component that belongs to the window.
1523      * @return The child tree Id
1524      * @sysCap Accessibility
1525     */
1526     int32_t GetChildTreeId() const;
1527 
1528     /**
1529      * @brief Get the child window Id of the component that belongs to the window.
1530      * @return The child window Id
1531      * @sysCap Accessibility
1532     */
1533     int32_t GetChildWindowId() const;
1534 
1535     /**
1536      * @brief Set the child tree Id of the component that belongs to the window.
1537      * @param iChildTreeId The child tree Id
1538      * @sysCap Accessibility
1539     */
1540     void SetBelongTreeId(const int32_t iBelongTreeId);
1541 
1542     /**
1543      * @brief Get the child tree Id of the component that belongs to the window.
1544      * @return The child tree Id
1545      * @sysCap Accessibility
1546     */
1547     int32_t GetBelongTreeId() const;
1548 
1549     /**
1550      * @brief Get the parent WindowId.
1551      * @return The parent windowId Id
1552      * @sysCap Accessibility
1553     */
1554     int32_t GetParentWindowId() const;
1555 
1556     /**
1557      * @brief Set the parent window Id to the element info.
1558      * @param iParentWindowId The parent window Id
1559      * @sysCap Accessibility
1560     */
1561     void SetParentWindowId(const int32_t iParentWindowId);
1562 
1563     void SetExtraElement(const ExtraElementInfo &extraElementInfo);
1564 
1565     const ExtraElementInfo &GetExtraElement() const;
1566     /**
1567      * @brief Get the accessibilityGroup to the element info.
1568      * @return the accessibilityGroup
1569      * @sysCap Accessibility
1570     */
1571     bool GetAccessibilityGroup() const;
1572 
1573     /**
1574      * @brief Set the accessibilityGroup to the element info.
1575      * @param accessibilityGroup The accessibilityGroup of node
1576      * @sysCap Accessibility
1577     */
1578     void SetAccessibilityGroup(const bool accessibilityGroup);
1579 
1580     /**
1581      * @brief Set the accessibilityLevel to the element info.
1582      * @param accessibilityLevel The accessibilityLevel of node.
1583      * @sysCap Accessibility
1584     */
1585     void SetAccessibilityLevel(const std::string accessibilityLevel);
1586 
1587     /**
1588      * @brief Get the accessibilityLevel to the element info.
1589      * @return the accessibilityLevel
1590      * @sysCap Accessibility
1591     */
1592     const std::string &GetAccessibilityLevel() const;
1593 
1594     /**
1595      * @brief Set zIndex
1596      * @param textType The value of zIndex
1597      * @sysCap Accessibility
1598      */
1599     void SetZIndex(const int32_t zIndex);
1600 
1601     /**
1602      * @brief Get zindex
1603      * @return The zindex of node
1604      * @sysCap Accessibility
1605      */
1606     int32_t GetZIndex() const;
1607 
1608     /**
1609      * @brief Set opacity
1610      * @param textType The value of opacity
1611      * @sysCap Accessibility
1612      */
1613     void SetOpacity(const float opacity);
1614 
1615     /**
1616      * @brief Get opacity
1617      * @return The opacity of node
1618      * @sysCap Accessibility
1619      */
1620     float GetOpacity() const;
1621 
1622     /**
1623      * @brief Set backgroundColor
1624      * @param textType The value of backgroundColor
1625      * @sysCap Accessibility
1626      */
1627     void SetBackgroundColor(const std::string &backgroundColor);
1628 
1629     /**
1630      * @brief Get backgroundColor
1631      * @return The backgroundColor of node
1632      * @sysCap Accessibility
1633      */
1634     const std::string &GetBackgroundColor() const;
1635 
1636     /**
1637      * @brief Set backgroundImage
1638      * @param textType The value of backgroundImage
1639      * @sysCap Accessibility
1640      */
1641     void SetBackgroundImage(const std::string &backgroundImage);
1642 
1643     /**
1644      * @brief Get backgroundImage
1645      * @return The backgroundImage of node
1646      * @sysCap Accessibility
1647      */
1648     const std::string &GetBackgroundImage() const;
1649 
1650     /**
1651      * @brief Set blur
1652      * @param textType The value of blur
1653      * @sysCap Accessibility
1654      */
1655     void SetBlur(const std::string &blur);
1656 
1657     /**
1658      * @brief Get blur
1659      * @return The blur of node
1660      * @sysCap Accessibility
1661      */
1662     const std::string &GetBlur() const;
1663 
1664     /**
1665      * @brief Set hitTestBehavior
1666      * @param textType The value of hitTestBehavior
1667      * @sysCap Accessibility
1668      */
1669     void SetHitTestBehavior(const std::string &hitTestBehavior);
1670 
1671     /**
1672      * @brief Get hitTestBehavior
1673      * @return The hitTestBehavior of node
1674      * @sysCap Accessibility
1675      */
1676     const std::string &GetHitTestBehavior() const;
1677 
1678     /**
1679      * @brief Set the navDestinationId to the element info.
1680      * @param navDestinationId The navDestinationId of node.
1681      * @sysCap Accessibility
1682     */
1683     void SetNavDestinationId(const int64_t navDestinationId);
1684 
1685     /**
1686      * @brief Get the navDestinationId to the element info.
1687      * @return the navDestinationId
1688      * @sysCap Accessibility
1689     */
1690     int64_t GetNavDestinationId() const;
1691 
1692     /**
1693      * @brief Set the span to the spanlist.
1694      * @param span The span.
1695      * @sysCap Accessibility
1696     */
1697     void AddSpan(const SpanInfo &span);
1698 
1699     /**
1700      * @brief Set the spanlist to the element info.
1701      * @param spanList The list of span.
1702      * @sysCap Accessibility
1703     */
1704     void SetSpanList(const std::vector<SpanInfo> &spanList);
1705 
1706     /**
1707      * @brief Gets an span list.
1708      * @return span list.
1709      * @sysCap Accessibility
1710      */
1711     const std::vector<SpanInfo> &GetSpanList() const;
1712 
1713     /**
1714      * @brief Get the isActive to the element info.
1715      * @return isActive status.
1716      * @sysCap Accessibility
1717      */
1718     bool GetIsActive() const;
1719 
1720     /**
1721      * @brief Set the isActive to the element info.
1722      * @param isActive The isActive of node.
1723      * @sysCap Accessibility
1724      */
1725     void SetIsActive(const bool isActive);
1726 
1727       /**
1728      * @brief Get the accessibilityVisible to the element info.
1729      * @return accessibilityVisible status.
1730      * @sysCap Accessibility
1731      */
1732     bool GetAccessibilityVisible() const;
1733 
1734     /**
1735      * @brief Set the accessibilityVisible to the element info.
1736      * @param isActive The accessibilityVisible of node.
1737      * @sysCap Accessibility
1738      */
1739     void SetAccessibilityVisible(const bool accessibilityVisible);
1740 
1741     /**
1742      * @brief Get the windowId to the element info.
1743      * @return mainWindowId.
1744      * @sysCap Accessibility
1745      */
1746     int32_t GetMainWindowId() const;
1747 
1748     /**
1749      * @brief Set the windowId to the element info.
1750      * @param windowId The mainWindowId of node.
1751      * @sysCap Accessibility
1752      */
1753     void SetMainWindowId(const int32_t windowId);
1754 
1755 protected:
1756     int32_t pageId_ = -1;
1757     int32_t windowId_ = -1;
1758     int64_t elementId_ = UNDEFINED_ACCESSIBILITY_ID;
1759     int64_t parentId_ = UNDEFINED_ACCESSIBILITY_ID;
1760 
1761     int32_t belongTreeId_ = UNDEFINED_TREE_ID;
1762     int32_t childTreeId_ = UNDEFINED_TREE_ID;
1763     int32_t childWindowId_ = UNDEFINED_WINID_ID;
1764     int32_t parentWindowId_ = UNDEFINED_WINID_ID;
1765 
1766     std::string bundleName_ = "";
1767     std::string componentType_ = "";
1768     std::string text_ = "";
1769     std::string hintText_ = "";
1770     std::string accessibilityText_ = "";
1771     std::string contentDescription_ = "";
1772     std::string resourceName_ = "";
1773     std::string inspectorKey_ = "";
1774     std::string pagePath_ = "";
1775     std::vector<int64_t> childNodeIds_;
1776     int32_t childCount_ = 0;
1777     std::vector<AccessibleAction> operations_;
1778     int32_t textLengthLimit_ = -1;
1779     Rect bounds_ {};
1780     bool checkable_ = false;
1781     bool checked_ = false;
1782     bool focusable_ = false;
1783     bool focused_ = false;
1784     bool visible_ = false;
1785     bool accessibilityFocused_ = false;
1786     bool selected_ = false;
1787     bool clickable_ = false;
1788     bool longClickable_ = false;
1789     bool enable_ = false;
1790     bool isPassword_ = false;
1791     bool scrollable_ = false;
1792     bool editable_ = false;
1793     bool popupSupported_ = false;
1794     bool multiLine_ = false;
1795     bool deletable_ = false;
1796     bool hint_ = false;
1797     bool isEssential_ = false;
1798     int32_t currentIndex_ = 0;
1799     int32_t beginIndex_ = 0;
1800     int32_t endIndex_ = 0;
1801     RangeInfo rangeInfo_ {};
1802     GridInfo grid_ {};
1803     GridItemInfo gridItem_ {};
1804     int32_t liveRegion_ = 0;
1805     bool contentInvalid_ = true;
1806     std::string error_ = "";
1807     int64_t labeled_ = 0;
1808     int32_t beginSelected_ = 0;
1809     int32_t endSelected_ = 0;
1810     int32_t inputType_ = 0; // text input type added
1811     bool validElement_ = true;
1812     TextMoveUnit textMoveStep_ = STEP_CHARACTER;
1813     int32_t itemCounts_ = 0;
1814     ActionType triggerAction_ = ACCESSIBILITY_ACTION_INVALID;
1815     std::vector<std::string> contentList_ {};
1816     std::string latestContent_ = "";
1817     std::string textType_ = "";
1818     float offset_ = 0.0f;
1819     ExtraElementInfo extraElementInfo_ {};
1820     bool accessibilityGroup_ = true;
1821     std::string accessibilityLevel_ = "auto";
1822     int32_t zIndex_ = 0;
1823     float opacity_ = 0.0f;
1824     std::string backgroundColor_ = "";
1825     std::string backgroundImage_ = "";
1826     std::string blur_ = "";
1827     std::string hitTestBehavior_ = "";
1828     int64_t navDestinationId_ = -1;
1829     std::vector<SpanInfo> spanList_ {};
1830     bool isActive_ = true;
1831     bool accessibilityVisible_ = true;
1832     int32_t mainWindowId_ = -1; // same widowId in uiview
1833 };
1834 } // namespace Accessibility
1835 } // namespace OHOS
1836 #endif // ACCESSIBILITY_ELEMENT_INFO_H