+ application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, screenCoordinates));
+ DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+ END_TEST;
+}
+
+int UtcDaliTouchEventNormalProcessing02(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
+ actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ application.GetScene().Add(actor);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Connect to actor's touched signal
+ HandleData handleData;
+ TouchEventHandleFunctor functor(handleData);
+ actor.TouchedSignal().Connect(&application, functor);
+
+ Vector2 screenCoordinates(10.0f, 10.0f);
+ Vector2 localCoordinates;
+ actor.ScreenToLocal(localCoordinates.x, localCoordinates.y, screenCoordinates.x, screenCoordinates.y);
+
+ // Emit a down signal
+ application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, screenCoordinates));
+ DALI_TEST_EQUALS(true, handleData.signalReceived, TEST_LOCATION);
+ DALI_TEST_EQUALS(1u, handleData.receivedTouchHandle.GetPointCount(), TEST_LOCATION);
+ DALI_TEST_EQUALS(PointState::DOWN, handleData.receivedTouchHandle.GetState(0), TEST_LOCATION);
+ DALI_TEST_EQUALS(screenCoordinates, handleData.receivedTouchHandle.GetScreenPosition(0), TEST_LOCATION);
+ DALI_TEST_EQUALS(localCoordinates, handleData.receivedTouchHandle.GetLocalPosition(0), 0.1f, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliTouchEventAPINegative(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
+ actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ application.GetScene().Add(actor);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Connect to actor's touched signal
+ OutOfBoundsData data;
+ OutOfBoundsFunctor functor(data, true);
+ actor.TouchedSignal().Connect(&application, functor);
+
+ Vector2 screenCoordinates(10.0f, 10.0f);
+ Vector2 localCoordinates;
+ actor.ScreenToLocal(localCoordinates.x, localCoordinates.y, screenCoordinates.x, screenCoordinates.y);
+
+ // Emit a down signal
+ application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, screenCoordinates));
+
+ DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
+ DALI_TEST_EQUALS(-1, data.point.deviceId, TEST_LOCATION);
+ DALI_TEST_EQUALS(PointState::FINISHED, data.point.state, TEST_LOCATION);
+ DALI_TEST_EQUALS(Vector2::ZERO, data.point.screen, TEST_LOCATION);
+ DALI_TEST_EQUALS(Vector2::ZERO, data.point.local, 0.1f, TEST_LOCATION);
+ DALI_TEST_CHECK(!data.point.hitActor);
+