Dali::Accessibility::TestEnableSC( true );
+ /* add to scene and remove from scene to touch AccessibilityDeregister */
+ application.GetScene().Add( pushbutton );
+
auto states = accessible->GetStates();
DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::PRESSED ] ), false, TEST_LOCATION );
states = accessible->GetStates();
DALI_TEST_EQUALS( static_cast< unsigned int >( states[ Accessibility::State::PRESSED ] ), true, TEST_LOCATION );
+ /* add to scene and remove from scene to touch AccessibilityDeregister */
+ application.GetScene().Remove( pushbutton );
+
Dali::Accessibility::TestEnableSC( false );
END_TEST;
StopObservingVisual(iter->visual);
}
- AccessibilityDeregister();
+ AccessibilityDeregister(false);
// All gesture detectors will be destroyed so no need to disconnect.
delete mStartingPinchScale;
}
}
-void Control::Impl::AccessibilityDeregister()
+void Control::Impl::AccessibilityDeregister(bool remove)
{
if(accessibilityNotificationSet)
{
+ accessibilityNotificationPosition.NotifySignal().Disconnect(&Control::Impl::PositionOrSizeChangedCallback);
+ if(remove)
+ {
+ mControlImpl.Self().RemovePropertyNotification(accessibilityNotificationPosition);
+ }
+ accessibilityNotificationPosition.Reset();
accessibilityNotificationPosition = {};
+
+ accessibilityNotificationSize.NotifySignal().Disconnect(&Control::Impl::PositionOrSizeChangedCallback);
+ if(remove)
+ {
+ mControlImpl.Self().RemovePropertyNotification(accessibilityNotificationSize);
+ }
+ accessibilityNotificationSize.Reset();
accessibilityNotificationSize = {};
+
+ accessibilityNotificationCulled.NotifySignal().Disconnect(&Control::Impl::CulledChangedCallback);
+ if(remove)
+ {
+ mControlImpl.Self().RemovePropertyNotification(accessibilityNotificationCulled);
+ }
+ accessibilityNotificationCulled.Reset();
accessibilityNotificationCulled = {};
accessibilityNotificationSet = false;
}
Dali::Accessibility::Accessible* GetAccessibilityObject();
void AccessibilityRegister();
- void AccessibilityDeregister();
+ void AccessibilityDeregister(bool remove);
std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Actor)> accessibilityConstructor;
std::unique_ptr<Dali::Accessibility::Accessible> accessibilityObject;