2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <dali-test-suite-utils.h>
19 #include <dali/integration-api/events/touch-event-integ.h>
20 #include <dali/integration-api/render-task-list-integ.h>
21 #include <dali/public-api/dali-core.h>
23 #include <test-touch-event-utils.h>
29 void utc_dali_pinch_gesture_detector_startup(void)
31 test_return_value = TET_UNDEF;
34 void utc_dali_pinch_gesture_detector_cleanup(void)
36 test_return_value = TET_PASS;
39 ///////////////////////////////////////////////////////////////////////////////
42 // Stores data that is populated in the callback and will be read by the TET cases
46 : functorCalled(false),
47 voidFunctorCalled(false),
54 functorCalled = false;
55 voidFunctorCalled = false;
57 receivedGesture.Reset();
63 bool voidFunctorCalled;
64 PinchGesture receivedGesture;
68 // Functor that sets the data when called
69 struct GestureReceivedFunctor
71 GestureReceivedFunctor(SignalData& data)
76 void operator()(Actor actor, const PinchGesture& pinch)
78 signalData.functorCalled = true;
79 signalData.receivedGesture = pinch;
80 signalData.pinchedActor = actor;
85 signalData.voidFunctorCalled = true;
88 SignalData& signalData;
91 // Functor that removes the gestured actor from stage
92 struct UnstageActorFunctor : public GestureReceivedFunctor
94 UnstageActorFunctor(SignalData& data, GestureState& stateToUnstage, Integration::Scene scene)
95 : GestureReceivedFunctor(data),
96 stateToUnstage(stateToUnstage),
101 void operator()(Actor actor, const PinchGesture& pinch)
103 GestureReceivedFunctor::operator()(actor, pinch);
105 if(pinch.GetState() == stateToUnstage)
111 GestureState& stateToUnstage;
112 Integration::Scene scene;
117 ///////////////////////////////////////////////////////////////////////////////
119 int UtcDaliPinchGestureDetectorConstructor(void)
121 TestApplication application;
123 PinchGestureDetector detector;
124 DALI_TEST_CHECK(!detector);
128 int UtcDaliPinchGestureDetectorCopyConstructorP(void)
130 TestApplication application;
132 PinchGestureDetector detector = PinchGestureDetector::New();
135 PinchGestureDetector copy(detector);
136 DALI_TEST_CHECK(detector);
140 int UtcDaliPinchGestureDetectorAssignmentOperatorP(void)
142 TestApplication application;
144 PinchGestureDetector detector = PinchGestureDetector::New();
147 PinchGestureDetector assign;
149 DALI_TEST_CHECK(detector);
151 DALI_TEST_CHECK(detector == assign);
155 int UtcDaliPinchGestureDetectorNew(void)
157 TestApplication application;
159 PinchGestureDetector detector = PinchGestureDetector::New();
161 DALI_TEST_CHECK(detector);
163 // Attach an actor and emit a touch event on the actor to ensure complete line coverage
164 Actor actor = Actor::New();
165 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
166 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
167 application.GetScene().Add(actor);
170 application.SendNotification();
171 application.Render();
173 detector.Attach(actor);
175 Integration::TouchEvent touchEvent(1);
176 Integration::Point point;
177 point.SetDeviceId(1);
178 point.SetState(PointState::DOWN);
179 point.SetScreenPosition(Vector2(20.0f, 20.0f));
180 touchEvent.AddPoint(point);
181 application.ProcessEvent(touchEvent);
183 Integration::Point point2;
184 point.SetDeviceId(1);
185 point.SetState(PointState::DOWN);
186 point.SetScreenPosition(Vector2(20.0f, 20.0f));
187 touchEvent.AddPoint(point2);
188 application.ProcessEvent(touchEvent);
192 int UtcDaliPinchGestureDetectorDownCast(void)
194 TestApplication application;
195 tet_infoline("Testing Dali::PinchGestureDetector::DownCast()");
197 PinchGestureDetector detector = PinchGestureDetector::New();
199 BaseHandle object(detector);
201 PinchGestureDetector detector2 = PinchGestureDetector::DownCast(object);
202 DALI_TEST_CHECK(detector2);
204 PinchGestureDetector detector3 = DownCast<PinchGestureDetector>(object);
205 DALI_TEST_CHECK(detector3);
207 BaseHandle unInitializedObject;
208 PinchGestureDetector detector4 = PinchGestureDetector::DownCast(unInitializedObject);
209 DALI_TEST_CHECK(!detector4);
211 PinchGestureDetector detector5 = DownCast<PinchGestureDetector>(unInitializedObject);
212 DALI_TEST_CHECK(!detector5);
214 GestureDetector detector6 = PinchGestureDetector::New();
215 PinchGestureDetector detector7 = PinchGestureDetector::DownCast(detector6);
216 DALI_TEST_CHECK(detector7);
220 // Negative test case for a method
221 int UtcDaliPinchGestureSignalReceptionNegative(void)
223 TestApplication application;
225 Actor actor = Actor::New();
226 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
227 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
228 application.GetScene().Add(actor);
231 application.SendNotification();
232 application.Render();
235 GestureReceivedFunctor functor(data);
237 PinchGestureDetector detector = PinchGestureDetector::New();
238 detector.Attach(actor);
239 detector.DetectedSignal().Connect(&application, functor);
241 // Do a pinch outside actor's area
242 TestStartPinch(application, Vector2(112.0f, 62.0f), Vector2(112.0f, 162.0f), Vector2(112.0f, 100.0f), Vector2(112.0f, 124.0f), 100);
244 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
246 // Continue pinch into actor's area - we should still not receive the signal
248 TestContinuePinch(application, Vector2(112.0f, 100.0f), Vector2(112.0f, 124.0f), Vector2(5.0f, 5.0f), Vector2(35.0f, 35.0f), 200);
250 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
252 // Stop pinching - we should still not receive the signal
254 TestEndPinch(application, Vector2(6.0f, 6.0f), Vector2(18.0f, 18.0f), Vector2(10.0f, 8.0f), Vector2(14.0f, 16.0f), 300);
256 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
260 int UtcDaliPinchGestureSignalReceptionDownMotionLeave(void)
262 TestApplication application;
264 Actor actor = Actor::New();
265 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
266 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
267 application.GetScene().Add(actor);
270 application.SendNotification();
271 application.Render();
274 GestureReceivedFunctor functor(data);
276 PinchGestureDetector detector = PinchGestureDetector::New();
277 detector.Attach(actor);
278 detector.DetectedSignal().Connect(&application, functor);
280 // Start pan within the actor's area
281 TestStartPinch(application, Vector2(5.0f, 20.0f), Vector2(35.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
282 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
283 DALI_TEST_EQUALS(GestureState::STARTED, data.receivedGesture.GetState(), TEST_LOCATION);
284 DALI_TEST_EQUALS(0.666f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
285 DALI_TEST_EQUALS(66.666f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
286 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
287 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
289 // Continue the pan within the actor's area - we should still receive the signal
291 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(17.0f, 20.0f), Vector2(25.0f, 20.0f), 400);
292 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
293 DALI_TEST_EQUALS(GestureState::CONTINUING, data.receivedGesture.GetState(), TEST_LOCATION);
294 DALI_TEST_EQUALS(0.2666f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
295 DALI_TEST_EQUALS(80.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
296 DALI_TEST_EQUALS(Vector2(21.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
297 DALI_TEST_EQUALS(Vector2(21.0f, 20.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
299 // Pinch Gesture leaves actor's area - we should still receive the signal
301 TestContinuePinch(application, Vector2(17.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(300.0f, 10.0f), Vector2(340.0f, 10.0f), 1000);
302 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
303 DALI_TEST_EQUALS(GestureState::CONTINUING, data.receivedGesture.GetState(), TEST_LOCATION);
304 DALI_TEST_EQUALS(1.333f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
305 DALI_TEST_EQUALS(213.333f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
306 DALI_TEST_EQUALS(Vector2(320.0f, 10.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
307 DALI_TEST_EQUALS(Vector2(320.0f, 10.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
309 // Gesture ends - we would receive a finished state
311 TestEndPinch(application, Vector2(300.0f, 10.0f), Vector2(340.0f, 10.0f), Vector2(305.0f, 10.0f), Vector2(315.0f, 10.0f), 1500);
312 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
313 DALI_TEST_EQUALS(GestureState::FINISHED, data.receivedGesture.GetState(), TEST_LOCATION);
314 DALI_TEST_EQUALS(0.333f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
315 DALI_TEST_EQUALS(600.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
316 DALI_TEST_EQUALS(Vector2(310.0f, 10.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
317 DALI_TEST_EQUALS(Vector2(310.0f, 10.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
321 int UtcDaliPinchGestureSignalReceptionDownMotionUp(void)
323 TestApplication application;
325 Actor actor = Actor::New();
326 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
327 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
328 application.GetScene().Add(actor);
331 application.SendNotification();
332 application.Render();
335 GestureReceivedFunctor functor(data);
337 PinchGestureDetector detector = PinchGestureDetector::New();
338 detector.Attach(actor);
339 detector.DetectedSignal().Connect(&application, functor);
341 // Start pinch within the actor's area
342 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
343 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
344 DALI_TEST_EQUALS(GestureState::STARTED, data.receivedGesture.GetState(), TEST_LOCATION);
345 DALI_TEST_EQUALS(0.555f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
346 DALI_TEST_EQUALS(106.667f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
347 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
348 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
350 // Continue the pinch within the actor's area - we should still receive the signal
352 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
353 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
354 DALI_TEST_EQUALS(GestureState::CONTINUING, data.receivedGesture.GetState(), TEST_LOCATION);
355 DALI_TEST_EQUALS(0.277f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
356 DALI_TEST_EQUALS(66.666f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
357 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
358 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
360 // Gesture ends within actor's area - we would receive a finished state
362 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
363 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
364 DALI_TEST_EQUALS(GestureState::FINISHED, data.receivedGesture.GetState(), TEST_LOCATION);
365 DALI_TEST_EQUALS(0.055f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
366 DALI_TEST_EQUALS(160.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
367 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
368 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
372 int UtcDaliPinchGestureSignalReceptionDetach(void)
374 TestApplication application;
376 Actor actor = Actor::New();
377 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
378 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
379 application.GetScene().Add(actor);
382 application.SendNotification();
383 application.Render();
386 GestureReceivedFunctor functor(data);
388 PinchGestureDetector detector = PinchGestureDetector::New();
389 detector.Attach(actor);
390 detector.DetectedSignal().Connect(&application, functor);
392 // Start pinch within the actor's area
393 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
394 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
395 DALI_TEST_EQUALS(GestureState::STARTED, data.receivedGesture.GetState(), TEST_LOCATION);
397 // Continue the pinch within the actor's area - we should still receive the signal
399 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
400 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
401 DALI_TEST_EQUALS(GestureState::CONTINUING, data.receivedGesture.GetState(), TEST_LOCATION);
403 // Gesture ends within actor's area
405 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
406 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
407 DALI_TEST_EQUALS(GestureState::FINISHED, data.receivedGesture.GetState(), TEST_LOCATION);
410 detector.DetachAll();
412 // Ensure we are no longer signalled
414 TestGeneratePinch(application);
415 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
419 int UtcDaliPinchGestureSignalReceptionDetachWhilePinching(void)
421 TestApplication application;
423 Actor actor = Actor::New();
424 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
425 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
426 application.GetScene().Add(actor);
429 application.SendNotification();
430 application.Render();
433 GestureReceivedFunctor functor(data);
435 PinchGestureDetector detector = PinchGestureDetector::New();
436 detector.Attach(actor);
437 detector.DetectedSignal().Connect(&application, functor);
439 // Start pinch within the actor's area
440 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
441 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
442 DALI_TEST_EQUALS(GestureState::STARTED, data.receivedGesture.GetState(), TEST_LOCATION);
444 // Continue the pinch within the actor's area - we should still receive the signal
446 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
447 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
448 DALI_TEST_EQUALS(GestureState::CONTINUING, data.receivedGesture.GetState(), TEST_LOCATION);
450 // Detach actor during the pinch, we should not receive the next event
451 detector.DetachAll();
453 // Gesture ends within actor's area
455 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
456 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
460 int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void)
462 TestApplication application;
465 GestureReceivedFunctor functor(data);
467 PinchGestureDetector detector = PinchGestureDetector::New();
468 detector.DetectedSignal().Connect(&application, functor);
470 // Attach a temporary actor to stop detector being removed from PinchGestureProcessor when main actor
472 Actor tempActor = Actor::New();
473 tempActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
474 tempActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT);
475 application.GetScene().Add(tempActor);
476 detector.Attach(tempActor);
478 // Actor lifetime is scoped
480 Actor actor = Actor::New();
481 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
482 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
483 application.GetScene().Add(actor);
486 application.SendNotification();
487 application.Render();
489 detector.Attach(actor);
491 // Start pinch within the actor's area
492 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
493 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
494 DALI_TEST_EQUALS(GestureState::STARTED, data.receivedGesture.GetState(), TEST_LOCATION);
496 // Continue the pinch within the actor's area - we should still receive the signal
498 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
499 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
500 DALI_TEST_EQUALS(GestureState::CONTINUING, data.receivedGesture.GetState(), TEST_LOCATION);
502 // Remove the actor from stage and reset the data
503 application.GetScene().Remove(actor);
506 application.SendNotification();
507 application.Render();
510 // Actor should now have been destroyed
512 // Gesture ends within the area where the actor used to be
514 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
515 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
519 int UtcDaliPinchGestureSignalReceptionRotatedActor(void)
521 TestApplication application;
523 Actor actor = Actor::New();
524 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
525 actor.SetProperty(Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS));
526 application.GetScene().Add(actor);
528 // Render and notify a couple of times
529 application.SendNotification();
530 application.Render();
533 GestureReceivedFunctor functor(data);
535 PinchGestureDetector detector = PinchGestureDetector::New();
536 detector.Attach(actor);
537 detector.DetectedSignal().Connect(&application, functor);
539 // Do an entire pinch, only check finished value
540 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
542 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
543 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
544 DALI_TEST_EQUALS(0.055f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
545 DALI_TEST_EQUALS(160.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
546 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
547 DALI_TEST_EQUALS(Vector2(70.0f, 30.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
549 // Rotate actor again and render and notify
550 actor.SetProperty(Actor::Property::ORIENTATION, Quaternion(Dali::Degree(180.0f), Vector3::ZAXIS));
551 application.SendNotification();
552 application.Render();
554 // Do an entire pinch, only check finished value
555 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 2100);
557 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 3000);
558 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
559 DALI_TEST_EQUALS(0.055f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
560 DALI_TEST_EQUALS(160.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
561 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
562 DALI_TEST_EQUALS(Vector2(30.0f, 30.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
564 // Rotate actor again and render and notify
565 actor.SetProperty(Actor::Property::ORIENTATION, Quaternion(Dali::Degree(270.0f), Vector3::ZAXIS));
566 application.SendNotification();
567 application.Render();
569 // Do an entire pinch, only check finished value
570 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 4100);
572 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 5000);
573 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
574 DALI_TEST_EQUALS(0.055f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
575 DALI_TEST_EQUALS(160.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
576 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
577 DALI_TEST_EQUALS(Vector2(30.0f, 70.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
581 int UtcDaliPinchGestureSignalReceptionChildHit(void)
583 TestApplication application;
585 Actor parent = Actor::New();
586 parent.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
587 parent.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
588 application.GetScene().Add(parent);
590 // Set child to completely cover parent.
591 // Change rotation of child to be different from parent so that we can check if our local coordinate
592 // conversion of the parent actor is correct.
593 Actor child = Actor::New();
594 child.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
595 child.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
596 child.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
597 child.SetProperty(Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS));
601 application.SendNotification();
602 application.Render();
605 GestureReceivedFunctor functor(data);
607 PinchGestureDetector detector = PinchGestureDetector::New();
608 detector.Attach(parent);
609 detector.DetectedSignal().Connect(&application, functor);
611 // Do an entire pan, only check finished value - hits child area but parent should still receive it
612 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
614 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
615 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
616 DALI_TEST_EQUALS(true, parent == data.pinchedActor, TEST_LOCATION);
617 DALI_TEST_EQUALS(0.055f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
618 DALI_TEST_EQUALS(160.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
619 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
621 // Attach child and generate same touch points to yield same results
622 // (Also proves that you can detach and then re-attach another actor)
623 detector.Attach(child);
624 detector.Detach(parent);
626 // Do an entire pan, only check finished value
627 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 2100);
629 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 3000);
630 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
631 DALI_TEST_EQUALS(true, child == data.pinchedActor, TEST_LOCATION);
632 DALI_TEST_EQUALS(0.055f, data.receivedGesture.GetScale(), 0.01f, TEST_LOCATION);
633 DALI_TEST_EQUALS(160.0f, data.receivedGesture.GetSpeed(), 0.01f, TEST_LOCATION);
634 DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.GetScreenCenterPoint(), 0.01f, TEST_LOCATION);
635 DALI_TEST_EQUALS(Vector2(20.0f, 80.0f), data.receivedGesture.GetLocalCenterPoint(), 0.01f, TEST_LOCATION);
639 int UtcDaliPinchGestureSignalReceptionAttachDetachMany(void)
641 TestApplication application;
643 Actor first = Actor::New();
644 first.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
645 first.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
646 application.GetScene().Add(first);
648 Actor second = Actor::New();
649 second.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
650 second.SetProperty(Actor::Property::POSITION_X, 100.0f);
651 second.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
652 application.GetScene().Add(second);
655 application.SendNotification();
656 application.Render();
659 GestureReceivedFunctor functor(data);
661 PinchGestureDetector detector = PinchGestureDetector::New();
662 detector.Attach(first);
663 detector.Attach(second);
664 detector.DetectedSignal().Connect(&application, functor);
666 // Start pinch within second actor's area
667 TestStartPinch(application, Vector2(102.0f, 20.0f), Vector2(138.0f, 20.0f), Vector2(110.0f, 20.0f), Vector2(130.0f, 20.0f), 100);
668 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
669 DALI_TEST_EQUALS(true, second == data.pinchedActor, TEST_LOCATION);
671 // Pinch moves into first actor's area - second actor should receive the pinch
673 TestContinuePinch(application, Vector2(110.0f, 20.0f), Vector2(130.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
674 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
675 DALI_TEST_EQUALS(true, second == data.pinchedActor, TEST_LOCATION);
677 // Detach the second actor during the pinch, we should not receive the next event
678 detector.Detach(second);
680 // Gesture ends within actor's area
682 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(119.0f, 20.0f), Vector2(121.0f, 20.0f), 3000);
683 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
687 int UtcDaliPinchGestureSignalReceptionActorBecomesUntouchable(void)
689 TestApplication application;
691 Actor actor = Actor::New();
692 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
693 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
694 application.GetScene().Add(actor);
697 application.SendNotification();
698 application.Render();
701 GestureReceivedFunctor functor(data);
703 PinchGestureDetector detector = PinchGestureDetector::New();
704 detector.Attach(actor);
705 detector.DetectedSignal().Connect(&application, functor);
707 // Start pinch in actor's area
708 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
709 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
711 // Pan continues within actor's area
713 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
714 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
716 // Actor become invisible - actor should not receive the next pinch
717 actor.SetProperty(Actor::Property::VISIBLE, false);
720 application.SendNotification();
721 application.Render();
723 // Gesture ends within actor's area
725 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 3000);
726 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
730 int UtcDaliPinchGestureSignalReceptionMultipleDetectorsOnActor(void)
732 TestApplication application;
734 Actor actor = Actor::New();
735 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
736 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
737 application.GetScene().Add(actor);
739 Actor actor2 = Actor::New();
740 actor2.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
741 actor2.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT);
742 application.GetScene().Add(actor2);
745 application.SendNotification();
746 application.Render();
748 // Attach actor to one detector
749 SignalData firstData;
750 GestureReceivedFunctor firstFunctor(firstData);
751 PinchGestureDetector firstDetector = PinchGestureDetector::New();
752 firstDetector.Attach(actor);
753 firstDetector.DetectedSignal().Connect(&application, firstFunctor);
755 // Attach actor to another detector
756 SignalData secondData;
757 GestureReceivedFunctor secondFunctor(secondData);
758 PinchGestureDetector secondDetector = PinchGestureDetector::New();
759 secondDetector.Attach(actor);
760 secondDetector.DetectedSignal().Connect(&application, secondFunctor);
762 // Add second actor to second detector, when we remove the actor, this will make sure that this
763 // gesture detector is not removed from the GestureDetectorProcessor. In this scenario, the
764 // functor should still not be called (which is what we're also testing).
765 secondDetector.Attach(actor2);
767 // Pinch in actor's area - both detector's functors should be called
768 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
769 DALI_TEST_EQUALS(true, firstData.functorCalled, TEST_LOCATION);
770 DALI_TEST_EQUALS(true, secondData.functorCalled, TEST_LOCATION);
772 // Pinch continues in actor's area - both detector's functors should be called
775 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
776 DALI_TEST_EQUALS(true, firstData.functorCalled, TEST_LOCATION);
777 DALI_TEST_EQUALS(true, secondData.functorCalled, TEST_LOCATION);
779 // Detach actor from firstDetector and emit pinch on actor, only secondDetector's functor should be called.
780 firstDetector.Detach(actor);
783 TestEndPinch(application, Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
784 DALI_TEST_EQUALS(false, firstData.functorCalled, TEST_LOCATION);
785 DALI_TEST_EQUALS(true, secondData.functorCalled, TEST_LOCATION);
787 // New pinch on actor, only secondDetector has actor attached
790 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 1500);
791 DALI_TEST_EQUALS(false, firstData.functorCalled, TEST_LOCATION);
792 DALI_TEST_EQUALS(true, secondData.functorCalled, TEST_LOCATION);
794 // Detach actor from secondDetector
795 secondDetector.Detach(actor);
798 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 2000);
799 DALI_TEST_EQUALS(false, firstData.functorCalled, TEST_LOCATION);
800 DALI_TEST_EQUALS(false, secondData.functorCalled, TEST_LOCATION);
804 int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void)
806 TestApplication application;
808 Actor actor1 = Actor::New();
809 actor1.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
810 actor1.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
811 application.GetScene().Add(actor1);
813 GestureReceivedFunctor functor1(data1);
814 PinchGestureDetector detector1 = PinchGestureDetector::New();
815 detector1.Attach(actor1);
816 detector1.DetectedSignal().Connect(&application, functor1);
818 Actor actor2 = Actor::New();
819 actor2.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
820 actor2.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT);
821 actor2.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT);
822 application.GetScene().Add(actor2);
824 GestureReceivedFunctor functor2(data2);
825 PinchGestureDetector detector2 = PinchGestureDetector::New();
826 detector2.Attach(actor2);
827 detector2.DetectedSignal().Connect(&application, functor2);
830 application.SendNotification();
831 application.Render();
833 // Start pan in actor1's area, only data1 should be set
834 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
835 DALI_TEST_EQUALS(true, data1.functorCalled, TEST_LOCATION);
836 DALI_TEST_EQUALS(false, data2.functorCalled, TEST_LOCATION);
840 int UtcDaliPinchGestureActorUnstaged(void)
842 TestApplication application;
844 Actor actor = Actor::New();
845 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
846 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
847 application.GetScene().Add(actor);
850 application.SendNotification();
851 application.Render();
853 // State to remove actor in.
854 GestureState stateToUnstage(GestureState::STARTED);
856 // Attach actor to detector
858 UnstageActorFunctor functor(data, stateToUnstage, application.GetScene());
859 PinchGestureDetector detector = PinchGestureDetector::New();
860 detector.Attach(actor);
861 detector.DetectedSignal().Connect(&application, functor);
864 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
865 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
867 TestEndPinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
868 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
872 application.SendNotification();
873 application.Render();
875 // Re-add actor to stage
876 application.GetScene().Add(actor);
879 application.SendNotification();
880 application.Render();
882 // Change state to GestureState::CONTINUING to remove
883 stateToUnstage = GestureState::CONTINUING;
886 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
887 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
889 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
890 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
892 TestEndPinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
893 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
897 application.SendNotification();
898 application.Render();
900 // Re-add actor to stage
901 application.GetScene().Add(actor);
904 application.SendNotification();
905 application.Render();
907 // Change state to GestureState::CONTINUING to remove
908 stateToUnstage = GestureState::FINISHED;
911 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
912 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
914 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
915 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
917 TestEndPinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
918 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
919 tet_result(TET_PASS); // If we get here then we have handled actor stage removal gracefully.
923 int UtcDaliPinchGestureActorStagedAndDestroyed(void)
925 TestApplication application;
927 Actor actor = Actor::New();
928 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
929 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
930 application.GetScene().Add(actor);
932 // Create and add a second actor so that GestureDetector destruction does not come into play.
933 Actor dummyActor(Actor::New());
934 dummyActor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
935 dummyActor.SetProperty(Actor::Property::POSITION, Vector2(100.0f, 100.0f));
936 dummyActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
937 application.GetScene().Add(dummyActor);
940 application.SendNotification();
941 application.Render();
943 // State to remove actor in.
944 GestureState stateToUnstage(GestureState::STARTED);
946 // Attach actor to detector
948 UnstageActorFunctor functor(data, stateToUnstage, application.GetScene());
949 PinchGestureDetector detector = PinchGestureDetector::New();
950 detector.Attach(actor);
951 detector.Attach(dummyActor);
952 detector.DetectedSignal().Connect(&application, functor);
954 // Here we are testing a STARTED actor which is removed in the STARTED callback, but then added back
955 // before we get a continuing state. As we were removed from the stage, even if we're at the same
956 // position, we should still not be signalled.
959 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
960 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
964 application.SendNotification();
965 application.Render();
967 // Re add to the stage, we should not be signalled
968 application.GetScene().Add(actor);
971 application.SendNotification();
972 application.Render();
974 // Continue signal emission
975 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 500);
976 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
978 TestEndPinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
979 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
982 // Here we delete an actor in started, we should not receive any subsequent signalling.
985 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 1500);
986 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
990 application.SendNotification();
991 application.Render();
993 // Delete actor as well
997 application.SendNotification();
998 application.Render();
1000 // Continue signal emission
1001 TestContinuePinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(15.0f, 20.0f), Vector2(25.0f, 20.0f), 2000);
1002 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
1004 TestEndPinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 3000);
1005 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
1009 int UtcDaliPinchGestureLayerConsumesTouch(void)
1011 TestApplication application;
1013 Actor actor = Actor::New();
1014 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
1015 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
1016 application.GetScene().Add(actor);
1020 GestureReceivedFunctor functor(data);
1021 PinchGestureDetector detector = PinchGestureDetector::New();
1022 detector.Attach(actor);
1023 detector.DetectedSignal().Connect(&application, functor);
1025 // Add a layer to overlap the actor
1026 Layer layer = Layer::New();
1027 layer.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
1028 layer.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
1029 application.GetScene().Add(layer);
1032 // Render and notify
1033 application.SendNotification();
1034 application.Render();
1036 // Emit signals, should receive
1037 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 100);
1038 TestEndPinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 1000);
1039 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
1042 // Set layer to consume all touch
1043 layer.SetProperty(Layer::Property::CONSUMES_TOUCH, true);
1045 // Render and notify
1046 application.SendNotification();
1047 application.Render();
1049 // Emit the same signals again, should not receive
1050 TestStartPinch(application, Vector2(2.0f, 20.0f), Vector2(38.0f, 20.0f), Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), 1500);
1051 TestEndPinch(application, Vector2(10.0f, 20.0f), Vector2(30.0f, 20.0f), Vector2(19.0f, 20.0f), Vector2(21.0f, 20.0f), 2000);
1052 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);