virtual void Resume() = 0;
/**
+ * @brief Cancels anything screen-reader is reading / has queued to read
+ *
+ * @param alsoNonDiscardable whether to cancel non-discardable readings as well
+ */
+ virtual void StopReading(bool alsoNonDiscardable) = 0;
+
+ /**
* @brief Get screen reader status.
*/
virtual bool GetScreenReaderEnabled() = 0;
}
}
+void Dali::AtspiAccessibility::StopReading(bool alsoNonDiscardable)
+{
+ if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
+ {
+ bridge->StopReading(alsoNonDiscardable);
+ }
+}
+
void Dali::AtspiAccessibility::Say(const std::string& text, bool discardable, std::function<void(std::string)> callback)
{
if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
DALI_ADAPTOR_API void Resume();
/**
+ * @brief Cancels anything screen-reader is reading / has queued to read
+ *
+ * @param alsoNonDiscardable whether to cancel non-discardable readings as well
+ */
+DALI_ADAPTOR_API void StopReading(bool alsoNonDiscardable = false);
+
+/**
* @brief Set ATSPI to be turned On or Off forcibly.
*
* @param[in] turnOn true to turn on, false to turn off.
false);
}
+ void StopReading(bool alsoNonDiscardable) override
+ {
+ if(!IsUp())
+ {
+ return;
+ }
+
+ directReadingClient.method<DBus::ValueOrError<void>(bool)>("StopReading").asyncCall([](DBus::ValueOrError<void> msg) {
+ if(!msg)
+ {
+ LOG() << "Direct reading command failed (" << msg.getError().message << ")";
+ }
+ },
+ alsoNonDiscardable);
+ }
+
void Say(const std::string& text, bool discardable, std::function<void(std::string)> callback) override
{
if(!IsUp())
{
}
+ void StopReading(bool alsoNonDiscardable) override
+ {
+ }
+
bool GetScreenReaderEnabled() override
{
return false;