*/
virtual void updateExtents() = 0;
+ /**
+ * @copydoc UiObject::updateXPath()
+ */
+ virtual void updateXPath() = 0;
+
/**
* @copydoc UiObject::setFocus()
*/
*
* @since_tizen 6.5
*/
- virtual void refresh() = 0;
+ virtual void refresh(bool updateAll = true) = 0;
/**
* @brief Gets available atspi action name.
std::string mAutomationId;
std::string mType;
std::string mStyle;
+ std::string mXPath;
Rect<int> mScreenBoundingBox;
Rect<int> mWindowBoundingBox;
int mSupportingIfaces;
*/
void updateExtents() override;
+ /**
+ * @copydoc UiObject::updateXPath()
+ */
+ void updateXPath() override;
+
/**
* @copydoc UiObject::setFocus()
*/
/**
* @copydoc AccessibleNode::refresh()
*/
- void refresh() override;
+ void refresh(bool updateAll = true) override;
/**
* @copydoc AccessibleNode::getActions()
* @since_tizen 6.5
*/
void updateExtents() override;
+ /**
+ * @brief TBD
+ * @since_tizen 6.5
+ */
+ void updateXPath() override;
/**
* @brief TBD
* @brief TBD
* @since_tizen 6.5
*/
- void refresh() override;
+ void refresh(bool updateAll = true) override;
/**
* @brief TBD
*/
void updateExtents() const;
+ /**
+ * @brief Updates object's XPath information.
+ *
+ * @since_tizen 7.0
+ */
+ void updateXPath() const;
+
/**
* @brief Sets focus to object.
*
}
}
+void AtspiAccessibleNode::updateXPath()
+{
+ auto XMLDocMap = AccessibleWatcher::getInstance()->getXMLDocMap();
+ if (XMLDocMap.count(mPkg) == 0) return;
+
+ auto XMLDoc = XMLDocMap[mPkg];
+
+ mXPath = XMLDoc->getXPath(mId);
+}
+
bool AtspiAccessibleNode::setFocus()
{
AtspiComponent *component = AtspiWrapper::Atspi_accessible_get_component_iface(mNode);
return false;
}
-void AtspiAccessibleNode::refresh()
+void AtspiAccessibleNode::refresh(bool updateAll)
{
AtspiWrapper::Atspi_accessible_clear_cache(mNode);
g_free(windowExtent);
}
g_object_unref(component);
+
+ if (updateAll) updateXPath();
}
} else {
setFeatureProperty(ATSPI_STATE_INVALID);
{
}
+void MockAccessibleNode::updateXPath()
+{
+}
+
bool MockAccessibleNode::setFocus()
{
return false;
}
-void MockAccessibleNode::refresh()
+void MockAccessibleNode::refresh(bool updateAll)
{
}
mNode->updateExtents();
}
+void UiObject::updateXPath() const
+{
+ mNode->updateXPath();
+}
+
bool UiObject::setFocus() const
{
return mNode->setFocus();