gTouchCallBackCalled = false;
// simulate a touch event
- Dali::TouchPoint point( 0, TouchPoint::Down, 25.0f, 25.0f );
+ Dali::Integration::Point point;
+ point.SetState( PointState::DOWN );
+ point.SetScreenPosition( Vector2( 25.0f, 25.0f ) );
Dali::Integration::TouchEvent event;
event.AddPoint( point );
app.ProcessEvent( event );
END_TEST;
}
+int UtcDaliActorSetParentOriginIndividual(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ Vector3 vector(0.7f, 0.8f, 0.9f);
+ DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin());
+
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN_X, vector.x );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentParentOrigin().x, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN_Y, vector.y );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentParentOrigin().y, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN_Z, vector.z );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentParentOrigin().z, TEST_LOCATION );
+
+ END_TEST;
+}
+
int UtcDaliActorGetCurrentParentOrigin(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliActorSetAnchorPointIndividual(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ Vector3 vector(0.7f, 0.8f, 0.9f);
+ DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint());
+
+ actor.SetProperty( Actor::Property::ANCHOR_POINT_X, vector.x );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentAnchorPoint().x, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::ANCHOR_POINT_Y, vector.y );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentAnchorPoint().y, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::ANCHOR_POINT_Z, vector.z );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentAnchorPoint().z, TEST_LOCATION );
+
+ END_TEST;
+}
+
int UtcDaliActorGetCurrentAnchorPoint(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliActorSetSizeIndividual(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ Vector3 vector(0.7f, 0.8f, 0.9f);
+ DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+
+ actor.SetProperty( Actor::Property::SIZE_WIDTH, vector.width );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.width, actor.GetCurrentSize().width, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::SIZE_HEIGHT, vector.height );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.height, actor.GetCurrentSize().height, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::SIZE_DEPTH, vector.depth );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.depth, actor.GetCurrentSize().depth, TEST_LOCATION );
+
+ END_TEST;
+}
+
+
int UtcDaliActorGetCurrentSize(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliActorSetPositionProperties(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ Vector3 vector(0.7f, 0.8f, 0.9f);
+ DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+
+ actor.SetProperty( Actor::Property::POSITION_X, vector.x );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentPosition().x, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::POSITION_Y, vector.y );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentPosition().y, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::POSITION_Z, vector.z );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentPosition().z, TEST_LOCATION );
+
+ END_TEST;
+}
+
int UtcDaliActorTranslateBy(void)
{
TestApplication application;
END_TEST;
}
+// SetOrientation(float angleRadians, Vector3 axis)
+int UtcDaliActorSetOrientationProperty(void)
+{
+ TestApplication application;
+
+ Quaternion rotation( Radian(0.785f), Vector3(1.0f, 1.0f, 0.0f));
+ Actor actor = Actor::New();
+
+ actor.SetProperty( Actor::Property::ORIENTATION, rotation );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ END_TEST;
+}
+
// RotateBy(float angleRadians, Vector3 axis)
int UtcDaliActorRotateBy01(void)
{
END_TEST;
}
+int UtcDaliActorSetScaleIndividual(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ Vector3 vector(0.7f, 0.8f, 0.9f);
+ DALI_TEST_CHECK(vector != actor.GetCurrentScale());
+
+ actor.SetProperty( Actor::Property::SCALE_X, vector.x );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentScale().x, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::SCALE_Y, vector.y );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentScale().y, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::SCALE_Z, vector.z );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentScale().z, TEST_LOCATION );
+
+ END_TEST;
+}
+
int UtcDaliActorScaleBy(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliActorSetColorIndividual(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ Vector4 vector(0.7f, 0.8f, 0.9f, 0.6f);
+ DALI_TEST_CHECK(vector != actor.GetCurrentColor());
+
+ actor.SetProperty( Actor::Property::COLOR_RED, vector.r );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.r, actor.GetCurrentColor().r, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::COLOR_GREEN, vector.g );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.g, actor.GetCurrentColor().g, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::COLOR_BLUE, vector.b );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.b, actor.GetCurrentColor().b, TEST_LOCATION );
+
+ actor.SetProperty( Actor::Property::COLOR_ALPHA, vector.a );
+
+ // flush the queue and render once
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS( vector.a, actor.GetCurrentColor().a, TEST_LOCATION );
+
+ END_TEST;
+}
+
+
int UtcDaliActorGetCurrentColor(void)
{
TestApplication application;
// simulate a touch event in the middle of the screen
Vector2 touchPoint( Stage::GetCurrent().GetSize() * 0.5 );
- Dali::TouchPoint point( 1, TouchPoint::Down, touchPoint.x, touchPoint.y );
+ Dali::Integration::Point point;
+ point.SetDeviceId( 1 );
+ point.SetState( PointState::DOWN );
+ point.SetScreenPosition( Vector2( touchPoint.x, touchPoint.y ) );
Dali::Integration::TouchEvent event;
event.AddPoint( point );
application.ProcessEvent( event );
// simulate a hover event in the middle of the screen
Vector2 touchPoint( Stage::GetCurrent().GetSize() * 0.5 );
- Dali::TouchPoint point( 1, TouchPoint::Motion, touchPoint.x, touchPoint.y );
+ Dali::Integration::Point point;
+ point.SetDeviceId( 1 );
+ point.SetState( PointState::MOTION );
+ point.SetScreenPosition( Vector2( touchPoint.x, touchPoint.y ) );
Dali::Integration::HoverEvent event;
event.AddPoint( point );
application.ProcessEvent( event );
// connect to its touch signal
actor.TouchedSignal().Connect(TestCallback);
- Dali::TouchPoint point( 0, TouchPoint::Down, hitTestData[index]->mTouchPoint.x, hitTestData[index]->mTouchPoint.y );
+ Dali::Integration::Point point;
+ point.SetState( PointState::DOWN );
+ point.SetScreenPosition( Vector2( hitTestData[index]->mTouchPoint.x, hitTestData[index]->mTouchPoint.y ) );
Dali::Integration::TouchEvent event;
event.AddPoint( point );