- ShowInsideFridge() can tell which app is at the top of the layer.
Change-Id: I2ba90e6976e2f3c23b86fac0f67dd95a4ee60779
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
void AccessibilityAdaptor::EnableAccessibility(bool enabled)
{
- SetForcedEnable( true );
- if(enabled)
+ SetForcedEnable(true);
+ if (enabled)
{
Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).EnableAccessibility();
}
return Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).IsEnabled();
}
-void AccessibilityAdaptor::SetForcedEnable( bool forced )
+void AccessibilityAdaptor::SetForcedEnable(bool forced)
{
Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetForcedEnable(forced);
}
+void AccessibilityAdaptor::ShowInsideFridge(bool isShown)
+{
+ SetForcedShown(true);
+ Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).ShowInsideFridge(isShown);
+}
+
+void AccessibilityAdaptor::SetForcedShown(bool forced)
+{
+ Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetForcedShown(forced);
+}
+
+
void AccessibilityAdaptor::SetActionHandler(AccessibilityActionHandler& handler)
{
Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetActionHandler(handler);
* @brief Sets Accessibility enabled forcibly.
* @param forced Whether accessibility sets enabled forcibly
*/
- void SetForcedEnable( bool forced );
+ void SetForcedEnable(bool forced);
+
+ /**
+ * @brief Checks whether Inside Fridge is shown or not.
+ * @param[in] isShown True if Inside Fridge is shown.
+ */
+ void ShowInsideFridge(bool isShown);
+
+ /**
+ * @brief Sets Inside Fridge shown forcibly.
+ * @param[in] forced Whether Inside Fridge shown forcibly
+ */
+ void SetForcedShown(bool forced);
/**
* @brief Set the handler to handle accessibility actions.
mFocusedActorPosition(-1.0f, -1.0f),
mActionHandler( NULL ),
mIsEnabled( false ),
- mIsForced( false )
+ mIsForced( false ),
+ mIsInsideFridgeShown( false ),
+ mIsForcedShown( false )
{
mAccessibilityGestureDetector = new AccessibilityGestureDetector();
}
return mIsEnabled;
}
-void AccessibilityAdaptor::SetForcedEnable( bool forced )
+void AccessibilityAdaptor::SetForcedEnable(bool forced)
{
mIsForced = forced;
}
return mIsForced;
}
+void AccessibilityAdaptor::ShowInsideFridge(bool isShown)
+{
+ mIsInsideFridgeShown = isShown;
+}
+
+bool AccessibilityAdaptor::IsInsideFridgeShown() const
+{
+ return mIsInsideFridgeShown;
+}
+
+void AccessibilityAdaptor::SetForcedShown(bool forced)
+{
+ mIsForcedShown = forced;
+}
+
+bool AccessibilityAdaptor::IsForcedShown() const
+{
+ return mIsForcedShown;
+}
+
Vector2 AccessibilityAdaptor::GetReadPosition() const
{
return mReadPosition;
bool IsForcedEnable() const;
/**
+ * @copydoc Dali::AccessibilityAdaptor::ShowInsideFridge()
+ */
+ void ShowInsideFridge(bool isShown);
+
+ /**
+ * Whether Inside Fridge is shown.
+ */
+ bool IsInsideFridgeShown() const;
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::SetForcedShown()
+ */
+ void SetForcedShown(bool forced);
+
+ /**
+ * Whether Inside Fridge shown forcibly or not.
+ */
+ bool IsForcedShown() const;
+
+ /**
* @copydoc Dali::AccessibilityAdaptor::GetReadPosition() const
*/
Vector2 GetReadPosition() const;
AccessibilityGestureDetectorPtr mAccessibilityGestureDetector; ///< The accessibility gesture detector
- bool mIsEnabled : 1; ///< enable/disable the accessibility action
-
- bool mIsForced : 1; ///< Is the accessibility enabled forcibly
+ bool mIsEnabled : 1; ///< enable/disable the accessibility action
+ bool mIsForced : 1; ///< Is the accessibility enabled forcibly
+ bool mIsInsideFridgeShown : 1; ///< Is inside fridge shown
+ bool mIsForcedShown : 1; ///< Is inside fridge shown forcibly
public:
}
}
+ if( accessibilityAdaptor->IsForcedShown() )
+ {
+ DALI_LOG_ERROR("InsideFridge app calls the API \n");
+ if( accessibilityAdaptor->IsInsideFridgeShown() )
+ {
+ DALI_LOG_ERROR("Is Inside Fridge shown [TRUE] -> Enable \n");
+ accessibilityAdaptor->EnableAccessibility();
+ }
+ else
+ {
+ DALI_LOG_ERROR("Is Inside Fridge shown [FALSE] -> Disable \n");
+ accessibilityAdaptor->DisableAccessibility();
+ }
+ }
+
if( !accessibilityAdaptor->IsEnabled() )
{
DALI_LOG_ERROR( "The current dali accessibility is not available. \n" );
}
else
{
- DALI_LOG_ERROR("[FYI] Only Apps show and it is a forced dali -> EnableAccessibility \n");
+ DALI_LOG_ERROR("[FYI] Only Apps show and it is a forced dali -> (Apps) EnableAccessibility \n");
accessibilityAdaptor->EnableAccessibility();
}
}