-
-int UtcDaliScrollViewCubeEffectSetup(void)
-{
- tet_infoline(" UtcDaliScrollViewCubeEffectSetup");
-
- ScrollViewCubeEffect effect;
-
- DALI_TEST_CHECK( !effect );
-
- BaseHandle handle = ScrollViewCubeEffect::New();
-
- DALI_TEST_CHECK( handle );
-
- effect = ScrollViewCubeEffect::DownCast(handle);
-
- DALI_TEST_CHECK( effect );
- END_TEST;
-}
-
-int UtcDaliScrollViewCubeEffectTest(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" UtcDaliScrollViewCubeEffectTest");
-
- Vector2 size = Stage::GetCurrent().GetSize();
-
- ScrollView scrollView = SetupTestScrollView(1, 3, size);
- Actor page = gPages[1];
- Wait(application, 500);
-
- ScrollViewCubeEffect effect = ScrollViewCubeEffect::New();
- scrollView.ApplyEffect(effect);
-
- Actor actor = AddActorToPage(page, 0.5f, 0.5f, 3, 3);
- Wait(application);
- Vector3 actorPrePosition = actor.GetCurrentPosition();
-
- effect.ApplyToActor(actor, page, Vector3(-105.0f, 30.0f, -240.0f), Vector2(Math::PI * 0.5f, Math::PI * 0.5f), Vector2(0.25f, 0.25f) * size);
-
- Actor actor2 = AddActorToPage(page, 0.5f, 0.5f, 3, 3);
- effect.ApplyToActor(actor2, Vector3(-105.0f, 30.0f, -240.0f), Vector2(Math::PI * 0.5f, Math::PI * 0.5f), Vector2(0.25f, 0.25f) * size);
-
- scrollView.ScrollTo(1);
- while(!gOnScrollCompleteCalled)
- {
- Wait(application);
- }
- // test that the first page has reached centre of screen
- Vector3 actorPostPosition = actor.GetCurrentPosition();
- // just check the actor has moved
- DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
- CleanupTest();
- END_TEST;
-}
-
-int UtcDaliScrollViewCarouselEffectSetup(void)
-{
- tet_infoline(" UtcDaliScrollViewCarouselEffectSetup");
-
- ScrollViewCarouselEffect effect;
-
- DALI_TEST_CHECK( !effect );
-
- BaseHandle handle = ScrollViewCarouselEffect::New();
-
- DALI_TEST_CHECK( handle );
-
- effect = ScrollViewCarouselEffect::DownCast(handle);
-
- DALI_TEST_CHECK( effect );
- END_TEST;
-}
-
-int UtcDaliScrollViewCarouselEffectTest(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" UtcDaliScrollViewCarouselEffectTest");
-
- Vector2 size = Stage::GetCurrent().GetSize();
-
- ScrollView scrollView = SetupTestScrollView(1, 3, size);
- Actor testPage = gPages[1];
- Wait(application, 500);
-
- ScrollViewCarouselEffect effect = ScrollViewCarouselEffect::New();
- scrollView.ApplyEffect(effect);
-
- Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
- Wait(application);
- Vector3 actorPrePosition = actor.GetCurrentPosition();
-
- effect.ApplyToActor( actor, Vector2(1.2f, 1.2f) );
-
- scrollView.ScrollTo(Vector3(size.x, 0.0f, 0.0f), 0.5f, DirectionBiasNone, DirectionBiasNone);
- while(!gOnScrollCompleteCalled)
- {
- Wait(application);
- }
- // test that the first page has reached centre of screen
- Vector3 actorPostPosition = actor.GetCurrentPosition();
- // just check the actor has moved
- DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
- CleanupTest();
- END_TEST;
-}
-
-int UtcDaliScrollViewDepthEffectSetup(void)
-{
- tet_infoline(" UtcDaliScrollViewDepthEffectSetup");
-
- ScrollViewDepthEffect effect;
-
- DALI_TEST_CHECK( !effect );
-
- BaseHandle handle = ScrollViewDepthEffect::New();
-
- DALI_TEST_CHECK( handle );
-
- effect = ScrollViewDepthEffect::DownCast(handle);
-
- DALI_TEST_CHECK( effect );
- END_TEST;
-}
-
-int UtcDaliScrollViewDepthEffectTest(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" UtcDaliScrollViewDepthEffectTest");
-
- Vector2 size = Stage::GetCurrent().GetSize();
-
- ScrollView scrollView = SetupTestScrollView(1, 3, size);
- Actor testPage = gPages[1];
- Wait(application, 500);
-
- ScrollViewDepthEffect effect = ScrollViewDepthEffect::New();
- scrollView.ApplyEffect(effect);
-
- Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
- Wait(application);
- Vector3 actorPrePosition = actor.GetCurrentPosition();
-
- const Vector2 positionExtent(0.5f, 2.5f);
- const Vector2 offsetExtent(1.0f, 1.0f);
- const float positionScale(1.5f);
- const float scaleExtent(0.5f);
-
- effect.ApplyToActor( actor, positionExtent, offsetExtent, positionScale, scaleExtent );
-
- scrollView.ScrollTo(1);
- while(!gOnScrollCompleteCalled)
- {
- Wait(application);
- }
- // test that the first page has reached centre of screen
- Vector3 actorPostPosition = actor.GetCurrentPosition();
- // just check the actor has moved
- DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
- CleanupTest();
- END_TEST;
-}
-
-