[ATSPI] Add a function to check whether accessibility is enabled 61/262961/2
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 24 Aug 2021 04:48:30 +0000 (13:48 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 24 Aug 2021 08:20:29 +0000 (17:20 +0900)
- Added `IsEnabled()` to check accessibility state

Change-Id: I18153b3570b6a20f8af37e86c9e71ba1ea733d89
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali/devel-api/adaptor-framework/atspi-accessibility.cpp
dali/devel-api/adaptor-framework/atspi-accessibility.h

index 64ee565..481aec8 100644 (file)
@@ -113,3 +113,8 @@ int Dali::AtspiAccessibility::GetStatus()
   }
   return -1;
 }
+
+bool Dali::AtspiAccessibility::IsEnabled()
+{
+  return Dali::Accessibility::IsUp();
+}
index 7e52419..16f1e37 100644 (file)
@@ -65,7 +65,7 @@ DALI_ADAPTOR_API void StopReading(bool alsoNonDiscardable = false);
 DALI_ADAPTOR_API bool SuppressScreenReader(bool suppress);
 
 /**
- * @brief Set ATSPI to be turned On or Off forcibly.
+ * @brief Sets ATSPI to be turned On or Off forcibly.
  *
  * @param[in] turnOn true to turn on, false to turn off.
  * @return The status of ATSPI : 0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF),
@@ -74,12 +74,19 @@ DALI_ADAPTOR_API bool SuppressScreenReader(bool suppress);
 DALI_ADAPTOR_API int SetForcefully(bool turnOn);
 
 /**
- * @brief Get ATSPI status.
+ * @brief Gets ATSPI status.
  * @return Status of ATSPI : 0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF),
  * 2 (ATSPI OFF, ScreenReader ON), 3(ATSPI ON, ScreenReader ON)
  */
 DALI_ADAPTOR_API int GetStatus();
 
+/**
+ * @brief Returns whether the state of Accessibility is enabled or not.
+ *
+ * @return True if Accessibility is enabled, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsEnabled();
+
 } //namespace AtspiAccessibility
 } //namespace Dali