Revert "[Tizen] Revert "Changes after touch consumed behaviour change""
[platform/core/uifw/dali-demo.git] / examples / gestures / gesture-example.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 884c3f9..d04c63e
@@ -158,7 +158,7 @@ private:
     background.Add( touchControl );
 
     // Connect to the touch signal
-    touchControl.TouchSignal().Connect( this, &GestureExample::OnTouch );
+    touchControl.TouchedSignal().Connect( this, &GestureExample::OnTouch );
     touchControl.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
 
     // Create a long press gesture detector, attach the actor & connect
@@ -266,7 +266,7 @@ private:
    */
   void OnLongPress( Actor actor, const LongPressGesture& longPress )
   {
-    if( longPress.GetState() == Gesture::Started )
+    if( longPress.GetState() == GestureState::STARTED )
     {
       // When we first receive a long press, attach the actor to the pan detector.
       mPanDetector.Attach( actor );
@@ -305,14 +305,14 @@ private:
 
     switch( pan.GetState() )
     {
-      case Gesture::Started:
+      case GestureState::STARTED:
       {
         mPanStarted = true;
         break;
       }
 
-      case Gesture::Finished:
-      case Gesture::Cancelled:
+      case GestureState::FINISHED:
+      case GestureState::CANCELLED:
       {
         // If we cancel or finish the pan, do an animation to indicate this and stop the shake animation.
 
@@ -371,15 +371,15 @@ private:
   {
     switch( pinch.GetState() )
     {
-      case Gesture::Started:
+      case GestureState::STARTED:
       {
         // Starting scale is required so that we know what to multiply the pinch.scale by.
         mStartingScale = actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
         break;
       }
 
-      case Gesture::Finished:
-      case Gesture::Cancelled:
+      case GestureState::FINISHED:
+      case GestureState::CANCELLED:
       {
         Vector3 scale( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) );
 
@@ -419,15 +419,15 @@ private:
   {
     switch( rotation.GetState() )
     {
-      case Gesture::Started:
+      case GestureState::STARTED:
       {
         // Starting orientation is required so that we know what to multiply the rotation.rotation by.
         mStartingOrientation = actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION );
         break;
       }
 
-      case Gesture::Finished:
-      case Gesture::Cancelled:
+      case GestureState::FINISHED:
+      case GestureState::CANCELLED:
       {
         // Do an animation to come back to go back to the original orientation.
         Animation anim = Animation::New( ROTATE_BACK_ANIMATION_DURATION );