(Actor) Add ability to connect to new touch signal via scripts 39/74239/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 13 Jun 2016 09:50:36 +0000 (10:50 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 13 Jun 2016 09:50:36 +0000 (10:50 +0100)
Change-Id: I59e46cc70473e729415cc16ae056b7c5de9d237b

dali/internal/event/actors/actor-impl.cpp

index 5bddf6ace16ba652f37fc74876092a329edb13e3..7f7ae96cd8405a86b3142b5199252cf55421742c 100644 (file)
@@ -210,6 +210,7 @@ const char* const SIGNAL_WHEEL_EVENT = "wheelEvent";
 const char* const SIGNAL_ON_STAGE = "onStage";
 const char* const SIGNAL_OFF_STAGE = "offStage";
 const char* const SIGNAL_ON_RELAYOUT = "onRelayout";
+const char* const SIGNAL_TOUCH = "touch";
 
 // Actions
 
@@ -229,6 +230,7 @@ SignalConnectorType signalConnector3( mType, SIGNAL_WHEEL_EVENT, &Actor::DoConne
 SignalConnectorType signalConnector4( mType, SIGNAL_ON_STAGE, &Actor::DoConnectSignal );
 SignalConnectorType signalConnector5( mType, SIGNAL_OFF_STAGE, &Actor::DoConnectSignal );
 SignalConnectorType signalConnector6( mType, SIGNAL_ON_RELAYOUT, &Actor::DoConnectSignal );
+SignalConnectorType signalConnector7( mType, SIGNAL_TOUCH, &Actor::DoConnectSignal );
 
 TypeAction a1( mType, ACTION_SHOW, &Actor::DoAction );
 TypeAction a2( mType, ACTION_HIDE, &Actor::DoAction );
@@ -1939,6 +1941,10 @@ bool Actor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra
   {
     actor->OnRelayoutSignal().Connect( tracker, functor );
   }
+  else if( 0 == signalName.compare( SIGNAL_TOUCH ) )
+  {
+    actor->TouchSignal().Connect( tracker, functor );
+  }
   else
   {
     // signalName does not match any signal