#include <string>
#include <cfloat> // For FLT_MAX
#include <dali/devel-api/actors/actor-devel.h>
-#include <dali/devel-api/object/handle-devel.h>
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/integration-api/events/hover-event-integ.h>
#include <dali-test-suite-utils.h>
DALI_TEST_EQUALS( vector.depth, actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION );
// Check async behaviour
- currentSize = DevelHandle::GetCurrentProperty( actor, Actor::Property::SIZE ).Get< Vector3 >();
+ currentSize = actor.GetCurrentProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION );
- DALI_TEST_EQUALS( vector.width, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SIZE_WIDTH ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.height, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SIZE_HEIGHT ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.depth, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SIZE_DEPTH ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< float >( Actor::Property::SIZE_WIDTH ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< float >( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.depth, actor.GetCurrentProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION );
// Change the resize policy and check whether the size stays the same
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
DALI_TEST_EQUALS( vector.x, actor.GetCurrentPosition().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, DevelHandle::GetCurrentProperty< Vector3 >( actor, Actor::Property::POSITION ).x, TEST_LOCATION );
- DALI_TEST_EQUALS( vector.x, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::POSITION_X ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), TEST_LOCATION );
actor.SetProperty( Actor::Property::POSITION_Y, vector.y );
DALI_TEST_EQUALS( vector.y, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetCurrentPosition().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, DevelHandle::GetCurrentProperty< Vector3 >( actor, Actor::Property::POSITION ).y, TEST_LOCATION );
- DALI_TEST_EQUALS( vector.y, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::POSITION_Y ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< float >( Actor::Property::POSITION_Y ), TEST_LOCATION );
actor.SetProperty( Actor::Property::POSITION_Z, vector.z );
DALI_TEST_EQUALS( vector.z, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetCurrentPosition().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, DevelHandle::GetCurrentProperty< Vector3 >( actor, Actor::Property::POSITION ).z, TEST_LOCATION );
- DALI_TEST_EQUALS( vector.z, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::POSITION_Z ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< float >( Actor::Property::POSITION_Z ), TEST_LOCATION );
END_TEST;
}
DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
DALI_TEST_EQUALS(rotation, actor.GetProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
- DALI_TEST_EQUALS(rotation, DevelHandle::GetCurrentProperty< Quaternion >( actor, Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
END_TEST;
}
DALI_TEST_EQUALS( vector.x, actor.GetCurrentScale().x, TEST_LOCATION );
DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.x, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION );
actor.SetProperty( Actor::Property::SCALE_Y, vector.y );
DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetCurrentScale().y, TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.y, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION );
actor.SetProperty( Actor::Property::SCALE_Z, vector.z );
DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetCurrentScale().z, TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.z, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION );
DALI_TEST_EQUALS( vector, actor.GetProperty< Vector3 >( Actor::Property::SCALE ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector, DevelHandle::GetCurrentProperty< Vector3 >( actor, Actor::Property::SCALE ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), TEST_LOCATION );
END_TEST;
}
DALI_TEST_EQUALS( vector.r, actor.GetCurrentColor().r, TEST_LOCATION );
DALI_TEST_EQUALS( vector.r, actor.GetProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.r, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.r, actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION );
actor.SetProperty( Actor::Property::COLOR_GREEN, vector.g );
DALI_TEST_EQUALS( vector.g, actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.g, actor.GetCurrentColor().g, TEST_LOCATION );
DALI_TEST_EQUALS( vector.g, actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.g, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.g, actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION );
actor.SetProperty( Actor::Property::COLOR_BLUE, vector.b );
DALI_TEST_EQUALS( vector.b, actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.b, actor.GetCurrentColor().b, TEST_LOCATION );
DALI_TEST_EQUALS( vector.b, actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.b, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.b, actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION );
actor.SetProperty( Actor::Property::COLOR_ALPHA, vector.a );
DALI_TEST_EQUALS( vector.a, actor.GetCurrentColor().a, TEST_LOCATION );
DALI_TEST_EQUALS( vector.a, actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector.a, DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.a, actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION );
DALI_TEST_EQUALS( vector, actor.GetProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
- DALI_TEST_EQUALS( vector, DevelHandle::GetCurrentProperty< Vector4 >( actor, Actor::Property::COLOR ), TEST_LOCATION );
+ DALI_TEST_EQUALS( vector, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
actor.SetProperty( DevelActor::Property::OPACITY, 0.2f );
data.Check( false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
- DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( actor, Actor::Property::VISIBLE ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
tet_infoline( "Play the animation and check the property value" );
animation.Play();
DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION );
tet_infoline( "Animation not currently finished, so the current visibility should still be true" );
- DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( actor, Actor::Property::VISIBLE ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
application.SendNotification();
application.Render( 1100 ); // After the animation
- DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( actor, Actor::Property::VISIBLE ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION );
END_TEST;
}