#include <dali/public-api/actors/actor.h>
/**
- * Functor to be connected to an Actor's TouchSignal.
+ * Functor to be connected to an Actor's TouchedSignal.
* Allows the user to specify whether the functor should return true (consumed) or false.
*/
struct TouchEventFunctorConsumeSetter
application.Render();
// connect to its touch signal
- actor.TouchSignal().Connect( TestTouchCallback );
+ actor.TouchedSignal().Connect( TestTouchCallback );
// simulate a touch event in the middle of the screen
Vector2 touchPoint( application.GetScene().GetSize() * 0.5 );
DALI_TEST_CHECK( !gTouchCallBackCalled );
// connect to its touch signal
- actor.TouchSignal().Connect(TestTouchCallback);
+ actor.TouchedSignal().Connect(TestTouchCallback);
Dali::Integration::Point point;
point.SetState( PointState::DOWN );
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
// Connect ChildOrderChangedSignal
bool orderChangedSignal( false );
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
Dali::Integration::Point point;
point.SetDeviceId( 1 );
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
bool orderChangedSignal( false );
Actor orderChangedActor;
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
Dali::Integration::Point point;
point.SetDeviceId( 1 );
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
Dali::Integration::Point point;
point.SetDeviceId( 1 );
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
Dali::Integration::Point point;
point.SetDeviceId( 1 );
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
Dali::Integration::Point point;
point.SetDeviceId( 1 );
// connect to actor touch signals, will use touch callbacks to determine which actor is on top.
// Only top actor will get touched.
- actorA.TouchSignal().Connect( TestTouchCallback );
- actorB.TouchSignal().Connect( TestTouchCallback2 );
- actorC.TouchSignal().Connect( TestTouchCallback3 );
+ actorA.TouchedSignal().Connect( TestTouchCallback );
+ actorB.TouchedSignal().Connect( TestTouchCallback2 );
+ actorC.TouchedSignal().Connect( TestTouchCallback3 );
ResetTouchCallbacks();
END_TEST;
}
-int UtcDaliActorTouchSignalNegative(void)
+int UtcDaliActorTouchedSignalNegative(void)
{
TestApplication application;
Dali::Actor instance;
try
{
- instance.TouchSignal();
+ instance.TouchedSignal();
DALI_TEST_CHECK(false); // Should not get here
}
catch(...)
DALI_TEST_CHECK( gTouchCallBackCalled == false );
// connect to its touch signal
- actor.ConnectSignal( &application, "touch", TestCallback() );
+ actor.ConnectSignal( &application, "touched", TestCallback() );
application.SendNotification();
application.Render(1000);
detector.Attach(actor);
TouchEventFunctor touchFunctor;
- actor.TouchSignal().Connect(&application, touchFunctor);
+ actor.TouchedSignal().Connect(&application, touchFunctor);
Integration::TouchEvent touchEvent(1);
Integration::Point point;
bool consume = false;
TouchEventFunctorConsumeSetter touchFunctor(consume);
- actor.TouchSignal().Connect(&application,touchFunctor);
+ actor.TouchedSignal().Connect(&application,touchFunctor);
// Render and notify
application.SendNotification();
bool consume = false;
TouchEventFunctorConsumeSetter touchFunctor(consume);
- actor.TouchSignal().Connect(&application,touchFunctor);
+ actor.TouchedSignal().Connect(&application,touchFunctor);
// Render and notify
application.SendNotification();
bool consume = false;
TouchEventFunctorConsumeSetter touchFunctor(consume);
- actor.TouchSignal().Connect(&application,touchFunctor);
+ actor.TouchedSignal().Connect(&application,touchFunctor);
// Render and notify
application.SendNotification();
bool consume = false;
TouchEventFunctorConsumeSetter touchFunctor(consume);
- actor.TouchSignal().Connect(&application,touchFunctor);
+ actor.TouchedSignal().Connect(&application,touchFunctor);
// Render and notify
application.SendNotification();
TouchedSignalData data;
data.createNewScene = true;
TouchFunctor functor( data );
- scene.TouchSignal().Connect( &application, functor );
+ scene.TouchedSignal().Connect( &application, functor );
// Render and notify.
application.SendNotification();
END_TEST;
}
-int UtcDaliSceneTouchSignalP(void)
+int UtcDaliSceneTouchedSignalP(void)
{
TestApplication application;
Dali::Integration::Scene scene = application.GetScene();
TouchedSignalData data;
TouchFunctor functor( data );
- scene.TouchSignal().Connect( &application, functor );
+ scene.TouchedSignal().Connect( &application, functor );
// Render and notify.
application.SendNotification();
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- actor.TouchSignal().Connect( &DummyTouchCallback );
+ actor.TouchedSignal().Connect( &DummyTouchCallback );
scene.Add( actor );
// Render and notify.
END_TEST;
}
-int UtcDaliSceneTouchSignalN(void)
+int UtcDaliSceneTouchedSignalN(void)
{
TestApplication application;
Dali::Integration::Scene scene = application.GetScene();
TouchedSignalData data;
TouchFunctor functor( data );
- scene.TouchSignal().Connect( &application, functor );
+ scene.TouchedSignal().Connect( &application, functor );
// Render and notify.
application.SendNotification();
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- actor.TouchSignal().Connect( &DummyTouchCallback );
+ actor.TouchedSignal().Connect( &DummyTouchCallback );
scene.Add( actor );
// Render and notify.
DALI_TEST_CHECK( !handle.WheelEventSignal().GetConnectionCount() );
DALI_TEST_CHECK( !handle.OffSceneSignal().GetConnectionCount() );
DALI_TEST_CHECK( !handle.OnSceneSignal().GetConnectionCount() );
- DALI_TEST_CHECK( !handle.TouchSignal().GetConnectionCount() );
+ DALI_TEST_CHECK( !handle.TouchedSignal().GetConnectionCount() );
}
END_TEST;
}
};
// Stores data that is populated in the touched signal callback and will be read by the TET cases
-struct TouchSignalData
+struct TouchedSignalData
{
- TouchSignalData()
+ TouchedSignalData()
: functorCalled(false)
{}
// Functor that sets the data when touched signal is received
struct TouchFunctor
{
- TouchFunctor( TouchSignalData& data ) : signalData( data ) { }
+ TouchFunctor( TouchedSignalData& data ) : signalData( data ) { }
void operator()( const TouchEvent& touch )
{
signalData.functorCalled = true;
}
- TouchSignalData& signalData;
+ TouchedSignalData& signalData;
};
// Stores data that is populated in the wheel-event callback and will be read by the TET cases
TestApplication application;
Stage stage = Stage::GetCurrent();
- TouchSignalData data;
+ TouchedSignalData data;
TouchFunctor functor( data );
- stage.TouchSignal().Connect( &application, functor );
+ stage.TouchedSignal().Connect( &application, functor );
// Render and notify.
application.SendNotification();
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- actor.TouchSignal().Connect( &DummyTouchCallback );
+ actor.TouchedSignal().Connect( &DummyTouchCallback );
stage.Add( actor );
// Render and notify.
TestApplication application;
Stage stage = Stage::GetCurrent();
- TouchSignalData data;
+ TouchedSignalData data;
TouchFunctor functor( data );
- stage.TouchSignal().Connect( &application, functor );
+ stage.TouchedSignal().Connect( &application, functor );
// Render and notify.
application.SendNotification();
actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- actor.TouchSignal().Connect( &DummyTouchCallback );
+ actor.TouchedSignal().Connect( &DummyTouchCallback );
stage.Add( actor );
// Render and notify.
END_TEST;
}
-
-int UtcDaliStageTouchSignalP(void)
-{
- TestApplication application;
- Stage stage = Stage::GetCurrent();
-
- TouchSignalData data;
- TouchFunctor functor( data );
- stage.TouchSignal().Connect( &application, functor );
-
- // Render and notify.
- application.SendNotification();
- application.Render();
-
- // Basic test: No actors, single touch (down then up).
- {
- GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( !data.receivedTouchEvent.GetHitActor(0) );
- data.Reset();
-
- GenerateTouch( application, PointState::UP, Vector2( 10.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( !data.receivedTouchEvent.GetHitActor(0) );
- data.Reset();
- }
-
- // Add an actor to the scene.
- Actor actor = Actor::New();
- actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
- actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- actor.TouchSignal().Connect( &DummyTouchCallback );
- stage.Add( actor );
-
- // Render and notify.
- application.SendNotification();
- application.Render();
-
- // Actor on scene, single touch, down in actor, motion, then up outside actor.
- {
- GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetHitActor(0) == actor );
- data.Reset();
-
- GenerateTouch( application, PointState::MOTION, Vector2( 150.0f, 10.0f ) ); // Some motion
-
- DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
- data.Reset();
-
- GenerateTouch( application, PointState::UP, Vector2( 150.0f, 10.0f ) ); // Some motion
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( !data.receivedTouchEvent.GetHitActor(0) );
- data.Reset();
- }
-
- // Multiple touch. Should only receive a touch on first down and last up.
- {
- Integration::TouchEvent touchEvent;
- Integration::Point point;
-
- // 1st point
- point.SetState( PointState::DOWN );
- point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
- touchEvent.points.push_back( point );
- application.ProcessEvent( touchEvent );
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_EQUALS( data.receivedTouchEvent.GetPointCount(), 1u, TEST_LOCATION );
- data.Reset();
-
- // 2nd point
- touchEvent.points[0].SetState( PointState::STATIONARY );
- point.SetDeviceId( 1 );
- point.SetScreenPosition( Vector2( 50.0f, 50.0f ) );
- touchEvent.points.push_back( point );
- application.ProcessEvent( touchEvent );
- DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
- data.Reset();
-
- // Primary point is up
- touchEvent.points[0].SetState( PointState::UP );
- touchEvent.points[1].SetState( PointState::STATIONARY );
- application.ProcessEvent( touchEvent );
- DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
- data.Reset();
-
- // Remove 1st point now, 2nd point is now in motion
- touchEvent.points.erase( touchEvent.points.begin() );
- touchEvent.points[0].SetState( PointState::MOTION );
- touchEvent.points[0].SetScreenPosition( Vector2( 150.0f, 50.0f ) );
- application.ProcessEvent( touchEvent );
- DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
- data.Reset();
-
- // Final point Up
- touchEvent.points[0].SetState( PointState::UP );
- application.ProcessEvent( touchEvent );
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_EQUALS( data.receivedTouchEvent.GetPointCount(), 1u, TEST_LOCATION );
- data.Reset();
- }
- END_TEST;
-}
-
-int UtcDaliStageTouchSignalN(void)
-{
- TestApplication application;
- Stage stage = Stage::GetCurrent();
-
- TouchSignalData data;
- TouchFunctor functor( data );
- stage.TouchSignal().Connect( &application, functor );
-
- TouchSignalData data2;
- TouchFunctor functor2( data2 );
- GetImplementation( stage ).ConnectSignal( &application, "touch", functor2 );
-
- // Render and notify.
- application.SendNotification();
- application.Render();
-
- // Confirm functor not called before there has been any touch event.
- DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
- DALI_TEST_EQUALS( false, data2.functorCalled, TEST_LOCATION );
-
- // No actors, single touch, down, motion then up.
- {
- GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( !data.receivedTouchEvent.GetHitActor(0));
-
- DALI_TEST_EQUALS( true, data2.functorCalled, TEST_LOCATION );
-
- data.Reset();
- data2.Reset();
-
- // Confirm there is no signal when the touchpoint is only moved.
- GenerateTouch( application, PointState::MOTION, Vector2( 1200.0f, 10.0f ) ); // Some motion
-
- DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
- data.Reset();
-
- // Confirm a following up event generates a signal.
- GenerateTouch( application, PointState::UP, Vector2( 1200.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( !data.receivedTouchEvent.GetHitActor(0));
- data.Reset();
- }
-
- // Add an actor to the scene.
- Actor actor = Actor::New();
- actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
- actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- actor.TouchSignal().Connect( &DummyTouchCallback );
- stage.Add( actor );
-
- // Render and notify.
- application.SendNotification();
- application.Render();
-
- // Actor on scene. Interrupted before down and interrupted after down.
- {
- GenerateTouch( application, PointState::INTERRUPTED, Vector2( 10.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( !data.receivedTouchEvent.GetHitActor(0) );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetState(0) == PointState::INTERRUPTED );
- data.Reset();
-
- GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetHitActor(0) == actor );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetState(0) == PointState::DOWN );
- data.Reset();
-
- GenerateTouch( application, PointState::INTERRUPTED, Vector2( 10.0f, 10.0f ) );
-
- DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetPointCount() != 0u );
- DALI_TEST_CHECK( !data.receivedTouchEvent.GetHitActor(0) );
- DALI_TEST_CHECK( data.receivedTouchEvent.GetState(0) == PointState::INTERRUPTED );
-
- DALI_TEST_EQUALS( data.receivedTouchEvent.GetPointCount(), 1u, TEST_LOCATION );
-
- // Check that getting info about a non-existent point returns an empty handle
- Actor actor = data.receivedTouchEvent.GetHitActor( 1 );
- DALI_TEST_CHECK( !actor );
-
- data.Reset();
- }
-
- END_TEST;
-}
-
int UtcDaliStageSignalWheelEventP(void)
{
TestApplication application;
detector.Attach(actor);
TouchEventFunctor touchFunctor;
- actor.TouchSignal().Connect( &application, touchFunctor );
+ actor.TouchedSignal().Connect( &application, touchFunctor );
Integration::TouchEvent touchEvent(1);
Integration::Point point;
parent.Add(child);
TouchEventFunctor touchFunctor;
- child.TouchSignal().Connect(&application, touchFunctor);
+ child.TouchedSignal().Connect(&application, touchFunctor);
// Render and notify
application.SendNotification();
bool consume = false;
TouchEventFunctorConsumeSetter touchFunctor(consume);
- actor.TouchSignal().Connect(&application,touchFunctor);
+ actor.TouchedSignal().Connect(&application,touchFunctor);
// Render and notify
application.SendNotification();
// Connect to actor's touch signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
Vector2 screenCoordinates( 10.0f, 10.0f );
Vector2 localCoordinates;
// Connect to actor's touched signal
HandleData handleData;
TouchEventHandleFunctor functor( handleData );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
Vector2 screenCoordinates( 10.0f, 10.0f );
Vector2 localCoordinates;
// Connect to actor's touched signal
OutOfBoundsData data;
OutOfBoundsFunctor functor( data, true );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
Vector2 screenCoordinates( 10.0f, 10.0f );
Vector2 localCoordinates;
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
Vector2 screenCoordinates( sceneSize.x * 0.5f, sceneSize.y * 0.5f );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data, false );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Connect to root actor's touched signal
SignalData rootData;
TouchEventFunctor rootFunctor( rootData ); // Consumes signal
- rootActor.TouchSignal().Connect( &application, rootFunctor );
+ rootActor.TouchedSignal().Connect( &application, rootFunctor );
Vector2 screenCoordinates( 10.0f, 10.0f );
Vector2 actorCoordinates, rootCoordinates;
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data, false );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Connect to root actor's touched signal
SignalData rootData;
TouchEventFunctor rootFunctor( rootData ); // Consumes signal
- rootActor.TouchSignal().Connect( &application, rootFunctor );
+ rootActor.TouchedSignal().Connect( &application, rootFunctor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Set actor to require leave events
actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data, false );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Connect to root actor's touched signal
SignalData rootData;
TouchEventFunctor rootFunctor( rootData ); // Consumes signal
- rootActor.TouchSignal().Connect( &application, rootFunctor );
+ rootActor.TouchedSignal().Connect( &application, rootFunctor );
// Set actor to require leave events
actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data, false );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Connect to root actor's touched signal
SignalData rootData;
TouchEventFunctor rootFunctor( rootData ); // Consumes signal
- rootActor.TouchSignal().Connect( &application, rootFunctor );
+ rootActor.TouchedSignal().Connect( &application, rootFunctor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
application.Render();
// Connect to layer1 and actor1
- layer1.TouchSignal().Connect( &application, functor );
- actor1.TouchSignal().Connect( &application, functor );
+ layer1.TouchedSignal().Connect( &application, functor );
+ actor1.TouchedSignal().Connect( &application, functor );
// Hit in hittable area, actor1 should be hit
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
application.Render();
// Connect to layer2 and actor2
- layer2.TouchSignal().Connect( &application, functor );
- actor2.TouchSignal().Connect( &application, functor );
+ layer2.TouchedSignal().Connect( &application, functor );
+ actor2.TouchedSignal().Connect( &application, functor );
// Emit an event, should hit layer2
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to layer's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
- layer.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
+ layer.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to layer's touched signal
SignalData data;
TouchEventFunctor functor( data );
- parent.TouchSignal().Connect( &application, functor );
- actor.TouchSignal().Connect( &application, functor );
+ parent.TouchedSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
RemoveActorFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Register for leave events
actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data, false );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Add a layer to overlap the actor
Layer layer = Layer::New();
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down and motion
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touch signal.
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit an event within clipped area - no hit.
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
data.Reset();
- clippingChild.TouchSignal().Connect( &application, functor );
+ clippingChild.TouchedSignal().Connect( &application, functor );
// Emit an event inside part of the child which is within the clipped area, we should have a hit.
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 30.0f, 30.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data, false /* Do not consume */ );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Connect to parent's touched signal
SignalData parentData;
TouchEventFunctor parentFunctor( parentData );
- parent.TouchSignal().Connect( &application, parentFunctor );
+ parent.TouchedSignal().Connect( &application, parentFunctor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Parent is now consumer, connect again to the touched signal of the actor so that it becomes the consumer
SignalData secondData;
TouchEventFunctor secondFunctor( secondData /* Consume */ );
- actor.TouchSignal().Connect( &application, secondFunctor );
+ actor.TouchedSignal().Connect( &application, secondFunctor );
// Unparent the actor
actor.Unparent();
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data, false /* Do not consume */ );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Connect to parent's touched signal
SignalData parentData;
TouchEventFunctor parentFunctor( parentData, false /* Do not consume */ );
- parent.TouchSignal().Connect( &application, parentFunctor );
+ parent.TouchedSignal().Connect( &application, parentFunctor );
// Connect to root's touched signal and consume
SignalData rootData;
TouchEventFunctor rootFunctor( rootData );
- rootActor.TouchSignal().Connect( &application, rootFunctor );
+ rootActor.TouchedSignal().Connect( &application, rootFunctor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
// Root is now consumer, connect to the touched signal of the parent so that it becomes the consumer
SignalData secondData;
TouchEventFunctor secondFunctor( secondData /* Consume */ );
- parent.TouchSignal().Connect( &application, secondFunctor );
+ parent.TouchedSignal().Connect( &application, secondFunctor );
// Emit an interrupted signal, all three should STILL be called
application.ProcessEvent( GenerateSingleTouch( PointState::INTERRUPTED, Vector2( 10.0f, 10.0f ) ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal with an angle
Integration::TouchEvent touchEvent = GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal with an angle
Integration::TouchEvent touchEvent = GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal with an angle
Integration::TouchEvent touchEvent = GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal with an angle
Integration::TouchEvent touchEvent = GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal with an angle
// Connect to actor's touched signal
HandleData handleData;
TouchEventHandleFunctor functor( handleData );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
Vector2 screenCoordinates( 10.0f, 10.0f );
Vector2 localCoordinates;
// Connect to actor's touched signal
HandleData handleData;
TouchEventHandleFunctor functor( handleData );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal with MouseButton
Integration::TouchEvent touchEvent = GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) );
// Connect to actor's touched signal
HandleData handleData;
TouchEventHandleFunctor functor( handleData );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal with MouseButton
Integration::TouchEvent touchEvent = GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) );
// Connect to actor's touched signal
SignalData data;
TouchEventFunctor functor( data );
- actor.TouchSignal().Connect( &application, functor );
+ actor.TouchedSignal().Connect( &application, functor );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::STARTED, Vector2( 10.0f, 10.0f ) ) );
return GetImplementation(*this).EventProcessingFinishedSignal();
}
-Stage::TouchSignalType& Stage::TouchSignal()
+Stage::TouchEventSignalType& Stage::TouchedSignal()
{
- return GetImplementation( *this ).TouchSignal();
+ return GetImplementation( *this ).TouchedSignal();
}
Stage::WheelEventSignalType& Stage::WheelEventSignal()
* |-------------------------|--------------------------------------|
* | keyEvent | @ref KeyEventSignal() |
* | eventProcessingFinished | @ref EventProcessingFinishedSignal() |
- * | touch | @ref TouchSignal() |
+ * | touched | @ref TouchedSignal() |
* | wheelEvent | @ref WheelEventSignal() |
* | contextLost | @ref ContextLostSignal() |
* | contextRegained | @ref ContextRegainedSignal() |
* | sceneCreated | @ref SceneCreatedSignal() |
- * @SINCE_1_0.0
*/
class DALI_CORE_API Stage : public BaseHandle
{
public:
- typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type @SINCE_1_0.0
- typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type @SINCE_1_0.0
- typedef Signal< void (const TouchEvent&) > TouchSignalType; ///< Touch signal type @SINCE_1_1.37
- typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type @SINCE_1_0.0
- typedef Signal< void () > ContextStatusSignal; ///< Context status signal type @SINCE_1_0.0
- typedef Signal< void () > SceneCreatedSignalType; ///< Scene created signal type @SINCE_1_0.0
+ typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type
+ typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type
+ typedef Signal< void (const TouchEvent&) > TouchEventSignalType; ///< Touch signal type
+ typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type
+ typedef Signal< void () > ContextStatusSignal; ///< Context status signal type
+ typedef Signal< void () > SceneCreatedSignalType; ///< Scene created signal type
/**
* @brief Allows the creation of an empty stage handle.
* The x component will be the width of the Stage in pixels.
* The y component will be the height of the Stage in pixels.
* The z component will be the distance between far and near planes.
- * @SINCE_1_0.0
* @return The size of the Stage as a Vector
*/
Vector2 GetSize() const;
* @code
* void YourCallbackName(const KeyEvent& event);
* @endcode
- * @SINCE_1_0.0
* @return The signal to connect to
*/
KeyEventSignalType& KeyEventSignal();
* @return The touch signal to connect to
* @note Motion events are not emitted.
*/
- TouchSignalType& TouchSignal();
+ TouchEventSignalType& TouchedSignal();
/**
* @brief This signal is emitted when wheel event is received.
return GetImplementation(*this).KeyEventGeneratedSignal();
}
-Scene::TouchSignalType& Scene::TouchSignal()
+Scene::TouchEventSignalType& Scene::TouchedSignal()
{
- return GetImplementation(*this).TouchSignal();
+ return GetImplementation(*this).TouchedSignal();
}
Scene::WheelEventSignalType& Scene::WheelEventSignal()
typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type
typedef Signal< void (const Dali::KeyEvent&) > KeyEventSignalType; ///< Key event signal type
typedef Signal< bool (const Dali::KeyEvent&) > KeyEventGeneratedSignalType; ///< key event generated signal type
- typedef Signal< void (const Dali::TouchEvent&) > TouchSignalType; ///< Touch signal type
+ typedef Signal< void (const Dali::TouchEvent&) > TouchEventSignalType; ///< Touch signal type
typedef Signal< void (const Dali::WheelEvent&) > WheelEventSignalType; ///< Touched signal type
using FrameCallbackContainer = std::vector< std::pair< std::unique_ptr< CallbackBase >, int32_t > >;
* @return The touch signal to connect to
* @note Motion events are not emitted.
*/
- TouchSignalType& TouchSignal();
+ TouchEventSignalType& TouchedSignal();
/**
* @brief This signal is emitted when wheel event is received.
const char* const SIGNAL_ON_SCENE = "onScene";
const char* const SIGNAL_OFF_SCENE = "offScene";
const char* const SIGNAL_ON_RELAYOUT = "onRelayout";
-const char* const SIGNAL_TOUCH = "touch";
+const char* const SIGNAL_TOUCHED = "touched";
const char* const SIGNAL_VISIBILITY_CHANGED = "visibilityChanged";
const char* const SIGNAL_LAYOUT_DIRECTION_CHANGED = "layoutDirectionChanged";
const char* const SIGNAL_CHILD_ADDED = "childAdded";
SignalConnectorType signalConnector4( mType, SIGNAL_ON_SCENE, &Actor::DoConnectSignal );
SignalConnectorType signalConnector5( mType, SIGNAL_OFF_SCENE, &Actor::DoConnectSignal );
SignalConnectorType signalConnector6( mType, SIGNAL_ON_RELAYOUT, &Actor::DoConnectSignal );
-SignalConnectorType signalConnector7( mType, SIGNAL_TOUCH, &Actor::DoConnectSignal );
+SignalConnectorType signalConnector7( mType, SIGNAL_TOUCHED, &Actor::DoConnectSignal );
SignalConnectorType signalConnector8( mType, SIGNAL_VISIBILITY_CHANGED, &Actor::DoConnectSignal );
SignalConnectorType signalConnector9( mType, SIGNAL_LAYOUT_DIRECTION_CHANGED, &Actor::DoConnectSignal );
SignalConnectorType signalConnector10( mType, SIGNAL_CHILD_ADDED, &Actor::DoConnectSignal );
bool Actor::GetTouchRequired() const
{
- return !mTouchSignal.Empty() || mDerivedRequiresTouch;
+ return !mTouchedSignal.Empty() || mDerivedRequiresTouch;
}
bool Actor::GetHoverRequired() const
{
bool consumed = false;
- if( !mTouchSignal.Empty() )
+ if( !mTouchedSignal.Empty() )
{
Dali::Actor handle( this );
- consumed = mTouchSignal.Emit( handle, touch );
+ consumed = mTouchedSignal.Emit( handle, touch );
}
return consumed;
}
}
-Dali::Actor::TouchEventSignalType& Actor::TouchSignal()
+Dali::Actor::TouchEventSignalType& Actor::TouchedSignal()
{
- return mTouchSignal;
+ return mTouchedSignal;
}
Dali::Actor::HoverSignalType& Actor::HoveredSignal()
{
actor->OnRelayoutSignal().Connect( tracker, functor );
}
- else if( 0 == signalName.compare( SIGNAL_TOUCH ) )
+ else if( 0 == signalName.compare( SIGNAL_TOUCHED ) )
{
- actor->TouchSignal().Connect( tracker, functor );
+ actor->TouchedSignal().Connect( tracker, functor );
}
else if( 0 == signalName.compare( SIGNAL_VISIBILITY_CHANGED ) )
{
mAnchorPoint( NULL ),
mRelayoutData( NULL ),
mGestureData( NULL ),
- mTouchSignal(),
+ mTouchedSignal(),
mHoveredSignal(),
mWheelEventSignal(),
mOnSceneSignal(),
void EmitChildRemovedSignal( Actor& child );
/**
- * @copydoc Dali::Actor::TouchEventSignal()
+ * @copydoc Dali::Actor::TouchedSignal()
*/
- Dali::Actor::TouchEventSignalType& TouchSignal();
+ Dali::Actor::TouchEventSignalType& TouchedSignal();
/**
* @copydoc Dali::Actor::HoveredSignal()
ActorGestureData* mGestureData; ///< Optional Gesture data. Only created when actor requires gestures
// Signals
- Dali::Actor::TouchEventSignalType mTouchSignal;
+ Dali::Actor::TouchEventSignalType mTouchedSignal;
Dali::Actor::HoverSignalType mHoveredSignal;
Dali::Actor::WheelEventSignalType mWheelEventSignal;
Dali::Actor::OnSceneSignalType mOnSceneSignal;
void Scene::EmitTouchedSignal( const Dali::TouchEvent& touch )
{
Dali::Integration::Scene handle( this );
- if ( !mTouchSignal.Empty() )
+ if ( !mTouchedSignal.Empty() )
{
- mTouchSignal.Emit( touch );
+ mTouchedSignal.Emit( touch );
}
}
return mEventProcessingFinishedSignal;
}
-Integration::Scene::TouchSignalType& Scene::TouchSignal()
+Integration::Scene::TouchEventSignalType& Scene::TouchedSignal()
{
- return mTouchSignal;
+ return mTouchedSignal;
}
Integration::Scene::WheelEventSignalType& Scene::WheelEventSignal()
Integration::Scene::EventProcessingFinishedSignalType& EventProcessingFinishedSignal();
/**
- * @copydoc Integration::Scene::TouchSignal()
+ * @copydoc Integration::Scene::TouchedSignal()
*/
- Integration::Scene::TouchSignalType& TouchSignal();
+ Integration::Scene::TouchEventSignalType& TouchedSignal();
/**
* @copydoc Integration::Scene::sWheelEventSignal()
Integration::Scene::EventProcessingFinishedSignalType mEventProcessingFinishedSignal;
// The touch signal
- Integration::Scene::TouchSignalType mTouchSignal;
+ Integration::Scene::TouchEventSignalType mTouchedSignal;
// The wheel event signal
Integration::Scene::WheelEventSignalType mWheelEventSignal;
const char* const SIGNAL_KEY_EVENT = "keyEvent";
const char* const SIGNAL_KEY_EVENT_GENERATED = "keyEventGenerated";
const char* const SIGNAL_EVENT_PROCESSING_FINISHED = "eventProcessingFinished";
-const char* const SIGNAL_TOUCH = "touch";
+const char* const SIGNAL_TOUCHED = "touched";
const char* const SIGNAL_WHEEL_EVENT = "wheelEvent";
const char* const SIGNAL_CONTEXT_LOST = "contextLost";
const char* const SIGNAL_CONTEXT_REGAINED = "contextRegained";
SignalConnectorType signalConnector6( mType, SIGNAL_CONTEXT_REGAINED, &Stage::DoConnectSignal );
SignalConnectorType signalConnector7( mType, SIGNAL_SCENE_CREATED, &Stage::DoConnectSignal );
SignalConnectorType signalConnector8( mType, SIGNAL_KEY_EVENT_GENERATED, &Stage::DoConnectSignal );
-SignalConnectorType signalConnector9( mType, SIGNAL_TOUCH, &Stage::DoConnectSignal );
+SignalConnectorType signalConnector9( mType, SIGNAL_TOUCHED, &Stage::DoConnectSignal );
} // unnamed namespace
mScene->SetBackgroundColor( Dali::DEFAULT_BACKGROUND_COLOR );
mScene->EventProcessingFinishedSignal().Connect( this, &Stage::OnEventProcessingFinished );
mScene->KeyEventSignal().Connect( this, &Stage::OnKeyEvent );
- mScene->TouchSignal().Connect( this, &Stage::OnTouchEvent );
+ mScene->TouchedSignal().Connect( this, &Stage::OnTouchEvent );
mScene->WheelEventSignal().Connect( this, &Stage::OnWheelEvent );
}
{
stage->EventProcessingFinishedSignal().Connect( tracker, functor );
}
- else if( 0 == strcmp( signalName.c_str(), SIGNAL_TOUCH ) )
+ else if( 0 == strcmp( signalName.c_str(), SIGNAL_TOUCHED ) )
{
- stage->TouchSignal().Connect( tracker, functor );
+ stage->TouchedSignal().Connect( tracker, functor );
}
else if( 0 == strcmp( signalName.c_str(), SIGNAL_WHEEL_EVENT ) )
{
void Stage::OnTouchEvent( const Dali::TouchEvent& touch )
{
- mTouchSignal.Emit( touch );
+ EmitTouchedSignal( touch );
}
void Stage::OnWheelEvent( const Dali::WheelEvent& event )
void Stage::EmitEventProcessingFinishedSignal()
{
- mEventProcessingFinishedSignal.Emit();
+ mEventProcessingFinishedSignal.Emit();
}
void Stage::EmitTouchedSignal( const Dali::TouchEvent& touch )
{
- mTouchSignal.Emit( touch );
+ mTouchedSignal.Emit( touch );
}
void Stage::EmitWheelEventSignal( const WheelEvent& event )
return mEventProcessingFinishedSignal;
}
-Dali::Stage::TouchSignalType& Stage::TouchSignal()
+Dali::Stage::TouchEventSignalType& Stage::TouchedSignal()
{
- return mTouchSignal;
+ return mTouchedSignal;
}
Dali::Stage::WheelEventSignalType& Stage::WheelEventSignal()
mKeyEventSignal(),
mKeyEventGeneratedSignal(),
mEventProcessingFinishedSignal(),
- mTouchSignal(),
+ mTouchedSignal(),
mWheelEventSignal(),
mContextLostSignal(),
mContextRegainedSignal(),
void OnKeyEvent( const Dali::KeyEvent& event );
/**
- * Callback for Internal::Scene TouchSignal signal
+ * Callback for Internal::Scene TouchedSignal signal
*/
void OnTouchEvent( const Dali::TouchEvent& touch );
Dali::Stage::EventProcessingFinishedSignalType& EventProcessingFinishedSignal();
/**
- * @copydoc Dali::Stage::TouchSignal()
+ * @copydoc Dali::Stage::TouchedSignal()
*/
- Dali::Stage::TouchSignalType& TouchSignal();
+ Dali::Stage::TouchEventSignalType& TouchedSignal();
/**
* @copydoc Dali::Stage::WheelEventSignal()
Dali::Stage::EventProcessingFinishedSignalType mEventProcessingFinishedSignal;
// The touched signal
- Dali::Stage::TouchSignalType mTouchSignal;
+ Dali::Stage::TouchEventSignalType mTouchedSignal;
// The wheel event signal
Dali::Stage::WheelEventSignalType mWheelEventSignal;
return GetImplementation(*this).GetRelayoutSize( dimension );
}
-Actor::TouchEventSignalType& Actor::TouchSignal()
+Actor::TouchEventSignalType& Actor::TouchedSignal()
{
- return GetImplementation( *this ).TouchSignal();
+ return GetImplementation( *this ).TouchedSignal();
}
Actor::HoverSignalType& Actor::HoveredSignal()
*
* <h3>Multi-Touch Events:</h3>
*
- * Touch or hover events are received via signals; see Actor::TouchSignal() and Actor::HoveredSignal() for more details.
+ * Touch or hover events are received via signals; see Actor::TouchedSignal() and Actor::HoveredSignal() for more details.
*
* <i>Hit Testing Rules Summary:</i>
*
* Signals
* | %Signal Name | Method |
* |-------------------|------------------------------|
- * | touch | @ref TouchSignal() |
+ * | touched | @ref TouchedSignal() |
* | hovered | @ref HoveredSignal() |
* | wheelEvent | @ref WheelEventSignal() |
* | onScene | @ref OnSceneSignal() |
// Typedefs
- typedef Signal< bool (Actor, const TouchEvent&) > TouchEventSignalType; ///< Touch signal type @SINCE_1_1.37
+ typedef Signal< bool (Actor, const TouchEvent&) > TouchEventSignalType; ///< Touch signal type @SINCE_1_1.37
typedef Signal< bool (Actor, const HoverEvent&) > HoverSignalType; ///< Hover signal type @SINCE_1_0.0
typedef Signal< bool (Actor, const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type @SINCE_1_0.0
typedef Signal< void (Actor) > OnSceneSignalType; ///< Scene connection signal type @SINCE_1_9.24
* The return value of True, indicates that the touch event has been consumed.
* Otherwise the signal will be emitted on the next sensitive parent of the actor.
* A true return will also cancel any ongoing gestures.
- * @SINCE_1_1.37
+ * @SINCE_1_9.28
* @return The signal to connect to
* @pre The Actor has been initialized.
*/
- TouchEventSignalType& TouchSignal();
+ TouchEventSignalType& TouchedSignal();
/**
* @brief This signal is emitted when hover input is received.
* {
* Actor actor = Actor::New();
*
- * actor.TouchSignal().Connect( this, &MyClass::Callback );
+ * actor.TouchedSignal().Connect( this, &MyClass::Callback );
* }
*
* ~MyClass()