1 #ifndef ACCESSIBLE_NODE_H
2 #define ACCESSIBLE_NODE_H
9 #include "AccessibleUtils.h"
14 * @brief AccessibleNodeInterface enum class
17 enum class AccessibleNodeInterface {
23 EDITABLETEXT = 0X0010,
37 * @brief NodeFeatureProperties enum class
40 enum class NodeFeatureProperties {
48 LONGCLICKABLE = 0X0040,
59 class IAccessibleNode {
61 virtual ~IAccessibleNode() = 0;
67 * @brief AccessibleNode Class
70 class AccessibleNode {
71 public: // Constructor & Destructor
82 virtual ~AccessibleNode();
89 virtual int getChildCount() const = 0;
95 virtual std::shared_ptr<AccessibleNode> getChildAt(int index) const = 0;
101 virtual std::vector<std::shared_ptr<AccessibleNode>> getChildren() const = 0;
107 virtual std::shared_ptr<AccessibleNode> getParent() const = 0;
114 std::string getText() const;
120 std::string getPkg() const;
126 std::string getRes() const;
132 std::string getRole() const;
138 std::string getType() const;
144 std::string getStyle() const;
150 Rect<int> getBoundingBox() const;
156 bool isCheckable() const;
162 bool isChecked() const;
168 bool isClickable() const;
174 bool isEnabled() const;
180 bool isFocusable() const;
186 bool isFocused() const;
192 bool isLongClickable() const;
198 bool isScrollable() const;
204 bool isSelectable() const;
210 bool isSelected() const;
216 bool isVisible() const;
222 bool isShowing() const;
228 bool isActive() const;
241 void print(int, int);
247 virtual void* getRawHandler(void) const = 0;
253 virtual void refresh() = 0;
259 virtual std::vector<std::string> getActions() const = 0;
265 virtual bool doAction(std::string action) = 0;
271 virtual void setValue(std::string text) = 0;
278 bool isSupporting(AccessibleNodeInterface thisIface) const;
284 bool hasFeatureProperty(NodeFeatureProperties prop) const;
290 void setFeatureProperty(NodeFeatureProperties prop, bool has);
326 Rect<int> mBoundingBox;
331 int mSupportingIfaces;
336 int mFeatureProperty;