describedByObject};
}
-void BridgeAccessible::SuppressScreenReader(bool suppress)
-{
- mIsScreenReaderSuppressed = suppress;
-}
-
DBus::ValueOrError<bool> BridgeAccessible::DoGesture(Dali::Accessibility::Gesture type, int32_t startPositionX, int32_t startPositionY, int32_t endPositionX, int32_t endPositionY, Dali::Accessibility::GestureState state, uint32_t eventTime)
{
// Please be aware of sending GestureInfo point in the different order with parameters
ReadingMaterialType GetReadingMaterial();
/**
- * @copydoc Dali::Accessibility::Bridge::SuppressScreenReader()
- */
- void SuppressScreenReader(bool) override;
-
- /**
* @copydoc Dali::Accessibility::Accessible::DoGesture()
*/
DBus::ValueOrError<bool> DoGesture(Dali::Accessibility::Gesture type, int32_t startPositionX, int32_t startPositionY, int32_t endPositionX, int32_t endPositionY, Dali::Accessibility::GestureState state, uint32_t eventTime);
* @return The Component object
*/
Dali::Accessibility::Component* CalculateNavigableAccessibleAtPoint(Dali::Accessibility::Accessible* root, Dali::Accessibility::Point point, Dali::Accessibility::CoordinateType type, unsigned int maxRecursionDepth);
-
-protected:
- bool mIsScreenReaderSuppressed = false;
};
#endif // DALI_INTERNAL_ACCESSIBILITY_BRIDGE_ACCESSIBLE_H
protected:
mutable AppAccessible mApplication;
std::vector<Dali::Accessibility::Accessible*> mDefaultLabels;
+ bool mIsScreenReaderSuppressed = false;
private:
/**
}
}
+ /**
+ * @copydoc Dali::Accessibility::Bridge::SuppressScreenReader()
+ */
+ void SuppressScreenReader(bool suppress) override
+ {
+ if(mIsScreenReaderSuppressed == suppress)
+ {
+ return;
+ }
+ mIsScreenReaderSuppressed = suppress;
+ ReadScreenReaderEnabledProperty();
+ }
+
bool ReadIsEnabledTimerCallback()
{
ReadIsEnabledProperty();
return;
}
mIsEnabled = std::get<0>(msg);
- if(mIsEnabled)
+ if((!mIsScreenReaderSuppressed && mIsScreenReaderEnabled) || mIsEnabled)
{
ForceUp();
}
+ else
+ {
+ ForceDown();
+ }
});
}
void ReadScreenReaderEnabledProperty()
{
+ // can be true because of SuppressScreenReader before init
+ if (!mAccessibilityStatusClient)
+ {
+ return;
+ }
+
mAccessibilityStatusClient.property<bool>("ScreenReaderEnabled").asyncGet([this](DBus::ValueOrError<bool> msg) {
if(!msg)
{
return;
}
mIsScreenReaderEnabled = std::get<0>(msg);
- if(mIsScreenReaderEnabled)
+ if((!mIsScreenReaderSuppressed && mIsScreenReaderEnabled) || mIsEnabled)
{
ForceUp();
}
+ else
+ {
+ ForceDown();
+ }
});
}
{
mAccessibilityStatusClient.addPropertyChangedEvent<bool>("ScreenReaderEnabled", [this](bool res) {
mIsScreenReaderEnabled = res;
- if(mIsScreenReaderEnabled || mIsEnabled)
+ if((!mIsScreenReaderSuppressed && mIsScreenReaderEnabled) || mIsEnabled)
{
ForceUp();
}