#include <automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/dbus-wrapper.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali/devel-api/adaptor-framework/accessibility.h>
-#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
+#include <dali/devel-api/adaptor-framework/accessibility-bridge.h>
#include <dali/devel-api/adaptor-framework/window-devel.h>
+#include <dali/devel-api/atspi-interfaces/accessible.h>
+#include <dali/devel-api/atspi-interfaces/action.h>
+#include <dali/devel-api/atspi-interfaces/component.h>
#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/popup/popup.h>
child_1_accessible -> GetIndexInParent();
DALI_ABORT("Object has parent, test abort");
}
- catch (Dali::DaliException &){}
+ catch (const std::domain_error&){}
parent.Add(child_1);
parent.Add(child_2);
Wait(application);
- auto* accessibleParent = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(scrollView));
+ auto* accessibleParent = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(scrollView));
DALI_TEST_CHECK(accessibleParent);
- auto* accessibleA = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(actorA));
+ auto* accessibleA = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(actorA));
DALI_TEST_CHECK(accessibleA);
- auto* accessibleB = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(actorB));
+ auto* accessibleB = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(actorB));
DALI_TEST_CHECK(accessibleB);
accessibleA->GrabHighlight(); // == scrollView.ScrollTo(actorA)
Wait(application);
- auto* accessibleParent = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(view));
+ auto* accessibleParent = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(view));
DALI_TEST_CHECK(accessibleParent);
- auto* accessibleA = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(view.GetItem(0)));
+ auto* accessibleA = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(view.GetItem(0)));
DALI_TEST_CHECK(accessibleA);
- auto* accessibleB = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(view.GetItem(1)));
+ auto* accessibleB = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(view.GetItem(1)));
DALI_TEST_CHECK(accessibleB);
accessibleA->GrabHighlight(); // == view.ScrollToItem(view.GetItemId(actorA))
TextLabel label = TextLabel::New("123");
- auto* accessible = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(label));
+ auto* accessible = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(label));
DALI_TEST_CHECK(accessible);
DALI_TEST_EQUALS(accessible->IsScrollable(), false, TEST_LOCATION);
DALI_TEST_EQUALS(accessible->ScrollToChild({}), false, TEST_LOCATION);
+ DALI_TEST_EQUALS(accessible->GetInternalActor(), label, TEST_LOCATION);
Dali::Accessibility::TestEnableSC( false );
END_TEST;
// Make precondition two children exist in parent area
PushButton parentButton = PushButton::New();
+ parentButton.SetProperty(Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX);
parentButton.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
parentButton.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
- parentButton.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, 0.0f) );
- parentButton.SetProperty( Dali::Actor::Property::SIZE, Dali::Vector2(100.0f, 200.0f) );
+ parentButton.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, 0.0f));
+ parentButton.SetProperty(Actor::Property::SIZE, Dali::Vector2(100.0f, 200.0f));
application.GetScene().Add( parentButton );
PushButton buttonA = PushButton::New();
buttonA.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
buttonA.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
- buttonA.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, 0.0f) );
- buttonA.SetProperty( Dali::Actor::Property::SIZE, Dali::Vector2(100.0f, 100.0f) );
+ buttonA.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, 0.0f));
+ buttonA.SetProperty(Actor::Property::SIZE, Dali::Vector2(100.0f, 100.0f));
parentButton.Add(buttonA);
PushButton buttonB = PushButton::New();
buttonB.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
buttonB.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
- buttonB.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, 100.0f) );
- buttonB.SetProperty( Dali::Actor::Property::SIZE, Dali::Vector2(100.0f, 100.0f) );
+ buttonB.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, 100.0f));
+ buttonB.SetProperty(Actor::Property::SIZE, Dali::Vector2(100.0f, 100.0f));
parentButton.Add(buttonB);
Wait(application);
// Set highlight to first child (A) to enable movement tracking
- auto* accessible = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(buttonA));
+ auto* accessible = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(buttonA));
DALI_TEST_CHECK(accessible);
accessible->GrabHighlight();
Wait(application);
// Move first child (A) out of parent area through the parent's area top edge - single move outed event expected for A object and OUTGOING_TOP_LEFT direction
- buttonA.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, -200.0f) );
+ buttonA.SetProperty(Actor::Property::POSITION, Dali::Vector2(0.0f, -200.0f));
Wait(application);
- // Need one more seding notificaiton to get correct updated position
+ // Need one more notificaiton to get correct updated position
application.SendNotification();
DALI_TEST_EQUALS( true, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
// Move first child (A) outside of parent area (both start and end position are outside of parent area) - no move outed event expected for A object
buttonA.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, -300.0f) );
Wait(application);
- // Need one more seding notificaiton to get correct updated position
+ // Need one more notificaiton to get correct updated position
application.SendNotification();
DALI_TEST_EQUALS( false, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
Dali::Accessibility::TestResetMoveOutedCalled();
// Set highlight to second child (B) to enable movement tracking
- accessible = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(buttonB));
+ accessible = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(buttonB));
DALI_TEST_CHECK(accessible);
accessible->GrabHighlight();
Wait(application);
// B: (0,100) --> (0, 50)
buttonB.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(0.0f, 50.0f) );
Wait(application);
- // Need one more seding notificaiton to get correct updated position
+ // Need one more notificaiton to get correct updated position
application.SendNotification();
DALI_TEST_EQUALS( false, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
Dali::Accessibility::TestResetMoveOutedCalled();
// Move second child (B) out of parent area through the parent's area right edge - single move outed event expected for B object and OUTGOING_BOTTOM_RIGHT direction
- buttonB.SetProperty( Dali::Actor::Property::POSITION, Dali::Vector2(300.0f, 100.0f) );
+ buttonB.SetProperty(Actor::Property::POSITION, Dali::Vector2(300.0f, 100.0f));
Wait(application);
- // Need one more seding notificaiton to get correct updated position
+ // Need one more notificaiton to get correct updated position
application.SendNotification();
DALI_TEST_EQUALS( true, Dali::Accessibility::TestGetMoveOutedCalled(), TEST_LOCATION );
Dali::Accessibility::TestResetMoveOutedCalled();
// Disable movement tracking on B by giving highlight to A
- accessible = dynamic_cast<DevelControl::AccessibleImpl*>(Dali::Accessibility::Accessible::Get(buttonA));
+ accessible = dynamic_cast<DevelControl::ControlAccessible*>(Dali::Accessibility::Accessible::Get(buttonA));
DALI_TEST_CHECK(accessible);
accessible->GrabHighlight();
Wait(application);