ScreenReaderEnabled should be distinguished from IsEnabled.
This is because there are things to do only when the screen reader is enabled.
Change-Id: Ibd9fd26380ef09b8c795696d9f320e0056c2bc41
return mDisabledSignal;
}
+ static Signal<void()>& ScreenReaderEnabledSignal()
+ {
+ return mScreenReaderEnabledSignal;
+ }
+
+ static Signal<void()>& ScreenReaderDisabledSignal()
+ {
+ return mScreenReaderDisabledSignal;
+ }
+
protected:
struct Data
{
inline static Signal<void()> mEnabledSignal;
inline static Signal<void()> mDisabledSignal;
+ inline static Signal<void()> mScreenReaderEnabledSignal;
+ inline static Signal<void()> mScreenReaderDisabledSignal;
/**
* @brief Registers accessible object to be known in bridge object.
{
return Dali::Accessibility::IsUp();
}
+
+bool Dali::AtspiAccessibility::IsScreenReaderEnabled()
+{
+ return Dali::Accessibility::Bridge::GetCurrentBridge()->GetScreenReaderEnabled();
+}
\ No newline at end of file
*/
DALI_ADAPTOR_API bool IsEnabled();
+/**
+ * @brief Returns whether the state of Screen Reader is enabled or not.
+ *
+ * @return True if Screen Reader is enabled, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsScreenReaderEnabled();
+
} //namespace AtspiAccessibility
} //namespace Dali
});
}
+ void EmitScreenReaderEnabledSignal()
+ {
+ if (mIsScreenReaderEnabled)
+ {
+ mScreenReaderEnabledSignal.Emit();
+ }
+ else
+ {
+ mScreenReaderDisabledSignal.Emit();
+ }
+ }
+
void ListenScreenReaderEnabledProperty()
{
mAccessibilityStatusClient.addPropertyChangedEvent<bool>("ScreenReaderEnabled", [this](bool res) {
mIsScreenReaderEnabled = res;
+ EmitScreenReaderEnabledSignal();
SwitchBridge();
});
}