Merge "Moved Gesture::State and -::Type to gesture-enumerations.h." into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 3 Sep 2020 11:58:53 +0000 (11:58 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 3 Sep 2020 11:58:53 +0000 (11:58 +0000)
1  2 
examples/gestures/gesture-example.cpp
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp

index bd32658,4bab310..d04c63e
mode 100644,100755..100644
@@@ -158,7 -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
     */
    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 );
  
      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.
  
    {
      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 ) );
  
    {
      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 );
index 981c6f0,9ecf686..e79ff90
mode 100644,100755..100644
@@@ -270,7 -270,7 +270,7 @@@ public
      imagePrevious.SetProperty( Actor::Property::OPACITY, 0.6f );
      controlsLayer.Add( imagePrevious );
      imagePrevious.SetProperty( Dali::Actor::Property::NAME, PREVIOUS_BUTTON_ID );
 -    imagePrevious.TouchSignal().Connect( this, &ImageScalingAndFilteringController::OnControlTouched );
 +    imagePrevious.TouchedSignal().Connect( this, &ImageScalingAndFilteringController::OnControlTouched );
  
      // Next image button:
      Toolkit::ImageView imageNext = Toolkit::ImageView::New( DALI_ICON_PLAY, ImageDimensions( playWidth, playWidth ) );
      imageNext.SetProperty( Actor::Property::OPACITY, 0.6f );
      controlsLayer.Add( imageNext );
      imageNext.SetProperty( Dali::Actor::Property::NAME, NEXT_BUTTON_ID );
 -    imageNext.TouchSignal().Connect( this, &ImageScalingAndFilteringController::OnControlTouched );
 +    imageNext.TouchedSignal().Connect( this, &ImageScalingAndFilteringController::OnControlTouched );
  
      // Buttons to popup selectors for fitting and sampling modes:
  
  
    void OnPinch( Actor actor, const PinchGesture& pinch )
    {
-     if( pinch.GetState() == Gesture::Started )
+     if( pinch.GetState() == GestureState::STARTED )
      {
        mLastPinchScale = pinch.GetScale();
      }