- application.ProcessEvent(GeneratePan(Gesture::Continuing, Vector2(10.0f, 20.0f), Vector2(20.0f, 20.0f), 10));
- DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
- data.Reset();
- application.ProcessEvent(GeneratePan(Gesture::Finished, Vector2(10.0f, 20.0f), Vector2(20.0f, 20.0f), 10));
- DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
- END_TEST;
-}
-
-int UtcDaliPanGestureSystemOverlay(void)
-{
- TestApplication application;
- Dali::Integration::Core& core = application.GetCore();
- Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() );
- systemOverlay.GetOverlayRenderTasks().CreateTask();
-
- Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- systemOverlay.Add(actor);
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- SignalData data;
- GestureReceivedFunctor functor(data);
-
- PanGestureDetector detector = PanGestureDetector::New();
- detector.Attach(actor);
- detector.DetectedSignal().Connect(&application, functor);
-
- Vector2 screenCoordsStart( 10.0f, 20.0f );
- Vector2 screenCoordsEnd( 20.0f, 20.0f );
-
- // Start pan within the actor's area
- application.ProcessEvent( GeneratePan( Gesture::Possible, screenCoordsStart, screenCoordsEnd, 10 ) );
- application.ProcessEvent( GeneratePan( Gesture::Started, screenCoordsStart, screenCoordsEnd, 10 ) );
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliPanGestureBehindTouchableSystemOverlay(void)
-{
- TestApplication application;
- Dali::Integration::Core& core = application.GetCore();
- Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() );
- systemOverlay.GetOverlayRenderTasks().CreateTask();
-
- // SystemOverlay actor
- Actor systemOverlayActor = Actor::New();
- systemOverlayActor.SetSize(100.0f, 100.0f);
- systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- systemOverlay.Add(systemOverlayActor);
-
- // Stage actor
- Actor stageActor = Actor::New();
- stageActor.SetSize(100.0f, 100.0f);
- stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(stageActor);
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // Set system-overlay actor to touchable
- TouchEventData touchData;
- TouchEventDataFunctor touchFunctor( touchData );
- systemOverlayActor.TouchedSignal().Connect(&application, touchFunctor);
-
- // Set stage actor to receive the gesture
- SignalData data;
- GestureReceivedFunctor functor(data);
-
- PanGestureDetector detector = PanGestureDetector::New();
- detector.Attach(stageActor);
- detector.DetectedSignal().Connect(&application, functor);
-
- Vector2 screenCoordsStart( 10.0f, 20.0f );
- Vector2 screenCoordsEnd( 20.0f, 20.0f );
-
- // Start pan within the two actors' area
- application.ProcessEvent( GeneratePan( Gesture::Possible, screenCoordsStart, screenCoordsEnd, 10 ) );
- application.ProcessEvent( GeneratePan( Gesture::Started, screenCoordsStart, screenCoordsEnd, 10 ) );
- application.ProcessEvent( GeneratePan( Gesture::Finished, screenCoordsStart, screenCoordsEnd, 10 ) );
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION );
-
- data.Reset();
- touchData.Reset();
-
- // Do touch in the same area
- application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoordsStart ) );
- DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
- DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION );
-
- END_TEST;
-}
-
-int UtcDaliPanGestureTouchBehindGesturedSystemOverlay(void)
-{
- TestApplication application;
- Dali::Integration::Core& core = application.GetCore();
- Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() );
- systemOverlay.GetOverlayRenderTasks().CreateTask();
-
- // SystemOverlay actor
- Actor systemOverlayActor = Actor::New();
- systemOverlayActor.SetSize(100.0f, 100.0f);
- systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- systemOverlay.Add(systemOverlayActor);
-
- // Stage actor
- Actor stageActor = Actor::New();
- stageActor.SetSize(100.0f, 100.0f);
- stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(stageActor);
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // Set stage actor to touchable
- TouchEventData touchData;
- TouchEventDataFunctor touchFunctor( touchData );
- stageActor.TouchedSignal().Connect(&application, touchFunctor);
-
- // Set system-overlay actor to have the gesture
- SignalData data;
- GestureReceivedFunctor functor(data);
-
- PanGestureDetector detector = PanGestureDetector::New();
- detector.Attach(systemOverlayActor);
- detector.DetectedSignal().Connect(&application, functor);
-
- Vector2 screenCoordsStart( 10.0f, 20.0f );
- Vector2 screenCoordsEnd( 20.0f, 20.0f );
-
- // Start pan within the two actors' area
- application.ProcessEvent( GeneratePan( Gesture::Possible, screenCoordsStart, screenCoordsEnd, 10 ) );
- application.ProcessEvent( GeneratePan( Gesture::Started, screenCoordsStart, screenCoordsEnd, 10 ) );
- application.ProcessEvent( GeneratePan( Gesture::Finished, screenCoordsStart, screenCoordsEnd, 10 ) );
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION );