END_TEST;
}
+int UtcDaliActorMoveConstructor(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ DALI_TEST_CHECK( actor );
+
+ int id = actor.GetProperty< int >( Actor::Property::ID );
+
+ Actor moved = std::move( actor);
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( id, moved.GetProperty< int >( Actor::Property::ID ), TEST_LOCATION );
+ DALI_TEST_CHECK( !actor );
+
+ END_TEST;
+}
+
+int UtcDaliActorMoveAssignment(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ DALI_TEST_CHECK( actor );
+
+ int id = actor.GetProperty< int >( Actor::Property::ID );
+
+ Actor moved;
+ moved = std::move( actor);
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( id, moved.GetProperty< int >( Actor::Property::ID ), TEST_LOCATION );
+ DALI_TEST_CHECK( !actor );
+
+ END_TEST;
+}
+
//& purpose: Testing Dali::Actor::GetName()
int UtcDaliActorGetName(void)
{
DALI_TEST_CHECK(!actor.GetProperty< bool >( Actor::Property::IS_ROOT ));
// get the root layer
- actor = Stage::GetCurrent().GetLayer( 0 );
+ actor = application.GetScene().GetLayer( 0 );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::IS_ROOT ) );
END_TEST;
}
DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
// get the root layer
- actor = Stage::GetCurrent().GetLayer( 0 );
+ actor = application.GetScene().GetLayer( 0 );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
END_TEST;
}
DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::IS_LAYER ) );
// get the root layer
- actor = Stage::GetCurrent().GetLayer( 0 );
+ actor = application.GetScene().GetLayer( 0 );
DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::IS_LAYER ) );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Layer layer = actor.GetLayer();
DALI_TEST_CHECK(layer);
// get the root layers layer
- actor = Stage::GetCurrent().GetLayer( 0 );
+ actor = application.GetScene().GetLayer( 0 );
DALI_TEST_CHECK( actor.GetLayer() );
END_TEST;
}
// try reparenting root
try
{
- parent2.Add( Stage::GetCurrent().GetLayer( 0 ) );
+ parent2.Add( application.GetScene().GetLayer( 0 ) );
tet_printf("Assertion test failed - no Exception\n" );
tet_result(TET_FAIL);
}
Actor child = Actor::New();
Actor random = Actor::New();
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
DALI_TEST_CHECK(parent.GetChildCount() == 0);
DALI_TEST_CHECK(parent.GetChildCount() == 1);
- Stage::GetCurrent().Remove( parent );
+ application.GetScene().Remove( parent );
DALI_TEST_CHECK(parent.GetChildCount() == 1);
END_TEST;
TestApplication application;
Actor actor = Actor::New();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
float startValue(1.0f);
Property::Index index = actor.RegisterProperty( "testProperty", startValue );
TestApplication application;
Actor actor = Actor::New();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
float startValue(5.0f);
Property::Index index = actor.RegisterProperty( "testProperty", startValue );
TestApplication application;
Actor actor = Actor::New();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
int startValue(5);
Property::Index index = actor.RegisterProperty( "testProperty", startValue );
DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ));
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.1f, 0.2f, 0.3f ) );
DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3( 0.1f, 0.2f, 0.3f ) );
// flush the queue and render once
DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
// Check the size in the new frame
DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetProperty( Actor::Property::SIZE, Vector3( 0.1f, 0.2f, 0.3f ) );
// Immediately check the size after setting
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 );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
Actor actor = Actor::New();
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
Vector3 vector( 100.0f, 200.0f, 400.0f );
DALI_TEST_CHECK( vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
DALI_TEST_EQUALS( expectedExtent.width, actualExtent.width, Math::MACHINE_EPSILON_10000, TEST_LOCATION );
DALI_TEST_EQUALS( expectedExtent.height, actualExtent.height, Math::MACHINE_EPSILON_10000, TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
application.Render();
DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetProperty( Actor::Property::POSITION, Vector3( 0.1f, 0.2f, 0.3f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
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 );
+ application.GetScene().Remove( actor );
END_TEST;
}
parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Actor parent = Actor::New();
Actor child = Actor::New();
parent.Add( child );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
DALI_TEST_EQUALS( parent.GetProperty( Actor::Property::COLOR_ALPHA ).Get<float>(), 1.0f, 0.0001f, TEST_LOCATION );
DALI_TEST_EQUALS( child.GetProperty( Actor::Property::COLOR_ALPHA ).Get<float>(), 1.0f, 0.0001f, TEST_LOCATION );
application.Render();
DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.RotateBy( Degree( 360 ), axis);
DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
application.Render();
DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
application.Render();
DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.RotateBy( angle, Vector3::ZAXIS);
// flush the queue and render once
application.Render();
DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
Radian rotationAngle( Degree(90.0f) );
Quaternion rotation( rotationAngle, Vector3::YAXIS );
parent.SetProperty( Actor::Property::ORIENTATION, rotation );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
child.SetProperty( Actor::Property::ORIENTATION, rotation );
DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale);
// add to stage and test
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetProperty( Actor::Property::SCALE, Vector3( 2.0f, 2.0f, 2.0f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), 0.001, TEST_LOCATION);
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
Actor parent = Actor::New();
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
parent.SetProperty( Actor::Property::SCALE, parentScale );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
Vector3 childScale( 2.0f, 2.0f, 2.0f );
Actor parent = Actor::New();
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
parent.SetProperty( Actor::Property::SCALE, parentScale );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
Vector3 childScale( 2.0f, 2.0f, 2.0f );
DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
// put actor on stage
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.5f, TEST_LOCATION );
// put actor on stage
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// change opacity, actor is on stage to change is not immediate
actor.SetProperty( Actor::Property::OPACITY, 0.9f );
application.Render();
DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetProperty( Actor::Property::COLOR, color );
// flush the queue and render once
application.SendNotification();
actor.SetProperty( Actor::Property::COLOR, newColor );
DALI_TEST_EQUALS( Vector4( newColor.r, newColor.g, newColor.b, 1.0f ), actor.GetProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
- Stage::GetCurrent().Remove( actor );
+ application.GetScene().Remove( actor );
END_TEST;
}
Actor parent = Actor::New();
Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f );
parent.SetProperty( Actor::Property::COLOR, parentColor );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::POSITION, Vector2(10.0f, 10.0f));
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK( gTestConstraintCalled == false );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
constraint.Apply();
// flush the queue and render once
constraint2.SetTag( constraint2Tag );
constraint2.Apply();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// flush the queue and render once
application.SendNotification();
application.Render();
ResetTouchCallbacks();
// get the root layer
- Actor actor = Stage::GetCurrent().GetRootLayer();
+ Actor actor = application.GetScene().GetRootLayer();
DALI_TEST_CHECK( gTouchCallBackCalled == false );
application.SendNotification();
actor.TouchedSignal().Connect( TestCallback );
// simulate a touch event in the middle of the screen
- Vector2 touchPoint( Stage::GetCurrent().GetSize() * 0.5 );
+ Vector2 touchPoint( application.GetScene().GetSize() * 0.5 );
Dali::Integration::Point point;
point.SetDeviceId( 1 );
point.SetState( PointState::DOWN );
gHoverCallBackCalled = false;
// get the root layer
- Actor actor = Stage::GetCurrent().GetRootLayer();
+ Actor actor = application.GetScene().GetRootLayer();
DALI_TEST_CHECK( gHoverCallBackCalled == false );
application.SendNotification();
actor.HoveredSignal().Connect( TestCallback3 );
// simulate a hover event in the middle of the screen
- Vector2 touchPoint( Stage::GetCurrent().GetSize() * 0.5 );
+ Vector2 touchPoint( application.GetScene().GetSize() * 0.5 );
Dali::Integration::Point point;
point.SetDeviceId( 1 );
point.SetState( PointState::MOTION );
DALI_TEST_CHECK( gOffStageCallBackCalled == 0 );
// add parent to stage
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
// onstage emitted, offstage not
DALI_TEST_EQUALS( gOnStageCallBackCalled, 1, TEST_LOCATION );
DALI_TEST_EQUALS( gOffStageCallBackCalled, 0, TEST_LOCATION );
gOnStageCallBackCalled = gOffStageCallBackCalled = 0;
gActorNamesOnOffStage.clear();
- Stage::GetCurrent().Remove( parent );
+ application.GetScene().Remove( parent );
// onstage not emitted, offstage is
DALI_TEST_EQUALS( gOnStageCallBackCalled, 0, TEST_LOCATION );
DALI_TEST_EQUALS( gOffStageCallBackCalled, 2, TEST_LOCATION );
gOnStageCallBackCalled = gOffStageCallBackCalled = 0;
gActorNamesOnOffStage.clear();
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
// onstage emitted, offstage not
DALI_TEST_EQUALS( gOnStageCallBackCalled, 2, TEST_LOCATION );
DALI_TEST_EQUALS( gOffStageCallBackCalled, 0, TEST_LOCATION );
gOnStageCallBackCalled = gOffStageCallBackCalled = 0;
gActorNamesOnOffStage.clear();
- Stage::GetCurrent().Remove( parent );
+ application.GetScene().Remove( parent );
// onstage not emitted, offstage is
DALI_TEST_EQUALS( gOnStageCallBackCalled, 0, TEST_LOCATION );
DALI_TEST_EQUALS( gOffStageCallBackCalled, 1, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
ResetTouchCallbacks();
int UtcDaliActorSetDrawMode(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorSetDrawModeOverlay");
Actor a = Actor::New();
- Stage::GetCurrent().Add(a);
- app.SendNotification();
- app.Render(0);
- app.SendNotification();
- app.Render(1);
+ application.GetScene().Add(a);
+ application.SendNotification();
+ application.Render(0);
+ application.SendNotification();
+ application.Render(1);
DALI_TEST_CHECK( DrawMode::NORMAL == a.GetProperty< DrawMode::Type >( Actor::Property::DRAW_MODE ) ); // Ensure overlay is off by default
a.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
- app.SendNotification();
- app.Render(1);
+ application.SendNotification();
+ application.Render(1);
DALI_TEST_CHECK( DrawMode::OVERLAY_2D == a.GetProperty< DrawMode::Type >( Actor::Property::DRAW_MODE ) ); // Check Actor is overlay
a.SetProperty( Actor::Property::DRAW_MODE, DrawMode::NORMAL );
- app.SendNotification();
- app.Render(1);
+ application.SendNotification();
+ application.Render(1);
DALI_TEST_CHECK( DrawMode::NORMAL == a.GetProperty< DrawMode::Type >( Actor::Property::DRAW_MODE ) ); // Check Actor is normal
END_TEST;
int UtcDaliActorSetDrawModeOverlayRender(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorSetDrawModeOverlayRender");
- app.SendNotification();
- app.Render(1);
+ application.SendNotification();
+ application.Render(1);
std::vector<GLuint> ids;
ids.push_back( 8 ); // first rendered actor
ids.push_back( 9 ); // second rendered actor
ids.push_back( 10 ); // third rendered actor
- app.GetGlAbstraction().SetNextTextureIds( ids );
+ application.GetGlAbstraction().SetNextTextureIds( ids );
Texture imageA = Texture::New(TextureType::TEXTURE_2D, Pixel::Format::RGBA8888, 16, 16);
Texture imageB = Texture::New(TextureType::TEXTURE_2D, Pixel::Format::RGBA8888, 16, 16);
Actor b = CreateRenderableActor( imageB );
Actor c = CreateRenderableActor( imageC );
- app.SendNotification();
- app.Render(1);
+ application.SendNotification();
+ application.Render(1);
//Textures are bound when first created. Clear bound textures vector
- app.GetGlAbstraction().ClearBoundTextures();
+ application.GetGlAbstraction().ClearBoundTextures();
// Render a,b,c as regular non-overlays. so order will be:
// a (8)
// b (9)
// c (10)
- Stage::GetCurrent().Add(a);
- Stage::GetCurrent().Add(b);
- Stage::GetCurrent().Add(c);
+ application.GetScene().Add(a);
+ application.GetScene().Add(b);
+ application.GetScene().Add(c);
- app.SendNotification();
- app.Render(1);
+ application.SendNotification();
+ application.Render(1);
// Should be 3 textures changes.
- const std::vector<GLuint>& boundTextures = app.GetGlAbstraction().GetBoundTextures( GL_TEXTURE0 );
+ const std::vector<GLuint>& boundTextures = application.GetGlAbstraction().GetBoundTextures( GL_TEXTURE0 );
typedef std::vector<GLuint>::size_type TextureSize;
DALI_TEST_EQUALS( boundTextures.size(), static_cast<TextureSize>( 3 ), TEST_LOCATION );
if( boundTextures.size() == 3 )
// c (10)
// a (8)
a.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
- app.GetGlAbstraction().ClearBoundTextures();
+ application.GetGlAbstraction().ClearBoundTextures();
- app.SendNotification();
- app.Render(1);
+ application.SendNotification();
+ application.Render(1);
// Should be 3 texture changes.
DALI_TEST_EQUALS( boundTextures.size(), static_cast<TextureSize>(3), TEST_LOCATION );
int UtcDaliActorGetCurrentWorldMatrix(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorGetCurrentWorldMatrix");
Actor parent = Actor::New();
parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
parent.SetProperty( Actor::Property::SCALE, parentScale );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetProperty( Actor::Property::SCALE, childScale );
parent.Add( child );
- app.SendNotification();
- app.Render(0);
- app.Render();
- app.SendNotification();
+ application.SendNotification();
+ application.Render(0);
+ application.Render();
+ application.SendNotification();
Matrix parentMatrix(false);
parentMatrix.SetTransformComponents(parentScale, parentRotation, parentPosition);
int UtcDaliActorConstrainedToWorldMatrix(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorConstrainedToWorldMatrix");
Actor parent = Actor::New();
parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
parent.SetProperty( Actor::Property::SCALE, parentScale );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
posConstraint.AddSource( Source( parent, Actor::Property::WORLD_MATRIX ) );
posConstraint.Apply();
- Stage::GetCurrent().Add( child );
+ application.GetScene().Add( child );
- app.SendNotification();
- app.Render(0);
- app.Render();
- app.SendNotification();
+ application.SendNotification();
+ application.Render(0);
+ application.Render();
+ application.SendNotification();
Matrix parentMatrix(false);
parentMatrix.SetTransformComponents(parentScale, parentRotation, parentPosition);
int UtcDaliActorConstrainedToOrientation(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorConstrainedToOrientation");
Actor parent = Actor::New();
parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
parent.SetProperty( Actor::Property::SCALE, parentScale );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
posConstraint.AddSource( Source( parent, Actor::Property::ORIENTATION ) );
posConstraint.Apply();
- Stage::GetCurrent().Add( child );
+ application.GetScene().Add( child );
- app.SendNotification();
- app.Render(0);
- app.Render();
- app.SendNotification();
+ application.SendNotification();
+ application.Render(0);
+ application.Render();
+ application.SendNotification();
DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION );
END_TEST;
int UtcDaliActorConstrainedToOpacity(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorConstrainedToOpacity");
Actor parent = Actor::New();
parent.SetProperty( Actor::Property::OPACITY, 0.7f );
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
Constraint opacityConstraint = Constraint::New<float>( child, Actor::Property::OPACITY, EqualToConstraint() );
opacityConstraint.AddSource( Source( parent, Actor::Property::OPACITY ) );
opacityConstraint.Apply();
- Stage::GetCurrent().Add( child );
+ application.GetScene().Add( child );
- app.SendNotification();
- app.Render(0);
- app.Render();
- app.SendNotification();
+ application.SendNotification();
+ application.Render(0);
+ application.Render();
+ application.SendNotification();
DALI_TEST_EQUALS( child.GetCurrentProperty< float >( Actor::Property::OPACITY ), parent.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.001f, TEST_LOCATION );
parent.SetProperty( Actor::Property::OPACITY, 0.3f );
- app.SendNotification();
- app.Render(0);
- app.Render();
- app.SendNotification();
+ application.SendNotification();
+ application.Render(0);
+ application.Render();
+ application.SendNotification();
DALI_TEST_EQUALS( child.GetCurrentProperty< float >( Actor::Property::OPACITY ), parent.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.001f, TEST_LOCATION );
int UtcDaliActorUnparent(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorUnparent");
Actor parent = Actor::New();
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child = Actor::New();
int UtcDaliActorGetChildAt(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorGetChildAt");
Actor parent = Actor::New();
- Stage::GetCurrent().Add( parent );
+ application.GetScene().Add( parent );
Actor child0 = Actor::New();
parent.Add( child0 );
int UtcDaliActorSetGetOverlay(void)
{
- TestApplication app;
+ TestApplication application;
tet_infoline(" UtcDaliActorSetGetOverlay");
Actor parent = Actor::New();
int UtcDaliActorProperties(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliRelayoutProperties_ResizePolicies(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliRelayoutProperties_SizeScalePolicy(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliRelayoutProperties_SizeModeFactor(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliRelayoutProperties_DimensionDependency(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliRelayoutProperties_Padding(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliRelayoutProperties_MinimumMaximumSize(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliActorGetHeightForWidth(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliActorGetWidthForHeight(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliActorGetRelayoutSize(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
// Add actor to stage
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
DALI_TEST_EQUALS( actor.GetRelayoutSize( Dimension::WIDTH ), 0.0f, TEST_LOCATION );
actor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 0.0f ) );
// Flush the queue and render once
- app.SendNotification();
- app.Render();
+ application.SendNotification();
+ application.Render();
DALI_TEST_EQUALS( actor.GetRelayoutSize( Dimension::WIDTH ), 1.0f, TEST_LOCATION );
int UtcDaliActorSetPadding(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliActorSetMinimumSize(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
int UtcDaliActorSetMaximumSize(void)
{
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
DALI_TEST_CHECK( ! gOnRelayoutCallBackCalled );
// Add actor to stage
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
actor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 2.0 ) );
*
* GetHierarchyDepth should return 1 for A, 2 for B and C, and 3 for D, E and F.
*/
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
TestApplication application;
Actor actor = Actor::New();
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
application.Render(0);
// Create a clipping actor.
Actor actorDepth1Clip = CreateActorWithContent16x16();
actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- Stage::GetCurrent().Add( actorDepth1Clip );
+ application.GetScene().Add( actorDepth1Clip );
// Gather the call trace.
GenerateTrace( application, enabledDisableTrace, stencilTrace );
// Create a clipping actor.
Actor actorDepth1Clip = CreateActorWithContent16x16();
actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- Stage::GetCurrent().Add( actorDepth1Clip );
+ application.GetScene().Add( actorDepth1Clip );
// Gather the call trace.
GenerateTrace( application, enabledDisableTrace, stencilTrace );
// Create a clipping actor.
Actor actorDepth1Clip = CreateActorWithContent16x16();
actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- Stage::GetCurrent().Add( actorDepth1Clip );
+ application.GetScene().Add( actorDepth1Clip );
// Create a child actor.
Actor childDepth2 = CreateActorWithContent16x16();
// If we are on the first loop, set the layer to 3D and loop to perform the test again.
if( i == 0u )
{
- Stage::GetCurrent().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+ application.GetScene().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
GenerateTrace( application, enabledDisableTrace, stencilTrace );
}
}
actors[1].SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
// Build the scene graph.
- Stage::GetCurrent().Add( actors[0] );
+ application.GetScene().Add( actors[0] );
// Left branch:
actors[0].Add( actors[1] );
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 );
+ application.GetScene().Add( clippingActorA );
// Gather the call trace.
GenerateTrace( application, enabledDisableTrace, scissorTrace );
clippingActorA.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -200.0f, 0.0f ));
clippingActorB.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
- Stage::GetCurrent().Add( clippingActorA );
- Stage::GetCurrent().Add( clippingActorB );
+ application.GetScene().Add( clippingActorA );
+ application.GetScene().Add( clippingActorB );
// Gather the call trace.
GenerateTrace( application, enabledDisableTrace, scissorTrace );
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 );
+ application.GetScene().Add( clippingActorA );
// Create a child clipping actor.
Actor clippingActorB = CreateActorWithContent16x16();
clippingActorD.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
clippingActorE.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
- Stage::GetCurrent().Add( clippingActorA );
+ application.GetScene().Add( clippingActorA );
clippingActorA.Add( clippingActorB );
- Stage::GetCurrent().Add( clippingActorC );
- Stage::GetCurrent().Add( clippingActorD );
+ application.GetScene().Add( clippingActorC );
+ application.GetScene().Add( clippingActorD );
clippingActorD.Add( clippingActorE );
// Gather the call trace.
// Create a clipping actor.
Actor actorDepth1Clip = CreateActorWithContent16x16();
actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- Stage::GetCurrent().Add( actorDepth1Clip );
+ application.GetScene().Add( actorDepth1Clip );
// Turn the RenderMode to just "COLOR" at the Renderer level to ignore the clippingMode.
actorDepth1Clip.GetRendererAt( 0 ).SetProperty( Renderer::Property::RENDER_MODE, RenderMode::COLOR );
int UtcDaliGetPropertyN(void)
{
tet_infoline( "Testing Actor::GetProperty returns a non valid value if property index is out of range" );
- TestApplication app;
+ TestApplication application;
Actor actor = Actor::New();
Debug::Filter::SetGlobalLogLevel( Debug::Verbose );
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
// Set up renderers to add to Actors, float value 1, 2, 3 assigned to each
// enables checking of which actor the uniform is assigned too
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor parentA = Actor::New();
Actor parentB = Actor::New();
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
Actor actorA = Actor::New();
actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
TestApplication application;
- Stage stage( Stage::GetCurrent() );
+ Integration::Scene stage( application.GetScene() );
tet_infoline( "Create an actor with AnchorPoint::TOP_LEFT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::SCALE, 2.0f );
actor.SetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT, false );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.0f), Vector3::ZAXIS ) );
actor.SetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT, false );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.0f), Vector3::ZAXIS ) );
actor.SetProperty( Actor::Property::SCALE, 2.0f );
actor.SetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT, false );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
Actor parent = Actor::New();
- Stage::GetCurrent().Add( parent );
- Vector2 stageSize( Stage::GetCurrent().GetSize() );
+ application.GetScene().Add( parent );
+ Vector2 stageSize( application.GetScene().GetSize() );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
tet_infoline( "Check that the visibility change signal is emitted when the visibility changes when an animation starts" );
Actor actor = Actor::New();
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
application.SendNotification();
application.Render();
Actor actor0 = Actor::New();
DALI_TEST_EQUALS( actor0.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
- Stage::GetCurrent().Add( actor0 );
+ application.GetScene().Add( actor0 );
application.SendNotification();
application.Render();
DALI_TEST_EQUALS( actor1.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
DALI_TEST_EQUALS( actor2.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
- Stage::GetCurrent().Add( actor3 );
+ application.GetScene().Add( actor3 );
actor3.Add( actor4 );
actor4.Add( actor5 );
actor5.Add( actor6 );
Actor actor = Actor::New();
DALI_TEST_EQUALS( actor.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
bool signalCalled = false;
LayoutDirectionFunctor layoutDirectionFunctor(signalCalled);
int UtcDaliChildAddedSignalP1(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
bool signalReceived=false;
Actor childActor;
int UtcDaliChildAddedSignalP2(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
bool signalReceived=false;
Actor childActor;
int UtcDaliChildAddedSignalN(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
bool signalReceived=false;
Actor childActor;
int UtcDaliChildRemovedSignalP1(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
bool signalReceived=false;
Actor childActor;
int UtcDaliChildRemovedSignalP2(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
bool signalReceived=false;
Actor childActor;
int UtcDaliChildRemovedSignalN(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
bool signalReceived=false;
Actor childActor;
int UtcDaliChildMovedSignalP(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
bool addedASignalReceived = false;
bool removedASignalReceived = false;
int utcDaliActorCulled(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
tet_infoline( "Check that the actor is culled if the actor is out of the screen" );
int utcDaliEnsureRenderWhenRemovingLastRenderableActor(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
tet_infoline( "Ensure we clear the screen when the last actor is removed" );
int utcDaliEnsureRenderWhenMakingLastActorInvisible(void)
{
TestApplication application;
- auto stage = Stage::GetCurrent();
+ auto stage = application.GetScene();
tet_infoline( "Ensure we clear the screen when the last actor is made invisible" );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::SIZE, actorSize );
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( actor );
+ application.GetScene().Add( actor );
// Size should be updated without rendering.
Vector3 size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
- Stage::GetCurrent().Remove(actor);
+ application.GetScene().Remove(actor);
application.SendNotification();
// Actor removed, last 3 dirty rects are reported. Adaptor would merge them together.
actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
actor.RegisterProperty(SHADER_SHADOW_COLOR_PROPERTY_NAME, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
actor.SetProperty(Actor::Property::POSITION, Vector3(100.0f, 100.0f, 0.0f));
actor.SetProperty(Actor::Property::SIZE, Vector3(50.0f, 50.0f, 0.0f));
actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
Actor actor2 = CreateRenderableActor();
actor2.SetProperty(Actor::Property::POSITION, Vector3(150.0f, 150.0f, 0.0f));
actor2.SetProperty(Actor::Property::SIZE, Vector3(100.0f, 100.0f, 0.0f));
actor2.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
- Stage::GetCurrent().Add(actor2);
+ application.GetScene().Add(actor2);
application.SendNotification();
std::vector<Rect<int>> damagedRects;
actor.SetProperty(Actor::Property::SIZE, Vector3(75.0f, 150.0f, 0.0f));
actor.SetProperty(DevelActor::Property::UPDATE_SIZE_HINT, Vector3(150, 300, 0));
actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
- Stage::GetCurrent().Add(actor);
+ application.GetScene().Add(actor);
application.SendNotification();
std::vector<Rect<int>> damagedRects;
END_TEST;
}
+int UtcDaliActorCaptureAllTouchAfterStartPropertyP(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ DALI_TEST_EQUALS(actor.GetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START).Get<bool>(), false, TEST_LOCATION);
+ actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, true);
+ DALI_TEST_EQUALS(actor.GetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START).Get<bool>(), true, TEST_LOCATION);
+ END_TEST;
+}
+
+int UtcDaliActorCaptureAllTouchAfterStartPropertyN(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ // Make sure setting invalid types does not cause a crash
+ try
+ {
+ actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, 1.0f);
+ actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector2::ONE);
+ actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector3::ONE);
+ actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector4::ONE);
+ actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Property::Map());
+ actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Property::Array());
+ tet_result(TET_PASS);
+ }
+ catch(...)
+ {
+ tet_result(TET_FAIL);
+ }
+ END_TEST;
+}