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