}
-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
Test mTest;
};
-static bool TestCallback(Actor actor, const TouchEvent& event)
+static bool TestCallback(Actor actor, const TouchData& event)
{
return true;
}
// * Actor's touch event is connected to a callback function
// and this callback function consumes the event.
- actor.TouchedSignal().Connect( &TestCallback );
+ actor.TouchSignal().Connect( &TestCallback );
// * Button's pressed signal is connected to a callback function
// which also consumes the event.
// 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();
// 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();
// 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();
// 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();
// 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();
// 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();
// * Actor's touch event is connected to a callback function
// and this callback function consumes the event.
- actor.TouchedSignal().Connect( &TestCallback );
+ actor.TouchSignal().Connect( &TestCallback );
// * Button's pressed signal is connected to a callback function
// which also consumes the event.
// 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();
// 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();
// 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();
// 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();
// 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();
// 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();