Aurum: Introduce description property
[platform/core/uifw/aurum.git] / libaurum / inc / Impl / Accessibility / AtspiAccessibleNode.h
1 /*
2  * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *               http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  *
16  */
17
18 #ifndef _ATSPI_ACCESSIBLE_NODE_H_
19 #define _ATSPI_ACCESSIBLE_NODE_H_
20
21 #include "AccessibleNode.h"
22 #include <atspi/atspi.h>
23
24 using namespace Aurum;
25
26 namespace AurumInternal {
27
28 /**
29  * @brief AtspiAccessibleNode is inherited from AccessibleNode class.
30  *        It manages object informations which from atspi server.
31  *
32  * @since_tizen 6.5
33  */
34 class AtspiAccessibleNode : public AccessibleNode {
35 public:
36     /**
37      * @brief AtspiAccessibleNode constructor.
38      *
39      * @param[in] node AtspiAccessible ptr
40      *
41      * @since_tizen 6.5
42      */
43     AtspiAccessibleNode(AtspiAccessible *node);
44
45     /**
46      * @brief AtspiAccessibleNode destructor.
47      *
48      * @since_tizen 6.5
49      */
50    ~AtspiAccessibleNode() override;
51
52 public:
53     /**
54      * @copydoc UiObject::getChildCount()
55      */
56     int getChildCount() const override;
57
58     /**
59      * @copydoc UiObject::getChildAt()
60      */
61     std::shared_ptr<AccessibleNode> getChildAt(int index) const override;
62
63     /**
64      * @copydoc UiObject::getChildren()
65      */
66     std::vector<std::shared_ptr<AccessibleNode>> getChildren() const override;
67
68     /**
69      * @copydoc UiObject::getParent()
70      */
71     std::shared_ptr<AccessibleNode> getParent() const override;
72
73     /**
74      * @copydoc UiObject::getMatches()
75      */
76     std::vector<std::shared_ptr<AccessibleNode>> getMatches(const std::shared_ptr<UiSelector> selector, const bool ealryReturn) const override;
77
78     /**
79      * @copydoc UiObject::getMatchesInMatches()
80      */
81     std::vector<std::shared_ptr<AccessibleNode>> getMatchesInMatches(const std::shared_ptr<UiSelector> firstSelector, const std::shared_ptr<UiSelector> secondSelector, const bool ealryReturn) const override;
82
83     /**
84      * @copydoc AccessibleNode::isValid()
85      */
86     bool isValid() const override;
87
88 public:
89     /**
90      * @copydoc AccessibleNode::getRawHandler()
91      */
92     void* getRawHandler(void) const override;
93
94     /**
95      * @copydoc UiObject::updateRoleName()
96      */
97     void updateRoleName() override;
98
99     /**
100      * @copydoc UiObject::updateUniqueId()
101      */
102     void updateUniqueId() override;
103
104     /**
105      * @copydoc UiObject::updateName()
106      */
107     void updateName() override;
108
109     /**
110      * @copydoc UiObject::updateApplication()
111      */
112     void updateApplication() override;
113
114     /**
115      * @copydoc UiObject::updateAttributes()
116      */
117     void updateAttributes() override;
118
119     /**
120      * @copydoc UiObject::updateStates()
121      */
122     void updateStates() override;
123
124     /**
125      * @copydoc UiObject::updateExtents()
126      */
127     void updateExtents() override;
128
129     /**
130      * @copydoc UiObject::updateXPath()
131      */
132     void updateXPath() override;
133
134     /**
135      * @copydoc UiObject::updateToolkitName()
136      */
137     void updateToolkitName() override;
138
139     /**
140      * @copydoc UiObject::updateValue()
141      */
142     void updateValue() override;
143
144     /**
145      * @copydoc UiObject::updatePid()
146      */
147     void updatePid() override;
148
149     /**
150      * @copydoc UiObject::updateTextMinBoundingRect()
151      */
152     void updateTextMinBoundingRect() override;
153
154     /**
155      * @copydoc UiObject::updateInterface()
156      */
157     void updateInterface() override;
158
159     /**
160      * @copydoc UiObject::setFocus()
161      */
162     bool setFocus() override;
163
164     /**
165      * @copydoc AccessibleNode::refresh()
166      */
167     void refresh(bool updateAll = true) override;
168
169     /**
170      * @copydoc AccessibleNode::getActions()
171      */
172     std::vector<std::string> getActions() const override;
173
174     /**
175      * @copydoc AccessibleNode::doAction()
176      */
177     bool doAction(std::string action) override;
178
179     /**
180      * @copydoc AccessibleNode::setValue()
181      */
182     bool setValue(std::string text) override;
183
184     /**
185      * @copydoc AccessibleNode::setValue()
186      */
187     bool setValue(double value) override;
188
189 private:
190     using AccessibleNode::setFeatureProperty;
191
192     /**
193      * @copydoc AccessibleNode::setFeatureProperty()
194      */
195     void setFeatureProperty(AtspiStateType type);
196
197 private:
198     AtspiAccessible *mNode;
199 };
200
201 }
202
203 #endif