namespace Accessibility
{
class Accessible;
+class ProxyAccessible;
/**
* @brief Base class for different accessibility bridges.
* that could be read by screen-reader immediately after the navigation context has changed
* (window activates, popup shows up, tab changes) and before first UI element is highlighted.
*
+ * @param[in] root The root of the navigation context for which to retrieve the default label.
+ *
* @return The handler to accessibility object
* @note This is a Tizen only feature not present in upstream ATSPI.
* Feature can be enabled/disabled for particular context root object
* Following strings are valid values for "default_label" attribute: "enabled", "disabled".
* Any other value will be interpreted as "enabled".
*/
- virtual Accessible* GetDefaultLabel() const = 0;
+ virtual Accessible* GetDefaultLabel(Accessible* root) const = 0;
/**
* @brief Sets name of current application which will be visible on accessibility bus.
virtual Accessible* FindByPath(const std::string& path) const = 0;
/**
+ * @brief Notifies accessibility dbus that window has just been created.
+ *
+ * @param[in] window The window to be created
+ */
+ virtual void WindowCreated(Window window) = 0;
+
+ /**
* @brief Notifies accessibility dbus that window has just been shown.
*
* @param[in] window The window to be shown
virtual void WindowUnfocused(Window window) = 0;
/**
+ * @brief Tells the bridge that the application is not running
+ */
+ virtual void ApplicationPaused() = 0;
+
+ /**
+ * @brief Tells the bridge that the application is running
+ */
+ virtual void ApplicationResumed() = 0;
+
+ /**
* @brief Initializes accessibility bus.
*/
virtual void Initialize() = 0;
virtual void UnembedSocket(const Address& plug, const Address& socket) = 0;
/**
+ * @brief Calls socket.SetOffset(x, y) via D-Bus.
+ *
+ * The "SetOffset" D-Bus method is a DALi extension. It can be used to inform a DALi widget about
+ * its position on the screen.
+ *
+ * @param[in] socket The socket
+ * @param[in] x Horizontal offset
+ * @param[in] y Vertical offset
+ *
+ * @note Remote object pointed to by 'socket' must implement 'org.a11y.atspi.Socket'.
+ * @see EmbedSocket()
+ * @see SetExtentsOffset()
+ */
+ virtual void SetSocketOffset(ProxyAccessible* socket, std::int32_t x, std::int32_t y) = 0;
+
+ /**
+ * @brief Sets the global extents offset.
+ *
+ * This offset will be added during serialization of GetExtents() return value to D-Bus.
+ * Local calls to GetExtents() are unaffected.
+ *
+ * @param[in] x Horizontal offset
+ * @param[in] y Vertical offset
+ *
+ * @see SetSocketOffset()
+ * @see Dali::Accessibility::Component::GetExtents()
+ */
+ virtual void SetExtentsOffset(std::int32_t x, std::int32_t y) = 0;
+
+ /**
+ * @brief Sets the preferred bus name.
+ *
+ * If the Bridge is enabled, it will immediately release the previous name and request the new one.
+ *
+ * Otherwise, the Bridge will request this name on AT-SPI activation (and release it on deactivation).
+ * It is up to the caller to determine whether a given name will be available in the system.
+ *
+ * @param preferredBusName The preferred bus name
+ */
+ virtual void SetPreferredBusName(std::string_view preferredBusName) = 0;
+
+ /**
* @brief Returns instance of bridge singleton object.
*
* @return The current bridge object
*/
static void EnableAutoInit();
+ /**
+ * @brief Encodes a widget ID as a usable bus name.
+ *
+ * @param widgetInstanceId The instance ID of a widget
+ * @return std::string Encoded bus name
+ *
+ * @see SetPreferredBusName
+ */
+ static std::string MakeBusNameForWidget(std::string_view widgetInstanceId);
+
static Signal<void()>& EnabledSignal()
{
return mEnabledSignal;
Bridge* mBridge = nullptr;
Actor mHighlightActor;
Actor mCurrentlyHighlightedActor;
+ std::pair<std::int32_t, std::int32_t> mExtentsOffset{0, 0};
};
std::shared_ptr<Data> mData;
friend class Accessible;