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.
21 #include <dali/public-api/dali-core.h>
22 #include <dali/integration-api/input-options.h>
23 #include <dali/integration-api/events/touch-event-integ.h>
24 #include <dali/integration-api/render-task-list-integ.h>
25 #include <dali-test-suite-utils.h>
26 #include <test-touch-utils.h>
30 ///////////////////////////////////////////////////////////////////////////////
37 : functorCalled(false),
38 voidFunctorCalled(false),
44 functorCalled = false;
45 voidFunctorCalled = false;
47 receivedGesture.state = Gesture::Started;
53 bool voidFunctorCalled;
54 PanGesture receivedGesture;
58 // Functor that sets the data when called
59 struct GestureReceivedFunctor
61 GestureReceivedFunctor(SignalData& data) : signalData(data) { }
63 void operator()(Actor actor, const PanGesture& pan)
65 signalData.functorCalled = true;
66 signalData.receivedGesture = pan;
67 signalData.pannedActor = actor;
72 signalData.voidFunctorCalled = true;
75 SignalData& signalData;
79 Integration::TouchEvent GenerateSingleTouch( PointState::Type state, const Vector2& screenPosition, uint32_t time )
81 Integration::TouchEvent touchEvent;
82 Integration::Point point;
83 point.SetState( state );
84 point.SetScreenPosition( screenPosition );
85 point.SetDeviceClass( Device::Class::TOUCH );
86 point.SetDeviceSubclass( Device::Subclass::NONE );
87 touchEvent.points.push_back( point );
88 touchEvent.time = time;
92 Integration::TouchEvent GenerateDoubleTouch( PointState::Type stateA, const Vector2& screenPositionA, PointState::Type stateB, const Vector2& screenPositionB, uint32_t time )
94 Integration::TouchEvent touchEvent;
95 Integration::Point point;
96 point.SetState( stateA );
97 point.SetScreenPosition( screenPositionA );
98 point.SetDeviceClass( Device::Class::TOUCH );
99 point.SetDeviceSubclass( Device::Subclass::NONE );
100 touchEvent.points.push_back( point );
101 point.SetScreenPosition( screenPositionB );
102 point.SetState( stateB);
103 touchEvent.points.push_back( point );
104 touchEvent.time = time;
111 ///////////////////////////////////////////////////////////////////////////////
114 int UtcDaliPanGestureRecognizerBasicNoAction(void)
116 TestApplication application;
118 PanGestureDetector detector = PanGestureDetector::New();
120 Actor actor = Actor::New();
121 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
122 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
123 application.GetScene().Add(actor);
126 application.SendNotification();
127 application.Render();
129 detector.Attach(actor);
132 GestureReceivedFunctor functor(data);
133 detector.DetectedSignal().Connect(&application, functor);
135 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
137 application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 20.0f, 20.0f ), 200 ) );
139 application.SendNotification();
141 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
146 int UtcDaliPanGestureRecognizerBasic(void)
148 TestApplication application;
150 PanGestureDetector detector = PanGestureDetector::New();
152 Actor actor = Actor::New();
153 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
154 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
155 application.GetScene().Add(actor);
158 application.SendNotification();
159 application.Render();
161 detector.Attach(actor);
164 GestureReceivedFunctor functor(data);
165 detector.DetectedSignal().Connect(&application, functor);
167 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
168 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
169 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 152 ) );
171 application.SendNotification();
173 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
178 int UtcDaliPanGestureRecognizerBasicInterrupted(void)
180 TestApplication application;
182 PanGestureDetector detector = PanGestureDetector::New();
184 Actor actor = Actor::New();
185 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
186 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
187 application.GetScene().Add(actor);
190 application.SendNotification();
191 application.Render();
193 detector.Attach(actor);
196 GestureReceivedFunctor functor(data);
197 detector.DetectedSignal().Connect(&application, functor);
199 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
200 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 25.0f ), 151 ) );
201 application.ProcessEvent( GenerateSingleTouch( PointState::INTERRUPTED, Vector2( 20.0f, 30.0f ), 152 ) );
203 application.SendNotification();
205 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
210 int UtcDaliPanGestureRecognizerBasicShortest(void)
212 TestApplication application;
214 PanGestureDetector detector = PanGestureDetector::New();
216 Actor actor = Actor::New();
217 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
218 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
219 application.GetScene().Add(actor);
222 application.SendNotification();
223 application.Render();
225 detector.Attach(actor);
228 GestureReceivedFunctor functor(data);
229 detector.DetectedSignal().Connect(&application, functor);
231 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
232 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
233 application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 20.0f, 40.0f ), 155 ) );
235 application.SendNotification();
237 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
242 int UtcDaliPanGestureRecognizerBasicFailToStart(void)
244 TestApplication application;
246 PanGestureDetector detector = PanGestureDetector::New();
248 Actor actor = Actor::New();
249 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
250 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
251 application.GetScene().Add(actor);
254 application.SendNotification();
255 application.Render();
257 detector.Attach(actor);
260 GestureReceivedFunctor functor(data);
261 detector.DetectedSignal().Connect(&application, functor);
263 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
264 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
265 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 40.0f, 40.0f ), 153 ) );
267 application.SendNotification();
269 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
274 int UtcDaliPanGestureRecognizerBasicStationary(void)
276 TestApplication application;
278 PanGestureDetector detector = PanGestureDetector::New();
280 Actor actor = Actor::New();
281 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
282 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
283 application.GetScene().Add(actor);
286 application.SendNotification();
287 application.Render();
289 detector.Attach(actor);
292 GestureReceivedFunctor functor(data);
293 detector.DetectedSignal().Connect(&application, functor);
295 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
296 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
297 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 50.0f ), 152 ) );
298 application.ProcessEvent( GenerateSingleTouch( PointState::STATIONARY, Vector2( 20.0f, 50.0f ), 153 ) );
299 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 55.0f ), 154 ) );
301 application.SendNotification();
303 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
308 int UtcDaliPanGestureRecognizerNewParametersFail(void)
310 TestApplication application;
312 PanGestureDetector detector = PanGestureDetector::New();
314 detector.SetMaximumTouchesRequired(2);
315 detector.SetMinimumTouchesRequired(2);
317 Actor actor = Actor::New();
318 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
319 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
320 application.GetScene().Add(actor);
323 application.SendNotification();
324 application.Render();
326 detector.Attach(actor);
329 GestureReceivedFunctor functor(data);
330 detector.DetectedSignal().Connect(&application, functor);
332 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
333 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
334 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 152 ) );
336 application.SendNotification();
338 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
343 int UtcDaliPanGestureRecognizerNewParametersSuccess(void)
345 TestApplication application;
347 PanGestureDetector detector = PanGestureDetector::New();
349 detector.SetMaximumTouchesRequired(2);
350 detector.SetMinimumTouchesRequired(2);
352 Actor actor = Actor::New();
353 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
354 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
355 application.GetScene().Add(actor);
358 application.SendNotification();
359 application.Render();
361 detector.Attach(actor);
364 GestureReceivedFunctor functor(data);
365 detector.DetectedSignal().Connect(&application, functor);
367 application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
368 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
369 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
371 application.SendNotification();
373 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
378 int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches01(void)
380 TestApplication application;
382 PanGestureDetector detector = PanGestureDetector::New();
384 detector.SetMaximumTouchesRequired(2);
385 detector.SetMinimumTouchesRequired(2);
387 Actor actor = Actor::New();
388 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
389 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
390 application.GetScene().Add(actor);
393 application.SendNotification();
394 application.Render();
396 detector.Attach(actor);
399 GestureReceivedFunctor functor(data);
400 detector.DetectedSignal().Connect(&application, functor);
402 application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
403 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
404 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
405 application.ProcessEvent( GenerateSingleTouch( PointState::STATIONARY, Vector2( 50.0f, 50.0f ), 153 ) );
407 application.SendNotification();
409 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
414 int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches02(void)
416 TestApplication application;
418 PanGestureDetector detector = PanGestureDetector::New();
420 detector.SetMaximumTouchesRequired(2);
421 detector.SetMinimumTouchesRequired(2);
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();
432 detector.Attach(actor);
435 GestureReceivedFunctor functor(data);
436 detector.DetectedSignal().Connect(&application, functor);
438 application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
439 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
440 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
441 application.ProcessEvent( GenerateDoubleTouch( PointState::STATIONARY, Vector2( 50.0f, 50.0f ), PointState::UP, Vector2( 50.0f, 40.0f ), 153 ) );
443 application.SendNotification();
445 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
450 int UtcDaliPanGestureRecognizerNewParametersNoStart(void)
452 TestApplication application;
454 PanGestureDetector detector = PanGestureDetector::New();
456 detector.SetMaximumTouchesRequired(2);
457 detector.SetMinimumTouchesRequired(2);
459 Actor actor = Actor::New();
460 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
461 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
462 application.GetScene().Add(actor);
465 application.SendNotification();
466 application.Render();
468 detector.Attach(actor);
471 GestureReceivedFunctor functor(data);
472 detector.DetectedSignal().Connect(&application, functor);
474 application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
475 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
476 application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 50.0f, 50.0f ), 153 ) );
478 application.SendNotification();
480 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
485 int UtcDaliPanGestureRecognizerNewParametersSlowRelease(void)
487 TestApplication application;
489 PanGestureDetector detector = PanGestureDetector::New();
491 detector.SetMaximumTouchesRequired(2);
492 detector.SetMinimumTouchesRequired(2);
494 Actor actor = Actor::New();
495 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
496 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
497 application.GetScene().Add(actor);
500 application.SendNotification();
501 application.Render();
503 detector.Attach(actor);
506 GestureReceivedFunctor functor(data);
507 detector.DetectedSignal().Connect(&application, functor);
509 application.ProcessEvent( GenerateDoubleTouch( PointState::DOWN, Vector2( 20.0f, 50.0f ), PointState::DOWN, Vector2( 20.0f, 40.0f ), 150 ) );
510 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 40.0f, 50.0f ), PointState::MOTION, Vector2( 40.0f, 40.0f ), 151 ) );
511 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 50.0f, 50.0f ), PointState::MOTION, Vector2( 50.0f, 40.0f ), 152 ) );
512 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 60.0f, 50.0f ), PointState::MOTION, Vector2( 60.0f, 40.0f ), 153 ) );
513 application.ProcessEvent( GenerateDoubleTouch( PointState::MOTION, Vector2( 70.0f, 50.0f ), PointState::MOTION, Vector2( 70.0f, 40.0f ), 154 ) );
514 application.ProcessEvent( GenerateSingleTouch( PointState::UP, Vector2( 70.0f, 50.0f ), 155 ) );
516 application.SendNotification();
518 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
523 int UtcDaliPanGestureRecognizerOtherEvent(void)
525 TestApplication application;
527 PanGestureDetector detector = PanGestureDetector::New();
529 Actor actor = Actor::New();
530 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
531 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
532 application.GetScene().Add(actor);
535 application.SendNotification();
536 application.Render();
538 detector.Attach(actor);
541 GestureReceivedFunctor functor(data);
542 detector.DetectedSignal().Connect(&application, functor);
544 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
545 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 151 ) );
546 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 152 ) );
547 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 60.0f ), 153 ) ); // Exercise default case in Started case. Not sure if realistic
548 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 65.0f ), 154 ) );
550 application.SendNotification();
552 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
557 int UtcDaliPanGestureRecognizerSlowMoving(void)
559 TestApplication application;
561 PanGestureDetector detector = PanGestureDetector::New();
563 Actor actor = Actor::New();
564 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
565 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
566 application.GetScene().Add(actor);
569 application.SendNotification();
570 application.Render();
572 detector.Attach(actor);
575 GestureReceivedFunctor functor(data);
576 detector.DetectedSignal().Connect(&application, functor);
578 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
579 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 251 ) );
580 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 352 ) );
581 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 70.0f ), 453 ) );
582 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 80.0f ), 554 ) );
583 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 90.0f ), 655 ) );
585 application.SendNotification();
587 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
592 int UtcDaliPanGestureRecognizerNewParamsMinNum(void)
594 TestApplication application;
596 Integration::SetPanGestureMinimumPanEvents(8);
599 PanGestureDetector detector = PanGestureDetector::New();
601 Actor actor = Actor::New();
602 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
603 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
604 application.GetScene().Add(actor);
607 application.SendNotification();
608 application.Render();
610 detector.Attach(actor);
613 GestureReceivedFunctor functor(data);
614 detector.DetectedSignal().Connect(&application, functor);
616 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
617 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 251 ) );
618 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 352 ) );
619 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 70.0f ), 453 ) );
620 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 80.0f ), 554 ) );
621 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 90.0f ), 655 ) );
623 application.SendNotification();
625 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
630 int UtcDaliPanGestureRecognizerNewParamsMinDistance(void)
632 TestApplication application;
634 Integration::SetPanGestureMinimumDistance(100);
636 PanGestureDetector detector = PanGestureDetector::New();
638 Actor actor = Actor::New();
639 actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
640 actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
641 application.GetScene().Add(actor);
644 application.SendNotification();
645 application.Render();
647 detector.Attach(actor);
650 GestureReceivedFunctor functor(data);
651 detector.DetectedSignal().Connect(&application, functor);
653 application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 20.0f, 20.0f ), 150 ) );
654 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 40.0f ), 251 ) );
655 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 60.0f ), 352 ) );
656 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 70.0f ), 453 ) );
657 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 80.0f ), 554 ) );
658 application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 20.0f, 90.0f ), 655 ) );
660 application.SendNotification();
662 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);