Changes after touch changes to Core 36/75136/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 16 Jun 2016 16:46:08 +0000 (17:46 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 16 Jun 2016 18:18:59 +0000 (19:18 +0100)
Change-Id: Ie054c75df998a295d21af549420359d9c2684364

12 files changed:
automated-tests/src/dali-toolkit-internal/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/mesh-builder.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-touch-utils.h
automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp
automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp
automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp

index e23dbe3..69698fa 100644 (file)
@@ -38,13 +38,38 @@ bool PushButtonSelected( Button button, bool selected )
 }
 
 
-const Dali::TouchPoint pointDownInside( 0, TouchPoint::Down, 240, 400 );
-const Dali::TouchPoint pointUpInside( 0, TouchPoint::Up, 240, 400 );
-const Dali::TouchPoint pointLeave( 0, TouchPoint::Leave, 240, 400 );
-const Dali::TouchPoint pointEnter( 0, TouchPoint::Motion, 240, 400 );
-const Dali::TouchPoint pointMotionOut( 0, TouchPoint::Motion, 10, 10 );
-const Dali::TouchPoint pointDownOutside( 0, TouchPoint::Down, 10, 10 );
-const Dali::TouchPoint pointUpOutside( 0, TouchPoint::Up, 10, 10 );
+Dali::Integration::Point GetPointDownInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointUpInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointMotionOut()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::MOTION );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointUpOutside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
+
 } // namespace
 
 
@@ -385,7 +410,7 @@ int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
   // A down event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -395,7 +420,7 @@ int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
   // An up event is sent outside the button's boundary but inside the actor's one.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -419,7 +444,7 @@ int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
   // A down event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -429,7 +454,7 @@ int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
   // A motion event is sent outside the button's boundary but inside the actor's one.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointMotionOut );
+  event.AddPoint( GetPointMotionOut() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -449,7 +474,7 @@ int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
   // A down event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -460,7 +485,7 @@ int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
   // An up event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -528,7 +553,7 @@ int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
   // A down event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -546,7 +571,7 @@ int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
   // An up event is sent outside the button's boundary but inside the actor's one.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -573,7 +598,7 @@ int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
   // A down event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -591,7 +616,7 @@ int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
   // A motion event is sent outside the button's boundary but inside the actor's one.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointMotionOut );
+  event.AddPoint( GetPointMotionOut() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -617,7 +642,7 @@ int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
   // A down event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -636,7 +661,7 @@ int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
   // An up event is sent inside the button's boundary.
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
 
   // flush the queue and render once
   application.SendNotification();
index 4cc72bd..978dc74 100644 (file)
@@ -28,7 +28,6 @@ TextureSet CreateTextureSet()
 {
   return TextureSet::New();
 }
-
 TextureSet CreateTextureSet( Image image )
 {
   TextureSet textureSet = TextureSet::New();
index 391bcc4..e157338 100644 (file)
@@ -31,7 +31,6 @@ Shader CreateShader();
 TextureSet CreateTextureSet();
 TextureSet CreateTextureSet( Image image );
 PropertyBuffer CreatePropertyBuffer();
-
 }
 
 #endif // MESH_BUILDER_H
index ebae313..28caca9 100644 (file)
@@ -62,10 +62,13 @@ struct TouchEventDataFunctor
   }
 
   // Generate a touch-event
-  Integration::TouchEvent GenerateSingleTouch( TouchPoint::State state, Vector2 screenPosition ) const
+  Integration::TouchEvent GenerateSingleTouch( PointState::Type state, const Vector2& screenPosition ) const
   {
     Integration::TouchEvent touchEvent;
-    touchEvent.points.push_back( TouchPoint ( 0, state, screenPosition.x, screenPosition.y ) );
+    Integration::Point point;
+    point.SetState( state );
+    point.SetScreenPosition( screenPosition );
+    touchEvent.points.push_back( point );
     return touchEvent;
   }
 
index bffde5d..0ae0611 100644 (file)
@@ -978,7 +978,10 @@ int UtcDaliAlignmentOnTouchEvent(void)
   application.SendNotification();
 
   Integration::TouchEvent touchEvent(1);
-  TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+  Integration::Point point;
+  point.SetDeviceId( 1 );
+  point.SetState( PointState::DOWN);
+  point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
   touchEvent.AddPoint(point);
   application.ProcessEvent(touchEvent);
 
index f2d3e9c..ebfd376 100644 (file)
@@ -103,7 +103,10 @@ int UtcDaliBuilderQuitSignal(void)
 
   // Emit touch event and check that our quit method is called
   Integration::TouchEvent touchEvent;
-  touchEvent.points.push_back( TouchPoint ( 0, TouchPoint::Down, 10.0f, 10.0f ) );
+  Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  touchEvent.points.push_back( point );
   application.ProcessEvent( touchEvent );
   DALI_TEST_CHECK( functorCalled );
 
@@ -268,7 +271,10 @@ int UtcDaliBuilderAnimationP(void)
   // trigger play
   // Emit touch event and check that our quit method is called
   Integration::TouchEvent touchEvent;
-  touchEvent.points.push_back( TouchPoint ( 0, TouchPoint::Down, 10.0f, 10.0f ) );
+  Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  touchEvent.points.push_back( point );
   application.ProcessEvent( touchEvent );
 
   // Render and notify
@@ -665,7 +671,10 @@ int UtcDaliBuilderChildActionP(void)
 
   // Emit touch event and check that our quit method is called
   Integration::TouchEvent touchEvent;
-  touchEvent.points.push_back( TouchPoint ( 0, TouchPoint::Down, 10.0f, 10.0f ) );
+  Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  touchEvent.points.push_back( point );
   application.ProcessEvent( touchEvent );
 
   // Render and notify
@@ -719,7 +728,10 @@ int UtcDaliBuilderSetPropertyActionP(void)
 
   // Emit touch event and check that our quit method is called
   Integration::TouchEvent touchEvent;
-  touchEvent.points.push_back( TouchPoint ( 0, TouchPoint::Down, 10.0f, 10.0f ) );
+  Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  touchEvent.points.push_back( point );
   application.ProcessEvent( touchEvent );
 
   // Render and notify
@@ -770,7 +782,10 @@ int UtcDaliBuilderGenericActionP(void)
 
   // Emit touch event and check that our quit method is called
   Integration::TouchEvent touchEvent;
-  touchEvent.points.push_back( TouchPoint ( 0, TouchPoint::Down, 10.0f, 10.0f ) );
+  Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  touchEvent.points.push_back( point );
   application.ProcessEvent( touchEvent );
 
   // Render and notify
@@ -826,7 +841,10 @@ int UtcDaliBuilderPropertyNotificationP(void)
 
   // Emit touch event and check that our quit method is called
   Integration::TouchEvent touchEvent;
-  touchEvent.points.push_back( TouchPoint ( 0, TouchPoint::Down, 10.0f, 10.0f ) );
+  Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+  touchEvent.points.push_back( point );
   application.ProcessEvent( touchEvent );
 
   // Render and notify
index f290cb2..07e2b14 100644 (file)
@@ -71,12 +71,54 @@ Image CreateSolidColorImage( const Vector4& color, unsigned int width, unsigned
   return imageData;
 }
 
-const Dali::TouchPoint pointDownInside( 0, TouchPoint::Down, 240, 400 );
-const Dali::TouchPoint pointUpInside( 0, TouchPoint::Up, 240, 400 );
-const Dali::TouchPoint pointLeave( 0, TouchPoint::Leave, 240, 400 );
-const Dali::TouchPoint pointEnter( 0, TouchPoint::Motion, 240, 400 );
-const Dali::TouchPoint pointDownOutside( 0, TouchPoint::Down, 10, 10 );
-const Dali::TouchPoint pointUpOutside( 0, TouchPoint::Up, 10, 10 );
+Dali::Integration::Point GetPointDownInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointUpInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointLeave()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::LEAVE );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointEnter()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::MOTION );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointDownOutside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointUpOutside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
+
 
 static float ANIMATION_TIME( 0.5f );
 } // namespace
@@ -404,14 +446,14 @@ int UtcDaliButtonPressedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
@@ -420,14 +462,14 @@ int UtcDaliButtonPressedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
@@ -436,18 +478,18 @@ int UtcDaliButtonPressedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointLeave );
+  event.AddPoint( GetPointLeave() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
@@ -456,18 +498,18 @@ int UtcDaliButtonPressedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointEnter );
+  event.AddPoint( GetPointEnter() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
@@ -499,11 +541,11 @@ int UtcDaliButtonClickedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gIsCalledButtonCallback );
@@ -512,11 +554,11 @@ int UtcDaliButtonClickedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
@@ -525,15 +567,15 @@ int UtcDaliButtonClickedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointLeave );
+  event.AddPoint( GetPointLeave() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
@@ -542,15 +584,15 @@ int UtcDaliButtonClickedSignalP(void)
 
   gIsCalledButtonCallback = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointEnter );
+  event.AddPoint( GetPointEnter() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gIsCalledButtonCallback );
index 264a125..f30007f 100644 (file)
@@ -562,7 +562,10 @@ int UtcDaliControlImplTouchEvent(void)
 
     DALI_TEST_EQUALS( dummyImpl.touchEventCalled, false, TEST_LOCATION );
     Integration::TouchEvent touchEvent(1);
-    TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+    Integration::Point point;
+    point.SetDeviceId( 1 );
+    point.SetState( PointState::DOWN );
+    point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
     touchEvent.AddPoint(point);
     application.ProcessEvent(touchEvent);
     DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
@@ -584,7 +587,10 @@ int UtcDaliControlImplTouchEvent(void)
     application.SendNotification();
 
     Integration::TouchEvent touchEvent(1);
-    TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+    Integration::Point point;
+    point.SetDeviceId( 1 );
+    point.SetState( PointState::DOWN );
+    point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
     touchEvent.AddPoint(point);
     application.ProcessEvent(touchEvent);
 
@@ -612,8 +618,11 @@ int UtcDaliControlImplHoverEvent(void)
 
     DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, false, TEST_LOCATION );
     Integration::HoverEvent event(1);
-    TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f );
-    event.AddPoint( point );
+    Integration::Point point;
+    point.SetDeviceId( 1 );
+    point.SetState( PointState::MOTION );
+    point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
+    event.AddPoint(point);
     application.ProcessEvent( event );
     DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, true, TEST_LOCATION );
 
@@ -634,8 +643,11 @@ int UtcDaliControlImplHoverEvent(void)
     application.SendNotification();
 
     Integration::HoverEvent event(1);
-    TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f );
-    event.AddPoint( point );
+    Integration::Point point;
+    point.SetDeviceId( 1 );
+    point.SetState( PointState::MOTION );
+    point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
+    event.AddPoint(point);
     application.ProcessEvent( event );
 
     Stage::GetCurrent().Remove(dummy);
index 4df55da..c3eaa4b 100644 (file)
@@ -55,8 +55,22 @@ const int RENDER_FRAME_INTERVAL = 10;                          ///< Duration of
 const int RENDER_ANIMATION_TEST_DURATION_MS = 2000;            ///< 2000ms to test animation.
 const int RENDER_ANIMATION_TEST_DURATION_FRAMES = RENDER_ANIMATION_TEST_DURATION_MS / RENDER_FRAME_INTERVAL; ///< equivalent frames.
 const Vector3 DEFAULT_BUTTON_SIZE(100.0f, 50.0f, 0.0f);
-const Dali::TouchPoint pointDownOutside( 0, TouchPoint::Down, 10.0f, 10.0f );
-const Dali::TouchPoint pointUpOutside( 0, TouchPoint::Up, 10.0f, 10.0f );
+
+Dali::Integration::Point GetPointDown()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointUp()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
 
 /**
  * Counts how many descendants root Actor has, including
@@ -627,14 +641,14 @@ int UtcDaliPopupOnTouchedOutsideSignal(void)
   Dali::Integration::TouchEvent event;
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDown() );
   application.ProcessEvent( event );
 
   application.SendNotification();
   application.Render();
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUp() );
   application.ProcessEvent( event );
 
   application.SendNotification();
@@ -645,14 +659,14 @@ int UtcDaliPopupOnTouchedOutsideSignal(void)
   popup.SetProperty( Popup::Property::TOUCH_TRANSPARENT, true );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDown() );
   application.ProcessEvent( event );
 
   application.SendNotification();
   application.Render();
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUp() );
   application.ProcessEvent( event );
 
   application.SendNotification();
@@ -1127,18 +1141,16 @@ int UtcDaliPopupPropertyTouchTransparent(void)
 
   gPushButtonClicked = false;
   Dali::Integration::TouchEvent event;
-  const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 10.0f, 10.0f );
-  const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 10.0f, 10.0f );
 
   // Perform a click, the popup should block the click from hitting the button.
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDown );
+  event.AddPoint( GetPointDown() );
   application.ProcessEvent( event );
   application.SendNotification();
   application.Render();
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUp );
+  event.AddPoint( GetPointUp() );
   application.ProcessEvent( event );
   application.SendNotification();
   application.Render();
@@ -1153,13 +1165,13 @@ int UtcDaliPopupPropertyTouchTransparent(void)
 
   // Perform a click, the popup should allow the click to travel through to the button.
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDown );
+  event.AddPoint( GetPointDown() );
   application.ProcessEvent( event );
   application.SendNotification();
   application.Render();
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUp );
+  event.AddPoint( GetPointUp() );
   application.ProcessEvent( event );
   application.SendNotification();
   application.Render();
index f785c63..fe2ac1d 100644 (file)
@@ -65,13 +65,53 @@ static bool PushButtonReleased( Button button )
   return true;
 }
 
-const Dali::TouchPoint pointDownInside( 0, TouchPoint::Down, 240, 400 );
-const Dali::TouchPoint pointUpInside( 0, TouchPoint::Up, 240, 400 );
-const Dali::TouchPoint pointLeave( 0, TouchPoint::Leave, 240, 400 );
-const Dali::TouchPoint pointEnter( 0, TouchPoint::Motion, 240, 400 );
-const Dali::TouchPoint pointMotionOut( 0, TouchPoint::Motion, 10, 10 );
-const Dali::TouchPoint pointDownOutside( 0, TouchPoint::Down, 10, 10 );
-const Dali::TouchPoint pointUpOutside( 0, TouchPoint::Up, 10, 10 );
+Dali::Integration::Point GetPointDownInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointUpInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointLeave()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::LEAVE );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointEnter()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::MOTION );
+  point.SetScreenPosition( Vector2( 240, 400 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointDownOutside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
+
+Dali::Integration::Point GetPointUpOutside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( Vector2( 10, 10 ) );
+  return point;
+}
 
 Image CreateSolidColorImage( const Vector4& color, unsigned int width, unsigned int height )
 {
@@ -386,7 +426,7 @@ int UtcDaliPushButtonPressed(void)
   pushButton.PressedSignal().Connect( &PushButtonPressed );
 
   Dali::Integration::TouchEvent eventDown;
-  eventDown.AddPoint( pointDownInside );
+  eventDown.AddPoint( GetPointDownInside() );
 
   // flush the queue and render once
   application.SendNotification();
@@ -422,11 +462,11 @@ int UtcDaliPushButtonReleased(void)
 
   gPushButtonReleased = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gPushButtonReleased );
@@ -435,11 +475,11 @@ int UtcDaliPushButtonReleased(void)
 
   gPushButtonReleased = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gPushButtonReleased );
@@ -448,15 +488,15 @@ int UtcDaliPushButtonReleased(void)
 
   gPushButtonReleased = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointLeave );
+  event.AddPoint( GetPointLeave() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gPushButtonReleased );
@@ -465,15 +505,15 @@ int UtcDaliPushButtonReleased(void)
 
   gPushButtonReleased = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointEnter );
+  event.AddPoint( GetPointEnter() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gPushButtonReleased );
@@ -505,11 +545,11 @@ int UtcDaliPushButtonSelected(void)
 
   gPushButtonSelectedState = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gPushButtonSelectedState );
@@ -520,21 +560,21 @@ int UtcDaliPushButtonSelected(void)
   // Test2. Touch point down and up inside the button twice.
   gPushButtonSelectedState = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( gPushButtonSelectedState );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gPushButtonSelectedState );
@@ -543,11 +583,11 @@ int UtcDaliPushButtonSelected(void)
 
   gPushButtonSelectedState = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gPushButtonSelectedState );
@@ -556,15 +596,15 @@ int UtcDaliPushButtonSelected(void)
 
   gPushButtonSelectedState = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownInside );
+  event.AddPoint( GetPointDownInside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointLeave );
+  event.AddPoint( GetPointLeave() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpOutside );
+  event.AddPoint( GetPointUpOutside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gPushButtonSelectedState );
@@ -573,15 +613,15 @@ int UtcDaliPushButtonSelected(void)
 
   gPushButtonSelectedState = false;
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointDownOutside );
+  event.AddPoint( GetPointDownOutside() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointEnter );
+  event.AddPoint( GetPointEnter() );
   application.ProcessEvent( event );
 
   event = Dali::Integration::TouchEvent();
-  event.AddPoint( pointUpInside );
+  event.AddPoint( GetPointUpInside() );
   application.ProcessEvent( event );
 
   DALI_TEST_CHECK( !gPushButtonSelectedState );
index ac22fe9..07f275e 100644 (file)
@@ -236,8 +236,12 @@ int UtcDaliRadioButtonSelectedProperty(void)
     Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent();
     Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent();
 
-    const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 1.0f, 1.0f );
-    const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 1.0f, 1.0f );
+    Dali::Integration::Point pointDown;
+    pointDown.SetState( PointState::DOWN );
+    pointDown.SetScreenPosition( Vector2( 1.0f, 1.0f ) );
+
+    Dali::Integration::Point pointUp( pointDown );
+    pointUp.SetState( PointState::UP );
 
     event1.AddPoint( pointDown );
     application.ProcessEvent( event1 );
@@ -257,8 +261,12 @@ int UtcDaliRadioButtonSelectedProperty(void)
     Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent();
     Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent();
 
-    const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 1.0f, 1.0f );
-    const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 1.0f, 1.0f );
+    Dali::Integration::Point pointDown;
+    pointDown.SetState( PointState::DOWN );
+    pointDown.SetScreenPosition( Vector2( 1.0f, 1.0f ) );
+
+    Dali::Integration::Point pointUp( pointDown );
+    pointUp.SetState( PointState::UP );
 
     event1.AddPoint( pointDown );
     application.ProcessEvent( event1 );
@@ -278,8 +286,12 @@ int UtcDaliRadioButtonSelectedProperty(void)
     Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent();
     Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent();
 
-    const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 1.0f, 41.0f );
-    const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 1.0f, 41.0f );
+    Dali::Integration::Point pointDown;
+    pointDown.SetState( PointState::DOWN );
+    pointDown.SetScreenPosition( Vector2( 1.0f, 41.0f ) );
+
+    Dali::Integration::Point pointUp( pointDown );
+    pointUp.SetState( PointState::UP );
 
     event1.AddPoint( pointDown );
     application.ProcessEvent( event1 );
@@ -299,8 +311,12 @@ int UtcDaliRadioButtonSelectedProperty(void)
     Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent();
     Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent();
 
-    const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 1.0f, 500.0f );
-    const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 1.0f, 500.0f );
+    Dali::Integration::Point pointDown;
+    pointDown.SetState( PointState::DOWN );
+    pointDown.SetScreenPosition( Vector2( 1.0f, 500.0f ) );
+
+    Dali::Integration::Point pointUp( pointDown );
+    pointUp.SetState( PointState::UP );
 
     event1.AddPoint( pointDown );
     application.ProcessEvent( event1 );
index 15079e2..7ec6acf 100644 (file)
@@ -151,16 +151,22 @@ int UtcDaliSliderSignals(void)
 
   event = Dali::Integration::TouchEvent();
 
-  const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 10.0f, 10.0f );
+  Integration::Point pointDown;
+  pointDown.SetState( PointState::DOWN );
+  pointDown.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
   event.AddPoint( pointDown );
 
   for( int i = 0; i < 5; ++i )
   {
-    const Dali::TouchPoint pointDown( 0, TouchPoint::Motion, 10.0f + i * 10.0f, 10.0f );
-    event.AddPoint( pointDown );
+    Integration::Point pointMotion;
+    pointMotion.SetState( PointState::MOTION );
+    pointMotion.SetScreenPosition( Vector2( 10.0f + i * 10.0f, 10.0f ) );
+    event.AddPoint( pointMotion );
   }
 
-  const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 50.0f, 10.0f );
+  Integration::Point pointUp;
+  pointUp.SetState( PointState::UP );
+  pointUp.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
   event.AddPoint( pointUp );
 
   application.ProcessEvent( event );