From: Richard Huang Date: Tue, 19 May 2020 12:43:33 +0000 (+0100) Subject: Remove some public Setter/Getter APIs from Dali::Actor X-Git-Tag: dali_1.9.13~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=b0f468ba41245cab977c308f7f34b106370a8771 Remove some public Setter/Getter APIs from Dali::Actor Change-Id: Ibe93035af4c549162d57761ec38d44f107dcb41d --- diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp index aa4f298..e53f0f1 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp @@ -71,8 +71,8 @@ Actor CreateMeshActorToStage( TestApplication& application, Vector3 parentOrigin Actor meshActor = Actor::New(); meshActor.AddRenderer( renderer ); meshActor.SetSize( Vector3( 400.0f, 400.0f, 0.1f ) ); - meshActor.SetParentOrigin( parentOrigin ); - meshActor.SetAnchorPoint( anchorPoint ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint ); Stage::GetCurrent().Add( meshActor ); application.SendNotification(); @@ -101,7 +101,7 @@ bool GetCameraDepths( TestApplication& application, float& nearPlane, float& far nearPlane = cameraActor.GetNearClippingPlane(); farPlane = cameraActor.GetFarClippingPlane(); - cameraDepth = cameraActor.GetCurrentPosition().z; + cameraDepth = cameraActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z; } return !!cameraActor; @@ -137,8 +137,8 @@ int UtcFrustumLeftCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( -radius / stageSize.width + offset, 0.5f, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( -radius / stageSize.width + offset, 0.5f, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -182,8 +182,8 @@ int UtcFrustumRightCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( radius / stageSize.width + offset, 0.5f, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( radius / stageSize.width + offset, 0.5f, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -227,8 +227,8 @@ int UtcFrustumTopCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( 0.5f, -radius / stageSize.width + offset, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, -radius / stageSize.width + offset, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -273,8 +273,8 @@ int UtcFrustumBottomCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( 0.5f, radius / stageSize.width + offset, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, radius / stageSize.width + offset, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -316,7 +316,7 @@ int UtcFrustumNearCullP(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float radius = meshActor.GetTargetSize().Length() * 0.5f; float offset = radius + 0.1f; @@ -344,7 +344,7 @@ int UtcFrustumNearCullN(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float offset = meshActor.GetTargetSize().z - 0.1f; meshPosition.z = cameraDepth - nearPlane + offset; @@ -370,7 +370,7 @@ int UtcFrustumFarCullP(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float radius = meshActor.GetTargetSize().Length() * 0.5f; float offset = radius + 0.1f; @@ -398,7 +398,7 @@ int UtcFrustumFarCullN(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float offset = meshActor.GetTargetSize().z - 0.1f; meshPosition.z = cameraDepth - farPlane - offset; diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp index d300568..3cf7ecb 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp @@ -27,7 +27,7 @@ TestCustomActor TestCustomActor::NewNegoSize() { Impl::TestCustomActor* impl = new Impl::TestCustomActor( true ); TestCustomActor custom( *impl ); // takes ownership - custom.SetName( "SizeNegotiationActor" ); + custom.SetProperty( Dali::Actor::Property::NAME, "SizeNegotiationActor" ); impl->Initialize(); @@ -290,7 +290,7 @@ void TestCustomActor::AddToCallStacks( const char* method ) mMethodsCalled.push_back( method ); // Combine Actor name with method string - std::string nameAndMethod( Self().GetName() ); + std::string nameAndMethod( Self().GetProperty< std::string >( Dali::Actor::Property::NAME ) ); if ( 0 == nameAndMethod.size() ) { nameAndMethod = "Unknown: "; diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h index e10b28b..a951b4e 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h @@ -346,10 +346,10 @@ struct TestCustomActorVariant7 : public TestCustomActor virtual void OnInitialize( const char* name ) { // We need to do this early, before the OnChildAdd is recorded - Self().SetName( name ); + Self().SetProperty( Dali::Actor::Property::NAME, name ); mContainer = Dali::Actor::New(); - mContainer.SetName( "Container" ); + mContainer.SetProperty( Dali::Actor::Property::NAME, "Container" ); Self().Add( mContainer ); } diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 1e68d63..4cc24d0 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -15,6 +15,9 @@ * */ +// Enable debug log for test coverage +#define DEBUG_ENABLED 1 + #include "assert.h" #include #include @@ -22,6 +25,7 @@ #include #include #include +#include #include #include @@ -132,14 +136,14 @@ static int gOnStageCallBackCalled; void OnStageCallback( Actor actor ) { ++gOnStageCallBackCalled; - gActorNamesOnOffStage.push_back( actor.GetName() ); + gActorNamesOnOffStage.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) ); DALI_TEST_CHECK( actor.OnStage() == true ); } static int gOffStageCallBackCalled; void OffStageCallback( Actor actor ) { ++gOffStageCallBackCalled; - gActorNamesOnOffStage.push_back( actor.GetName() ); + gActorNamesOnOffStage.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) ); DALI_TEST_CHECK( actor.OnStage() == false ); } @@ -176,7 +180,7 @@ static std::vector< std::string > gActorNamesRelayout; void OnRelayoutCallback( Actor actor ) { gOnRelayoutCallBackCalled = true; - gActorNamesRelayout.push_back( actor.GetName() ); + gActorNamesRelayout.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) ); } struct VisibilityChangedFunctorData @@ -326,7 +330,7 @@ int UtcDaliActorGetName(void) Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.GetName().empty()); + DALI_TEST_CHECK(actor.GetProperty< std::string >( Actor::Property::NAME ).empty()); END_TEST; } @@ -338,8 +342,8 @@ int UtcDaliActorSetName(void) string str("ActorName"); Actor actor = Actor::New(); - actor.SetName(str); - DALI_TEST_CHECK(actor.GetName() == str); + actor.SetProperty( Actor::Property::NAME,str); + DALI_TEST_CHECK(actor.GetProperty< std::string >( Actor::Property::NAME ) == str); END_TEST; } @@ -748,25 +752,25 @@ int UtcDaliActorSetParentOrigin(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); - actor.SetParentOrigin(vector); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, vector ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); Stage::GetCurrent().Add( actor ); - actor.SetParentOrigin( Vector3( 0.1f, 0.2f, 0.3f ) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.1f, 0.2f, 0.3f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentParentOrigin(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), TEST_LOCATION ); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -779,7 +783,7 @@ int UtcDaliActorSetParentOriginIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); actor.SetProperty( Actor::Property::PARENT_ORIGIN_X, vector.x ); @@ -787,7 +791,7 @@ int UtcDaliActorSetParentOriginIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentParentOrigin().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).x, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN_Y, vector.y ); @@ -795,7 +799,7 @@ int UtcDaliActorSetParentOriginIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentParentOrigin().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).y, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN_Z, vector.z ); @@ -803,7 +807,7 @@ int UtcDaliActorSetParentOriginIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentParentOrigin().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).z, TEST_LOCATION ); END_TEST; } @@ -815,15 +819,15 @@ int UtcDaliActorGetCurrentParentOrigin(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); - actor.SetParentOrigin(vector); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, vector ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); END_TEST; } @@ -834,24 +838,24 @@ int UtcDaliActorSetAnchorPoint(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); - actor.SetAnchorPoint(vector); + actor.SetProperty( Actor::Property::ANCHOR_POINT, vector ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); Stage::GetCurrent().Add( actor ); - actor.SetAnchorPoint( Vector3( 0.1f, 0.2f, 0.3f ) ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3( 0.1f, 0.2f, 0.3f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentAnchorPoint(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), TEST_LOCATION ); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -864,7 +868,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); actor.SetProperty( Actor::Property::ANCHOR_POINT_X, vector.x ); @@ -872,7 +876,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentAnchorPoint().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).x, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT_Y, vector.y ); @@ -880,7 +884,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentAnchorPoint().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).y, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT_Z, vector.z ); @@ -888,7 +892,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentAnchorPoint().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).z, TEST_LOCATION ); END_TEST; } @@ -900,15 +904,15 @@ int UtcDaliActorGetCurrentAnchorPoint(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); - actor.SetAnchorPoint(vector); + actor.SetProperty( Actor::Property::ANCHOR_POINT, vector); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); END_TEST; } @@ -920,7 +924,7 @@ int UtcDaliActorSetSize01(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector.x, vector.y); @@ -936,7 +940,7 @@ int UtcDaliActorSetSize01(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -986,7 +990,7 @@ int UtcDaliActorSetSize02(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector.x, vector.y, vector.z); @@ -999,7 +1003,7 @@ int UtcDaliActorSetSize02(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1015,7 +1019,7 @@ int UtcDaliActorSetSize03(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(Vector2(vector.x, vector.y)); @@ -1028,7 +1032,7 @@ int UtcDaliActorSetSize03(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1044,7 +1048,7 @@ int UtcDaliActorSetSize04(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector); @@ -1057,7 +1061,7 @@ int UtcDaliActorSetSize04(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); Stage::GetCurrent().Add( actor ); actor.SetSize( Vector3( 0.1f, 0.2f, 0.3f ) ); @@ -1071,7 +1075,7 @@ int UtcDaliActorSetSize04(void) application.Render(); // Check the size in the new frame - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentSize(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), TEST_LOCATION ); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, Vector3( 0.1f, 0.2f, 0.3f ), Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1087,7 +1091,7 @@ int UtcDaliActorSetSizeIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetProperty( Actor::Property::SIZE_WIDTH, vector.width ); @@ -1100,7 +1104,7 @@ int UtcDaliActorSetSizeIndividual(void) application.Render(); // Check the width in the new frame - DALI_TEST_EQUALS( vector.width, actor.GetCurrentSize().width, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, TEST_LOCATION ); sizeWidth = actor.GetProperty( Actor::Property::SIZE_WIDTH ).Get< float >(); DALI_TEST_EQUALS( sizeWidth, vector.width, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1116,7 +1120,7 @@ int UtcDaliActorSetSizeIndividual(void) application.Render(); // Check the height in the new frame - DALI_TEST_EQUALS( vector.height, actor.GetCurrentSize().height, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, TEST_LOCATION ); sizeHeight = actor.GetProperty( Actor::Property::SIZE_HEIGHT ).Get< float >(); DALI_TEST_EQUALS( sizeHeight, vector.height, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1132,7 +1136,7 @@ int UtcDaliActorSetSizeIndividual(void) application.Render(); // Check the depth in the new frame - DALI_TEST_EQUALS( vector.depth, actor.GetCurrentSize().depth, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.depth, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, TEST_LOCATION ); sizeDepth = actor.GetProperty( Actor::Property::SIZE_DEPTH ).Get< float >(); DALI_TEST_EQUALS( sizeDepth, vector.depth, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1173,7 +1177,7 @@ int UtcDaliActorSetSizeIndividual02(void) Stage::GetCurrent().Add( actor ); Vector3 vector( 100.0f, 200.0f, 400.0f ); - DALI_TEST_CHECK( vector != actor.GetCurrentSize() ); + DALI_TEST_CHECK( vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); actor.SetProperty( Actor::Property::SIZE_WIDTH, vector.width ); DALI_TEST_EQUALS( actor.GetProperty( Actor::Property::SIZE_WIDTH ).Get< float >(), vector.width, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1189,8 +1193,8 @@ int UtcDaliActorSetSizeIndividual02(void) application.Render(); // Check the width in the new frame - DALI_TEST_EQUALS( vector.width, actor.GetCurrentSize().width, TEST_LOCATION ); - DALI_TEST_EQUALS( vector.height, actor.GetCurrentSize().height, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, TEST_LOCATION ); END_TEST; } @@ -1203,7 +1207,7 @@ int UtcDaliActorGetCurrentSize(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 20.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector); @@ -1211,7 +1215,7 @@ int UtcDaliActorGetCurrentSize(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); END_TEST; } @@ -1235,19 +1239,19 @@ int UtcDaliActorGetCurrentSizeImmediate(void) Vector3 vector(100.0f, 100.0f, 20.0f); DALI_TEST_CHECK(vector != actor.GetTargetSize()); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector); DALI_TEST_CHECK(vector == actor.GetTargetSize()); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); // flush the queue and render once application.SendNotification(); application.Render(); DALI_TEST_CHECK(vector == actor.GetTargetSize()); - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); // Animation // Build the animation @@ -1304,20 +1308,20 @@ int UtcDaliActorSetPosition01(void) Vector3 vector(100.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector.x, vector.y); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); Stage::GetCurrent().Add( actor ); actor.SetPosition( Vector3( 0.1f, 0.2f, 0.3f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); actor.SetX( 1.0f ); actor.SetY( 1.1f ); @@ -1325,13 +1329,13 @@ int UtcDaliActorSetPosition01(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 1.0f, 1.1f, 1.2f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 1.0f, 1.1f, 1.2f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); actor.TranslateBy( Vector3( 0.1f, 0.1f, 0.1f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 1.1f, 1.2f, 1.3f ), actor.GetCurrentPosition(), Math::MACHINE_EPSILON_10000, TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 1.1f, 1.2f, 1.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Math::MACHINE_EPSILON_10000, TEST_LOCATION ); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -1349,7 +1353,7 @@ int UtcDaliActorSetPosition02(void) Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector.x, vector.y, vector.z); @@ -1357,7 +1361,7 @@ int UtcDaliActorSetPosition02(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1373,7 +1377,7 @@ int UtcDaliActorSetPosition03(void) Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector); @@ -1381,7 +1385,7 @@ int UtcDaliActorSetPosition03(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1393,7 +1397,7 @@ int UtcDaliActorSetX(void) Vector3 vector(100.0f, 0.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetX(100.0f); @@ -1401,7 +1405,7 @@ int UtcDaliActorSetX(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1413,7 +1417,7 @@ int UtcDaliActorSetY(void) Vector3 vector(0.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetY(100.0f); @@ -1421,7 +1425,7 @@ int UtcDaliActorSetY(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1433,7 +1437,7 @@ int UtcDaliActorSetZ(void) Vector3 vector(0.0f, 0.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetZ(100.0f); @@ -1441,7 +1445,7 @@ int UtcDaliActorSetZ(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1452,7 +1456,7 @@ int UtcDaliActorSetPositionProperties(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetProperty( Actor::Property::POSITION_X, vector.x ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); @@ -1462,7 +1466,7 @@ int UtcDaliActorSetPositionProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentPosition().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::POSITION_X ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); @@ -1476,7 +1480,7 @@ int UtcDaliActorSetPositionProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentPosition().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::POSITION_Y ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION ); @@ -1490,7 +1494,7 @@ int UtcDaliActorSetPositionProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentPosition().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::POSITION_Z ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION ); @@ -1506,7 +1510,7 @@ int UtcDaliActorTranslateBy(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector); @@ -1514,7 +1518,7 @@ int UtcDaliActorTranslateBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.TranslateBy(vector); @@ -1522,7 +1526,7 @@ int UtcDaliActorTranslateBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector*2.0f == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector*2.0f == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1538,7 +1542,7 @@ int UtcDaliActorGetCurrentPosition(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentPosition() == setVector); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) == setVector); END_TEST; } @@ -1549,30 +1553,30 @@ int UtcDaliActorGetCurrentWorldPosition(void) Actor parent = Actor::New(); Vector3 parentPosition( 1.0f, 2.0f, 3.0f ); parent.SetPosition( parentPosition ); - parent.SetParentOrigin( ParentOrigin::CENTER ); - parent.SetAnchorPoint( AnchorPoint::CENTER ); + parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin( ParentOrigin::CENTER ); - child.SetAnchorPoint( AnchorPoint::CENTER ); + child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Vector3 childPosition( 6.0f, 6.0f, 6.0f ); child.SetPosition( childPosition ); parent.Add( child ); // The actors should not have a world position yet - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childPosition, TEST_LOCATION ); // The actors should have a world position now - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childPosition, TEST_LOCATION ); END_TEST; } @@ -1584,53 +1588,53 @@ int UtcDaliActorSetInheritPosition(void) Actor parent = Actor::New(); Vector3 parentPosition( 1.0f, 2.0f, 3.0f ); parent.SetPosition( parentPosition ); - parent.SetParentOrigin( ParentOrigin::CENTER ); - parent.SetAnchorPoint( AnchorPoint::CENTER ); + parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin( ParentOrigin::CENTER ); - child.SetAnchorPoint( AnchorPoint::CENTER ); + child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Vector3 childPosition( 10.0f, 11.0f, 12.0f ); child.SetPosition( childPosition ); parent.Add( child ); // The actors should not have a world position yet - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); // first test default, which is to inherit position - DALI_TEST_EQUALS( child.IsPositionInherited(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), true, TEST_LOCATION ); application.SendNotification(); application.Render(0); // should only really call Update as Render is not required to update scene - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childPosition, TEST_LOCATION ); //Change child position Vector3 childOffset( -1.0f, 1.0f, 0.0f ); child.SetPosition( childOffset ); // Use local position as world postion - child.SetInheritPosition( false ); - DALI_TEST_EQUALS( child.IsPositionInherited(), false, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_POSITION, false ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), false, TEST_LOCATION ); application.SendNotification(); application.Render(0); // should only really call Update as Render is not required to update scene - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childOffset, TEST_LOCATION ); - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), childOffset, TEST_LOCATION ); //Change back to inherit position from parent - child.SetInheritPosition( true ); - DALI_TEST_EQUALS( child.IsPositionInherited(), true, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_POSITION, true ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), true, TEST_LOCATION ); application.SendNotification(); application.Render(0); // should only really call Update as Render is not required to update scene - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childOffset, TEST_LOCATION ); - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childOffset, TEST_LOCATION ); END_TEST; } @@ -1651,7 +1655,7 @@ int UtcDaliActorInheritOpacity(void) application.SendNotification(); application.Render(); - parent.SetOpacity( 0.1f ); + parent.SetProperty( DevelActor::Property::OPACITY, 0.1f ); DALI_TEST_EQUALS( parent.GetProperty( Actor::Property::COLOR_ALPHA ).Get(), 0.1f, 0.0001f, TEST_LOCATION ); DALI_TEST_EQUALS( child.GetProperty( Actor::Property::COLOR_ALPHA ).Get(), 1.0f, 0.0001f, TEST_LOCATION ); @@ -1683,7 +1687,7 @@ int UtcDaliActorSetOrientation01(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; } @@ -1701,24 +1705,24 @@ int UtcDaliActorSetOrientation02(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Add( actor ); actor.RotateBy( Degree( 360 ), axis); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); actor.SetOrientation( Degree( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) ); Quaternion result( Radian( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( result, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS( result, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); actor.SetOrientation( angle, axis); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -1739,7 +1743,7 @@ int UtcDaliActorSetOrientationProperty(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); DALI_TEST_EQUALS(rotation, actor.GetProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; @@ -1757,7 +1761,7 @@ int UtcDaliActorRotateBy01(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Add( actor ); @@ -1765,7 +1769,7 @@ int UtcDaliActorRotateBy01(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -1784,13 +1788,13 @@ int UtcDaliActorRotateBy02(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); actor.RotateBy(rotation); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; } @@ -1804,7 +1808,7 @@ int UtcDaliActorGetCurrentOrientation(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; } @@ -1824,28 +1828,28 @@ int UtcDaliActorGetCurrentWorldOrientation(void) parent.Add( child ); // The actors should not have a world rotation yet - DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, 0.001, TEST_LOCATION ); // The actors should have a world rotation now - DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION ); // turn off child rotation inheritance - child.SetInheritOrientation( false ); - DALI_TEST_EQUALS( child.IsOrientationInherited(), false, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_ORIENTATION, false ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_ORIENTATION ), false, TEST_LOCATION ); application.SendNotification(); application.Render(0); // The actors should have a world rotation now - DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), rotation, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), rotation, 0.001, TEST_LOCATION ); END_TEST; } @@ -1856,11 +1860,11 @@ int UtcDaliActorSetScale01(void) Actor actor = Actor::New(); - // Set to random value first - GetCurrentScale() asserts if called before SetScale() + // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale() actor.SetScale(0.25f); Vector3 scale(10.0f, 10.0f, 10.0f); - DALI_TEST_CHECK(actor.GetCurrentScale() != scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale); actor.SetScale(scale.x); @@ -1868,7 +1872,7 @@ int UtcDaliActorSetScale01(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); END_TEST; } @@ -1880,16 +1884,16 @@ int UtcDaliActorSetScale02(void) Actor actor = Actor::New(); - // Set to random value first - GetCurrentScale() asserts if called before SetScale() + // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale() actor.SetScale(Vector3(12.0f, 1.0f, 2.0f)); - DALI_TEST_CHECK(actor.GetCurrentScale() != scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale); actor.SetScale(scale.x, scale.y, scale.z); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); // add to stage and test Stage::GetCurrent().Add( actor ); @@ -1897,7 +1901,7 @@ int UtcDaliActorSetScale02(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentScale(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), 0.001, TEST_LOCATION); Stage::GetCurrent().Remove( actor ); @@ -1912,10 +1916,10 @@ int UtcDaliActorSetScale03(void) Actor actor = Actor::New(); - // Set to random value first - GetCurrentScale() asserts if called before SetScale() + // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale() actor.SetScale(Vector3(12.0f, 1.0f, 2.0f)); - DALI_TEST_CHECK(actor.GetCurrentScale() != scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale); actor.SetScale(scale); @@ -1923,7 +1927,7 @@ int UtcDaliActorSetScale03(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); END_TEST; } @@ -1934,7 +1938,7 @@ int UtcDaliActorSetScaleIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentScale()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); actor.SetProperty( Actor::Property::SCALE_X, vector.x ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION ); @@ -1943,7 +1947,7 @@ int UtcDaliActorSetScaleIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentScale().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION ); @@ -1954,7 +1958,7 @@ int UtcDaliActorSetScaleIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentScale().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION ); @@ -1965,7 +1969,7 @@ int UtcDaliActorSetScaleIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentScale().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION ); @@ -1981,7 +1985,7 @@ int UtcDaliActorScaleBy(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentScale()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); actor.SetScale(vector); @@ -1989,7 +1993,7 @@ int UtcDaliActorScaleBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentScale()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); actor.ScaleBy(vector); @@ -1997,7 +2001,7 @@ int UtcDaliActorScaleBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector*100.0f == actor.GetCurrentScale()); + DALI_TEST_CHECK(vector*100.0f == actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); END_TEST; } @@ -2014,7 +2018,7 @@ int UtcDaliActorGetCurrentScale(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); END_TEST; } @@ -2033,22 +2037,22 @@ int UtcDaliActorGetCurrentWorldScale(void) parent.Add( child ); // The actors should not have a scale yet - DALI_TEST_EQUALS( parent.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // The actors should not have a world scale yet - DALI_TEST_EQUALS( parent.GetCurrentWorldScale(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), Vector3::ONE, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentScale(), parentScale, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentScale(), childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), parentScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), childScale, TEST_LOCATION ); // The actors should have a world scale now - DALI_TEST_EQUALS( parent.GetCurrentWorldScale(), parentScale, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), parentScale * childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale * childScale, TEST_LOCATION ); END_TEST; } @@ -2070,16 +2074,16 @@ int UtcDaliActorInheritScale(void) application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.IsScaleInherited(), true, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), parentScale * childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), true, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale * childScale, TEST_LOCATION ); - child.SetInheritScale( false ); - DALI_TEST_EQUALS( child.IsScaleInherited(), false, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_SCALE, false ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), false, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), childScale, TEST_LOCATION ); END_TEST; } @@ -2088,25 +2092,25 @@ int UtcDaliActorSetVisible(void) TestApplication application; Actor actor = Actor::New(); - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.IsVisible() == false); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); - actor.SetVisible(true); + actor.SetProperty( Actor::Property::VISIBLE,true); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.IsVisible() == true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); // put actor on stage Stage::GetCurrent().Add( actor ); - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.IsVisible() == false); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); END_TEST; } @@ -2116,7 +2120,7 @@ int UtcDaliActorIsVisible(void) Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.IsVisible() == true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); END_TEST; } @@ -2126,38 +2130,38 @@ int UtcDaliActorSetOpacity(void) Actor actor = Actor::New(); // initial opacity is 1 - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); - actor.SetOpacity( 0.4f); + actor.SetProperty( DevelActor::Property::OPACITY, 0.4f); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.4f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.4f, TEST_LOCATION ); // change opacity, actor is on stage to change is not immediate - actor.SetOpacity( actor.GetCurrentOpacity() + 0.1f ); + actor.SetProperty( DevelActor::Property::OPACITY, actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) + 0.1f ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, TEST_LOCATION ); // put actor on stage Stage::GetCurrent().Add( actor ); // change opacity, actor is on stage to change is not immediate - actor.SetOpacity( 0.9f ); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.5f, TEST_LOCATION ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.9f ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, TEST_LOCATION ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.9f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.9f, TEST_LOCATION ); // change opacity, actor is on stage to change is not immediate - actor.SetOpacity( actor.GetCurrentOpacity() - 0.9f ); + actor.SetProperty( DevelActor::Property::OPACITY, actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) - 0.9f ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -2166,13 +2170,13 @@ int UtcDaliActorGetCurrentOpacity(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.GetCurrentOpacity() != 0.5f); + DALI_TEST_CHECK(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 0.5f); - actor.SetOpacity(0.5f); + actor.SetProperty( DevelActor::Property::OPACITY,0.5f); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentOpacity() == 0.5f); + DALI_TEST_CHECK(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) == 0.5f); END_TEST; } @@ -2181,11 +2185,11 @@ int UtcDaliActorSetSensitive(void) TestApplication application; Actor actor = Actor::New(); - bool sensitive = !actor.IsSensitive(); + bool sensitive = !actor.GetProperty< bool >( Actor::Property::SENSITIVE ); - actor.SetSensitive(sensitive); + actor.SetProperty( Actor::Property::SENSITIVE,sensitive); - DALI_TEST_CHECK(sensitive == actor.IsSensitive()); + DALI_TEST_CHECK(sensitive == actor.GetProperty< bool >( Actor::Property::SENSITIVE )); END_TEST; } @@ -2193,9 +2197,9 @@ int UtcDaliActorIsSensitive(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetSensitive(false); + actor.SetProperty( Actor::Property::SENSITIVE,false); - DALI_TEST_CHECK(false == actor.IsSensitive()); + DALI_TEST_CHECK(false == actor.GetProperty< bool >( Actor::Property::SENSITIVE )); END_TEST; } @@ -2205,35 +2209,35 @@ int UtcDaliActorSetColor(void) Actor actor = Actor::New(); Vector4 color(1.0f, 1.0f, 1.0f, 0.5f); - DALI_TEST_CHECK(color != actor.GetCurrentColor()); + DALI_TEST_CHECK(color != actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); - actor.SetColor(color); + actor.SetProperty( Actor::Property::COLOR,color); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(color == actor.GetCurrentColor()); + DALI_TEST_CHECK(color == actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); - actor.SetColor( actor.GetCurrentColor() + Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) ); + actor.SetProperty( Actor::Property::COLOR, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ) + Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); Stage::GetCurrent().Add( actor ); - actor.SetColor( color ); + actor.SetProperty( Actor::Property::COLOR, color ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( color, actor.GetCurrentColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( color, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); - actor.SetColor( actor.GetCurrentColor() + Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) ); + actor.SetProperty( Actor::Property::COLOR, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ) + Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) ); // flush the queue and render once application.SendNotification(); application.Render(); // Actor color is not clamped - DALI_TEST_EQUALS( Vector4( 2.1f, 2.1f, 2.1f, 1.6f ), actor.GetCurrentColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector4( 2.1f, 2.1f, 2.1f, 1.6f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); // world color is clamped - DALI_TEST_EQUALS( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ), actor.GetCurrentWorldColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), TEST_LOCATION ); actor.SetProperty( Actor::Property::COLOR, color ); DALI_TEST_EQUALS( color, actor.GetProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); @@ -2253,7 +2257,7 @@ int UtcDaliActorSetColorIndividual(void) Actor actor = Actor::New(); Vector4 vector(0.7f, 0.8f, 0.9f, 0.6f); - DALI_TEST_CHECK(vector != actor.GetCurrentColor()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); actor.SetProperty( Actor::Property::COLOR_RED, vector.r ); DALI_TEST_EQUALS( vector.r, actor.GetProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION ); @@ -2262,7 +2266,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.r, actor.GetCurrentColor().r, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.r, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, TEST_LOCATION ); DALI_TEST_EQUALS( vector.r, actor.GetProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.r, actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION ); @@ -2273,7 +2277,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.g, actor.GetCurrentColor().g, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.g, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, TEST_LOCATION ); DALI_TEST_EQUALS( vector.g, actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.g, actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION ); @@ -2284,7 +2288,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.b, actor.GetCurrentColor().b, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.b, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, TEST_LOCATION ); DALI_TEST_EQUALS( vector.b, actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.b, actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION ); @@ -2296,7 +2300,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.a, actor.GetCurrentColor().a, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.a, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, TEST_LOCATION ); DALI_TEST_EQUALS( vector.a, actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.a, actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION ); @@ -2310,7 +2314,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( 0.2f, actor.GetCurrentColor().a, TEST_LOCATION ); + DALI_TEST_EQUALS( 0.2f, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, TEST_LOCATION ); END_TEST; } @@ -2322,11 +2326,11 @@ int UtcDaliActorGetCurrentColor(void) Actor actor = Actor::New(); Vector4 color(1.0f, 1.0f, 1.0f, 0.5f); - actor.SetColor(color); + actor.SetProperty( Actor::Property::COLOR,color); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(color == actor.GetCurrentColor()); + DALI_TEST_CHECK(color == actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); END_TEST; } @@ -2337,46 +2341,46 @@ int UtcDaliActorGetCurrentWorldColor(void) Actor parent = Actor::New(); Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f ); - parent.SetColor( parentColor ); + parent.SetProperty( Actor::Property::COLOR, parentColor ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f ); - child.SetColor( childColor ); + child.SetProperty( Actor::Property::COLOR, childColor ); parent.Add( child ); - DALI_TEST_EQUALS( parent.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // verify the default color mode DALI_TEST_EQUALS( USE_OWN_MULTIPLY_PARENT_ALPHA, child.GetColorMode(), TEST_LOCATION ); // The actors should not have a world color yet - DALI_TEST_EQUALS( parent.GetCurrentWorldColor(), Color::WHITE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Color::WHITE, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentColor(), parentColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), parentColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION ); // The actors should have a world color now - DALI_TEST_EQUALS( parent.GetCurrentWorldColor(), parentColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), Vector4( childColor.r, childColor.g, childColor.b, childColor.a * parentColor.a), TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), parentColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Vector4( childColor.r, childColor.g, childColor.b, childColor.a * parentColor.a), TEST_LOCATION ); // use own color child.SetColorMode( USE_OWN_COLOR ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), childColor, TEST_LOCATION ); // use parent color child.SetColorMode( USE_PARENT_COLOR ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), parentColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), parentColor, TEST_LOCATION ); // use parent alpha child.SetColorMode( USE_OWN_MULTIPLY_PARENT_ALPHA ); @@ -2384,8 +2388,8 @@ int UtcDaliActorGetCurrentWorldColor(void) application.Render(0); Vector4 expectedColor( childColor ); expectedColor.a *= parentColor.a; - DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), expectedColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), expectedColor, TEST_LOCATION ); END_TEST; } @@ -2415,7 +2419,7 @@ int UtcDaliActorScreenToLocal(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.SetSize(100.0f, 100.0f); actor.SetPosition(10.0f, 10.0f); Stage::GetCurrent().Add(actor); @@ -2443,11 +2447,11 @@ int UtcDaliActorSetLeaveRequired(void) Actor actor = Actor::New(); - actor.SetLeaveRequired(false); - DALI_TEST_CHECK(actor.GetLeaveRequired() == false); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED,false); + DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == false); - actor.SetLeaveRequired(true); - DALI_TEST_CHECK(actor.GetLeaveRequired() == true); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED,true); + DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == true); END_TEST; } @@ -2457,7 +2461,7 @@ int UtcDaliActorGetLeaveRequired(void) Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.GetLeaveRequired() == false); + DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == false); END_TEST; } @@ -2547,7 +2551,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; actor.RemoveConstraints(constraint1Tag); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2560,7 +2564,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; constraint1.Apply(); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2573,7 +2577,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; actor.RemoveConstraints(constraint2Tag); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2586,7 +2590,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; actor.RemoveConstraints(constraint1Tag); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2667,7 +2671,7 @@ int UtcDaliActorOnOffStageSignal(void) gActorNamesOnOffStage.clear(); Actor parent = Actor::New(); - parent.SetName( "parent" ); + parent.SetProperty( Actor::Property::NAME, "parent" ); parent.OnStageSignal().Connect( OnStageCallback ); parent.OffStageSignal().Connect( OffStageCallback ); // sanity check @@ -2687,7 +2691,7 @@ int UtcDaliActorOnOffStageSignal(void) gActorNamesOnOffStage.clear(); Actor child = Actor::New(); - child.SetName( "child" ); + child.SetProperty( Actor::Property::NAME, "child" ); child.OnStageSignal().Connect( OnStageCallback ); child.OffStageSignal().Connect( OffStageCallback ); parent.Add( child ); // add child @@ -2750,11 +2754,11 @@ int UtcDaliActorFindChildByName(void) TestApplication application; Actor parent = Actor::New(); - parent.SetName( "parent" ); + parent.SetProperty( Actor::Property::NAME, "parent" ); Actor first = Actor::New(); - first .SetName( "first" ); + first .SetProperty( Actor::Property::NAME, "first" ); Actor second = Actor::New(); - second.SetName( "second" ); + second.SetProperty( Actor::Property::NAME, "second" ); parent.Add(first); first.Add(second); @@ -2831,8 +2835,8 @@ int UtcDaliActorHitTest(void) // get the root layer Actor actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::CENTER ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( actor ); @@ -2984,8 +2988,8 @@ int UtcDaliActorGetCurrentWorldMatrix(void) tet_infoline(" UtcDaliActorGetCurrentWorldMatrix"); Actor parent = Actor::New(); - parent.SetParentOrigin(ParentOrigin::CENTER); - parent.SetAnchorPoint(AnchorPoint::CENTER); + parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); Vector3 parentPosition( 10.0f, 20.0f, 30.0f); Radian rotationAngle(Degree(85.0f)); Quaternion parentRotation(rotationAngle, Vector3::ZAXIS); @@ -2996,7 +3000,7 @@ int UtcDaliActorGetCurrentWorldMatrix(void) Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Vector3 childPosition( 0.0f, 0.0f, 100.0f ); Radian childRotationAngle(Degree(23.0f)); Quaternion childRotation( childRotationAngle, Vector3::YAXIS ); @@ -3021,8 +3025,8 @@ int UtcDaliActorGetCurrentWorldMatrix(void) Matrix childWorldMatrix(false); Matrix::Multiply( childWorldMatrix, childMatrix, parentMatrix); - DALI_TEST_EQUALS( parent.GetCurrentWorldMatrix(), parentMatrix, 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldMatrix(), childWorldMatrix, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), parentMatrix, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), childWorldMatrix, 0.001, TEST_LOCATION ); END_TEST; } @@ -3034,8 +3038,8 @@ int UtcDaliActorConstrainedToWorldMatrix(void) tet_infoline(" UtcDaliActorConstrainedToWorldMatrix"); Actor parent = Actor::New(); - parent.SetParentOrigin(ParentOrigin::CENTER); - parent.SetAnchorPoint(AnchorPoint::CENTER); + parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); Vector3 parentPosition( 10.0f, 20.0f, 30.0f); Radian rotationAngle(Degree(85.0f)); Quaternion parentRotation(rotationAngle, Vector3::ZAXIS); @@ -3046,7 +3050,7 @@ int UtcDaliActorConstrainedToWorldMatrix(void) Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Constraint posConstraint = Constraint::New( child, Actor::Property::POSITION, PositionComponentConstraint() ); posConstraint.AddSource( Source( parent, Actor::Property::WORLD_MATRIX ) ); posConstraint.Apply(); @@ -3061,8 +3065,8 @@ int UtcDaliActorConstrainedToWorldMatrix(void) Matrix parentMatrix(false); parentMatrix.SetTransformComponents(parentScale, parentRotation, parentPosition); - DALI_TEST_EQUALS( parent.GetCurrentWorldMatrix(), parentMatrix, 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), parent.GetCurrentPosition(), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), parentMatrix, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001, TEST_LOCATION ); END_TEST; } @@ -3072,8 +3076,8 @@ int UtcDaliActorConstrainedToOrientation(void) tet_infoline(" UtcDaliActorConstrainedToOrientation"); Actor parent = Actor::New(); - parent.SetParentOrigin(ParentOrigin::CENTER); - parent.SetAnchorPoint(AnchorPoint::CENTER); + parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); Vector3 parentPosition( 10.0f, 20.0f, 30.0f); Radian rotationAngle(Degree(85.0f)); Quaternion parentRotation(rotationAngle, Vector3::ZAXIS); @@ -3084,7 +3088,7 @@ int UtcDaliActorConstrainedToOrientation(void) Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Constraint posConstraint = Constraint::New( child, Actor::Property::ORIENTATION, OrientationComponentConstraint() ); posConstraint.AddSource( Source( parent, Actor::Property::ORIENTATION ) ); posConstraint.Apply(); @@ -3096,7 +3100,7 @@ int UtcDaliActorConstrainedToOrientation(void) app.Render(); app.SendNotification(); - DALI_TEST_EQUALS( child.GetCurrentOrientation(), parent.GetCurrentOrientation(), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION ); END_TEST; } @@ -3106,7 +3110,7 @@ int UtcDaliActorConstrainedToOpacity(void) tet_infoline(" UtcDaliActorConstrainedToOpacity"); Actor parent = Actor::New(); - parent.SetOpacity( 0.7f ); + parent.SetProperty( DevelActor::Property::OPACITY, 0.7f ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); @@ -3121,16 +3125,16 @@ int UtcDaliActorConstrainedToOpacity(void) app.Render(); app.SendNotification(); - DALI_TEST_EQUALS( child.GetCurrentOpacity(), parent.GetCurrentOpacity(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), parent.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.001f, TEST_LOCATION ); - parent.SetOpacity( 0.3f ); + parent.SetProperty( DevelActor::Property::OPACITY, 0.3f ); app.SendNotification(); app.Render(0); app.Render(); app.SendNotification(); - DALI_TEST_EQUALS( child.GetCurrentOpacity(), parent.GetCurrentOpacity(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), parent.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.001f, TEST_LOCATION ); END_TEST; } @@ -3545,15 +3549,15 @@ int UtcDaliActorSetMinimumSize(void) Actor actor = Actor::New(); - Vector2 size = actor.GetMinimumSize(); + Vector2 size = actor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE ); DALI_TEST_EQUALS( size.width, 0.0f, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, 0.0f, TEST_LOCATION ); Vector2 size2( 1.0f, 2.0f ); - actor.SetMinimumSize( size2 ); + actor.SetProperty( Actor::Property::MINIMUM_SIZE, size2 ); - size = actor.GetMinimumSize(); + size = actor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE ); DALI_TEST_EQUALS( size.width, size2.width, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, size2.height, TEST_LOCATION ); @@ -3567,15 +3571,15 @@ int UtcDaliActorSetMaximumSize(void) Actor actor = Actor::New(); - Vector2 size = actor.GetMaximumSize(); + Vector2 size = actor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ); DALI_TEST_EQUALS( size.width, FLT_MAX, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, FLT_MAX, TEST_LOCATION ); Vector2 size2( 1.0f, 2.0f ); - actor.SetMaximumSize( size2 ); + actor.SetProperty( Actor::Property::MAXIMUM_SIZE, size2 ); - size = actor.GetMaximumSize(); + size = actor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ); DALI_TEST_EQUALS( size.width, size2.width, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, size2.height, TEST_LOCATION ); @@ -3594,7 +3598,7 @@ int UtcDaliActorOnRelayoutSignal(void) gActorNamesRelayout.clear(); Actor actor = Actor::New(); - actor.SetName( "actor" ); + actor.SetProperty( Actor::Property::NAME, "actor" ); actor.OnRelayoutSignal().Connect( OnRelayoutCallback ); // Sanity check @@ -3698,35 +3702,35 @@ int UtcDaliActorAnchorPointPropertyAsString(void) Actor actor = Actor::New(); actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); // Invalid should not change anything actor.SetProperty( Actor::Property::ANCHOR_POINT, "INVALID_ARG" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); END_TEST; } @@ -3738,35 +3742,35 @@ int UtcDaliActorParentOriginPropertyAsString(void) Actor actor = Actor::New(); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); // Invalid should not change anything actor.SetProperty( Actor::Property::PARENT_ORIGIN, "INVALID_ARG" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); END_TEST; } @@ -4036,8 +4040,8 @@ Actor CreateActorWithContent( uint32_t width, uint32_t height) // Setup dimensions and position so actor is not skipped by culling. actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); actor.SetSize( width, height ); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); return actor; } @@ -4347,12 +4351,12 @@ int UtcDaliActorPropertyClippingActorDrawOrder(void) if( i == 0 ) { - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); } else { float b = i > 2 ? 1.0f : -1.0f; - actor.SetParentOrigin( Vector3( 0.5 + ( 0.2f * b ), 0.8f, 0.8f ) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5 + ( 0.2f * b ), 0.8f, 0.8f ) ); } actors[i] = actor; @@ -4426,8 +4430,8 @@ int UtcDaliActorPropertyScissorClippingActor(void) Actor clippingActorA = CreateActorWithContent16x16(); // Note: Scissor coords are have flipped Y values compared with DALi's coordinate system. // We choose BOTTOM_LEFT to give us x=0, y=0 starting coordinates for the first test. - clippingActorA.SetParentOrigin( ParentOrigin::BOTTOM_LEFT ); - clippingActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); Stage::GetCurrent().Add( clippingActorA ); @@ -4445,8 +4449,8 @@ int UtcDaliActorPropertyScissorClippingActor(void) compareParametersString << "0, 0, " << imageSize.x << ", " << imageSize.y; DALI_TEST_CHECK( scissorTrace.FindMethodAndParams( "Scissor", compareParametersString.str() ) ); // Compare with 0, 0, 16, 16 - clippingActorA.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - clippingActorA.SetAnchorPoint( AnchorPoint::TOP_RIGHT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); // Gather the call trace. GenerateTrace( application, enabledDisableTrace, scissorTrace ); @@ -4479,12 +4483,12 @@ int UtcDaliActorPropertyScissorClippingActorSiblings(void) Actor clippingActorA = CreateActorWithContent( sizeA.width, sizeA.height ); Actor clippingActorB = CreateActorWithContent( sizeB.width, sizeB.height ); - clippingActorA.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorA.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorB.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorB.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); clippingActorA.SetPosition( 0.0f, -200.0f, 0.0f ); @@ -4548,15 +4552,15 @@ int UtcDaliActorPropertyScissorClippingActorNested01(void) Actor clippingActorA = CreateActorWithContent16x16(); // Note: Scissor coords are have flipped Y values compared with DALi's coordinate system. // We choose BOTTOM_LEFT to give us x=0, y=0 starting coordinates for the first test. - clippingActorA.SetParentOrigin( ParentOrigin::CENTER ); - clippingActorA.SetAnchorPoint( AnchorPoint::CENTER ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); Stage::GetCurrent().Add( clippingActorA ); // Create a child clipping actor. Actor clippingActorB = CreateActorWithContent16x16(); - clippingActorB.SetParentOrigin( ParentOrigin::CENTER ); - clippingActorB.SetAnchorPoint( AnchorPoint::CENTER ); + clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); clippingActorA.Add( clippingActorB ); @@ -4625,24 +4629,24 @@ int UtcDaliActorPropertyScissorClippingActorNested02(void) Actor clippingActorD = CreateActorWithContent( sizeD.width, sizeD.height ); Actor clippingActorE = CreateActorWithContent( sizeE.width, sizeE.height ); - clippingActorA.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorA.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorB.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorB.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorC.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorC.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorC.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorD.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorD.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorD.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorD.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorD.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorE.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorE.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorE.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorE.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorA.SetPosition( 0.0f, -200.0f, 0.0f ); clippingActorB.SetPosition( 0.0f, 0.0f, 0.0f ); @@ -4746,20 +4750,22 @@ int UtcDaliActorRaiseLower(void) TestApplication application; + Debug::Filter::SetGlobalLogLevel( Debug::Verbose ); + Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -4866,6 +4872,8 @@ int UtcDaliActorRaiseLower(void) ResetTouchCallbacks(); + Debug::Filter::SetGlobalLogLevel( Debug::NoLogging ); + END_TEST; } @@ -4904,14 +4912,14 @@ int UtcDaliActorRaiseToTopLowerToBottom(void) Renderer rendererC = Renderer::New(geometry, shaderC); actorC.AddRenderer(rendererC); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5116,14 +5124,14 @@ int UtcDaliActorRaiseAbove(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5248,14 +5256,14 @@ int UtcDaliActorLowerBelow(void) Renderer rendererC = Renderer::New(geometry, shaderC); actorC.AddRenderer(rendererC); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5267,7 +5275,7 @@ int UtcDaliActorLowerBelow(void) actorC.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); Actor container = Actor::New(); - container.SetParentOrigin( ParentOrigin::CENTER ); + container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); container.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); stage.Add( container ); @@ -5454,11 +5462,11 @@ int UtcDaliActorRaiseAboveDifferentParentsN(void) parentB.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); parentB.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); - parentA.SetAnchorPoint( AnchorPoint::CENTER ); - parentA.SetParentOrigin( ParentOrigin::CENTER ); + parentA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + parentA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - parentB.SetAnchorPoint( AnchorPoint::CENTER ); - parentB.SetParentOrigin( ParentOrigin::CENTER ); + parentB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + parentB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.Add( parentA ); stage.Add( parentB ); @@ -5473,14 +5481,14 @@ int UtcDaliActorRaiseAboveDifferentParentsN(void) tet_printf( "Actor C added to different parent from A and B \n" ); parentB.Add( actorC ); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5559,14 +5567,14 @@ int UtcDaliActorRaiseLowerWhenUnparentedTargetN(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5727,14 +5735,14 @@ int UtcDaliActorTestAllAPIwhenActorNotParented(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5888,14 +5896,14 @@ int UtcDaliActorRaiseAboveActorAndTargetTheSameN(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5991,7 +5999,7 @@ int UtcDaliActorGetScreenPosition(void) Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Vector2 size2( 10.0f, 20.0f ); actorA.SetSize( size2 ); @@ -6016,7 +6024,7 @@ int UtcDaliActorGetScreenPosition(void) tet_infoline( "UtcDaliActorGetScreenPosition Top Left Anchor Point and 0,0 position \n" ); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); @@ -6032,7 +6040,7 @@ int UtcDaliActorGetScreenPosition(void) tet_infoline( "UtcDaliActorGetScreenPosition Bottom right Anchor Point and 0,0 position \n" ); - actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); @@ -6080,11 +6088,11 @@ int UtcDaliActorGetScreenPosition(void) tet_infoline( "UtcDaliActorGetScreenPosition Scale parent and check child's screen position \n" ); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorA.SetPosition( 30.0, 30.0 ); Actor actorB = Actor::New(); - actorB.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorB.SetSize( size2 ); actorB.SetPosition( 10.f, 10.f ); actorA.Add( actorB ); @@ -6111,7 +6119,7 @@ int UtcDaliActorGetScreenPositionAfterScaling(void) Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Vector2 size2( 10.0f, 20.0f ); actorA.SetSize( size2 ); @@ -6136,7 +6144,7 @@ int UtcDaliActorGetScreenPositionAfterScaling(void) tet_infoline( "UtcDaliActorGetScreenPositionAfterScaling BOTTOM_RIGHT Anchor Point, scale 1.5f and 0,0 position \n" ); - actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); @@ -6162,8 +6170,8 @@ int UtcDaliActorGetScreenPositionWithDifferentParentOrigin(void) Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size2( 10.0f, 20.0f ); actorA.SetSize( size2 ); actorA.SetPosition( 0.f, 0.f ); @@ -6186,8 +6194,8 @@ int UtcDaliActorGetScreenPositionWithDifferentParentOrigin(void) tet_infoline( " BOTTOM_RIGHT Anchor Point, ParentOrigin::TOP_RIGHT and 0,0 position \n" ); - actorA.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); @@ -6216,8 +6224,8 @@ int UtcDaliActorGetScreenPositionWithChildActors(void) tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size1( 10.0f, 20.0f ); actorA.SetSize( size1 ); actorA.SetPosition( 0.f, 0.f ); @@ -6225,8 +6233,8 @@ int UtcDaliActorGetScreenPositionWithChildActors(void) tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor parentActorA = Actor::New(); - parentActorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - parentActorA.SetParentOrigin( ParentOrigin::CENTER ); + parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size2( 30.0f, 60.0f ); parentActorA.SetSize( size2 ); parentActorA.SetPosition( 0.f, 0.f ); @@ -6252,8 +6260,8 @@ int UtcDaliActorGetScreenPositionWithChildActors(void) tet_infoline( "change parent anchor point and parent origin then check screen position \n" ); - parentActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); - parentActorA.SetParentOrigin( ParentOrigin::TOP_LEFT ); + parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); + parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); application.SendNotification(); application.Render(); @@ -6281,8 +6289,8 @@ int UtcDaliActorGetScreenPositionWithChildActors02(void) tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size1( 10.0f, 20.0f ); actorA.SetSize( size1 ); actorA.SetPosition( 0.f, 0.f ); @@ -6290,8 +6298,8 @@ int UtcDaliActorGetScreenPositionWithChildActors02(void) tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor parentActorA = Actor::New(); - parentActorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - parentActorA.SetParentOrigin( ParentOrigin::CENTER ); + parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size2( 30.0f, 60.0f ); parentActorA.SetSize( size2 ); parentActorA.SetPosition( 0.f, 0.f ); @@ -6299,8 +6307,8 @@ int UtcDaliActorGetScreenPositionWithChildActors02(void) tet_infoline( "Create Grand Parent Actor 1 BOTTOM_LEFT Anchor Point, ParentOrigin::BOTTOM_LEFT and 0,0 position \n" ); Actor grandParentActorA = Actor::New(); - grandParentActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); - grandParentActorA.SetParentOrigin( ParentOrigin::BOTTOM_LEFT ); + grandParentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); + grandParentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); Vector2 size3( 60.0f, 120.0f ); grandParentActorA.SetSize( size3 ); grandParentActorA.SetPosition( 0.f, 0.f ); @@ -6340,8 +6348,8 @@ int UtcDaliActorGetScreenPositionPositionUsesAnchorPointFalse(void) tet_infoline( "Create an actor with AnchorPoint::TOP_LEFT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); actorA.SetSize( 10.0f, 20.0f ); stage.Add( actorA ); @@ -6349,8 +6357,8 @@ int UtcDaliActorGetScreenPositionPositionUsesAnchorPointFalse(void) tet_infoline( "Create an Actor with AnchorPoint::BOTTOM_RIGHT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" ); Actor actorB = Actor::New(); - actorB.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorB.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); Vector2 actorBSize( 30.0f, 60.0f ); actorB.SetSize( actorBSize ); @@ -6359,8 +6367,8 @@ int UtcDaliActorGetScreenPositionPositionUsesAnchorPointFalse(void) tet_infoline( "Create an actor with AnchorPoint::CENTER, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" ); Actor actorC = Actor::New(); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorC.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); Vector2 actorCSize( 60.0f, 120.0f ); actorC.SetSize( actorCSize ); @@ -6399,8 +6407,8 @@ int utcDaliActorPositionUsesAnchorPoint(void) tet_infoline( "Check default behaviour\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); Stage::GetCurrent().Add( actor ); @@ -6408,7 +6416,7 @@ int utcDaliActorPositionUsesAnchorPoint(void) application.Render(); tet_infoline( "Check that the world position is in the center\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Set the position uses anchor point property to false\n" ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); @@ -6417,7 +6425,7 @@ int utcDaliActorPositionUsesAnchorPoint(void) application.Render(); tet_infoline( "Check that the world position has changed appropriately\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6428,8 +6436,8 @@ int utcDaliActorPositionUsesAnchorPointCheckScale(void) tet_infoline( "Check that the scale is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); actor.SetScale( 2.0f ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); @@ -6439,19 +6447,19 @@ int utcDaliActorPositionUsesAnchorPointCheckScale(void) application.Render(); tet_infoline( "Check the world position is the same as it would be without a scale\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 100.0f, 100.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 100.0f, 100.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6462,8 +6470,8 @@ int utcDaliActorPositionUsesAnchorPointCheckRotation(void) tet_infoline( "Check that the rotation is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); actor.SetOrientation( Degree( 90.0f), Vector3::ZAXIS ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); @@ -6473,19 +6481,19 @@ int utcDaliActorPositionUsesAnchorPointCheckRotation(void) application.Render(); tet_infoline( "Check the world position is the same as it would be without a rotation\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( -50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( -50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 150.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 150.0f, 50.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6496,8 +6504,8 @@ int utcDaliActorPositionUsesAnchorPointCheckScaleAndRotation(void) tet_infoline( "Check that the scale and rotation is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); actor.SetOrientation( Degree( 90.0f), Vector3::ZAXIS ); actor.SetScale( 2.0f ); @@ -6508,19 +6516,19 @@ int utcDaliActorPositionUsesAnchorPointCheckScaleAndRotation(void) application.Render(); tet_infoline( "Check the world position is the same as it would be without a scale and rotation\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( -100.0f, 100.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( -100.0f, 100.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 200.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 200.0f, 0.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6536,11 +6544,11 @@ int utcDaliActorPositionUsesAnchorPointOnlyInheritPosition(void) Vector2 stageSize( Stage::GetCurrent().GetSize() ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); - actor.SetInheritScale( false ); - actor.SetInheritOrientation( false ); + actor.SetProperty( Actor::Property::INHERIT_SCALE, false ); + actor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); parent.Add( actor ); @@ -6550,19 +6558,19 @@ int utcDaliActorPositionUsesAnchorPointOnlyInheritPosition(void) const Vector3 expectedWorldPosition( -stageSize.width * 0.5f + 50.0f, -stageSize.height * 0.5f + 50.0f, 0.0f ); tet_infoline( "Check the world position is in the right place\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure world position hasn't changed" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure world position hasn't changed" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION ); END_TEST; } @@ -6577,14 +6585,14 @@ int utcDaliActorVisibilityChangeSignalSelf(void) VisibilityChangedFunctorData data; DevelActor::VisibilityChangedSignal( actor ).Connect( &application, VisibilityChangedFunctor( data ) ); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); data.Check( true /* called */, actor, false /* not visible */, DevelActor::VisibilityChange::SELF, TEST_LOCATION ); tet_infoline( "Ensure functor is not called if we attempt to change the visibility to what it already is at" ); data.Reset(); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); data.Check( false /* not called */, TEST_LOCATION ); tet_infoline( "Change the visibility using properties, ensure called" ); @@ -6622,7 +6630,7 @@ int utcDaliActorVisibilityChangeSignalChildren(void) DevelActor::VisibilityChangedSignal( child ).Connect( &application, VisibilityChangedFunctor( childData ) ); DevelActor::VisibilityChangedSignal( grandChild ).Connect( &application, VisibilityChangedFunctor( grandChildData ) ); - parent.SetVisible( false ); + parent.SetProperty( Actor::Property::VISIBLE, false ); parentData.Check( false /* not called */, TEST_LOCATION ); childData.Check( true /* called */, child, false /* not visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); grandChildData.Check( true /* called */, grandChild, false /* not visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); @@ -6634,7 +6642,7 @@ int utcDaliActorVisibilityChangeSignalChildren(void) DevelActor::VisibilityChangedSignal( parent ).Connect( &application, VisibilityChangedFunctor( parentData ) ); - parent.SetVisible( true ); + parent.SetProperty( Actor::Property::VISIBLE, true ); parentData.Check( true /* called */, parent, true /* visible */, DevelActor::VisibilityChange::SELF, TEST_LOCATION ); childData.Check( true /* called */, child, true /* visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); grandChildData.Check( true /* called */, grandChild, true /* visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); @@ -6644,7 +6652,7 @@ int utcDaliActorVisibilityChangeSignalChildren(void) childData.Reset(); grandChildData.Reset(); - parent.SetVisible( true ); + parent.SetProperty( Actor::Property::VISIBLE, true ); parentData.Check( false /* not called */, TEST_LOCATION ); childData.Check( false /* not called */, TEST_LOCATION ); grandChildData.Check( false /* not called */, TEST_LOCATION ); @@ -6701,12 +6709,12 @@ int utcDaliActorVisibilityChangeSignalByName(void) bool signalCalled=false; actor.ConnectSignal( &application, "visibilityChanged", VisibilityChangedVoidFunctor(signalCalled) ); DALI_TEST_EQUALS( signalCalled, false, TEST_LOCATION ); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); DALI_TEST_EQUALS( signalCalled, true, TEST_LOCATION ); tet_infoline( "Ensure functor is not called if we attempt to change the visibility to what it already is at" ); signalCalled = false; - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); DALI_TEST_EQUALS( signalCalled, false, TEST_LOCATION ); tet_infoline( "Change the visibility using properties, ensure called" ); @@ -7247,7 +7255,7 @@ int utcDaliEnsureRenderWhenMakingLastActorInvisible(void) auto& glAbstraction = application.GetGlAbstraction(); const auto clearCountBefore = glAbstraction.GetClearCountCalled(); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index addc288..0c53693 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -268,7 +268,7 @@ int UtcDaliAnimationSetDurationP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Restart the animation, with a different duration finishCheck.Reset(); @@ -290,13 +290,13 @@ int UtcDaliAnimationSetDurationP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -356,7 +356,7 @@ int UtcDaliAnimationSetLoopingP(void) application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); progress += intervalSeconds; - DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION ); if (progress >= 1.0f) { @@ -378,13 +378,13 @@ int UtcDaliAnimationSetLoopingP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -439,7 +439,7 @@ int UtcDaliAnimationSetLoopCountP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); finishCheck.Reset(); @@ -676,7 +676,7 @@ int UtcDaliAnimationSetLoopCountP4(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f) ); finishCheck.Reset(); @@ -690,7 +690,7 @@ int UtcDaliAnimationSetLoopCountP4(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -844,13 +844,13 @@ int UtcDaliAnimationSetEndActionN(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Go back to the start actor.SetPosition(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Test BakeFinal, animate again, for half the duration finishCheck.Reset(); @@ -867,17 +867,17 @@ int UtcDaliAnimationSetEndActionN(void) // We did NOT expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( targetPosition * 0.5f, actor.GetCurrentPosition(), VECTOR4_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition * 0.5f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), VECTOR4_EPSILON, TEST_LOCATION ); // The position should be same with target position in the next frame application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Go back to the start actor.SetPosition(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Test EndAction::Discard, animate again, but don't bake this time finishCheck.Reset(); @@ -891,17 +891,17 @@ int UtcDaliAnimationSetEndActionN(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // The position should be discarded in the next frame application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO/*discarded*/, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO/*discarded*/, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -950,7 +950,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } // Bake @@ -977,7 +977,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition*0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition*0.5f, TEST_LOCATION ); } // Discard @@ -1004,7 +1004,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); } // Don't play the animation: disconnect action should not be applied @@ -1027,7 +1027,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); } END_TEST; @@ -1111,7 +1111,7 @@ int UtcDaliAnimationSetCurrentProgressP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); DALI_TEST_EQUALS( 0.6f, animation.GetCurrentProgress(), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing @@ -1125,20 +1125,20 @@ int UtcDaliAnimationSetCurrentProgressP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); DALI_TEST_EQUALS( 0.8f, animation.GetCurrentProgress(), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1278,27 +1278,27 @@ int UtcDaliAnimationSetSpeedFactorP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f) + 1u/*just beyond half the duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1338,41 +1338,41 @@ int UtcDaliAnimationSetSpeedFactorP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), initialPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1414,21 +1414,21 @@ int UtcDaliAnimationSetSpeedFactorP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.3f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); @@ -1436,20 +1436,20 @@ int UtcDaliAnimationSetSpeedFactorP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*1200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1492,21 +1492,21 @@ int UtcDaliAnimationSetSpeedFactorP4(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.3f), TEST_LOCATION ); tet_printf("Reverse direction of animation whilst playing\n"); tet_printf("SetSpeedFactor(-0.5f)\n"); @@ -1518,27 +1518,27 @@ int UtcDaliAnimationSetSpeedFactorP4(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 10% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), 0.0001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), 0.0001, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), initialPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1698,8 +1698,8 @@ int UtcDaliAnimationSetSpeedFactorAndRange(void) unsigned int actorIndex = 0u; for( actorIndex = 0u; actorIndex < NUM_ENTRIES; ++actorIndex ) { - DALI_TEST_EQUALS( actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame], 0.001, TEST_LOCATION ); - if( ! Equals(actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame]) ) + DALI_TEST_EQUALS( actors[actorIndex].GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData[actorIndex].expected[frame], 0.001, TEST_LOCATION ); + if( ! Equals(actors[actorIndex].GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData[actorIndex].expected[frame]) ) { tet_printf("Failed at frame %u, actorIndex %u\n", frame, actorIndex ); } @@ -1785,7 +1785,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount01(void) for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame ) { - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData.expected[frame], 0.001, TEST_LOCATION ); application.Render(200); // 200 ms at half speed corresponds to 0.1 s @@ -1800,7 +1800,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount01(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 80.0f, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, 80.0f, 0.001, TEST_LOCATION ); END_TEST; } @@ -1867,7 +1867,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount02(void) for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame ) { - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData.expected[frame], 0.001, TEST_LOCATION ); application.Render(200); // 200 ms at half speed corresponds to 0.1 s @@ -1882,7 +1882,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount02(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 30.0f, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, 30.0f, 0.001, TEST_LOCATION ); END_TEST; } @@ -1934,14 +1934,14 @@ int UtcDaliAnimationSetPlayRangeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.6f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.6f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 200.0f )/* 80% progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.8f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.8f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds*100.0f ) + 1u/*just beyond the animation duration*/ ); @@ -1949,7 +1949,7 @@ int UtcDaliAnimationSetPlayRangeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.9f ), TEST_LOCATION ); END_TEST; } @@ -2028,7 +2028,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2037,7 +2037,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2046,7 +2046,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2055,7 +2055,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2064,13 +2064,13 @@ int UtcDaliAnimationPlayP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2084,7 +2084,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) Actor actor = Actor::New(); Vector3 basePosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION ); // Not added to the stage yet! // Build the animation @@ -2107,7 +2107,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2118,7 +2118,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); @@ -2129,14 +2129,14 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*back to start position as disconnect behaviour is discard*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*back to start position as disconnect behaviour is discard*/, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2147,7 +2147,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(80,80,80), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(80,80,80), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2155,15 +2155,15 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2177,7 +2177,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) Actor actor = Actor::New(); Vector3 basePosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION ); // Not added to the stage! // Build the animation @@ -2199,7 +2199,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2210,7 +2210,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); @@ -2221,7 +2221,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition /*bake final*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition /*bake final*/, TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2232,7 +2232,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition /*bake final removed the */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition /*bake final removed the */, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2240,14 +2240,14 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2261,7 +2261,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) Actor actor = Actor::New(); Vector3 basePosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION ); // Not added to the stage! // Build the animation @@ -2284,7 +2284,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2295,7 +2295,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); // baked here @@ -2306,18 +2306,18 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40) /*baked value*/, TEST_LOCATION ); // Add back to the stage Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /* animation restarted at 40,40,40 + 80%*60 */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /* animation restarted at 40,40,40 + 80%*60 */, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); // baked here @@ -2325,11 +2325,11 @@ int UtcDaliAnimationPlayOffStageBakeP(void) application.SendNotification(); // this render is a no-op in this case as animator is disabled while off stage application.Render(static_cast(durationSeconds*200.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); // Add back to the stage Stage::GetCurrent().Add(actor); @@ -2337,7 +2337,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) , TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) , TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2345,14 +2345,14 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2387,7 +2387,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); @@ -2395,7 +2395,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); @@ -2403,7 +2403,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); @@ -2411,7 +2411,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2419,13 +2419,13 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2455,7 +2455,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); // This is a test of the "Fire and Forget" behaviour // Stop the animation, and Discard the animation handle! @@ -2470,7 +2470,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); finishCheck.Reset(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); @@ -2478,7 +2478,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // Check that nothing has changed application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); @@ -2486,7 +2486,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // Check that nothing has changed application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 100% progress */); @@ -2494,7 +2494,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // Check that nothing has changed application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); END_TEST; } @@ -2539,7 +2539,7 @@ int UtcDaliAnimationPlayRangeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2548,13 +2548,13 @@ int UtcDaliAnimationPlayRangeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); //Loop inside the range @@ -2574,7 +2574,7 @@ int UtcDaliAnimationPlayRangeP(void) progress = progress - 0.4f; } - DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION ); } // We didn't expect the animation to finish yet @@ -2596,7 +2596,7 @@ int UtcDaliAnimationPlayRangeP(void) progress = progress - 0.7f; } - DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION ); } END_TEST; @@ -2633,7 +2633,7 @@ int UtcDaliAnimationPlayFromP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2642,19 +2642,19 @@ int UtcDaliAnimationPlayFromP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2710,7 +2710,7 @@ int UtcDaliAnimationPauseP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Pause the animation animation.Pause(); @@ -2724,7 +2724,7 @@ int UtcDaliAnimationPauseP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); } // Keep going @@ -2742,13 +2742,13 @@ int UtcDaliAnimationPauseP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2785,7 +2785,7 @@ int UtcDaliAnimationGetStateP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Pause the animation animation.Pause(); @@ -2801,7 +2801,7 @@ int UtcDaliAnimationGetStateP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); DALI_TEST_EQUALS( animation.GetState(), Animation::PAUSED, TEST_LOCATION ); } @@ -2822,14 +2822,14 @@ int UtcDaliAnimationGetStateP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION ); // re-play @@ -2874,7 +2874,7 @@ int UtcDaliAnimationStopP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Stop the animation animation.Stop(); @@ -2888,7 +2888,7 @@ int UtcDaliAnimationStopP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when stopped */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when stopped */, TEST_LOCATION ); } END_TEST; } @@ -2924,7 +2924,7 @@ int UtcDaliAnimationStopSetPositionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Stop the animation animation.Stop(); @@ -2940,7 +2940,7 @@ int UtcDaliAnimationStopSetPositionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), positionSet/*Animation should not interfere with this*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), positionSet/*Animation should not interfere with this*/, TEST_LOCATION ); } END_TEST; } @@ -2973,7 +2973,7 @@ int UtcDaliAnimationClearP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Clear the animation animation.Clear(); @@ -2984,7 +2984,7 @@ int UtcDaliAnimationClearP(void) // We don't expect the animation to finish now application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress since the animator was destroyed */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress since the animator was destroyed */, TEST_LOCATION ); // Restart as a scale animation; this should not move the actor's position finishCheck.Reset(); @@ -2999,16 +2999,16 @@ int UtcDaliAnimationClearP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3(2.0f, 2.0f, 2.0f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -4567,7 +4567,7 @@ int UtcDaliAnimationAnimateByActorPositionP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4594,7 +4594,7 @@ int UtcDaliAnimationAnimateByActorPositionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4602,13 +4602,13 @@ int UtcDaliAnimationAnimateByActorPositionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4618,7 +4618,7 @@ int UtcDaliAnimationAnimateByActorPositionComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4629,7 +4629,7 @@ int UtcDaliAnimationAnimateByActorPositionComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::POSITION_Y ), relativePosition.y ); animation.AnimateBy( Property( actor, Actor::Property::POSITION_Z ), relativePosition.z ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Start the animation @@ -4641,12 +4641,12 @@ int UtcDaliAnimationAnimateByActorPositionComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), targetPosition.y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), targetPosition.z, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4661,7 +4661,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4687,7 +4687,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector3 current(actor.GetCurrentPosition()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); DALI_TEST_CHECK( current.x > ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y > ninetyFivePercentProgress.y ); DALI_TEST_CHECK( current.z > ninetyFivePercentProgress.z ); @@ -4698,13 +4698,13 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4718,7 +4718,7 @@ int UtcDaliAnimationAnimateByActorPositionTimePeriodP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4745,7 +4745,7 @@ int UtcDaliAnimationAnimateByActorPositionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -4753,13 +4753,13 @@ int UtcDaliAnimationAnimateByActorPositionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4773,7 +4773,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4801,7 +4801,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -4809,13 +4809,13 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4826,7 +4826,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4851,7 +4851,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -4859,7 +4859,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -4867,7 +4867,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4875,7 +4875,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -4888,7 +4888,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4911,7 +4911,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -4919,7 +4919,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -4927,7 +4927,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4935,7 +4935,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -4949,7 +4949,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4974,7 +4974,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -4982,7 +4982,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -4990,7 +4990,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4998,8 +4998,8 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -5011,7 +5011,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5033,7 +5033,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -5041,7 +5041,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -5049,7 +5049,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5057,7 +5057,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -5068,7 +5068,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5093,7 +5093,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); float progress = max(0.0f, 0.25f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -5102,7 +5102,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.5f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -5111,7 +5111,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.75f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5119,7 +5119,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -5129,7 +5129,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5156,7 +5156,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -5164,14 +5164,14 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -5187,7 +5187,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) finishCheck.CheckSignalNotReceived(); // The scale should have grown less, than with a linear alpha function - Vector3 current(actor.GetCurrentScale()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); DALI_TEST_CHECK( current.x > 1.0f ); DALI_TEST_CHECK( current.y > 1.0f ); DALI_TEST_CHECK( current.z > 1.0f ); @@ -5201,14 +5201,14 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -5223,7 +5223,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -5231,7 +5231,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -5241,7 +5241,7 @@ int UtcDaliAnimationAnimateByActorScaleComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5252,7 +5252,7 @@ int UtcDaliAnimationAnimateByActorScaleComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::SCALE_Y ), relativeScale.y ); animation.AnimateBy( Property( actor, Actor::Property::SCALE_Z ), relativeScale.z ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Start the animation @@ -5264,12 +5264,12 @@ int UtcDaliAnimationAnimateByActorScaleComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Y ), targetScale.y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Z ), targetScale.z, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -5280,7 +5280,7 @@ int UtcDaliAnimationAnimateByActorColorP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5289,7 +5289,7 @@ int UtcDaliAnimationAnimateByActorColorP(void) Vector4 relativeColor( targetColor - Color::WHITE ); animation.AnimateBy( Property( actor, Actor::Property::COLOR ), relativeColor ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Start the animation @@ -5302,12 +5302,12 @@ int UtcDaliAnimationAnimateByActorColorP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); END_TEST; } @@ -5318,7 +5318,7 @@ int UtcDaliAnimationAnimateByActorColorComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5330,7 +5330,7 @@ int UtcDaliAnimationAnimateByActorColorComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::COLOR_BLUE ), relativeColor.b ); animation.AnimateBy( Property( actor, Actor::Property::COLOR_ALPHA ), relativeColor.a ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Start the animation @@ -5343,12 +5343,12 @@ int UtcDaliAnimationAnimateByActorColorComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); END_TEST; } @@ -5359,7 +5359,7 @@ int UtcDaliAnimationAnimateByActorSizeP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5368,7 +5368,7 @@ int UtcDaliAnimationAnimateByActorSizeP(void) Vector3 relativeSize( targetSize - Vector3::ZERO ); animation.AnimateBy( Property( actor, Actor::Property::SIZE ), relativeSize ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Start the animation @@ -5380,12 +5380,12 @@ int UtcDaliAnimationAnimateByActorSizeP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); END_TEST; } @@ -5396,7 +5396,7 @@ int UtcDaliAnimationAnimateByActorSizeComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5407,7 +5407,7 @@ int UtcDaliAnimationAnimateByActorSizeComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::SIZE_HEIGHT ), relativeSize.height ); animation.AnimateBy( Property( actor, Actor::Property::SIZE_DEPTH ), relativeSize.depth ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Start the animation @@ -5419,12 +5419,12 @@ int UtcDaliAnimationAnimateByActorSizeComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); END_TEST; } @@ -5435,14 +5435,14 @@ int UtcDaliAnimationAnimateByActorVisibilityP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5458,12 +5458,12 @@ int UtcDaliAnimationAnimateByActorVisibilityP(void) // Target value should be retrievable straight away DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), targetVisibility, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); END_TEST; } @@ -6886,7 +6886,7 @@ int UtcDaliAnimationAnimateToActorParentOriginP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -6908,7 +6908,7 @@ int UtcDaliAnimationAnimateToActorParentOriginXN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::PARENT_ORIGIN_X), startValue, TEST_LOCATION ); // Build the animation @@ -6931,7 +6931,7 @@ int UtcDaliAnimationAnimateToActorParentOriginYN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::PARENT_ORIGIN_Y), startValue, TEST_LOCATION ); // Build the animation @@ -6954,7 +6954,7 @@ int UtcDaliAnimationAnimateToActorParentOriginZN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::PARENT_ORIGIN_Z), startValue, TEST_LOCATION ); // Build the animation @@ -6976,7 +6976,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), AnchorPoint::CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -6998,7 +6998,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointXN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::ANCHOR_POINT_X), startValue, TEST_LOCATION ); // Build the animation @@ -7021,7 +7021,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointYN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::ANCHOR_POINT_Y), startValue, TEST_LOCATION ); // Build the animation @@ -7044,7 +7044,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointZN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::ANCHOR_POINT_Z), startValue, TEST_LOCATION ); // Build the animation @@ -7066,7 +7066,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7101,7 +7101,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -7109,14 +7109,14 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -7132,7 +7132,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) finishCheck.CheckSignalNotReceived(); // The size should have travelled less, than with a linear alpha function - Vector3 current(actor.GetCurrentSize()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); DALI_TEST_CHECK( current.x > 0.0f ); DALI_TEST_CHECK( current.y > 0.0f ); DALI_TEST_CHECK( current.z > 0.0f ); @@ -7146,14 +7146,14 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -7168,7 +7168,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7176,7 +7176,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); END_TEST; } @@ -7187,7 +7187,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentSize().width, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), startValue, TEST_LOCATION ); // Build the animation @@ -7219,7 +7219,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().width, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7227,7 +7227,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().width, targetWidth, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, targetWidth, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), targetWidth, TEST_LOCATION ); END_TEST; } @@ -7239,7 +7239,7 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentSize().height, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), startValue, TEST_LOCATION ); // Build the animation @@ -7271,7 +7271,7 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().height, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7279,7 +7279,7 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().height, targetHeight, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, targetHeight, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), targetHeight, TEST_LOCATION ); END_TEST; } @@ -7291,7 +7291,7 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentSize().depth, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), startValue, TEST_LOCATION ); // Build the animation @@ -7323,7 +7323,7 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().depth, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7331,7 +7331,7 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().depth, targetDepth, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, targetDepth, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), targetDepth, TEST_LOCATION ); END_TEST; } @@ -7342,7 +7342,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7365,7 +7365,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -7373,14 +7373,14 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -7397,7 +7397,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) finishCheck.CheckSignalNotReceived(); // The size should have travelled less, than with a linear alpha function - Vector3 current(actor.GetCurrentSize()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); DALI_TEST_CHECK( current.x > 0.0f ); DALI_TEST_CHECK( current.y > 0.0f ); DALI_TEST_CHECK( current.x < ninetyNinePercentProgress.x ); @@ -7409,15 +7409,15 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).x, targetSize.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, targetSize.y, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -7433,7 +7433,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7441,8 +7441,8 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).x, targetSize.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, targetSize.y, TEST_LOCATION ); END_TEST; } @@ -7452,7 +7452,7 @@ int UtcDaliAnimationAnimateToActorPositionP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7487,7 +7487,7 @@ int UtcDaliAnimationAnimateToActorPositionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7495,7 +7495,7 @@ int UtcDaliAnimationAnimateToActorPositionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7506,7 +7506,7 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7540,7 +7540,7 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7548,7 +7548,7 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, targetX, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7562,7 +7562,7 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentPosition().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7596,7 +7596,7 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().y, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7604,7 +7604,7 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().y, targetY, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7618,7 +7618,7 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentPosition().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7652,7 +7652,7 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().z, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7660,7 +7660,7 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().z, targetZ, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, targetZ, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetZ, TEST_LOCATION ); @@ -7673,7 +7673,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7698,7 +7698,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved less, than with a linear alpha function - Vector3 current(actor.GetCurrentPosition()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); DALI_TEST_CHECK( current.x > Vector3::ZERO.x ); DALI_TEST_CHECK( current.y > Vector3::ZERO.y ); DALI_TEST_CHECK( current.z > Vector3::ZERO.z ); @@ -7712,7 +7712,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7722,7 +7722,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7748,7 +7748,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */); @@ -7756,7 +7756,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/); @@ -7764,7 +7764,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7774,7 +7774,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7801,7 +7801,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */); @@ -7809,7 +7809,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/); @@ -7817,7 +7817,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7828,7 +7828,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7853,7 +7853,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -7861,7 +7861,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -7869,7 +7869,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7877,7 +7877,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -7888,7 +7888,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7911,7 +7911,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -7919,7 +7919,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -7927,7 +7927,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7935,7 +7935,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -7946,7 +7946,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7968,7 +7968,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -7976,7 +7976,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -7984,7 +7984,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7992,7 +7992,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -8003,7 +8003,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8027,7 +8027,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); float progress = max(0.0f, 0.25f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -8036,7 +8036,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.5f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -8045,7 +8045,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.75f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -8053,7 +8053,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -8064,7 +8064,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8088,7 +8088,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); float progress = max(0.0f, 0.25f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -8097,7 +8097,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.5f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -8106,7 +8106,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.75f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -8114,7 +8114,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -8124,7 +8124,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8153,7 +8153,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -8161,14 +8161,14 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -8184,7 +8184,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) finishCheck.CheckSignalNotReceived(); // The scale should have grown less, than with a linear alpha function - Vector3 current(actor.GetCurrentScale()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); DALI_TEST_CHECK( current.x > 1.0f ); DALI_TEST_CHECK( current.y > 1.0f ); DALI_TEST_CHECK( current.z > 1.0f ); @@ -8198,14 +8198,14 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -8220,7 +8220,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -8228,7 +8228,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -8239,7 +8239,7 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentScale().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); @@ -8272,7 +8272,7 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().x, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8283,7 +8283,7 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().x, targetX, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8297,7 +8297,7 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentScale().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); @@ -8330,7 +8330,7 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().y, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8341,7 +8341,7 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().y, targetY, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8355,7 +8355,7 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentScale().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); @@ -8388,7 +8388,7 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().z, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), fiftyPercentProgress, TEST_LOCATION ); @@ -8399,7 +8399,7 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().z, targetZ, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, targetZ, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), targetZ, TEST_LOCATION ); @@ -8412,7 +8412,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8444,7 +8444,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), tenPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), tenPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*900.0f) + 1u/*just beyond the animation duration*/); @@ -8452,14 +8452,14 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); // Reset everything finishCheck.Reset(); - actor.SetColor(Color::WHITE); + actor.SetProperty( Actor::Property::COLOR,Color::WHITE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -8475,7 +8475,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) finishCheck.CheckSignalNotReceived(); // The color should have changed less, than with a linear alpha function - Vector4 current(actor.GetCurrentColor()); + Vector4 current(actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); DALI_TEST_CHECK( current.x == 1.0f ); // doesn't change DALI_TEST_CHECK( current.y < 1.0f ); DALI_TEST_CHECK( current.y > tenPercentProgress.y ); @@ -8489,14 +8489,14 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); // Reset everything finishCheck.Reset(); - actor.SetColor(Color::WHITE); + actor.SetProperty( Actor::Property::COLOR,Color::WHITE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Repeat with a shorter animator duration float animatorDuration = 0.5f; @@ -8511,7 +8511,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), twentyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), twentyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*400.0f)/* 50% animation progress, 100% animator progress */); @@ -8519,7 +8519,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -8527,7 +8527,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); END_TEST; } @@ -8538,7 +8538,7 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().r, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8573,7 +8573,7 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().r, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8585,7 +8585,7 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().r, targetRed, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, targetRed, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), targetRed, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8600,7 +8600,7 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().g, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8635,7 +8635,7 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().g, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8647,7 +8647,7 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().g, targetGreen, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, targetGreen, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), targetGreen, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8662,7 +8662,7 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().b, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8697,7 +8697,7 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().b, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), fiftyPercentProgress, TEST_LOCATION ); @@ -8709,7 +8709,7 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().b, targetBlue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, targetBlue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION ); @@ -8724,7 +8724,7 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8760,7 +8760,7 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); @@ -8772,7 +8772,7 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, targetAlpha, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, targetAlpha, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); @@ -8957,10 +8957,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8997,7 +8997,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.1f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.1f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 10% progress */); application.SendNotification(); @@ -9005,7 +9005,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.3f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); application.SendNotification(); @@ -9013,7 +9013,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.25f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.25f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.25f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 40% progress */); application.SendNotification(); @@ -9021,7 +9021,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.0f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*400.0f)/* 80% progress */); application.SendNotification(); @@ -9029,7 +9029,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.7f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 90% progress */); application.SendNotification(); @@ -9037,7 +9037,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.8f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)+1/* 100% progress */); application.SendNotification(); @@ -9045,7 +9045,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.9f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -9059,10 +9059,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9096,7 +9096,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.1f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.1f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 10% progress */); application.SendNotification(); @@ -9104,7 +9104,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.36f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.36f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.36f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); application.SendNotification(); @@ -9112,7 +9112,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.21f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.21f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.21f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 40% progress */); application.SendNotification(); @@ -9120,7 +9120,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.0f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*400.0f)/* 80% progress */); application.SendNotification(); @@ -9128,7 +9128,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.7f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 90% progress */); application.SendNotification(); @@ -9136,7 +9136,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.76f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.76f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.76f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)+1/* 100% progress */); application.SendNotification(); @@ -9144,7 +9144,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.9f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -9158,10 +9158,10 @@ int UtcDaliAnimationAnimateBetweenActorColorP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9237,10 +9237,10 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9322,7 +9322,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleP(void) application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9341,7 +9341,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleP(void) animation.Play(); // Final key frame value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); @@ -9353,7 +9353,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleP(void) application.Render(static_cast(durationSeconds*500.0f)+1); application.SendNotification(); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9370,7 +9370,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleCubicP(void) application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9399,7 +9399,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleCubicP(void) application.Render(static_cast(durationSeconds*500.0f)+1); application.SendNotification(); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9416,7 +9416,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01P(void) application.SendNotification(); application.Render(0); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9445,7 +9445,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01P(void) Quaternion check( Radian(Degree(60)), Vector3::ZAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9462,7 +9462,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02P(void) Stage::GetCurrent().Add(actor); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9487,27 +9487,27 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02P(void) finishCheck.CheckSignalNotReceived(); Quaternion check(Radian(Degree(60)), Vector3::XAXIS); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(90)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(101.5)), Vector3(0.5f, 0.5f, 0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::YAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); // We did expect the animation to finish @@ -9527,7 +9527,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01CubicP(void) application.SendNotification(); application.Render(0); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9554,7 +9554,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01CubicP(void) Quaternion check( Radian(Degree(60)), Vector3::ZAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9571,7 +9571,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02CubicP(void) Stage::GetCurrent().Add(actor); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9597,27 +9597,27 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02CubicP(void) finishCheck.CheckSignalNotReceived(); Quaternion check(Radian(Degree(60)), Vector3::XAXIS); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(90)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(101.5)), Vector3(0.5f, 0.5f, 0.0f ) ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::YAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); // We did expect the animation to finish @@ -9631,10 +9631,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9710,10 +9710,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9789,10 +9789,10 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9870,10 +9870,10 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9952,10 +9952,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionTimePeriodP(void) float startValue(1.0f); float delay = 0.5f; Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -10032,10 +10032,10 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicWithDelayP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -10152,36 +10152,36 @@ int UtcDaliAnimationAnimateP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10231,36 +10231,36 @@ int UtcDaliAnimationAnimateAlphaFunctionP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10310,36 +10310,36 @@ int UtcDaliAnimationAnimateTimePeriodP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10389,36 +10389,36 @@ int UtcDaliAnimationAnimateAlphaFunctionTimePeriodP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10429,10 +10429,10 @@ int UtcDaliAnimationShowP(void) TestApplication application; Actor actor = Actor::New(); - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); application.SendNotification(); application.Render(0); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); Stage::GetCurrent().Add(actor); // Start the animation @@ -10451,7 +10451,7 @@ int UtcDaliAnimationShowP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f)/*Should be shown now*/); @@ -10459,7 +10459,7 @@ int UtcDaliAnimationShowP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -10467,7 +10467,7 @@ int UtcDaliAnimationShowP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); END_TEST; } @@ -10476,7 +10476,7 @@ int UtcDaliAnimationHideP(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); Stage::GetCurrent().Add(actor); // Start the animation @@ -10495,7 +10495,7 @@ int UtcDaliAnimationHideP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f)/*Should be hidden now*/); @@ -10503,7 +10503,7 @@ int UtcDaliAnimationHideP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -10511,7 +10511,7 @@ int UtcDaliAnimationHideP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); END_TEST; } @@ -10523,7 +10523,7 @@ int UtcDaliAnimationShowHideAtEndP(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); Stage::GetCurrent().Add(actor); // Start Hide animation @@ -10542,7 +10542,7 @@ int UtcDaliAnimationShowHideAtEndP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); // Start Show animation animation = Animation::New(durationSeconds); @@ -10556,7 +10556,7 @@ int UtcDaliAnimationShowHideAtEndP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); END_TEST; } @@ -10928,7 +10928,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayP(void) //Test GetCurrentProgress return 0.0 as the duration is 0.0 DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION ); - DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); tet_infoline("Set target position in animation without intiating play"); @@ -10956,7 +10956,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPosition.y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPosition.z, TEST_LOCATION ); - tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x ); + tet_printf( "x position at half way point(%f)\n", actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x ); application.Render(2000u); @@ -10993,7 +10993,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsPositionP(void) //Test GetCurrentProgress return 0.0 as the duration is 0.0 DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION ); - DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); tet_infoline("Set target position in animation without intiating play"); @@ -11023,7 +11023,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsPositionP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPositions[2].y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPositions[2].z, TEST_LOCATION ); - tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x ); + tet_printf( "x position at half way point(%f)\n", actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x ); application.Render(2000u); @@ -11170,7 +11170,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); @@ -11192,7 +11192,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(5000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 100.0f, TEST_LOCATION ); @@ -11207,7 +11207,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); @@ -11223,7 +11223,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(5000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 100.0f, TEST_LOCATION ); @@ -11242,7 +11242,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); @@ -11268,7 +11268,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(14000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 145.0f, TEST_LOCATION ); @@ -11284,7 +11284,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); @@ -11304,7 +11304,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(14000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 145.0f, TEST_LOCATION ); @@ -11472,7 +11472,7 @@ int UtcDaliAnimationProgressCallbackP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); tet_infoline( "Animation finished" ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -11507,21 +11507,21 @@ int UtcDaliAnimationPlayAfterP(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 50% animation progress, 0% animator progress */ ); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11529,11 +11529,11 @@ int UtcDaliAnimationPlayAfterP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } tet_printf("Testing that playing after 2 seconds with negative speedfactor\n"); @@ -11563,21 +11563,21 @@ int UtcDaliAnimationPlayAfterP(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 25% animation progress, 50% animator progress */ ); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 50% animation progress, 100% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11585,11 +11585,11 @@ int UtcDaliAnimationPlayAfterP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of Timeperiod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of Timeperiod in seconds // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); } END_TEST; @@ -11631,7 +11631,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move } application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 50% animation progress, 0% animator progress */ ); @@ -11639,14 +11639,14 @@ int UtcDaliAnimationPlayAfterP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) /* 100% progress */ ); @@ -11654,7 +11654,7 @@ int UtcDaliAnimationPlayAfterP2(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } animation.SetLooping(false); @@ -11663,7 +11663,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } tet_printf("Testing that playing after 2 seconds before looping with negative speedfactor\n"); @@ -11699,7 +11699,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. } application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 25% animation progress, 50% animator progress */ ); @@ -11707,14 +11707,14 @@ int UtcDaliAnimationPlayAfterP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 50% animation progress, 100% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f ) /* 100% progress */ ); @@ -11722,7 +11722,7 @@ int UtcDaliAnimationPlayAfterP2(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in second + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in second } animation.SetLooping(false); @@ -11731,7 +11731,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); } END_TEST; @@ -11768,14 +11768,14 @@ int UtcDaliAnimationPlayAfterP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11783,11 +11783,11 @@ int UtcDaliAnimationPlayAfterP3(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -11822,35 +11822,35 @@ int UtcDaliAnimationPlayAfterP4(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of PlayAfter + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of PlayAfter application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 20% animation progress, 0% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 45% animation progress, 0% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 70% animation progress, 40% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.4f ), TEST_LOCATION ); // 40% of animator progress + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.4f ), TEST_LOCATION ); // 40% of animator progress application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 95% animation progress, 90% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION ); // 90% of animator progress + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.9f ), TEST_LOCATION ); // 90% of animator progress application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 50.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11858,11 +11858,11 @@ int UtcDaliAnimationPlayAfterP4(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -11893,7 +11893,7 @@ int UtcDaliAnimationSetLoopingModeP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } // LoopingMode::AUTO_REVERSE @@ -11929,7 +11929,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition, // and arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 100% time progress */ ); @@ -11937,7 +11937,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); } animation.SetLooping( false ); @@ -11947,7 +11947,7 @@ int UtcDaliAnimationSetLoopingModeP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); } // LoopingMode::AUTO_REVERSE in Reverse mode, which begin from the end @@ -11987,7 +11987,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // Setting a negative speed factor is to play the animation in reverse. // So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time, // the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 100% time progress */ ); @@ -11995,7 +11995,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } animation.SetLooping( false ); @@ -12005,7 +12005,7 @@ int UtcDaliAnimationSetLoopingModeP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } END_TEST; @@ -12056,7 +12056,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); // AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition, // and arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); @@ -12074,7 +12074,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); finishCheck.Reset(); } @@ -12122,7 +12122,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) // Setting a negative speed factor is to play the animation in reverse. // So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time, // the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); @@ -12140,7 +12140,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); finishCheck.Reset(); } @@ -12185,13 +12185,13 @@ int UtcDaliAnimationSetLoopingModeP3(void) // AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition, // and arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 0.5f * 1000.0f )/* 100% time progress */ ); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 1.0f * 1000.0f ) + 1u /*just beyond the animation duration*/ ); @@ -12202,7 +12202,7 @@ int UtcDaliAnimationSetLoopingModeP3(void) finishCheck.CheckSignalReceived(); // After all animation finished, arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); finishCheck.Reset(); } @@ -12242,13 +12242,13 @@ int UtcDaliAnimationSetLoopingModeP3(void) // Setting a negative speed factor is to play the animation in reverse. // So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time, // the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 0.5f * 1000.0f )/* 100% time progress */ ); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 1.0f * 1000.0f ) + 1u /*just beyond the animation duration*/ ); @@ -12259,7 +12259,7 @@ int UtcDaliAnimationSetLoopingModeP3(void) finishCheck.CheckSignalReceived(); // After all animation finished, arrives at the target. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); finishCheck.Reset(); } @@ -12328,7 +12328,7 @@ int UtcDaliAnimationProgressSignalConnectionWithoutProgressMarkerP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); tet_infoline( "Animation finished" ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-BaseHandle.cpp b/automated-tests/src/dali/utc-Dali-BaseHandle.cpp index 722cc85..94a5b4b 100644 --- a/automated-tests/src/dali/utc-Dali-BaseHandle.cpp +++ b/automated-tests/src/dali/utc-Dali-BaseHandle.cpp @@ -288,18 +288,18 @@ int UtcDaliBaseHandleStlVector(void) std::stringstream stream; stream << "Actor " << i+1; - actor.SetName(stream.str()); + actor.SetProperty( Actor::Property::NAME,stream.str()); myVector.push_back(actor); } DALI_TEST_EQUALS(TargetVectorSize, static_cast(myVector.size()), TEST_LOCATION); - DALI_TEST_CHECK(myVector[0].GetName() == "Actor 1"); - DALI_TEST_CHECK(myVector[1].GetName() == "Actor 2"); - DALI_TEST_CHECK(myVector[2].GetName() == "Actor 3"); - DALI_TEST_CHECK(myVector[3].GetName() == "Actor 4"); - DALI_TEST_CHECK(myVector[4].GetName() == "Actor 5"); + DALI_TEST_CHECK(myVector[0].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 1"); + DALI_TEST_CHECK(myVector[1].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 2"); + DALI_TEST_CHECK(myVector[2].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 3"); + DALI_TEST_CHECK(myVector[3].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 4"); + DALI_TEST_CHECK(myVector[4].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 5"); END_TEST; } @@ -318,8 +318,8 @@ int UtcDaliBaseHandleDoAction(void) DALI_TEST_CHECK(actorObject.DoAction("invalidCommand", attributes) == false); // Check that the actor is visible - actor.SetVisible(true); - DALI_TEST_CHECK(actor.IsVisible() == true); + actor.SetProperty( Actor::Property::VISIBLE,true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); // Check the actor performed an action to hide itself DALI_TEST_CHECK(actorObject.DoAction("hide", attributes) == true); @@ -329,7 +329,7 @@ int UtcDaliBaseHandleDoAction(void) application.Render(); // Check that the actor is now invisible - DALI_TEST_CHECK(actor.IsVisible() == false); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); // Check the actor performed an action to show itself DALI_TEST_CHECK(actorObject.DoAction("show", attributes) == true); @@ -339,7 +339,7 @@ int UtcDaliBaseHandleDoAction(void) application.Render(); // Check that the actor is now visible - DALI_TEST_CHECK(actor.IsVisible() == true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); Stage::GetCurrent().Add(actor); @@ -390,7 +390,7 @@ int UtcDaliBaseHandleDoAction(void) // We expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // play again signalReceived = false; @@ -418,8 +418,8 @@ int UtcDaliBaseHandleConnectSignal(void) // get the root layer Actor actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.SetPosition( 240, 400 ); actor.SetSize( 100, 100 ); diff --git a/automated-tests/src/dali/utc-Dali-BufferImage.cpp b/automated-tests/src/dali/utc-Dali-BufferImage.cpp index 28c2168..381499e 100644 --- a/automated-tests/src/dali/utc-Dali-BufferImage.cpp +++ b/automated-tests/src/dali/utc-Dali-BufferImage.cpp @@ -248,7 +248,7 @@ int UtcDaliBufferImageUpdate01(void) BufferImage image = BufferImage::New(buffer, 16, 16, Pixel::A8); Actor actor = CreateRenderableActor( image ); Stage::GetCurrent().Add(actor); - actor.SetVisible(true); + actor.SetProperty( Actor::Property::VISIBLE,true); std::vector ids; ids.push_back(200); @@ -293,7 +293,7 @@ int UtcDaliBufferImageUpdate02(void) BufferImage image = BufferImage::New(buffer, 16, 16, Pixel::A8); Actor actor = CreateRenderableActor( image ); Stage::GetCurrent().Add(actor); - actor.SetVisible(true); + actor.SetProperty( Actor::Property::VISIBLE,true); application.SendNotification(); application.Render(0); diff --git a/automated-tests/src/dali/utc-Dali-CameraActor.cpp b/automated-tests/src/dali/utc-Dali-CameraActor.cpp index 85d6465..26fe3c0 100644 --- a/automated-tests/src/dali/utc-Dali-CameraActor.cpp +++ b/automated-tests/src/dali/utc-Dali-CameraActor.cpp @@ -910,7 +910,7 @@ int UtcDaliCameraActorSetOrthographicProjectionP1(void) actor.GetProperty( CameraActor::Property::FIELD_OF_VIEW ).Get( defaultFieldOfView ); actor.GetProperty( CameraActor::Property::NEAR_PLANE_DISTANCE ).Get( defaultNearPlaneDistance ); actor.GetProperty( CameraActor::Property::FAR_PLANE_DISTANCE ).Get( defaultFarPlaneDistance ); - Vector3 defaultPos = actor.GetCurrentPosition(); + Vector3 defaultPos = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); actor.SetOrthographicProjection( Size( 1080.0f, 1920.0f ) ); @@ -938,7 +938,7 @@ int UtcDaliCameraActorSetOrthographicProjectionP1(void) actor.GetProperty( CameraActor::Property::BOTTOM_PLANE_DISTANCE ).Get( value ); DALI_TEST_EQUALS( -960.0f, value, FLOAT_EPSILON, TEST_LOCATION ); - Vector3 pos = actor.GetCurrentPosition(); + Vector3 pos = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); DALI_TEST_EQUALS( defaultPos.z, pos.z, 0.001f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION ); @@ -1467,7 +1467,7 @@ int UtcDaliCameraActorModelView(void) Actor actor = CreateRenderableActor(image); actor.SetSize( 100.0f, 100.0f ); actor.SetPosition( 20.0f, 30.0f, 40.0f ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -1476,7 +1476,7 @@ int UtcDaliCameraActorModelView(void) application.SendNotification(); Matrix resultMatrix( true ); - resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentPosition() ); + resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) ); RenderTask task = Stage::GetCurrent().GetRenderTaskList().GetTask( 0 ); CameraActor cameraActor = task.GetCameraActor(); @@ -1552,7 +1552,7 @@ int UtcDaliCameraActorAnimatedProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 200.0f, 300.0f ), TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 200.0f, 300.0f ), TEST_LOCATION); END_TEST; } @@ -1576,12 +1576,12 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews01(void) Vector2 stageSize = stage.GetSize(); CameraActor freeLookCameraActor = CameraActor::New( stageSize ); - freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); freeLookCameraActor.SetType( Camera::FREE_LOOK ); Vector3 targetPosition( 30.0f, 240.0f, -256.0f ); Actor target = Actor::New(); - target.SetParentOrigin( ParentOrigin::CENTER ); + target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); target.SetPosition( targetPosition ); Constraint cameraOrientationConstraint = Constraint::New ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt ); @@ -1593,7 +1593,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews01(void) CameraActor lookAtCameraActor = CameraActor::New( stageSize ); lookAtCameraActor.SetType( Camera::LOOK_AT_TARGET ); lookAtCameraActor.SetTargetPosition( targetPosition ); - lookAtCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + lookAtCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.Add( target ); stage.Add( freeLookCameraActor ); @@ -1636,12 +1636,12 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void) Vector2 stageSize = stage.GetSize(); CameraActor freeLookCameraActor = CameraActor::New( stageSize ); - freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); freeLookCameraActor.SetType( Camera::FREE_LOOK ); Vector3 targetPosition( 30.0f, 240.0f, -256.0f ); Actor target = Actor::New(); - target.SetParentOrigin( ParentOrigin::CENTER ); + target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); target.SetPosition( targetPosition ); Constraint cameraOrientationConstraint = Constraint::New ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt ); @@ -1653,7 +1653,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void) CameraActor lookAtCameraActor = CameraActor::New( stageSize ); lookAtCameraActor.SetType( Camera::LOOK_AT_TARGET ); lookAtCameraActor.SetTargetPosition( targetPosition ); - lookAtCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + lookAtCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.Add( target ); stage.Add( freeLookCameraActor ); @@ -1681,7 +1681,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void) Matrix freeLookViewMatrix; freeLookCameraActor.GetProperty( CameraActor::CameraActor::Property::VIEW_MATRIX ).Get( freeLookViewMatrix ); - Matrix freeLookWorld = freeLookCameraActor.GetCurrentWorldMatrix(); + Matrix freeLookWorld = freeLookCameraActor.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ); Matrix freeLookTest( false ); Matrix::Multiply( freeLookTest, freeLookViewMatrix, freeLookWorld ); @@ -1704,7 +1704,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews03(void) CameraActor freeLookCameraActor = CameraActor::New( stageSize ); freeLookCameraActor.SetType( Camera::FREE_LOOK ); - freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Quaternion cameraOrientation( Radian( Degree( 180.0f ) ), Vector3::YAXIS ); freeLookCameraActor.SetPosition( cameraOffset ); @@ -1730,7 +1730,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews03(void) Matrix freeLookViewMatrix; freeLookCameraActor.GetProperty( CameraActor::CameraActor::Property::VIEW_MATRIX ).Get( freeLookViewMatrix ); - Matrix freeLookWorld = freeLookCameraActor.GetCurrentWorldMatrix(); + Matrix freeLookWorld = freeLookCameraActor.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ); Matrix freeLookTest( false ); Matrix::Multiply( freeLookTest, freeLookViewMatrix, freeLookWorld ); diff --git a/automated-tests/src/dali/utc-Dali-Constrainer.cpp b/automated-tests/src/dali/utc-Dali-Constrainer.cpp index 30a006a..30d5388 100644 --- a/automated-tests/src/dali/utc-Dali-Constrainer.cpp +++ b/automated-tests/src/dali/utc-Dali-Constrainer.cpp @@ -124,31 +124,31 @@ int UtcPathConstrainerApply(void) Vector3 position, tangent; path.Sample(0.2f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); path.Sample(0.4f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); path.Sample(0.6f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); path.Sample(0.8f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 100% progress */); path.Sample(1.0f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); END_TEST; } @@ -191,7 +191,7 @@ int UtcPathConstrainerApplyRange(void) actor.GetCurrentProperty( index ).Get(tValue); float currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -199,34 +199,34 @@ int UtcPathConstrainerApplyRange(void) currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); path.Sample(0.5, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); actor.GetCurrentProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); actor.GetCurrentProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); actor.GetCurrentProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); // Ensure GetProperty also returns the final result actor.GetProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); END_TEST; } @@ -261,7 +261,7 @@ int UtcPathConstrainerDestroy(void) Vector3 position, tangent; path.Sample(0.5f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); } @@ -270,7 +270,7 @@ int UtcPathConstrainerDestroy(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); END_TEST; } @@ -304,7 +304,7 @@ int UtcPathConstrainerRemove(void) Vector3 position, tangent; path.Sample(0.5f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); //Remove constraint pathConstrainer.Remove( actor ); @@ -312,7 +312,7 @@ int UtcPathConstrainerRemove(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); END_TEST; } @@ -453,23 +453,23 @@ int UtcLinearConstrainerApply(void) application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); //Setup a LinearConstrainer specifying the progress for each value linearConstrainer.Remove(actor); @@ -481,23 +481,23 @@ int UtcLinearConstrainerApply(void) application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 2.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 2.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } @@ -530,23 +530,23 @@ int UtcLinearConstrainerApplyRange(void) application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } @@ -575,7 +575,7 @@ int UtcLinearConstrainerDestroy(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); } @@ -584,7 +584,7 @@ int UtcLinearConstrainerDestroy(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } @@ -612,7 +612,7 @@ int UtcLinearConstrainerRemove(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); //Remove constraint linearConstrainer.Remove( actor ); @@ -620,7 +620,7 @@ int UtcLinearConstrainerRemove(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-Constraint.cpp b/automated-tests/src/dali/utc-Dali-Constraint.cpp index f8f8ac5..b741255 100644 --- a/automated-tests/src/dali/utc-Dali-Constraint.cpp +++ b/automated-tests/src/dali/utc-Dali-Constraint.cpp @@ -768,7 +768,7 @@ int UtcDaliConstraintBakeRemoveAction(void) // Should not equal position by default Vector3 position( 10.0f, 20.0f, 30.0f ); - DALI_TEST_CHECK( actor.GetCurrentPosition() != position ); + DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position ); // Create a constraint that constrains to position Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, SetValueFunctor< Vector3 >( position ) ); @@ -778,7 +778,7 @@ int UtcDaliConstraintBakeRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); // Remove the constraint, it should still be at position constraint.Remove(); @@ -786,7 +786,7 @@ int UtcDaliConstraintBakeRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); END_TEST; } @@ -804,11 +804,11 @@ int UtcDaliConstraintDiscardRemoveAction(void) application.Render(); // Get and store current position - Vector3 originalPosition = actor.GetCurrentPosition(); + Vector3 originalPosition = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); // Should not equal position by default Vector3 position( 10.0f, 20.0f, 30.0f ); - DALI_TEST_CHECK( actor.GetCurrentPosition() != position ); + DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position ); // Create a constraint that constrains to position Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, SetValueFunctor< Vector3 >( position ) ); @@ -818,7 +818,7 @@ int UtcDaliConstraintDiscardRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); // Remove the constraint, it should still be at position constraint.Remove(); @@ -826,8 +826,8 @@ int UtcDaliConstraintDiscardRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), originalPosition, TEST_LOCATION ); - DALI_TEST_CHECK( actor.GetCurrentPosition() != position ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), originalPosition, TEST_LOCATION ); + DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position ); END_TEST; } @@ -1258,7 +1258,7 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check initial value is fully opaque application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Create a constraint whose value is discarded when it is removed Constraint constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, SetHalfOpacity ); @@ -1268,12 +1268,12 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check value after one render, it should be constrained application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Render another frame, ensure the other value has also been updated application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Remove the actor from the stage and delete the constraint actor.Unparent(); @@ -1283,7 +1283,7 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check value while off-stage, it should be fully opaque application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Add the actor back to the stage and check the value, it should be fully opaque again Stage::GetCurrent().Add( actor ); @@ -1291,12 +1291,12 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check value when back on-stage, it should be fully opaque as the constraint is no longer applied to it. application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Render for another frame to ensure both buffers have the correct value application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); END_TEST; } @@ -1313,7 +1313,7 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void) // Check initial value is fully opaque application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Create a constraint whose value is discarded when it is removed Constraint constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, SetHalfOpacity ); @@ -1323,12 +1323,12 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void) // Check value after one render, it should be constrained application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Render another frame, ensure the other value has also been updated application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Remove the actor from the stage actor.Unparent(); @@ -1336,23 +1336,23 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void) // Check value while off-stage, the constraint is no longer being applied as it's off-stage application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Check the other buffer, the constraint should not be applied to this either. application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Add the actor back to the stage and check the value, the constraint should have been re-applied Stage::GetCurrent().Add( actor ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Render for another frame to ensure both buffers have the correct value application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-Constraints.cpp b/automated-tests/src/dali/utc-Dali-Constraints.cpp index 06c8a2e..9e0dfd2 100644 --- a/automated-tests/src/dali/utc-Dali-Constraints.cpp +++ b/automated-tests/src/dali/utc-Dali-Constraints.cpp @@ -333,7 +333,7 @@ int UtcDaliConstraintsLookAt(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_EQUALS( actor.GetCurrentWorldOrientation(), Quaternion::IDENTITY, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion::IDENTITY, TEST_LOCATION ); Vector3 targetPosition; Vector3 cameraPosition; diff --git a/automated-tests/src/dali/utc-Dali-Context.cpp b/automated-tests/src/dali/utc-Dali-Context.cpp index 0b8e151..1a6f094 100644 --- a/automated-tests/src/dali/utc-Dali-Context.cpp +++ b/automated-tests/src/dali/utc-Dali-Context.cpp @@ -48,7 +48,7 @@ static Actor CreateBitmapActor() BufferImage image = BufferImage::New(4,4,Pixel::RGBA8888); Actor actor = CreateRenderableActor( image ); actor.SetSize( 100.0f, 100.0f ); - actor.SetName("Test Image Rendering Actor"); + actor.SetProperty( Actor::Property::NAME,"Test Image Rendering Actor"); return actor; } diff --git a/automated-tests/src/dali/utc-Dali-CustomActor.cpp b/automated-tests/src/dali/utc-Dali-CustomActor.cpp index ce6d317..e109d49 100644 --- a/automated-tests/src/dali/utc-Dali-CustomActor.cpp +++ b/automated-tests/src/dali/utc-Dali-CustomActor.cpp @@ -159,70 +159,83 @@ int UtcDaliCustomActorOnStageConnectionOrder(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); Test::TestCustomActor actorC = Test::TestCustomActor::New(); - actorC.SetName( "ActorC" ); + actorC.SetProperty( Actor::Property::NAME, "ActorC" ); actorA.Add( actorC ); Test::TestCustomActor actorD = Test::TestCustomActor::New(); - actorD.SetName( "ActorD" ); + actorD.SetProperty( Actor::Property::NAME, "ActorD" ); actorB.Add( actorD ); Test::TestCustomActor actorE = Test::TestCustomActor::New(); - actorE.SetName( "ActorE" ); + actorE.SetProperty( Actor::Property::NAME, "ActorE" ); actorB.Add( actorE ); Test::TestCustomActor actorF = Test::TestCustomActor::New(); - actorF.SetName( "ActorF" ); + actorF.SetProperty( Actor::Property::NAME, "ActorF" ); actorC.Add( actorF ); // add the custom actor to stage Stage::GetCurrent().Add( actorA ); - DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 2, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorC.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorC.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 3, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorC.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorC.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorC.GetMethodsCalled()[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorD.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorD.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorD.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorD.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorD.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorE.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorE.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorE.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorE.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorE.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorF.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorF.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorF.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorF.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorF.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // Check sequence is correct in MasterCallStack - DALI_TEST_EQUALS( 3+3+2+1+1+1, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 4+4+3+2+2+2, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorC: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorD: OnPropertySet", MasterCallStack[ 5 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 5 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 6 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorD: OnStageConnection", MasterCallStack[ 7 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorE: OnStageConnection", MasterCallStack[ 8 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorC: OnStageConnection", MasterCallStack[ 9 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorF: OnStageConnection", MasterCallStack[ 10 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorE: OnPropertySet", MasterCallStack[ 7 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 8 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorF: OnPropertySet", MasterCallStack[ 9 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnChildAdd", MasterCallStack[ 10 ], TEST_LOCATION ); + + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 11 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 12 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorD: OnStageConnection", MasterCallStack[ 13 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorE: OnStageConnection", MasterCallStack[ 14 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnStageConnection", MasterCallStack[ 15 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorF: OnStageConnection", MasterCallStack[ 16 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -251,27 +264,27 @@ int UtcDaliCustomActorOnStageDisconnectionOrder(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); Test::TestCustomActor actorC = Test::TestCustomActor::New(); - actorC.SetName( "ActorC" ); + actorC.SetProperty( Actor::Property::NAME, "ActorC" ); actorA.Add( actorC ); Test::TestCustomActor actorD = Test::TestCustomActor::New(); - actorD.SetName( "ActorD" ); + actorD.SetProperty( Actor::Property::NAME, "ActorD" ); actorB.Add( actorD ); Test::TestCustomActor actorE = Test::TestCustomActor::New(); - actorE.SetName( "ActorE" ); + actorE.SetProperty( Actor::Property::NAME, "ActorE" ); actorB.Add( actorE ); Test::TestCustomActor actorF = Test::TestCustomActor::New(); - actorF.SetName( "ActorF" ); + actorF.SetProperty( Actor::Property::NAME, "ActorF" ); actorC.Add( actorF ); // Excercise the message passing to Update thread @@ -342,26 +355,30 @@ int UtcDaliCustomActorAddDuringOnStageConnection(void) */ Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant1( actorB ); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // Called from within OnStageConnection() + DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // Called from within OnStageConnection() - DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 3, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 5, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); // Occurs during Actor::Add from within from within OnStageConnection() - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); // Occurs after Actor::Add from within from within OnStageConnection() + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); // Occurs during Actor::Add from within from within OnStageConnection() + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); // Occurs after Actor::Add from within from within OnStageConnection() // Excercise the message passing to Update thread @@ -392,40 +409,44 @@ int UtcDaliCustomActorRemoveDuringOnStageConnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant2(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); Test::TestCustomActor actorC = Test::TestCustomActor::New(); - actorC.SetName( "ActorC" ); + actorC.SetProperty( Actor::Property::NAME, "ActorC" ); actorA.Add( actorC ); stage.Add( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 5, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 6, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // Called from within OnStageConnection() + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 4 ], TEST_LOCATION ); // Called from within OnStageConnection() + DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 5 ], TEST_LOCATION ); // Called from within OnStageConnection() - DALI_TEST_EQUALS( 5, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 8, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 5 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 7 ], TEST_LOCATION ); /* Actors B & C should be removed before the point where they could receive an OnStageConnection callback * Therefore they shouldn't receive either OnStageConnection or OnStageDisconnection */ - DALI_TEST_EQUALS( 0, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( 0, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 1, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 1, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); // Excercise the message passing to Update thread @@ -454,10 +475,10 @@ int UtcDaliCustomActorAddDuringOnStageDisconnection(void) */ Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant3( actorB ); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); // Excercise the message passing to Update thread @@ -507,11 +528,11 @@ int UtcDaliCustomActorRemoveDuringOnStageDisconnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant4(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); // Excercise the message passing to Update thread @@ -565,30 +586,34 @@ int UtcDaliCustomActorRemoveParentDuringOnStageConnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); Test::TestCustomActor actorB = Test::TestCustomActor::NewVariant5(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); stage.Add( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageDisconnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageDisconnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 4, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageDisconnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageDisconnection", MasterCallStack[ 5 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -613,32 +638,36 @@ int UtcDaliCustomActorAddParentDuringOnStageDisconnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::NewVariant6(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); stage.Remove( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // Disconnect was interrupted, so we should only get one OnStageConnection() for actorB - DALI_TEST_EQUALS( 4, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 5 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -686,7 +715,7 @@ int UtcDaliCustomActorReparentDuringOnChildAdd(void) stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); // Check hierarchy is as follows: @@ -704,7 +733,7 @@ int UtcDaliCustomActorReparentDuringOnChildAdd(void) DALI_TEST_CHECK( container ); if ( container ) { - DALI_TEST_EQUALS( "Container", container.GetName(), TEST_LOCATION ); + DALI_TEST_EQUALS( "Container", container.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION ); DALI_TEST_EQUALS( 1, (int)(container.GetChildCount()), TEST_LOCATION ); containerChild = container.GetChildAt(0); } @@ -712,33 +741,37 @@ int UtcDaliCustomActorReparentDuringOnChildAdd(void) DALI_TEST_CHECK( containerChild ); if ( containerChild ) { - DALI_TEST_EQUALS( "ActorB", containerChild.GetName(), TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB", containerChild.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION ); DALI_TEST_EQUALS( 0, (int)(containerChild.GetChildCount()), TEST_LOCATION ); } // Check callback sequence - DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); // The mContainer added to actorA - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // The actorB added to actorA - DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 5, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The mContainer added to actorA + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // The actorB added to actorA + DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 4 ], TEST_LOCATION ); // mContainer will then receive OnChildAdd - DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 7, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 9, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 4 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 5 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 5 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 7 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 8 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -767,15 +800,15 @@ int UtcDaliCustomActorRemoveDuringOnChildRemove(void) */ Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); stage.Add( actorB ); Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant8( actorB ); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Actor childActor = Actor::New(); - childActor.SetName( "Child" ); + childActor.SetProperty( Actor::Property::NAME, "Child" ); // Reparent from actorA to actorB actorA.Add( childActor ); actorB.Add( childActor ); @@ -794,32 +827,36 @@ int UtcDaliCustomActorRemoveDuringOnChildRemove(void) DALI_TEST_CHECK( child ); if ( child ) { - DALI_TEST_EQUALS( "Child", child.GetName(), TEST_LOCATION ); + DALI_TEST_EQUALS( "Child", child.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION ); } // Check callback sequence - DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); // The mContainer added to actorA - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // The actorB added to actorA + DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The mContainer added to actorA + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // The actorB added to actorA // mContainer will then receive OnChildAdd - DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The derived class are always notified, no matter the child is successfully removed or not - DALI_TEST_EQUALS( "OnChildRemove", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildRemove", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 8, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 5 ], TEST_LOCATION ); // The derived class are always notified, no matter the child is successfully removed or not - DALI_TEST_EQUALS( "ActorB: OnChildRemove", MasterCallStack[ 4 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 5 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildRemove", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 7 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -1064,8 +1101,8 @@ int UtcDaliCustomActorDoAction(void) DALI_TEST_CHECK(customActorObject.DoAction("invalidCommand", attributes) == false); // Check that the custom actor is visible - custom.SetVisible(true); - DALI_TEST_CHECK(custom.IsVisible() == true); + custom.SetProperty( Actor::Property::VISIBLE,true); + DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); // Check the custom actor performed an action to hide itself DALI_TEST_CHECK(customActorObject.DoAction("hide", attributes) == true); @@ -1075,7 +1112,7 @@ int UtcDaliCustomActorDoAction(void) application.Render(); // Check that the custom actor is now invisible - DALI_TEST_CHECK(custom.IsVisible() == false); + DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); // Check the custom actor performed an action to show itself DALI_TEST_CHECK(customActorObject.DoAction("show", attributes) == true); @@ -1085,7 +1122,7 @@ int UtcDaliCustomActorDoAction(void) application.Render(); // Check that the custom actor is now visible - DALI_TEST_CHECK(custom.IsVisible() == true); + DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); END_TEST; } @@ -1447,11 +1484,11 @@ int UtcDaliCustomActorSetGetActorPropertyActionSignal(void) auto actorHandle = Actor::New(); DALI_TEST_EQUALS( custom.GetPropertyCount(), actorHandle.GetPropertyCount(), TEST_LOCATION ); - DALI_TEST_EQUALS( custom.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); custom.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); // IsVisible returns scene value - DALI_TEST_EQUALS( custom.IsVisible(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); // should have custom actor typename (as it has not registered itself) DALI_TEST_EQUALS( "CustomActor", custom.GetTypeName(), TEST_LOCATION ); @@ -1469,7 +1506,7 @@ int UtcDaliCustomActorSetGetActorPropertyActionSignal(void) application.Render(1000.f); DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetProperty( Actor::Property::POSITION ).Get(), TEST_LOCATION ); - DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); Dali::WeakHandle weakRef( custom ); // should have actor signals diff --git a/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp b/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp index d854148..85dae6a 100644 --- a/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp +++ b/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp @@ -311,10 +311,10 @@ int UtcDaliFrameCallbackGetters(void) Vector3 scale( 2.0f, 4.0f, 6.0f ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( actorSize ); - actor.SetColor( color ); + actor.SetProperty( Actor::Property::COLOR, color ); actor.SetPosition( position ); actor.SetScale( scale ); @@ -346,8 +346,8 @@ int UtcDaliFrameCallbackSetters(void) Vector2 actorSize( 200, 300 ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( actorSize ); Stage stage = Stage::GetCurrent(); @@ -410,8 +410,8 @@ int UtcDaliFrameCallbackBake(void) Vector2 actorSize( 200, 300 ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( actorSize ); Stage stage = Stage::GetCurrent(); @@ -506,57 +506,57 @@ int UtcDaliFrameCallbackMultipleActors(void) positions['H'] = Vector3( 20.0f, 21.0f, 22.0f ); Actor actorA = Actor::New(); - actorA.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorA.SetSize( sizes['A'] ); actorA.SetPosition( positions['A'] ); stage.Add( actorA ); Actor actorB = Actor::New(); - actorB.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT ); - actorB.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorB.SetSize( sizes['B'] ); actorB.SetPosition( positions['B'] ); actorA.Add( actorB ); Actor actorC = Actor::New(); - actorC.SetParentOrigin( ParentOrigin::BOTTOM_CENTER ); - actorC.SetAnchorPoint( AnchorPoint::TOP_CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); actorC.SetSize( sizes['C'] ); actorC.SetPosition( positions['C'] ); actorB.Add( actorC ); Actor actorD = Actor::New(); - actorD.SetParentOrigin( ParentOrigin::CENTER_RIGHT ); - actorD.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + actorD.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT ); + actorD.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); actorD.SetSize( sizes['D'] ); actorD.SetPosition( positions['D'] ); actorA.Add( actorD ); Actor actorE = Actor::New(); - actorE.SetParentOrigin( ParentOrigin::BOTTOM_LEFT ); - actorE.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); + actorE.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); + actorE.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); actorE.SetSize( sizes['E'] ); actorE.SetPosition( positions['E'] ); stage.Add( actorE ); Actor actorF = Actor::New(); - actorF.SetParentOrigin( ParentOrigin::TOP_CENTER ); - actorF.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER ); + actorF.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); + actorF.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); actorF.SetSize( sizes['F'] ); actorF.SetPosition( positions['F'] ); actorE.Add( actorF ); Actor actorG = Actor::New(); - actorG.SetParentOrigin( ParentOrigin::CENTER_RIGHT ); - actorG.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + actorG.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT ); + actorG.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); actorG.SetSize( sizes['G'] ); actorG.SetPosition( positions['G'] ); actorE.Add( actorG ); Actor actorH = Actor::New(); - actorH.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - actorH.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); + actorH.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + actorH.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); actorH.SetSize( sizes['H'] ); actorH.SetPosition( positions['H'] ); actorG.Add( actorH ); @@ -612,8 +612,8 @@ int UtcDaliFrameCallbackCheckActorNotAdded(void) TestApplication application; Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( 200, 300 ); Stage stage = Stage::GetCurrent(); diff --git a/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp b/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp index b65fe6e..fed4521 100644 --- a/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp +++ b/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp @@ -40,11 +40,11 @@ bool IsActorHittableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType t case Dali::HitTestAlgorithm::CHECK_ACTOR: { // Check whether the actor is visible and not fully transparent. - if( actor.IsVisible() - && actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) + && actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f) // not FULLY_TRANSPARENT { // Check whether the actor has the specific name "HittableActor" - if(actor.GetName() == "HittableActor") + if(actor.GetProperty< std::string >( Actor::Property::NAME ) == "HittableActor") { hittable = true; } @@ -53,7 +53,7 @@ bool IsActorHittableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType t } case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE: { - if( actor.IsVisible() ) // Actor is visible, if not visible then none of its children are visible. + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible. { hittable = true; } @@ -77,9 +77,9 @@ bool DefaultIsActorTouchableFunction(Dali::Actor actor, Dali::HitTestAlgorithm:: { case Dali::HitTestAlgorithm::CHECK_ACTOR: { - if( actor.IsVisible() && - actor.IsSensitive() && - actor.GetCurrentWorldColor().a > 0.01f) + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) && + actor.GetProperty< bool >( Actor::Property::SENSITIVE ) && + actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f) { hittable = true; } @@ -87,8 +87,8 @@ bool DefaultIsActorTouchableFunction(Dali::Actor actor, Dali::HitTestAlgorithm:: } case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE: { - if( actor.IsVisible() && // Actor is visible, if not visible then none of its children are visible. - actor.IsSensitive()) // Actor is sensitive, if insensitive none of its children should be hittable either. + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) && // Actor is visible, if not visible then none of its children are visible. + actor.GetProperty< bool >( Actor::Property::SENSITIVE )) // Actor is sensitive, if insensitive none of its children should be hittable either. { hittable = true; } @@ -116,8 +116,8 @@ int UtcDaliHitTestAlgorithmWithFunctor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - actor.SetName("NonHittableActor"); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::NAME,"NonHittableActor"); stage.Add(actor); // Render and notify @@ -133,7 +133,7 @@ int UtcDaliHitTestAlgorithmWithFunctor(void) Dali::HitTestAlgorithm::HitTest( stage, screenCoordinates, results, IsActorHittableFunction ); DALI_TEST_CHECK( results.actor != actor ); - actor.SetName("HittableActor"); + actor.SetProperty( Actor::Property::NAME,"HittableActor"); results.actor = Actor(); results.actorCoordinates = Vector2::ZERO; @@ -162,16 +162,16 @@ int UtcDaliHitTestAlgorithmOrtho01(void) Vector2 actorSize( stageSize * 0.5f ); // Create two actors with half the size of the stage and set them to be partially overlapping Actor blue = Actor::New(); - blue.SetName( "Blue" ); - blue.SetAnchorPoint( AnchorPoint::CENTER ); - blue.SetParentOrigin( Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); + blue.SetProperty( Actor::Property::NAME, "Blue" ); + blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); blue.SetSize( actorSize ); blue.SetZ(30.0f); Actor green = Actor::New( ); - green.SetName( "Green" ); - green.SetAnchorPoint( AnchorPoint::CENTER ); - green.SetParentOrigin( Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); + green.SetProperty( Actor::Property::NAME, "Green" ); + green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); green.SetSize( actorSize ); // Add the actors to the view @@ -218,16 +218,16 @@ int UtcDaliHitTestAlgorithmOrtho02(void) Vector2 actorSize( stageSize * 0.5f ); // Create two actors with half the size of the stage and set them to be partially overlapping Actor blue = Actor::New(); - blue.SetName( "Blue" ); - blue.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - blue.SetParentOrigin( Vector3(0.2f, 0.2f, 0.5f) ); + blue.SetProperty( Actor::Property::NAME, "Blue" ); + blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.2f, 0.2f, 0.5f) ); blue.SetSize( actorSize ); blue.SetZ(30.0f); Actor green = Actor::New( ); - green.SetName( "Green" ); - green.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - green.SetParentOrigin( Vector3(0.4f, 0.4f, 0.5f) ); + green.SetProperty( Actor::Property::NAME, "Green" ); + green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.4f, 0.4f, 0.5f) ); green.SetSize( actorSize ); // Add the actors to the view @@ -278,30 +278,30 @@ int UtcDaliHitTestAlgorithmClippingActor(void) Stage stage = Stage::GetCurrent(); Actor rootLayer = stage.GetRootLayer(); - rootLayer.SetName( "RootLayer" ); + rootLayer.SetProperty( Actor::Property::NAME, "RootLayer" ); // Create a layer Layer layer = Layer::New(); - layer.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - layer.SetParentOrigin( ParentOrigin::TOP_LEFT ); - layer.SetName( "layer" ); + layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + layer.SetProperty( Actor::Property::NAME, "layer" ); stage.Add( layer ); // Create a clipping actor and add it to the layer. Actor clippingActor = CreateRenderableActor( Dali::BufferImage::WHITE() ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - clippingActor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); clippingActor.SetSize( 50.0f, 50.0f ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); - clippingActor.SetName( "clippingActor" ); + clippingActor.SetProperty( Actor::Property::NAME, "clippingActor" ); layer.Add( clippingActor ); // Create a renderable actor and add it to the clipping actor. Actor childActor = CreateRenderableActor( Dali::BufferImage::WHITE() ); childActor.SetSize( 100.0f, 100.0f ); - childActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - childActor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - childActor.SetName( "childActor" ); + childActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + childActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + childActor.SetProperty( Actor::Property::NAME, "childActor" ); clippingActor.Add( childActor ); // Render and notify @@ -312,12 +312,12 @@ int UtcDaliHitTestAlgorithmClippingActor(void) HitTestAlgorithm::Results results; HitTest( stage, Vector2( 10.0f, 10.0f ), results, &DefaultIsActorTouchableFunction ); DALI_TEST_CHECK( results.actor == childActor ); - tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetName().c_str() : "NULL" ) ); + tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetProperty< std::string >( Actor::Property::NAME ).c_str() : "NULL" ) ); // Hit within childActor but outside of clippingActor, should hit the root-layer instead. HitTest( stage, Vector2( 60.0f, 60.0f ), results, &DefaultIsActorTouchableFunction); DALI_TEST_CHECK( results.actor == rootLayer ); - tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetName().c_str() : "NULL" ) ); + tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetProperty< std::string >( Actor::Property::NAME ).c_str() : "NULL" ) ); END_TEST; } @@ -340,16 +340,16 @@ int UtcDaliHitTestAlgorithmOverlay(void) // Create two actors with half the size of the stage and set them to be partially overlapping Actor blue = Actor::New(); blue.SetDrawMode( DrawMode::OVERLAY_2D ); - blue.SetName( "Blue" ); - blue.SetAnchorPoint( AnchorPoint::CENTER ); - blue.SetParentOrigin( Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); + blue.SetProperty( Actor::Property::NAME, "Blue" ); + blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); blue.SetSize( actorSize ); blue.SetZ(30.0f); Actor green = Actor::New( ); - green.SetName( "Green" ); - green.SetAnchorPoint( AnchorPoint::CENTER ); - green.SetParentOrigin( Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); + green.SetProperty( Actor::Property::NAME, "Green" ); + green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); green.SetSize( actorSize ); // Add the actors to the view diff --git a/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp b/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp index df73182..9e543ac 100644 --- a/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp @@ -137,7 +137,7 @@ int UtcDaliHoverNormalProcessing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -206,8 +206,8 @@ int UtcDaliHoverOutsideCameraNearFarPlanes(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(ParentOrigin::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); stage.Add(actor); // Render and notify @@ -307,7 +307,7 @@ int UtcDaliHoverInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -344,7 +344,7 @@ int UtcDaliHoverParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -444,7 +444,7 @@ int UtcDaliHoverInterruptedParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -521,7 +521,7 @@ int UtcDaliHoverLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -534,7 +534,7 @@ int UtcDaliHoverLeave(void) actor.HoveredSignal().Connect( &application, functor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a started signal application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); @@ -560,7 +560,7 @@ int UtcDaliHoverLeave(void) data.Reset(); // We do not want to listen to leave events anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of actor, no signalling application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -576,7 +576,7 @@ int UtcDaliHoverLeaveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -594,8 +594,8 @@ int UtcDaliHoverLeaveParentConsumer(void) rootActor.HoveredSignal().Connect( &application, rootFunctor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); - rootActor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a started signal application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); @@ -640,7 +640,7 @@ int UtcDaliHoverLeaveParentConsumer(void) rootData.Reset(); // We do not want to listen to leave events of actor anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of root actor, only root signalled Vector2 stageSize( Stage::GetCurrent().GetSize() ); @@ -657,7 +657,7 @@ int UtcDaliHoverActorBecomesInsensitive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -676,7 +676,7 @@ int UtcDaliHoverActorBecomesInsensitive(void) data.Reset(); // Change actor to insensitive - actor.SetSensitive( false ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -693,7 +693,7 @@ int UtcDaliHoverActorBecomesInsensitiveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -729,7 +729,7 @@ int UtcDaliHoverActorBecomesInsensitiveParentConsumer(void) application.Render(); // Make root actor insensitive - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor) application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -750,12 +750,12 @@ int UtcDaliHoverMultipleLayers(void) Layer layer1 ( Layer::New() ); layer1.SetSize(100.0f, 100.0f); - layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer1 ); Actor actor1 ( Actor::New() ); actor1.SetSize( 100.0f, 100.0f ); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor1.SetZ( 1.0f ); // Should hit actor1 in this layer layer1.Add( actor1 ); @@ -774,37 +774,37 @@ int UtcDaliHoverMultipleLayers(void) data.Reset(); // Make layer1 insensitive, nothing should be hit - layer1.SetSensitive( false ); + layer1.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make layer1 sensitive again, again actor1 will be hit - layer1.SetSensitive( true ); + layer1.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.hoveredActor == actor1 ); data.Reset(); // Make rootActor insensitive, nothing should be hit - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make rootActor sensitive - rootActor.SetSensitive( true ); + rootActor.SetProperty( Actor::Property::SENSITIVE, true ); // Add another layer Layer layer2 ( Layer::New() ); layer2.SetSize(100.0f, 100.0f ); - layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2 Stage::GetCurrent().Add( layer2 ); Actor actor2 ( Actor::New() ); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.Add( actor2 ); // Render and notify @@ -822,21 +822,21 @@ int UtcDaliHoverMultipleLayers(void) data.Reset(); // Make layer2 insensitive, should hit actor1 - layer2.SetSensitive( false ); + layer2.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.hoveredActor == actor1 ); data.Reset(); // Make layer2 sensitive again, should hit layer2 - layer2.SetSensitive( true ); + layer2.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); //DALI_TEST_CHECK( data.hoveredActor == layer2 ); // TODO: Uncomment this after removing renderable hack! data.Reset(); // Make layer2 invisible, render and notify - layer2.SetVisible( false ); + layer2.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -847,7 +847,7 @@ int UtcDaliHoverMultipleLayers(void) data.Reset(); // Make rootActor invisible, render and notify - rootActor.SetVisible( false ); + rootActor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -866,7 +866,7 @@ int UtcDaliHoverMultipleRenderTasks(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Create render task @@ -910,12 +910,12 @@ int UtcDaliHoverMultipleRenderTasksWithChildLayer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.Add(layer); // Create render task @@ -964,14 +964,14 @@ int UtcDaliHoverOffscreenRenderTasks(void) // Create a renderable actor to display the FrameBufferImage Actor renderableActor = CreateRenderableActor( frameBufferImage ); - renderableActor.SetParentOrigin(ParentOrigin::CENTER); + renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); renderableActor.SetSize( stageSize.x, stageSize.y ); renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME stage.Add( renderableActor ); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add( actor ); application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects @@ -1011,12 +1011,12 @@ int UtcDaliHoverMultipleRenderableActors(void) Actor parent = CreateRenderableActor(); parent.SetSize( 100.0f, 100.0f ); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(parent); Actor actor = CreateRenderableActor(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1042,7 +1042,7 @@ int UtcDaliHoverActorRemovedInSignal(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1055,7 +1055,7 @@ int UtcDaliHoverActorRemovedInSignal(void) actor.HoveredSignal().Connect( &application, functor ); // Register for leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a started signal application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); @@ -1111,7 +1111,7 @@ int UtcDaliHoverActorSignalNotConsumed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1135,7 +1135,7 @@ int UtcDaliHoverActorUnStaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1173,11 +1173,11 @@ int UtcDaliHoverLeaveActorReadded(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Set actor to receive hover-events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Render and notify application.SendNotification(); @@ -1219,12 +1219,12 @@ int UtcDaliHoverClippingActor(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); stage.Add( actor ); Actor clippingActor = Actor::New(); clippingActor.SetSize( 50.0f, 50.0f ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); stage.Add( clippingActor ); @@ -1232,7 +1232,7 @@ int UtcDaliHoverClippingActor(void) Actor clippingChild = Actor::New(); clippingChild.SetSize( 50.0f, 50.0f ); clippingChild.SetPosition( 25.0f, 25.0f ); - clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.Add( clippingChild ); // Render and notify. diff --git a/automated-tests/src/dali/utc-Dali-Layer.cpp b/automated-tests/src/dali/utc-Dali-Layer.cpp index 9b3e5a4..65abc00 100644 --- a/automated-tests/src/dali/utc-Dali-Layer.cpp +++ b/automated-tests/src/dali/utc-Dali-Layer.cpp @@ -265,9 +265,9 @@ int UtcDaliLayerSetSortFunction(void) Actor actor = CreateRenderableActor( img ); Actor actor2 = CreateRenderableActor( img ); actor.SetSize(1,1); - actor.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent + actor.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent actor2.SetSize(1,1); - actor2.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent + actor2.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent // add to stage Stage::GetCurrent().Add( actor ); @@ -609,8 +609,8 @@ Actor CreateActor( bool withAlpha ) } Actor actor = CreateRenderableActor( bufferImage ); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); return actor; } diff --git a/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp index 2f9773e..1c52e57 100644 --- a/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp @@ -197,7 +197,7 @@ int UtcDaliLongPressGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -278,7 +278,7 @@ int UtcDaliLongPressGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -306,7 +306,7 @@ int UtcDaliLongPressGestureSignalReceptionPositive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -335,7 +335,7 @@ int UtcDaliLongPressGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -390,7 +390,7 @@ int UtcDaliLongPressGestureSignalReceptionActorDestroyedDuringLongPress(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -478,7 +478,7 @@ int UtcDaliLongPressGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -486,8 +486,8 @@ int UtcDaliLongPressGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -533,13 +533,13 @@ int UtcDaliLongPressGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -590,7 +590,7 @@ int UtcDaliLongPressGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -610,7 +610,7 @@ int UtcDaliLongPressGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor becomes invisible - actor should not receive the next long press - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -630,7 +630,7 @@ int UtcDaliLongPressGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -664,7 +664,7 @@ int UtcDaliLongPressGestureSignalReceptionDifferentPossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -723,7 +723,7 @@ int UtcDaliLongPressGesturePossibleCancelled(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -751,7 +751,7 @@ int UtcDaliLongPressGestureDetachAfterStarted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -785,7 +785,7 @@ int UtcDaliLongPressGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -839,14 +839,14 @@ int UtcDaliLongPressGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -919,7 +919,7 @@ int UtcDaliLongPressGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -932,7 +932,7 @@ int UtcDaliLongPressGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -973,7 +973,7 @@ int UtcDaliLongPressGestureSetMinimumHoldingTime(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp index e07f1f6..0611107 100644 --- a/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp @@ -123,7 +123,7 @@ int UtcDaliLongPressGestureRecognizerBasicNoAction(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -155,7 +155,7 @@ int UtcDaliLongPressGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -187,7 +187,7 @@ int UtcDaliLongPressGestureRecognizerTooShortWait(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -219,7 +219,7 @@ int UtcDaliLongPressGestureRecognizerTooFewPoints(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -252,7 +252,7 @@ int UtcDaliLongPressGestureRecognizerTooManyPoints(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -288,7 +288,7 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsMoving(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -328,7 +328,7 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsLongPress(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -362,12 +362,12 @@ int UtcDaliLongPressGestureRecognizerMultipleDetectors(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor2.SetX(100.0f); Stage::GetCurrent().Add(actor2); diff --git a/automated-tests/src/dali/utc-Dali-NativeImage.cpp b/automated-tests/src/dali/utc-Dali-NativeImage.cpp index 089ab4e..94636d7 100644 --- a/automated-tests/src/dali/utc-Dali-NativeImage.cpp +++ b/automated-tests/src/dali/utc-Dali-NativeImage.cpp @@ -167,7 +167,7 @@ int UtcDaliNativeImageTestCreationFailure(void) nativeImageInterface->SetGlExtensionCreateResult( false ); Actor actor = CreateRenderableActor( nativeImage ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( actor ); TestGlAbstraction& gl = application.GetGlAbstraction(); diff --git a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp index dc0a402..3885dc0 100644 --- a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp @@ -256,7 +256,7 @@ int UtcDaliPanGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); detector.Attach(actor); Stage::GetCurrent().Add(actor); @@ -317,7 +317,7 @@ int UtcDaliPanGestureSetMinimumTouchesRequired(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -359,7 +359,7 @@ int UtcDaliPanGestureSetMaximumTouchesRequired(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -403,7 +403,7 @@ int UtcDaliPanGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -443,7 +443,7 @@ int UtcDaliPanGestureSignalReceptionDownMotionLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -518,7 +518,7 @@ int UtcDaliPanGestureSignalReceptionDownMotionUp(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -579,7 +579,7 @@ int UtcDaliPanGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -635,7 +635,7 @@ int UtcDaliPanGestureSignalReceptionDetachWhilePanning(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -690,7 +690,7 @@ int UtcDaliPanGestureSignalReceptionActorDestroyedWhilePanning(void) // is destroyed. Actor tempActor = Actor::New(); tempActor.SetSize(100.0f, 100.0f); - tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(tempActor); detector.Attach(tempActor); @@ -700,7 +700,7 @@ int UtcDaliPanGestureSignalReceptionActorDestroyedWhilePanning(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -810,7 +810,7 @@ int UtcDaliPanGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -818,8 +818,8 @@ int UtcDaliPanGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -873,13 +873,13 @@ int UtcDaliPanGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -936,7 +936,7 @@ int UtcDaliPanGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -965,7 +965,7 @@ int UtcDaliPanGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next pan - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -986,12 +986,12 @@ int UtcDaliPanGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); // Render and notify @@ -1072,7 +1072,7 @@ int UtcDaliPanGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor1 = Actor::New(); actor1.SetSize(100.0f, 100.0f); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor1); SignalData data1; GestureReceivedFunctor functor1(data1); @@ -1082,8 +1082,8 @@ int UtcDaliPanGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); - actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); SignalData data2; GestureReceivedFunctor functor2(data2); @@ -1112,7 +1112,7 @@ int UtcDaliPanGestureSignalReceptionAttachActorAfterDown(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1160,13 +1160,13 @@ int UtcDaliPanGestureSignalReceptionAttachActorAfterDownAfterInitialPanToAnother Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); parent.Add( child ); // Create detector for parent and attach @@ -1232,7 +1232,7 @@ int UtcDaliPanGestureSignalReceptionDifferentPossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1301,7 +1301,7 @@ int UtcDaliPanGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1401,14 +1401,14 @@ int UtcDaliPanGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -1642,12 +1642,12 @@ int UtcDaliPanGestureAngleProcessing(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::TOP_LEFT); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(child); // Render and notify @@ -1775,12 +1775,12 @@ int UtcDaliPanGestureDirectionProcessing(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::TOP_LEFT); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(child); // Render and notify @@ -1890,7 +1890,7 @@ int UtcDaliPanGestureNoPredictionNoSmoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -1953,7 +1953,7 @@ int UtcDaliPanGestureNoPredictionSmoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2017,7 +2017,7 @@ int UtcDaliPanGesturePredictionNoSmoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2080,7 +2080,7 @@ int UtcDaliPanGesturePredictionSmoothing01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2146,7 +2146,7 @@ int UtcDaliPanGesturePredictionSmoothing02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2253,7 +2253,7 @@ int UtcDaliPanGesturePrediction2SmoothingMultiTap01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2327,7 +2327,7 @@ int UtcDaliPanGesturePrediction2SmoothingMultiTap02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2432,7 +2432,7 @@ int UtcDaliPanGesturePrediction2Smoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2527,7 +2527,7 @@ int UtcDaliPanGestureSetProperties(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2591,7 +2591,7 @@ int UtcDaliPanGestureSetPropertiesAlreadyPanning(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2722,7 +2722,7 @@ int UtcDaliPanGestureGetPropertyWithSceneObject(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2758,7 +2758,7 @@ int UtcDaliPanGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2771,7 +2771,7 @@ int UtcDaliPanGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -2811,7 +2811,7 @@ int UtcDaliPanGestureNoTimeDiff(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector diff --git a/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp index 4d9f119..3292daf 100644 --- a/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp @@ -119,7 +119,7 @@ int UtcDaliPanGestureRecognizerBasicNoAction(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -151,7 +151,7 @@ int UtcDaliPanGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -183,7 +183,7 @@ int UtcDaliPanGestureRecognizerBasicInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -215,7 +215,7 @@ int UtcDaliPanGestureRecognizerBasicShortest(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -247,7 +247,7 @@ int UtcDaliPanGestureRecognizerBasicFailToStart(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -279,7 +279,7 @@ int UtcDaliPanGestureRecognizerBasicStationary(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -316,7 +316,7 @@ int UtcDaliPanGestureRecognizerNewParametersFail(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -351,7 +351,7 @@ int UtcDaliPanGestureRecognizerNewParametersSuccess(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -386,7 +386,7 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -422,7 +422,7 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -458,7 +458,7 @@ int UtcDaliPanGestureRecognizerNewParametersNoStart(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -493,7 +493,7 @@ int UtcDaliPanGestureRecognizerNewParametersSlowRelease(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -528,7 +528,7 @@ int UtcDaliPanGestureRecognizerOtherEvent(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -562,7 +562,7 @@ int UtcDaliPanGestureRecognizerSlowMoving(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -600,7 +600,7 @@ int UtcDaliPanGestureRecognizerNewParamsMinNum(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -637,7 +637,7 @@ int UtcDaliPanGestureRecognizerNewParamsMinDistance(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp index 448cecd..6842603 100644 --- a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp @@ -169,7 +169,7 @@ int UtcDaliPinchGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -230,7 +230,7 @@ int UtcDaliPinchGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -272,7 +272,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -333,7 +333,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionUp(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -384,7 +384,7 @@ int UtcDaliPinchGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -435,7 +435,7 @@ int UtcDaliPinchGestureSignalReceptionDetachWhilePinching(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -487,7 +487,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void) // is destroyed. Actor tempActor = Actor::New(); tempActor.SetSize(100.0f, 100.0f); - tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(tempActor); detector.Attach(tempActor); @@ -495,7 +495,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -606,7 +606,7 @@ int UtcDaliPinchGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -614,8 +614,8 @@ int UtcDaliPinchGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -670,13 +670,13 @@ int UtcDaliPinchGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -721,7 +721,7 @@ int UtcDaliPinchGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -747,7 +747,7 @@ int UtcDaliPinchGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next pinch - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -767,12 +767,12 @@ int UtcDaliPinchGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); // Render and notify @@ -846,7 +846,7 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor1 = Actor::New(); actor1.SetSize(100.0f, 100.0f); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor1); SignalData data1; GestureReceivedFunctor functor1(data1); @@ -856,8 +856,8 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); - actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); SignalData data2; GestureReceivedFunctor functor2(data2); @@ -883,7 +883,7 @@ int UtcDaliPinchGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -974,14 +974,14 @@ int UtcDaliPinchGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -1066,7 +1066,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -1079,7 +1079,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); diff --git a/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp index 08ae245..97db383 100644 --- a/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp @@ -119,7 +119,7 @@ int UtcDaliPinchGestureRecognizerBasicNoAction(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -151,7 +151,7 @@ int UtcDaliPinchGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -185,7 +185,7 @@ int UtcDaliPinchGestureRecognizerEndEarly01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -220,7 +220,7 @@ int UtcDaliPinchGestureRecognizerEndEarly02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -256,7 +256,7 @@ int UtcDaliPinchGestureRecognizerRealistic01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -297,7 +297,7 @@ int UtcDaliPinchGestureRecognizerRealistic02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -337,7 +337,7 @@ int UtcDaliPinchGestureRecognizerRealistic03(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -380,12 +380,12 @@ int UtcDaliPinchGestureRecognizerMultipleDetectors(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor2.SetX(100.0f); Stage::GetCurrent().Add(actor2); @@ -447,7 +447,7 @@ int UtcDaliPinchGestureRecognizerShortDistance01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -481,7 +481,7 @@ int UtcDaliPinchGestureRecognizerShortDistance02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -519,7 +519,7 @@ int UtcDaliPinchGestureRecognizerLongDistance01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -554,7 +554,7 @@ int UtcDaliPinchGestureRecognizerLongDistance02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -588,7 +588,7 @@ int UtcDaliPinchGestureRecognizerLongDistance03(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -623,7 +623,7 @@ int UtcDaliPinchGestureRecognizerLongDistance04(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -659,7 +659,7 @@ int UtcDaliPinchGestureRecognizerMinimumTouchEvents(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); // Render and notify @@ -702,7 +702,7 @@ int UtcDaliPinchGestureRecognizerMinimumTouchEventsAfterStart(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp b/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp index 522ddb9..74919df 100644 --- a/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp +++ b/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp @@ -581,7 +581,7 @@ int UtcDaliPropertyNotificationVectorComponentGreaterThan(void) notification.NotifySignal().Connect( &TestCallback ); actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.0f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move right to satisfy XAxis condition @@ -606,7 +606,7 @@ int UtcDaliPropertyNotificationVectorComponentGreaterThan(void) // Change alpha Colour to satisfy w/alpha component condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; @@ -630,7 +630,7 @@ int UtcDaliPropertyNotificationVectorComponentLessThan(void) notification.NotifySignal().Connect( &TestCallback ); actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move left to satisfy XAxis condition @@ -655,7 +655,7 @@ int UtcDaliPropertyNotificationVectorComponentLessThan(void) // Change alpha Colour to satisfy w/alpha component condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.0f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; @@ -680,7 +680,7 @@ int UtcDaliPropertyNotificationVectorComponentInside(void) // set outside all conditions actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move x to inside condition @@ -705,7 +705,7 @@ int UtcDaliPropertyNotificationVectorComponentInside(void) // change alpha to inside condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.5f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.5f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; @@ -730,7 +730,7 @@ int UtcDaliPropertyNotificationVectorComponentOutside(void) // set inside all conditions actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.5f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.5f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move x to outside condition @@ -755,7 +755,7 @@ int UtcDaliPropertyNotificationVectorComponentOutside(void) // change alpha to outside condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-RenderTask.cpp b/automated-tests/src/dali/utc-Dali-RenderTask.cpp index e5ea26b..045e20f 100644 --- a/automated-tests/src/dali/utc-Dali-RenderTask.cpp +++ b/automated-tests/src/dali/utc-Dali-RenderTask.cpp @@ -2001,7 +2001,7 @@ int UtcDaliRenderTaskContinuous02(void) Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg"); Stage::GetCurrent().Add(secondRootActor); - secondRootActor.SetVisible(false); + secondRootActor.SetProperty( Actor::Property::VISIBLE,false); RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true); bool finished = false; @@ -2014,7 +2014,7 @@ int UtcDaliRenderTaskContinuous02(void) application.GetPlatform().ClearReadyResources(); // MAKE SOURCE ACTOR VISIBLE - expect continuous renders to start, no finished signal - secondRootActor.SetVisible(true); + secondRootActor.SetProperty( Actor::Property::VISIBLE,true); application.SendNotification(); // CONTINUE PROCESS/RENDER Input, Expected Input, Expected @@ -2558,7 +2558,7 @@ int UtcDaliRenderTaskFinishInvisibleSourceActor(void) BufferImage image = BufferImage::New( 10, 10 ); Actor rootActor = CreateRenderableActor( image ); rootActor.SetSize( 10, 10 ); - rootActor.SetVisible(false); + rootActor.SetProperty( Actor::Property::VISIBLE,false); Stage::GetCurrent().Add( rootActor ); RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList(); @@ -2678,8 +2678,8 @@ int UtcDaliRenderTaskWorldToViewport(void) actor.SetSize(100.0f, 100.0f); actor.SetPosition( Vector3(0.0, 0.0, 0.0) ); - actor.SetParentOrigin( Vector3(0.5, 0.5, 0.5) ); - actor.SetAnchorPoint( Vector3(0.5, 0.5, 0.5) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.5) ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.5) ); Stage::GetCurrent().Add(actor); @@ -2696,7 +2696,7 @@ int UtcDaliRenderTaskWorldToViewport(void) float screenX = 0.0; float screenY = 0.0; - bool ok = task.WorldToViewport(actor.GetCurrentWorldPosition(), screenX, screenY); + bool ok = task.WorldToViewport(actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), screenX, screenY); DALI_TEST_CHECK(ok == true); DALI_TEST_EQUALS(screenX, screenSize.x/2, Math::MACHINE_EPSILON_10000, TEST_LOCATION); @@ -2706,17 +2706,17 @@ int UtcDaliRenderTaskWorldToViewport(void) float actor2Size = 100.f; actor2.SetSize( actor2Size, actor2Size ); actor2.SetPosition( Vector3(0.0, 0.0, 0.0) ); - actor2.SetParentOrigin( Vector3(0.5, 0.5, 0.0) ); - actor2.SetAnchorPoint( Vector3(0.5, 0.5, 0.0) ); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.0) ); + actor2.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.0) ); Stage::GetCurrent().Add( actor2 ); actor2.Add(actor); - actor.SetParentOrigin( Vector3(0,0,0) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0,0,0) ); application.SendNotification(); application.Render(); application.SendNotification(); - ok = task.WorldToViewport(actor.GetCurrentWorldPosition(), screenX, screenY); + ok = task.WorldToViewport(actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), screenX, screenY); DALI_TEST_CHECK(ok == true); DALI_TEST_EQUALS(screenX, screenSize.x/2 - actor2Size/2, Math::MACHINE_EPSILON_10000, TEST_LOCATION); @@ -2730,7 +2730,7 @@ int UtcDaliRenderTaskViewportToLocal(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.SetSize(100.0f, 100.0f); actor.SetPosition(10.0f, 10.0f); Stage::GetCurrent().Add(actor); @@ -2768,7 +2768,7 @@ int UtcDaliRenderTaskOffscreenViewportToLocal(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( 100.0f, 100.0f ); actor.SetPosition( 10.0f, 10.0f ); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Renderer.cpp b/automated-tests/src/dali/utc-Dali-Renderer.cpp index 3a12e96..47b3c7e 100644 --- a/automated-tests/src/dali/utc-Dali-Renderer.cpp +++ b/automated-tests/src/dali/utc-Dali-Renderer.cpp @@ -454,7 +454,7 @@ int UtcDaliRendererBlendOptions01(void) Actor actor = Actor::New(); // set a transparent actor color so that blending is enabled - actor.SetOpacity( 0.5f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.5f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -499,7 +499,7 @@ int UtcDaliRendererBlendOptions02(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.5f ); // enable blending + actor.SetProperty( DevelActor::Property::OPACITY, 0.5f ); // enable blending actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -570,7 +570,7 @@ int UtcDaliRendererBlendOptions04(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.1f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.1f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -615,7 +615,7 @@ int UtcDaliRendererSetBlendMode01(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.98f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.98f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -647,7 +647,7 @@ int UtcDaliRendererSetBlendMode01b(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.0f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.0f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -682,7 +682,7 @@ int UtcDaliRendererSetBlendMode02(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.15f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.15f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -714,7 +714,7 @@ int UtcDaliRendererSetBlendMode03(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.75f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.75f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -779,7 +779,7 @@ int UtcDaliRendererSetBlendMode04b(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); actor.SetSize(400, 400); - actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); + actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); Stage::GetCurrent().Add(actor); renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO); @@ -811,7 +811,7 @@ int UtcDaliRendererSetBlendMode04c(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); actor.SetSize(400, 400); - actor.SetColor( Color::MAGENTA ); + actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA ); Stage::GetCurrent().Add(actor); renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO); @@ -1044,7 +1044,7 @@ int UtcDaliRendererPreMultipledAlpha(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); actor.SetSize(400, 400); - actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); + actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); Stage::GetCurrent().Add(actor); Property::Value value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA ); @@ -1581,8 +1581,8 @@ Renderer CreateRenderer( Actor actor, Geometry geometry, Shader shader, int dept Actor CreateActor( Actor parent, int siblingOrder, const char* location ) { Actor actor = Actor::New(); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,AnchorPoint::CENTER); actor.SetPosition(0.0f,0.0f); actor.SetSize(100, 100); parent.Add(actor); @@ -2827,7 +2827,7 @@ int UtcDaliRendererOpacity(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); Property::Value value = renderer.GetProperty( DevelRenderer::Property::OPACITY ); @@ -2875,7 +2875,7 @@ int UtcDaliRendererOpacityAnimation(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -2955,7 +2955,7 @@ int UtcDaliRendererRenderingBehavior(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); Property::Value value = renderer.GetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR ); @@ -3023,7 +3023,7 @@ int UtcDaliRendererRegenerateUniformMap(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); diff --git a/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp index 8d27655..5e74c25 100644 --- a/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp @@ -171,7 +171,7 @@ int UtcDaliRotationGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -232,7 +232,7 @@ int UtcDaliRotationGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -274,7 +274,7 @@ int UtcDaliRotationGestureSignalReceptionDownMotionLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -331,7 +331,7 @@ int UtcDaliRotationGestureSignalReceptionDownMotionUp(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -379,7 +379,7 @@ int UtcDaliRotationGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -430,7 +430,7 @@ int UtcDaliRotationGestureSignalReceptionDetachWhileRotationing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -482,7 +482,7 @@ int UtcDaliRotationGestureSignalReceptionActorDestroyedWhileRotationing(void) // is destroyed. Actor tempActor = Actor::New(); tempActor.SetSize(100.0f, 100.0f); - tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(tempActor); detector.Attach(tempActor); @@ -490,7 +490,7 @@ int UtcDaliRotationGestureSignalReceptionActorDestroyedWhileRotationing(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -598,7 +598,7 @@ int UtcDaliRotationGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -606,8 +606,8 @@ int UtcDaliRotationGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -660,13 +660,13 @@ int UtcDaliRotationGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -711,7 +711,7 @@ int UtcDaliRotationGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -737,7 +737,7 @@ int UtcDaliRotationGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next rotation - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -757,12 +757,12 @@ int UtcDaliRotationGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); // Render and notify @@ -836,7 +836,7 @@ int UtcDaliRotationGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor1 = Actor::New(); actor1.SetSize(100.0f, 100.0f); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor1); SignalData data1; GestureReceivedFunctor functor1(data1); @@ -846,8 +846,8 @@ int UtcDaliRotationGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); - actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); SignalData data2; GestureReceivedFunctor functor2(data2); @@ -873,7 +873,7 @@ int UtcDaliRotationGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -964,14 +964,14 @@ int UtcDaliRotationGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -1056,7 +1056,7 @@ int UtcDaliRotationGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -1069,7 +1069,7 @@ int UtcDaliRotationGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); diff --git a/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp index 044fd47..7b4d06b 100644 --- a/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp @@ -116,7 +116,7 @@ int UtcDaliRotationGestureRecognizerMinimumTouchEvents(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -157,7 +157,7 @@ int UtcDaliRotationGestureRecognizerMinimumTouchEventsAfterStart(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); application.SendNotification(); diff --git a/automated-tests/src/dali/utc-Dali-Sampler.cpp b/automated-tests/src/dali/utc-Dali-Sampler.cpp index fb895a1..d403a29 100644 --- a/automated-tests/src/dali/utc-Dali-Sampler.cpp +++ b/automated-tests/src/dali/utc-Dali-Sampler.cpp @@ -133,7 +133,7 @@ int UtcSamplerSetFilterMode(void) renderer.SetTextures( textureSet ); Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); Stage::GetCurrent().Add( actor ); @@ -264,7 +264,7 @@ int UtcSamplerSetWrapMode1(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); Stage::GetCurrent().Add( actor ); @@ -353,7 +353,7 @@ int UtcSamplerSetWrapMode2(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize( 400, 400 ); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Scene.cpp b/automated-tests/src/dali/utc-Dali-Scene.cpp index fd790b9..c2335ed 100644 --- a/automated-tests/src/dali/utc-Dali-Scene.cpp +++ b/automated-tests/src/dali/utc-Dali-Scene.cpp @@ -671,8 +671,8 @@ int UtcDaliSceneTouchSignalP(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); scene.Add( actor ); @@ -794,8 +794,8 @@ int UtcDaliSceneTouchSignalN(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); scene.Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Scripting.cpp b/automated-tests/src/dali/utc-Dali-Scripting.cpp index a4ec104..890dbc6 100644 --- a/automated-tests/src/dali/utc-Dali-Scripting.cpp +++ b/automated-tests/src/dali/utc-Dali-Scripting.cpp @@ -501,18 +501,18 @@ int UtcDaliScriptingNewActorProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentSize(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentPosition(), Vector3::XAXIS, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsVisible(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetName(), "MyActor", TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::XAXIS, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::MAGENTA, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< std::string >( Actor::Property::NAME ), "MyActor", TEST_LOCATION ); DALI_TEST_EQUALS( handle.GetColorMode(), USE_PARENT_COLOR, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsSensitive(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetLeaveRequired(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::SENSITIVE ), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ), true, TEST_LOCATION ); DALI_TEST_EQUALS( handle.GetDrawMode(), DrawMode::OVERLAY_2D, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsOrientationInherited(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsScaleInherited(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_ORIENTATION ), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), false, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); } @@ -528,8 +528,8 @@ int UtcDaliScriptingNewActorProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentParentOrigin(), ParentOrigin::TOP_CENTER, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentAnchorPoint(), AnchorPoint::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::TOP_LEFT, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); } @@ -545,8 +545,8 @@ int UtcDaliScriptingNewActorProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentAnchorPoint(), AnchorPoint::CENTER_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER_LEFT, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); } @@ -572,8 +572,8 @@ int UtcDaliScriptingNewAnimation(void) Scripting::NewAnimation( map, data ); Actor actor = Actor::New(); - actor.SetName("Actor1"); - actor.SetColor(Color::CYAN); + actor.SetProperty( Actor::Property::NAME,"Actor1"); + actor.SetProperty( Actor::Property::COLOR,Color::CYAN); Stage::GetCurrent().Add(actor); Animation anim = data.CreateAnimation( actor, 0.5f ); @@ -584,11 +584,11 @@ int UtcDaliScriptingNewAnimation(void) application.Render(500); // Start animation application.Render(500); // Halfway thru anim application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), (Color::MAGENTA+Color::CYAN)*0.5f, TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), (Color::MAGENTA+Color::CYAN)*0.5f, TEST_LOCATION); application.Render(500); // Halfway thru anim application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::MAGENTA, TEST_LOCATION ); END_TEST; } @@ -617,13 +617,13 @@ int UtcDaliScriptingNewActorChildren(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentPosition(), Vector3::XAXIS, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::XAXIS, TEST_LOCATION ); DALI_TEST_EQUALS( handle.GetChildCount(), 1u, TEST_LOCATION ); Actor child1 = handle.GetChildAt(0); DALI_TEST_CHECK( child1 ); DALI_TEST_CHECK( Layer::DownCast( child1 ) ); - DALI_TEST_EQUALS( child1.GetCurrentPosition(), Vector3::YAXIS, TEST_LOCATION ); + DALI_TEST_EQUALS( child1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::YAXIS, TEST_LOCATION ); DALI_TEST_EQUALS( child1.GetChildCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); @@ -667,15 +667,15 @@ int UtcDaliScriptingCreatePropertyMapActor(void) actor.SetSize( Vector3::ONE ); actor.SetPosition( Vector3::XAXIS ); actor.SetScale( Vector3::ZAXIS ); - actor.SetVisible( false ); - actor.SetColor( Color::MAGENTA ); - actor.SetName( "MyActor" ); - actor.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - actor.SetSensitive( false ); - actor.SetLeaveRequired( true ); - actor.SetInheritOrientation( false ); - actor.SetInheritScale( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); + actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA ); + actor.SetProperty( Actor::Property::NAME, "MyActor" ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + actor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false ); + actor.SetProperty( Actor::Property::INHERIT_SCALE, false ); actor.SetSizeModeFactor( Vector3::ONE ); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Stage.cpp b/automated-tests/src/dali/utc-Dali-Stage.cpp index a3fb8f2..3cf546a 100755 --- a/automated-tests/src/dali/utc-Dali-Stage.cpp +++ b/automated-tests/src/dali/utc-Dali-Stage.cpp @@ -1029,8 +1029,8 @@ int UtcDaliStageTouchedSignalP(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); @@ -1154,8 +1154,8 @@ int UtcDaliStageTouchedSignalN(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); @@ -1244,8 +1244,8 @@ int UtcDaliStageTouchSignalP(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); @@ -1375,8 +1375,8 @@ int UtcDaliStageTouchSignalN(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp index cef34fd..f6fb1be 100644 --- a/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp @@ -178,7 +178,7 @@ int UtcDaliTapGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -243,7 +243,7 @@ int UtcDaliTapGestureSetTapsRequiredMinMaxCheck(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -284,7 +284,7 @@ int UtcDaliTapGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -310,7 +310,7 @@ int UtcDaliTapGestureSignalReceptionPositive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -339,7 +339,7 @@ int UtcDaliTapGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -394,7 +394,7 @@ int UtcDaliTapGestureSignalReceptionActorDestroyedWhileTapping(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -481,7 +481,7 @@ int UtcDaliTapGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -489,8 +489,8 @@ int UtcDaliTapGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -534,13 +534,13 @@ int UtcDaliTapGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -587,7 +587,7 @@ int UtcDaliTapGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -606,7 +606,7 @@ int UtcDaliTapGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next pan - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -625,12 +625,12 @@ int UtcDaliTapGestureSignalReceptionMultipleGestureDetectors(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); second.SetX(100.0f); first.Add(second); @@ -686,7 +686,7 @@ int UtcDaliTapGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -720,7 +720,7 @@ int UtcDaliTapGestureSignalReceptionDifferentPossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -776,7 +776,7 @@ int UtcDaliTapGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -802,7 +802,7 @@ int UtcDaliTapGestureDetectorRemovedWhilePossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -832,7 +832,7 @@ int UtcDaliTapGestureActorRemovedWhilePossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -867,7 +867,7 @@ int UtcDaliTapGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -880,7 +880,7 @@ int UtcDaliTapGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); diff --git a/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp index 6afd4a2..ccdefa3 100644 --- a/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp @@ -117,7 +117,7 @@ int UtcDaliTapGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -150,7 +150,7 @@ int UtcDaliTapGestureRecognizerGapTooLong(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -183,7 +183,7 @@ int UtcDaliTapGestureRecognizerInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -218,7 +218,7 @@ int UtcDaliTapGestureRecognizerMoveTooFar(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -251,7 +251,7 @@ int UtcDaliTapGestureRecognizerStartDouble(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -284,7 +284,7 @@ int UtcDaliTapGestureRecognizerEndDouble(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -319,7 +319,7 @@ int UtcDaliTapGestureRecognizerDoubleTap(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -360,7 +360,7 @@ int UtcDaliTapGestureRecognizerDoubleTapMoveTooFar(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -413,7 +413,7 @@ int UtcDaliTapGestureRecognizerDoubleTapWaitTooLong(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -464,12 +464,12 @@ int UtcDaliTapGestureRecognizerMultipleDetectors(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor2.SetX(100.0f); Stage::GetCurrent().Add(actor2); diff --git a/automated-tests/src/dali/utc-Dali-TextureSet.cpp b/automated-tests/src/dali/utc-Dali-TextureSet.cpp index 3daa753..a8f33fd 100644 --- a/automated-tests/src/dali/utc-Dali-TextureSet.cpp +++ b/automated-tests/src/dali/utc-Dali-TextureSet.cpp @@ -55,7 +55,7 @@ Actor CreateActor( SetSampler setSamplerOption ) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); return actor; @@ -253,7 +253,7 @@ int UtcDaliTextureSetSetSampler(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp index 812a992..4019cbd 100755 --- a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp @@ -301,7 +301,7 @@ int UtcDaliTouchDataNormalProcessing01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -365,7 +365,7 @@ int UtcDaliTouchDataNormalProcessing02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -399,7 +399,7 @@ int UtcDaliTouchDataAPINegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -438,8 +438,8 @@ int UtcDaliTouchDataOutsideCameraNearFarPlanes(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(ParentOrigin::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); stage.Add(actor); // Render and notify @@ -539,7 +539,7 @@ int UtcDaliTouchDataInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -576,7 +576,7 @@ int UtcDaliTouchDataParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -676,7 +676,7 @@ int UtcDaliTouchDataInterruptedParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -755,7 +755,7 @@ int UtcDaliTouchDataLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -768,7 +768,7 @@ int UtcDaliTouchDataLeave(void) actor.TouchSignal().Connect( &application, functor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); @@ -794,7 +794,7 @@ int UtcDaliTouchDataLeave(void) data.Reset(); // We do not want to listen to leave events anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of actor, no signalling application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) ); @@ -810,7 +810,7 @@ int UtcDaliTouchDataLeaveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -828,8 +828,8 @@ int UtcDaliTouchDataLeaveParentConsumer(void) rootActor.TouchSignal().Connect( &application, rootFunctor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); - rootActor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); @@ -874,7 +874,7 @@ int UtcDaliTouchDataLeaveParentConsumer(void) rootData.Reset(); // We do not want to listen to leave events of actor anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of root actor, only root signalled Vector2 stageSize( Stage::GetCurrent().GetSize() ); @@ -891,7 +891,7 @@ int UtcDaliTouchDataActorBecomesInsensitive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -910,7 +910,7 @@ int UtcDaliTouchDataActorBecomesInsensitive(void) data.Reset(); // Change actor to insensitive - actor.SetSensitive( false ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) ); @@ -927,7 +927,7 @@ int UtcDaliTouchDataActorBecomesInsensitiveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -960,7 +960,7 @@ int UtcDaliTouchDataActorBecomesInsensitiveParentConsumer(void) application.Render(); // Make root actor insensitive - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor) application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) ); @@ -982,12 +982,12 @@ int UtcDaliTouchDataMultipleLayers(void) Layer layer1 ( Layer::New() ); layer1.SetSize(100.0f, 100.0f); - layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer1 ); Actor actor1 ( Actor::New() ); actor1.SetSize( 100.0f, 100.0f ); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor1.SetZ( 1.0f ); // Should hit actor1 in this layer layer1.Add( actor1 ); @@ -1006,37 +1006,37 @@ int UtcDaliTouchDataMultipleLayers(void) data.Reset(); // Make layer1 insensitive, nothing should be hit - layer1.SetSensitive( false ); + layer1.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make layer1 sensitive again, again actor1 will be hit - layer1.SetSensitive( true ); + layer1.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make rootActor insensitive, nothing should be hit - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make rootActor sensitive - rootActor.SetSensitive( true ); + rootActor.SetProperty( Actor::Property::SENSITIVE, true ); // Add another layer Layer layer2 ( Layer::New() ); layer2.SetSize(100.0f, 100.0f ); - layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2 Stage::GetCurrent().Add( layer2 ); Actor actor2 ( Actor::New() ); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.Add( actor2 ); // Render and notify @@ -1054,21 +1054,21 @@ int UtcDaliTouchDataMultipleLayers(void) data.Reset(); // Make layer2 insensitive, should hit actor1 - layer2.SetSensitive( false ); + layer2.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make layer2 sensitive again, should hit layer2 - layer2.SetSensitive( true ); + layer2.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); //DALI_TEST_CHECK( data.touchedActor == layer2 ); // TODO: Uncomment this after removing renderable hack! data.Reset(); // Make layer2 invisible, render and notify - layer2.SetVisible( false ); + layer2.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -1079,7 +1079,7 @@ int UtcDaliTouchDataMultipleLayers(void) data.Reset(); // Make rootActor invisible, render and notify - rootActor.SetVisible( false ); + rootActor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -1098,7 +1098,7 @@ int UtcDaliTouchDataMultipleRenderTasks(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Create render task @@ -1142,12 +1142,12 @@ int UtcDaliTouchDataMultipleRenderTasksWithChildLayer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.Add(layer); // Create render task @@ -1196,14 +1196,14 @@ int UtcDaliTouchDataOffscreenRenderTasks(void) // Create a renderable actor to display the FrameBufferImage Actor renderableActor = CreateRenderableActor( frameBufferImage ); - renderableActor.SetParentOrigin(ParentOrigin::CENTER); + renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); renderableActor.SetSize( stageSize.x, stageSize.y ); renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME stage.Add( renderableActor ); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add( actor ); application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects @@ -1243,12 +1243,12 @@ int UtcDaliTouchDataMultipleRenderableActors(void) Actor parent = CreateRenderableActor(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(parent); Actor actor = CreateRenderableActor(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1274,7 +1274,7 @@ int UtcDaliTouchDataActorRemovedInSignal(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1287,7 +1287,7 @@ int UtcDaliTouchDataActorRemovedInSignal(void) actor.TouchSignal().Connect( &application, functor ); // Register for leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); @@ -1343,7 +1343,7 @@ int UtcDaliTouchDataActorSignalNotConsumed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1367,7 +1367,7 @@ int UtcDaliTouchDataActorUnStaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1405,7 +1405,7 @@ int UtcDaliTouchDataLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1420,7 +1420,7 @@ int UtcDaliTouchDataLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -1457,11 +1457,11 @@ int UtcDaliTouchDataLeaveActorReadded(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Set actor to receive touch-events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Render and notify application.SendNotification(); @@ -1503,12 +1503,12 @@ int UtcDaliTouchDataClippedActor(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); stage.Add( actor ); Actor clippingActor = Actor::New(); clippingActor.SetSize( 50.0f, 50.0f ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); stage.Add( clippingActor ); @@ -1516,7 +1516,7 @@ int UtcDaliTouchDataClippedActor(void) Actor clippingChild = Actor::New(); clippingChild.SetSize( 50.0f, 50.0f ); clippingChild.SetPosition( 25.0f, 25.0f ); - clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.Add( clippingChild ); // Render and notify. @@ -1554,7 +1554,7 @@ int UtcDaliTouchDataActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1592,12 +1592,12 @@ int UtcDaliTouchDataParentUnstaged(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1635,12 +1635,12 @@ int UtcDaliTouchDataActorUnstagedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1728,12 +1728,12 @@ int UtcDaliTouchDataInterruptedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1799,7 +1799,7 @@ int UtcDaliTouchDataGetRadius(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1830,7 +1830,7 @@ int UtcDaliTouchDataGetEllipseRadius(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1861,7 +1861,7 @@ int UtcDaliTouchDataGetAngle(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1890,7 +1890,7 @@ int UtcDaliTouchDataGetPressure(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1919,7 +1919,7 @@ int UtcDaliTouchDataAndEventUsage(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1950,7 +1950,7 @@ int UtcDaliTouchDataGetDeviceAPINegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1981,7 +1981,7 @@ int UtcDaliTouchDataGetMouseButtonPositive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -2010,7 +2010,7 @@ int UtcDaliTouchDataGetMouseButtonNagative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp index 2f6d2ba..a139394 100755 --- a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp @@ -138,7 +138,7 @@ int UtcDaliTouchNormalProcessing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -207,8 +207,8 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(ParentOrigin::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); stage.Add(actor); // Render and notify @@ -308,7 +308,7 @@ int UtcDaliTouchInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -345,7 +345,7 @@ int UtcDaliTouchParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -445,7 +445,7 @@ int UtcDaliTouchInterruptedParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -524,7 +524,7 @@ int UtcDaliTouchLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -537,7 +537,7 @@ int UtcDaliTouchLeave(void) actor.TouchedSignal().Connect( &application, functor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); @@ -563,7 +563,7 @@ int UtcDaliTouchLeave(void) data.Reset(); // We do not want to listen to leave events anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of actor, no signalling application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -579,7 +579,7 @@ int UtcDaliTouchLeaveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -597,8 +597,8 @@ int UtcDaliTouchLeaveParentConsumer(void) rootActor.TouchedSignal().Connect( &application, rootFunctor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); - rootActor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); @@ -643,7 +643,7 @@ int UtcDaliTouchLeaveParentConsumer(void) rootData.Reset(); // We do not want to listen to leave events of actor anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of root actor, only root signalled Vector2 stageSize( Stage::GetCurrent().GetSize() ); @@ -660,7 +660,7 @@ int UtcDaliTouchActorBecomesInsensitive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -679,7 +679,7 @@ int UtcDaliTouchActorBecomesInsensitive(void) data.Reset(); // Change actor to insensitive - actor.SetSensitive( false ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -696,7 +696,7 @@ int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -729,7 +729,7 @@ int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void) application.Render(); // Make root actor insensitive - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor) application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -751,12 +751,12 @@ int UtcDaliTouchMultipleLayers(void) Layer layer1 ( Layer::New() ); layer1.SetSize(100.0f, 100.0f); - layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer1 ); Actor actor1 ( Actor::New() ); actor1.SetSize( 100.0f, 100.0f ); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor1.SetZ( 1.0f ); // Should hit actor1 in this layer layer1.Add( actor1 ); @@ -775,37 +775,37 @@ int UtcDaliTouchMultipleLayers(void) data.Reset(); // Make layer1 insensitive, nothing should be hit - layer1.SetSensitive( false ); + layer1.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make layer1 sensitive again, again actor1 will be hit - layer1.SetSensitive( true ); + layer1.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make rootActor insensitive, nothing should be hit - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make rootActor sensitive - rootActor.SetSensitive( true ); + rootActor.SetProperty( Actor::Property::SENSITIVE, true ); // Add another layer Layer layer2 ( Layer::New() ); layer2.SetSize(100.0f, 100.0f ); - layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2 Stage::GetCurrent().Add( layer2 ); Actor actor2 ( Actor::New() ); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.Add( actor2 ); // Render and notify @@ -823,21 +823,21 @@ int UtcDaliTouchMultipleLayers(void) data.Reset(); // Make layer2 insensitive, should hit actor1 - layer2.SetSensitive( false ); + layer2.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make layer2 sensitive again, should hit layer2 - layer2.SetSensitive( true ); + layer2.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); //DALI_TEST_CHECK( data.touchedActor == layer2 ); // TODO: Uncomment this after removing renderable hack! data.Reset(); // Make layer2 invisible, render and notify - layer2.SetVisible( false ); + layer2.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -848,7 +848,7 @@ int UtcDaliTouchMultipleLayers(void) data.Reset(); // Make rootActor invisible, render and notify - rootActor.SetVisible( false ); + rootActor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -867,7 +867,7 @@ int UtcDaliTouchMultipleRenderTasks(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Create render task @@ -911,12 +911,12 @@ int UtcDaliTouchMultipleRenderTasksWithChildLayer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.Add(layer); // Create render task @@ -965,14 +965,14 @@ int UtcDaliTouchOffscreenRenderTasks(void) // Create a renderable actor to display the FrameBufferImage Actor renderableActor = CreateRenderableActor( frameBufferImage ); - renderableActor.SetParentOrigin(ParentOrigin::CENTER); + renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); renderableActor.SetSize( stageSize.x, stageSize.y ); renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME stage.Add( renderableActor ); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add( actor ); application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects @@ -1043,12 +1043,12 @@ int UtcDaliTouchMultipleRenderableActors(void) Actor parent = CreateRenderableActor(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(parent); Actor actor = CreateRenderableActor(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1074,7 +1074,7 @@ int UtcDaliTouchActorRemovedInSignal(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1087,7 +1087,7 @@ int UtcDaliTouchActorRemovedInSignal(void) actor.TouchedSignal().Connect( &application, functor ); // Register for leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); @@ -1143,7 +1143,7 @@ int UtcDaliTouchActorSignalNotConsumed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1167,7 +1167,7 @@ int UtcDaliTouchActorUnStaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1205,7 +1205,7 @@ int UtcDaliTouchLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1220,7 +1220,7 @@ int UtcDaliTouchLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -1257,11 +1257,11 @@ int UtcDaliTouchLeaveActorReadded(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Set actor to receive touch-events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Render and notify application.SendNotification(); @@ -1303,12 +1303,12 @@ int UtcDaliTouchClippingActor(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); stage.Add( actor ); Actor clippingActor = Actor::New(); clippingActor.SetSize( 50.0f, 50.0f ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); stage.Add( clippingActor ); @@ -1316,7 +1316,7 @@ int UtcDaliTouchClippingActor(void) Actor clippingChild = Actor::New(); clippingChild.SetSize( 50.0f, 50.0f ); clippingChild.SetPosition( 25.0f, 25.0f ); - clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.Add( clippingChild ); // Render and notify. @@ -1354,7 +1354,7 @@ int UtcDaliTouchActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1392,12 +1392,12 @@ int UtcDaliTouchParentUnstaged(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1435,12 +1435,12 @@ int UtcDaliTouchActorUnstagedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1528,12 +1528,12 @@ int UtcDaliTouchInterruptedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1599,7 +1599,7 @@ int UtcDaliTouchDataConvert(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp b/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp index fd6d4cb..5b3c990 100644 --- a/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp +++ b/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp @@ -510,7 +510,7 @@ public: BaseHandle CreateNamedActorType() { Actor actor = Actor::New(); - actor.SetName( "NamedActor" ); + actor.SetProperty( Actor::Property::NAME, "NamedActor" ); return actor; } @@ -770,7 +770,7 @@ int UtcDaliTypeRegistryTypeRegistrationForNamedTypeP(void) Actor namedActor( Actor::DownCast( namedHandle ) ); DALI_TEST_CHECK( namedActor ); - DALI_TEST_CHECK( namedActor.GetName() == "NamedActor" ); + DALI_TEST_CHECK( namedActor.GetProperty< std::string >( Actor::Property::NAME ) == "NamedActor" ); DALI_TEST_CHECK( type.GetName() == "MyNamedActor" ); DALI_TEST_CHECK( type.GetBaseName() == "Actor" ); @@ -1875,11 +1875,11 @@ int UtcDaliTypeRegistryActionViaBaseHandle(void) Actor a = Actor::DownCast(hdl); DALI_TEST_CHECK( a ); - a.SetVisible(false); + a.SetProperty( Actor::Property::VISIBLE,false); application.SendNotification(); application.Render(0); - DALI_TEST_CHECK(!a.IsVisible()); + DALI_TEST_CHECK(!a.GetCurrentProperty< bool >( Actor::Property::VISIBLE )); Property::Map attributes; @@ -1887,7 +1887,7 @@ int UtcDaliTypeRegistryActionViaBaseHandle(void) application.SendNotification(); application.Render(0); - DALI_TEST_CHECK(a.IsVisible()); + DALI_TEST_CHECK(a.GetCurrentProperty< bool >( Actor::Property::VISIBLE )); DALI_TEST_CHECK(!hdl.DoAction("unknownAction", attributes)); END_TEST; @@ -2066,7 +2066,7 @@ int UtcDaliLongPressGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2104,7 +2104,7 @@ int UtcDaliPanGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2140,7 +2140,7 @@ int UtcDaliPinchGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2177,7 +2177,7 @@ int UtcDaliRotationGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2214,7 +2214,7 @@ int UtcDaliTapGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type diff --git a/automated-tests/src/dali/utc-Dali-WheelEvent.cpp b/automated-tests/src/dali/utc-Dali-WheelEvent.cpp index 9722454..9c7c223 100644 --- a/automated-tests/src/dali/utc-Dali-WheelEvent.cpp +++ b/automated-tests/src/dali/utc-Dali-WheelEvent.cpp @@ -215,7 +215,7 @@ int UtcDaliWheelEventSignalling(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/dali/integration-api/debug.cpp b/dali/integration-api/debug.cpp index 84c9cdf..3eda626 100644 --- a/dali/integration-api/debug.cpp +++ b/dali/integration-api/debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -169,6 +169,13 @@ void Filter::DisableGlobalTrace() } } +void Filter::SetGlobalLogLevel( LogLevel level ) +{ + for(FilterIter iter = GetActiveFilters()->begin(); iter != GetActiveFilters()->end(); iter++) + { + (*iter)->SetLogLevel( level ); + } +} void Filter::Log(LogLevel level, const char* format, ...) { diff --git a/dali/integration-api/debug.h b/dali/integration-api/debug.h index d1313a8..06f4da2 100755 --- a/dali/integration-api/debug.h +++ b/dali/integration-api/debug.h @@ -2,7 +2,7 @@ #define DALI_INTEGRATION_DEBUG_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -250,12 +250,19 @@ public: /** * Enable trace on all filters. */ - void EnableGlobalTrace(); + static void EnableGlobalTrace(); /** * Disable trace on all filters. */ - void DisableGlobalTrace(); + static void DisableGlobalTrace(); + + /** + * Set log level for all filters. + * + * @param[in] level The log level + */ + static void SetGlobalLogLevel( LogLevel level ); private: diff --git a/dali/internal/event/events/hover-event-processor.cpp b/dali/internal/event/events/hover-event-processor.cpp index 8fbacbc..ca18f50 100644 --- a/dali/internal/event/events/hover-event-processor.cpp +++ b/dali/internal/event/events/hover-event-processor.cpp @@ -240,7 +240,7 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n", TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y, ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ), - ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ), + ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ), hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y ); // Only set the currentRenderTask for the primary hit actor. @@ -263,8 +263,8 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even Dali::Actor primaryHitActor = primaryPoint.hitActor; TouchPoint::State primaryPointState = primaryPoint.state; - DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? reinterpret_cast< void* >( &primaryPoint.hitActor.GetBaseObject() ) : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetName().c_str() : "" ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? reinterpret_cast< void* >( &primaryPoint.hitActor.GetBaseObject() ) : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); if ( ( primaryPointState == TouchPoint::Started ) && ( hoverEvent.GetPointCount() == 1 ) && diff --git a/dali/internal/event/events/multi-point-event-util.cpp b/dali/internal/event/events/multi-point-event-util.cpp index d762508..e475c2f 100644 --- a/dali/internal/event/events/multi-point-event-util.cpp +++ b/dali/internal/event/events/multi-point-event-util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,11 +31,11 @@ namespace Internal #if defined(DEBUG_ENABLED) -static bool HIERARCHY_GEOMETRY(false); -static bool HIERARCHY_SENSITIVITY(false); -static bool HIERARCHY_TOUCH_REQUIRED(false); -static bool HIERARCHY_HOVER_REQUIRED(false); -static bool HIERARCHY_HITTABLE(false); +static bool HIERARCHY_GEOMETRY(true); +static bool HIERARCHY_SENSITIVITY(true); +static bool HIERARCHY_TOUCH_REQUIRED(true); +static bool HIERARCHY_HOVER_REQUIRED(true); +static bool HIERARCHY_HITTABLE(true); static const Debug::LogLevel HIERARCHY_DEBUG_LOG_LEVEL( Debug::Verbose ); @@ -48,11 +48,11 @@ void PrintChildren( Debug::Filter* logFilter, Dali::Actor actor, int level ) output << " | "; } - output << actor.GetName() << "(" << actor.GetTypeName() << ", " << actor.GetObjectPtr() << ")"; + output << actor.GetProperty< std::string >( Dali::Actor::Property::NAME ) << "(" << actor.GetTypeName() << ", " << actor.GetObjectPtr() << ")"; if ( HIERARCHY_GEOMETRY ) { - output << " Pos: " << actor.GetCurrentWorldPosition() << " Size: " << actor.GetCurrentSize() << " Scale: " << actor.GetCurrentWorldScale(); + output << " Pos: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::WORLD_POSITION ) << " Size: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::SIZE ) << " Scale: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::WORLD_SCALE ); } if ( HIERARCHY_SENSITIVITY ) diff --git a/dali/internal/event/events/touch-event-processor.cpp b/dali/internal/event/events/touch-event-processor.cpp index fb024a3..145f1ad 100644 --- a/dali/internal/event/events/touch-event-processor.cpp +++ b/dali/internal/event/events/touch-event-processor.cpp @@ -255,7 +255,7 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n", TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y, ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ), - ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ), + ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ), hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y ); // Only set the currentRenderTask for the primary hit actor. @@ -278,8 +278,8 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even Dali::Actor primaryHitActor = primaryPoint.GetHitActor(); PointState::Type primaryPointState = primaryPoint.GetState(); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast< void* >( &primaryHitActor.GetBaseObject() ) : NULL, primaryHitActor ? primaryHitActor.GetName().c_str() : "" ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast< void* >( &primaryHitActor.GetBaseObject() ) : NULL, primaryHitActor ? primaryHitActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); if ( ( primaryPointState == PointState::DOWN ) && ( touchEvent.GetPointCount() == 1 ) && diff --git a/dali/internal/event/events/wheel-event-processor.cpp b/dali/internal/event/events/wheel-event-processor.cpp index 107bd27..d2a7645 100644 --- a/dali/internal/event/events/wheel-event-processor.cpp +++ b/dali/internal/event/events/wheel-event-processor.cpp @@ -104,7 +104,7 @@ bool IsActorWheelableFunction(Dali::Actor actor, Dali::HitTestAlgorithm::Travers } case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE: { - if( actor.IsVisible() ) // Actor is visible, if not visible then none of its children are visible. + if( actor.GetProperty< bool >( Dali::Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible. { hittable = true; } @@ -143,14 +143,14 @@ void WheelEventProcessor::ProcessWheelEvent( const Integration::WheelEvent& even DALI_LOG_INFO( gLogFilter, Debug::General, " Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n", event.point.x, event.point.y, ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ), - ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ), + ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ), hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y ); // Recursively deliver events to the actor and its parents, until the event is consumed or the stage is reached. Dali::Actor consumedActor = EmitWheelSignals( hitTestResults.actor, wheelEvent ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL, hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL, hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); } else { diff --git a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp index 87d8645..140930e 100644 --- a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp +++ b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp @@ -61,9 +61,9 @@ void PrintChildren( Dali::Actor actor, int level ) output << actor.GetTypeName(); - output << ", " << actor.GetName(); + output << ", " << actor.GetProperty< std::string >( Dali::Actor::Property::NAME ); - output << " - Pos: " << actor.GetCurrentPosition() << " Size: " << actor.GetTargetSize(); + output << " - Pos: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ) << " Size: " << actor.GetTargetSize(); output << ", Dirty: (" << ( GetImplementation( actor ).IsLayoutDirty( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutDirty( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")"; output << ", Negotiated: (" << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")"; @@ -460,7 +460,7 @@ void RelayoutController::Relayout() if( actorImpl.RelayoutRequired() ) { - DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetName().c_str(), size.width, size.height ); + DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str(), size.width, size.height ); // 3. Negotiate the size with the current actor. Pass it an empty container which the actor // has to fill with all the actors it has not done any size negotiation for. diff --git a/dali/public-api/actors/actor.cpp b/dali/public-api/actors/actor.cpp index 88a1cd9..1595881 100644 --- a/dali/public-api/actors/actor.cpp +++ b/dali/public-api/actors/actor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,16 +65,6 @@ Actor& Actor::operator=(const Actor& rhs) return *this; } -const std::string& Actor::GetName() const -{ - return GetImplementation(*this).GetName(); -} - -void Actor::SetName(const std::string& name) -{ - GetImplementation(*this).SetName(name); -} - uint32_t Actor::GetId() const { return GetImplementation(*this).GetId(); @@ -145,26 +135,6 @@ Actor Actor::GetParent() const return Actor(parent); } -void Actor::SetParentOrigin(const Vector3& origin) -{ - GetImplementation(*this).SetParentOrigin(origin); -} - -Vector3 Actor::GetCurrentParentOrigin() const -{ - return GetImplementation(*this).GetCurrentParentOrigin(); -} - -void Actor::SetAnchorPoint(const Vector3& anchorPoint) -{ - GetImplementation(*this).SetAnchorPoint(anchorPoint); -} - -Vector3 Actor::GetCurrentAnchorPoint() const -{ - return GetImplementation(*this).GetCurrentAnchorPoint(); -} - void Actor::SetSize(float width, float height) { GetImplementation(*this).SetSize(width, height); @@ -190,11 +160,6 @@ Vector3 Actor::GetTargetSize() const return GetImplementation(*this).GetTargetSize(); } -Vector3 Actor::GetCurrentSize() const -{ - return GetImplementation(*this).GetCurrentSize(); -} - Vector3 Actor::GetNaturalSize() const { return GetImplementation(*this).GetNaturalSize(); @@ -235,16 +200,6 @@ void Actor::TranslateBy(const Vector3& distance) GetImplementation(*this).TranslateBy(distance); } -Vector3 Actor::GetCurrentPosition() const -{ - return GetImplementation(*this).GetCurrentPosition(); -} - -Vector3 Actor::GetCurrentWorldPosition() const -{ - return GetImplementation(*this).GetCurrentWorldPosition(); -} - void Actor::SetOrientation(const Radian& angle, const Vector3& axis) { GetImplementation(*this).SetOrientation(angle, axis); @@ -265,26 +220,6 @@ void Actor::RotateBy(const Quaternion& relativeRotation) GetImplementation(*this).RotateBy(relativeRotation); } -Quaternion Actor::GetCurrentOrientation() const -{ - return GetImplementation(*this).GetCurrentOrientation(); -} - -void Actor::SetInheritOrientation(bool inherit) -{ - GetImplementation(*this).SetInheritOrientation(inherit); -} - -bool Actor::IsOrientationInherited() const -{ - return GetImplementation(*this).IsOrientationInherited(); -} - -Quaternion Actor::GetCurrentWorldOrientation() const -{ - return GetImplementation(*this).GetCurrentWorldOrientation(); -} - void Actor::SetScale(float scale) { GetImplementation(*this).SetScale(scale); @@ -305,26 +240,6 @@ void Actor::ScaleBy(const Vector3& relativeScale) GetImplementation(*this).ScaleBy(relativeScale); } -Vector3 Actor::GetCurrentScale() const -{ - return GetImplementation(*this).GetCurrentScale(); -} - -Vector3 Actor::GetCurrentWorldScale() const -{ - return GetImplementation(*this).GetCurrentWorldScale(); -} - -void Actor::SetInheritScale( bool inherit ) -{ - GetImplementation(*this).SetInheritScale( inherit ); -} - -bool Actor::IsScaleInherited() const -{ - return GetImplementation(*this).IsScaleInherited(); -} - void Actor::SetSizeModeFactor(const Vector3& factor) { GetImplementation(*this).SetSizeModeFactor(factor); @@ -335,41 +250,6 @@ Vector3 Actor::GetSizeModeFactor() const return GetImplementation(*this).GetSizeModeFactor(); } -Matrix Actor::GetCurrentWorldMatrix() const -{ - return GetImplementation(*this).GetCurrentWorldMatrix(); -} - -void Actor::SetVisible(bool visible) -{ - GetImplementation(*this).SetVisible(visible); -} - -bool Actor::IsVisible() const -{ - return GetImplementation(*this).IsVisible(); -} - -void Actor::SetOpacity(float opacity) -{ - GetImplementation(*this).SetOpacity(opacity); -} - -float Actor::GetCurrentOpacity() const -{ - return GetImplementation(*this).GetCurrentOpacity(); -} - -void Actor::SetColor(const Vector4& color) -{ - GetImplementation(*this).SetColor(color); -} - -Vector4 Actor::GetCurrentColor() const -{ - return GetImplementation(*this).GetCurrentColor(); -} - void Actor::SetColorMode( ColorMode colorMode ) { GetImplementation(*this).SetColorMode(colorMode); @@ -380,11 +260,6 @@ ColorMode Actor::GetColorMode() const return GetImplementation(*this).GetColorMode(); } -Vector4 Actor::GetCurrentWorldColor() const -{ - return GetImplementation(*this).GetCurrentWorldColor(); -} - void Actor::SetDrawMode( DrawMode::Type drawMode ) { GetImplementation(*this).SetDrawMode( drawMode ); @@ -395,31 +270,11 @@ DrawMode::Type Actor::GetDrawMode() const return GetImplementation(*this).GetDrawMode(); } -void Actor::SetSensitive(bool sensitive) -{ - GetImplementation(*this).SetSensitive(sensitive); -} - -bool Actor::IsSensitive() const -{ - return GetImplementation(*this).IsSensitive(); -} - bool Actor::ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const { return GetImplementation(*this).ScreenToLocal(localX, localY, screenX, screenY); } -void Actor::SetLeaveRequired(bool required) -{ - GetImplementation(*this).SetLeaveRequired(required); -} - -bool Actor::GetLeaveRequired() const -{ - return GetImplementation(*this).GetLeaveRequired(); -} - void Actor::SetKeyboardFocusable( bool focusable ) { GetImplementation(*this).SetKeyboardFocusable(focusable); @@ -519,36 +374,6 @@ void Actor::GetPadding( Padding& paddingOut ) const paddingOut.top = heightPadding.y; } -void Actor::SetMinimumSize( const Vector2& size ) -{ - Internal::Actor& impl = GetImplementation(*this); - - impl.SetMinimumSize( size.x, Dimension::WIDTH ); - impl.SetMinimumSize( size.y, Dimension::HEIGHT ); -} - -Vector2 Actor::GetMinimumSize() -{ - Internal::Actor& impl = GetImplementation(*this); - - return Vector2( impl.GetMinimumSize( Dimension::WIDTH ), impl.GetMinimumSize( Dimension::HEIGHT ) ); -} - -void Actor::SetMaximumSize( const Vector2& size ) -{ - Internal::Actor& impl = GetImplementation(*this); - - impl.SetMaximumSize( size.x, Dimension::WIDTH ); - impl.SetMaximumSize( size.y, Dimension::HEIGHT ); -} - -Vector2 Actor::GetMaximumSize() -{ - Internal::Actor& impl = GetImplementation(*this); - - return Vector2( impl.GetMaximumSize( Dimension::WIDTH ), impl.GetMaximumSize( Dimension::HEIGHT ) ); -} - int32_t Actor::GetHierarchyDepth() { return GetImplementation(*this).GetHierarchyDepth(); diff --git a/dali/public-api/actors/actor.h b/dali/public-api/actors/actor.h index 82ce5c0..295f051 100644 --- a/dali/public-api/actors/actor.h +++ b/dali/public-api/actors/actor.h @@ -2,7 +2,7 @@ #define DALI_ACTOR_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,8 +73,8 @@ typedef Rect Padding; ///< Padding definition @SINCE_1_0.0 * * - An actor is only hittable if the actor's touch or hover signal has a connection. * - An actor is only hittable when it is between the camera's near and far planes. - * - If an actor is made insensitive, then the actor and its children are not hittable; see IsSensitive(). - * - If an actor's visibility flag is unset, then none of its children are hittable either; see IsVisible(). + * - If an actor is made insensitive, then the actor and its children are not hittable; see Actor::Property::SENSITIVE. + * - If an actor's visibility flag is unset, then none of its children are hittable either; see Actor::Property::VISIBLE. * - To be hittable, an actor must have a non-zero size. * - If an actor's world color is fully transparent, then it is not hittable; see GetCurrentWorldColor(). * @@ -261,7 +261,6 @@ public: * @brief The origin of an actor, within its parent's area. * @details Name "parentOrigin", type Property::VECTOR3, constraint-input * @SINCE_1_0.0 - * @see Actor::SetParentOrigin() */ PARENT_ORIGIN = DEFAULT_ACTOR_PROPERTY_START_INDEX, @@ -269,7 +268,6 @@ public: * @brief The x origin of an actor, within its parent's area. * @details Name "parentOriginX", type Property::FLOAT, constraint-input * @SINCE_1_0.0 - * @see Actor::SetParentOrigin() */ PARENT_ORIGIN_X, @@ -277,7 +275,6 @@ public: * @brief The y origin of an actor, within its parent's area. * @details Name "parentOriginY", type Property::FLOAT, constraint-input * @SINCE_1_0.0 - * @see Actor::SetParentOrigin() */ PARENT_ORIGIN_Y, @@ -285,7 +282,6 @@ public: * @brief The z origin of an actor, within its parent's area. * @details Name "parentOriginZ", type Property::FLOAT, constraint-input * @SINCE_1_0.0 - * @see Actor::SetParentOrigin() */ PARENT_ORIGIN_Z, @@ -293,7 +289,6 @@ public: * @brief The anchor-point of an actor. * @details Name "anchorPoint", type Property::VECTOR3, constraint-input * @SINCE_1_0.0 - * @see Actor::SetAnchorPoint() */ ANCHOR_POINT, @@ -301,7 +296,6 @@ public: * @brief The x anchor-point of an actor. * @details Name "anchorPointX", type Property::FLOAT, constraint-input * @SINCE_1_0.0 - * @see Actor::SetAnchorPoint() */ ANCHOR_POINT_X, @@ -309,7 +303,6 @@ public: * @brief The y anchor-point of an actor. * @details Name "anchorPointY", type Property::FLOAT, constraint-input * @SINCE_1_0.0 - * @see Actor::SetAnchorPoint() */ ANCHOR_POINT_Y, @@ -317,7 +310,6 @@ public: * @brief The z anchor-point of an actor. * @details Name "anchorPointZ", type Property::FLOAT, constraint-input * @SINCE_1_0.0 - * @see Actor::SetAnchorPoint() */ ANCHOR_POINT_Z, @@ -389,7 +381,6 @@ public: * @brief The world position of an actor. * @details Name "worldPosition", type Property::VECTOR3, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldPosition() */ WORLD_POSITION, @@ -397,7 +388,6 @@ public: * @brief The x world position of an actor. * @details Name "worldPositionX", type Property::FLOAT, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldPosition() */ WORLD_POSITION_X, @@ -405,7 +395,6 @@ public: * @brief The y world position of an actor. * @details Name "worldPositionY", type Property::FLOAT, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldPosition() */ WORLD_POSITION_Y, @@ -413,7 +402,6 @@ public: * @brief The z world position of an actor. * @details Name "worldPositionZ", type Property::FLOAT, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldPosition() */ WORLD_POSITION_Z, @@ -429,7 +417,6 @@ public: * @brief The world orientation of an actor. * @details Name "worldOrientation", type Property::ROTATION, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldOrientation() */ WORLD_ORIENTATION, @@ -469,7 +456,6 @@ public: * @brief The world scale factor applied to an actor. * @details Name "worldScale", type Property::VECTOR3, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldScale() */ WORLD_SCALE, @@ -477,7 +463,6 @@ public: * @brief The visibility flag of an actor. * @details Name "visible", type Property::BOOL, animatable / constraint-input * @SINCE_1_0.0 - * @see Actor::SetVisible() */ VISIBLE, @@ -486,7 +471,6 @@ public: * @details Name "color", type Property::VECTOR4 or Property::VECTOR3, animatable / constraint-input * @note The alpha value will be 1.0f if a Vector3 type value is set. * @SINCE_1_0.0 - * @see Actor::SetColor() */ COLOR, @@ -494,7 +478,6 @@ public: * @brief The red component of an actor's color. * @details Name "colorRed", type Property::FLOAT, animatable / constraint-input * @SINCE_1_0.0 - * @see Actor::SetColor() */ COLOR_RED, @@ -502,7 +485,6 @@ public: * @brief The green component of an actor's color. * @details Name "colorGreen", type Property::FLOAT, animatable / constraint-input * @SINCE_1_0.0 - * @see Actor::SetColor() */ COLOR_GREEN, @@ -510,7 +492,6 @@ public: * @brief The blue component of an actor's color. * @details Name "colorBlue", type Property::FLOAT, animatable / constraint-input * @SINCE_1_0.0 - * @see Actor::SetColor() */ COLOR_BLUE, @@ -518,7 +499,6 @@ public: * @brief The alpha component of an actor's color. * @details Name "colorAlpha", type Property::FLOAT, animatable / constraint-input * @SINCE_1_0.0 - * @see Actor::SetColor() */ COLOR_ALPHA, @@ -526,7 +506,6 @@ public: * @brief The world color of an actor. * @details Name "worldColor", type Property::VECTOR4, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldColor() */ WORLD_COLOR, @@ -534,7 +513,6 @@ public: * @brief The world matrix of an actor. * @details Name "worldMatrix", type Property::MATRIX, read-only / constraint-input * @SINCE_1_0.0 - * @see Actor::GetCurrentWorldMatrix() */ WORLD_MATRIX, @@ -542,7 +520,6 @@ public: * @brief The name of an actor. * @details Name "name", type Property::STRING * @SINCE_1_0.0 - * @see Actor::GetName() */ NAME, @@ -550,7 +527,6 @@ public: * @brief The flag whether an actor should emit touch or hover signals. * @details Name "sensitive", type Property::BOOLEAN * @SINCE_1_0.0 - * @see Actor::SetSensitive() */ SENSITIVE, @@ -558,7 +534,6 @@ public: * @brief The flag whether an actor should receive a notification when touch or hover motion events leave. * @details Name "leaveRequired", type Property::BOOLEAN * @SINCE_1_0.0 - * @see Actor::SetLeaveRequired() */ LEAVE_REQUIRED, @@ -566,7 +541,6 @@ public: * @brief The flag whether a child actor inherits it's parent's orientation. * @details Name "inheritOrientation", type Property::BOOLEAN * @SINCE_1_0.0 - * @see Actor::SetInheritOrientation() */ INHERIT_ORIENTATION, @@ -574,7 +548,6 @@ public: * @brief The flag whether a child actor inherits it's parent's scale. * @details Name "inheritScale", type Property::BOOLEAN * @SINCE_1_0.0 - * @see Actor::SetInheritScale() */ INHERIT_SCALE, @@ -659,7 +632,6 @@ public: * @brief The minimum size an actor can be assigned in size negotiation. * @details Name "minimumSize", type Property::VECTOR2. * @SINCE_1_0.0 - * @see Actor::SetMinimumSize() */ MINIMUM_SIZE, @@ -667,7 +639,6 @@ public: * @brief The maximum size an actor can be assigned in size negotiation. * @details Name "maximumSize", type Property::VECTOR2. * @SINCE_1_0.0 - * @see Actor::SetMaximumSize() */ MAXIMUM_SIZE, @@ -675,7 +646,6 @@ public: * @brief The flag whether a child actor inherits it's parent's position. * @details Name "inheritPosition", type Property::BOOLEAN. * @SINCE_1_1.24 - * @see Actor::SetInheritPosition() */ INHERIT_POSITION, @@ -771,24 +741,6 @@ public: Actor& operator=(const Actor& rhs); /** - * @brief Retrieves the Actor's name. - * - * @SINCE_1_0.0 - * @return The Actor's name - * @pre The Actor has been initialized. - */ - const std::string& GetName() const; - - /** - * @brief Sets the Actor's name. - * - * @SINCE_1_0.0 - * @param[in] name The new name - * @pre The Actor has been initialized. - */ - void SetName(const std::string& name); - - /** * @brief Retrieves the unique ID of the actor. * * @SINCE_1_0.0 @@ -927,56 +879,6 @@ public: // Positioning /** - * @brief Sets the origin of an actor, within its parent's area. - * - * This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, - * and (1.0, 1.0, 0.5) is the bottom-right corner. - * The default parent-origin is Dali::ParentOrigin::TOP_LEFT (0.0, 0.0, 0.5). - * An actor's position is the distance between this origin, and the actor's anchor-point. - * @image html parent-origin.png - * @SINCE_1_0.0 - * @param[in] origin The new parent-origin - * @pre The Actor has been initialized. - * @see Dali::ParentOrigin for predefined parent origin values - */ - void SetParentOrigin(const Vector3& origin); - - /** - * @brief Retrieves the parent-origin of an actor. - * - * @SINCE_1_0.0 - * @return The current parent-origin - * @pre The Actor has been initialized. - */ - Vector3 GetCurrentParentOrigin() const; - - /** - * @brief Sets the anchor-point of an actor. - * - * This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) - * is the top-left corner of the actor, and (1.0, 1.0, 0.5) is the - * bottom-right corner. The default anchor point is - * Dali::AnchorPoint::CENTER (0.5, 0.5, 0.5). - * An actor position is the distance between its parent-origin and this anchor-point. - * An actor's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point. - * @image html anchor-point.png - * @SINCE_1_0.0 - * @param[in] anchorPoint The new anchor-point - * @pre The Actor has been initialized. - * @see Dali::AnchorPoint for predefined anchor point values - */ - void SetAnchorPoint(const Vector3& anchorPoint); - - /** - * @brief Retrieves the anchor-point of an actor. - * - * @SINCE_1_0.0 - * @return The current anchor-point - * @pre The Actor has been initialized. - */ - Vector3 GetCurrentAnchorPoint() const; - - /** * @brief Sets the size of an actor. * * Geometry can be scaled to fit within this area. @@ -1037,16 +939,6 @@ public: Vector3 GetTargetSize() const; /** - * @brief Retrieves the actor's size. - * - * @SINCE_1_0.0 - * @return The actor's current size - * @pre The actor has been initialized. - * @note This property can be animated; the return value may not match the value written with SetSize(). - */ - Vector3 GetCurrentSize() const; - - /** * @brief Returns the natural size of the actor. * * Deriving classes stipulate the natural size and by default an actor has a ZERO natural size. @@ -1061,7 +953,7 @@ public: * * By default, sets the position vector between the parent origin and anchor point (default). * - * If Position inheritance if disabled, sets the world position. @see SetInheritPosition + * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION * * @image html actor-position.png * The Actor's z position will be set to 0.0f. @@ -1077,7 +969,7 @@ public: * * By default, sets the position vector between the parent origin and anchor point (default). * - * If Position inheritance if disabled, sets the world position. @see SetInheritPosition + * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION * * @image html actor-position.png * @SINCE_1_0.0 @@ -1093,7 +985,7 @@ public: * * By default, sets the position vector between the parent origin and anchor point (default). * - * If Position inheritance if disabled, sets the world position. @see SetInheritPosition + * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION * * @image html actor-position.png * @SINCE_1_0.0 @@ -1139,53 +1031,6 @@ public: void TranslateBy(const Vector3& distance); /** - * @brief Retrieves the position of the Actor. - * - * @SINCE_1_0.0 - * @return The Actor's current position - * @pre The Actor has been initialized. - * @note This property can be animated; the return value may not match the value written with SetPosition(). - */ - Vector3 GetCurrentPosition() const; - - /** - * @brief Retrieves the world-position of the Actor. - * - * @SINCE_1_0.0 - * @return The Actor's current position in world coordinates - * @pre The Actor has been initialized. - * @note The actor may not have a world-position unless it has been added to the stage. - */ - Vector3 GetCurrentWorldPosition() const; - - /** - * @brief Sets whether a child actor inherits it's parent's position. - * - * Default is to inherit. - * Switching this off means that using SetPosition() sets the actor's world position, i.e. translates from - * the world origin (0,0,0) to the anchor point of the actor. - * @SINCE_1_1.24 - * @param[in] inherit - @c true if the actor should inherit position, @c false otherwise - * @pre The Actor has been initialized. - */ - inline void SetInheritPosition( bool inherit ) - { - SetProperty(Property::INHERIT_POSITION, inherit ); - } - - /** - * @brief Returns whether the actor inherits its parent's position. - * - * @SINCE_1_1.24 - * @return @c true if the actor inherits its parent position, @c false if it uses world position - * @pre The Actor has been initialized. - */ - inline bool IsPositionInherited() const - { - return GetProperty(Property::INHERIT_POSITION ).Get(); - } - - /** * @brief Sets the orientation of the Actor. * * An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point. @@ -1256,46 +1101,6 @@ public: void RotateBy(const Quaternion& relativeRotation); /** - * @brief Retrieves the Actor's orientation. - * - * @SINCE_1_0.0 - * @return The current orientation - * @pre The Actor has been initialized. - * @note This property can be animated; the return value may not match the value written with SetOrientation(). - */ - Quaternion GetCurrentOrientation() const; - - /** - * @brief Sets whether a child actor inherits it's parent's orientation. - * - * Default is to inherit. - * Switching this off means that using SetOrientation() sets the actor's world orientation. - * @SINCE_1_0.0 - * @param[in] inherit - @c true if the actor should inherit orientation, @c false otherwise - * @pre The Actor has been initialized. - */ - void SetInheritOrientation(bool inherit); - - /** - * @brief Returns whether the actor inherits its parent's orientation. - * - * @SINCE_1_0.0 - * @return @c true if the actor inherits its parent orientation, @c false if it uses world orientation - * @pre The Actor has been initialized. - */ - bool IsOrientationInherited() const; - - /** - * @brief Retrieves the world-orientation of the Actor. - * - * @SINCE_1_0.0 - * @return The Actor's current orientation in the world - * @pre The Actor has been initialized. - * @note The actor will not have a world-orientation, unless it has previously been added to the stage. - */ - Quaternion GetCurrentWorldOrientation() const; - - /** * @brief Sets the scale factor applied to an actor. * * @SINCE_1_0.0 @@ -1336,127 +1141,9 @@ public: */ void ScaleBy(const Vector3& relativeScale); - /** - * @brief Retrieves the scale factor applied to an actor. - * - * @SINCE_1_0.0 - * @return A vector representing the scale factor for each axis - * @pre The Actor has been initialized. - * @note This property can be animated; the return value may not match the value written with SetScale(). - */ - Vector3 GetCurrentScale() const; - - /** - * @brief Retrieves the world-scale of the Actor. - * - * @SINCE_1_0.0 - * @return The Actor's current scale in the world - * @pre The Actor has been initialized. - * @note The actor will not have a world-scale, unless it has previously been added to the stage. - */ - Vector3 GetCurrentWorldScale() const; - - /** - * @brief Sets whether a child actor inherits it's parent's scale. - * - * Default is to inherit. - * Switching this off means that using SetScale() sets the actor's world scale. - * @SINCE_1_0.0 - * @param[in] inherit - @c true if the actor should inherit scale, @c false otherwise - * @pre The Actor has been initialized. - */ - void SetInheritScale( bool inherit ); - - /** - * @brief Returns whether the actor inherits its parent's scale. - * - * @SINCE_1_0.0 - * @return @c true if the actor inherits its parent scale, @c false if it uses world scale - * @pre The Actor has been initialized. - */ - bool IsScaleInherited() const; - - /** - * @brief Retrieves the world-matrix of the actor. - * - * @SINCE_1_0.0 - * @return The Actor's current world matrix - * @pre The Actor has been initialized. - * @note The actor will not have a world-matrix, unless it has previously been added to the stage. - */ - Matrix GetCurrentWorldMatrix() const; - // Visibility & Color /** - * @brief Sets the visibility flag of an actor. - * - * @SINCE_1_0.0 - * @param[in] visible The new visibility flag - * @pre The actor has been initialized. - * @note This is an asynchronous method; the value written may not match a value subsequently read with IsVisible(). - * @note If an actor's visibility flag is set to false, then the actor and its children will not be rendered. - * This is regardless of the individual visibility values of the children i.e. an actor will only be - * rendered if all of its parents have visibility set to true. - */ - void SetVisible(bool visible); - - /** - * @brief Retrieves the visibility flag of an actor. - * - * @SINCE_1_0.0 - * @return The visibility flag - * @pre The actor has been initialized. - * @note This property can be animated; the return value may not match the value written with SetVisible(). - * @note If an actor is not visible, then the actor and its children will not be rendered. - * This is regardless of the individual visibility values of the children i.e. an actor will only be - * rendered if all of its parents have visibility set to true. - */ - bool IsVisible() const; - - /** - * @brief Sets the opacity of an actor. - * - * @SINCE_1_0.0 - * @param[in] opacity The new opacity - * @pre The actor has been initialized. - * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOpacity(). - */ - void SetOpacity(float opacity); - - /** - * @brief Retrieves the actor's opacity. - * - * @SINCE_1_0.0 - * @return The actor's opacity - * @pre The actor has been initialized. - * @note This property can be animated; the return value may not match the value written with SetOpacity(). - */ - float GetCurrentOpacity() const; - - /** - * @brief Sets the actor's color; this is an RGBA value. - * - * The final color of the actor depends on its color mode. - * @SINCE_1_0.0 - * @param[in] color The new color - * @pre The Actor has been initialized. - * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentColor(). - */ - void SetColor(const Vector4& color); - - /** - * @brief Retrieves the actor's color. - * - * Actor's own color is not clamped. - * @SINCE_1_0.0 - * @return The color - * @pre The Actor has been initialized. - * @note This property can be animated; the return value may not match the value written with SetColor(). - */ - Vector4 GetCurrentColor() const; - - /** * @brief Sets the actor's color mode. * * This specifies whether the Actor uses its own color, or inherits @@ -1477,16 +1164,6 @@ public: ColorMode GetColorMode() const; /** - * @brief Retrieves the world-color of the Actor, where each component is clamped within the 0->1 range. - * - * @SINCE_1_0.0 - * @return The Actor's current color in the world - * @pre The Actor has been initialized. - * @note The actor will not have a world-color, unless it has previously been added to the stage. - */ - Vector4 GetCurrentWorldColor() const; - - /** * @brief Sets how the actor and its children should be drawn. * * Not all actors are renderable, but DrawMode can be inherited from any actor. @@ -1515,45 +1192,6 @@ public: // Input Handling /** - * @brief Sets whether an actor should emit touch or hover signals. - * - * An actor is sensitive by default, which means that as soon as an application connects to the SignalTouch(), - * the touch event signal will be emitted, and as soon as an application connects to the SignalHover(), the - * hover event signal will be emitted. - * - * If the application wishes to temporarily disable the touch or hover event signal emission, then they can do so by calling: - * @code - * actor.SetSensitive(false); - * @endcode - * - * Then, to re-enable the touch or hover event signal emission, the application should call: - * @code - * actor.SetSensitive(true); - * @endcode - * - * @SINCE_1_0.0 - * @param[in] sensitive true to enable emission of the touch or hover event signals, false otherwise - * @pre The Actor has been initialized. - * @note If an actor's sensitivity is set to false, then it's children will not be hittable either. - * This is regardless of the individual sensitivity values of the children i.e. an actor will only be - * hittable if all of its parents have sensitivity set to true. - * @see @see TouchedSignal() and HoveredSignal(). - */ - void SetSensitive(bool sensitive); - - /** - * @brief Queries whether an actor emits touch or hover event signals. - * - * @SINCE_1_0.0 - * @return @c true, if emission of touch or hover event signals is enabled, @c false otherwise - * @pre The Actor has been initialized. - * @note If an actor is not sensitive, then it's children will not be hittable either. - * This is regardless of the individual sensitivity values of the children i.e. an actor will only be - * hittable if all of its parents have sensitivity set to true. - */ - bool IsSensitive() const; - - /** * @brief Converts screen coordinates into the actor's coordinate system using the default camera. * * @SINCE_1_0.0 @@ -1568,29 +1206,6 @@ public: bool ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const; /** - * @brief Sets whether the actor should receive a notification when touch or hover motion events leave - * the boundary of the actor. - * - * @SINCE_1_0.0 - * @param[in] required Should be set to true if a Leave event is required - * @pre The Actor has been initialized. - * @note By default, this is set to false as most actors do not require this. - * @note Need to connect to the TouchedSignal() or HoveredSignal() to actually receive this event. - * - */ - void SetLeaveRequired(bool required); - - /** - * @brief This returns whether the actor requires touch or hover events whenever touch or hover motion events leave - * the boundary of the actor. - * - * @SINCE_1_0.0 - * @return @c true if a Leave event is required, @c false otherwise - * @pre The Actor has been initialized. - */ - bool GetLeaveRequired() const; - - /** * @brief Sets whether the actor should be focusable by keyboard navigation. * * The default is false. @@ -1777,38 +1392,6 @@ public: void GetPadding( Padding& paddingOut ) const; /** - * @brief Sets the minimum size an actor can be assigned in size negotiation. - * - * @SINCE_1_0.0 - * @param[in] size The minimum size - */ - void SetMinimumSize( const Vector2& size ); - - /** - * @brief Returns the minimum relayout size. - * - * @SINCE_1_0.0 - * @return Return the minimum size - */ - Vector2 GetMinimumSize(); - - /** - * @brief Sets the maximum size an actor can be assigned in size negotiation. - * - * @SINCE_1_0.0 - * @param[in] size The maximum size - */ - void SetMaximumSize( const Vector2& size ); - - /** - * @brief Returns the maximum relayout size. - * - * @SINCE_1_0.0 - * @return Return the maximum size - */ - Vector2 GetMaximumSize(); - - /** * @brief Gets depth in the hierarchy for the actor. * * @SINCE_1_0.0