}
-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
// 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();
// 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();
{
return TextureSet::New();
}
-
TextureSet CreateTextureSet( Image image )
{
TextureSet textureSet = TextureSet::New();
TextureSet CreateTextureSet();
TextureSet CreateTextureSet( Image image );
PropertyBuffer CreatePropertyBuffer();
-
}
#endif // MESH_BUILDER_H
}
// 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;
}
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);
// 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 );
// 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
// 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
// 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
// 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
// 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
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
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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);
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 );
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);
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
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();
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();
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();
// 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();
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 )
{
pushButton.PressedSignal().Connect( &PushButtonPressed );
Dali::Integration::TouchEvent eventDown;
- eventDown.AddPoint( pointDownInside );
+ eventDown.AddPoint( GetPointDownInside() );
// flush the queue and render once
application.SendNotification();
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 );
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 );
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 );
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 );
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 );
// 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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );