Refactoring Gestures Class 86/236886/10
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 23 Jun 2020 06:25:53 +0000 (15:25 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 1 Sep 2020 15:24:40 +0000 (16:24 +0100)
Change-Id: Ic67c98e5bcc58d5f0ce812b043fb7ebff204d41a

19 files changed:
examples/cube-transition-effect/cube-transition-effect-example.cpp [changed mode: 0644->0755]
examples/deferred-shading/deferred-shading.cpp [changed mode: 0644->0755]
examples/dissolve-effect/dissolve-effect-example.cpp [changed mode: 0644->0755]
examples/gestures/gesture-example.cpp [changed mode: 0644->0755]
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp [changed mode: 0644->0755]
examples/image-view-svg/image-view-svg-example.cpp [changed mode: 0644->0755]
examples/item-view/item-view-example.cpp [changed mode: 0644->0755]
examples/model3d-view/model3d-view-example.cpp [changed mode: 0644->0755]
examples/motion-blur/motion-blur-example.cpp [changed mode: 0644->0755]
examples/motion-stretch/motion-stretch-example.cpp [changed mode: 0644->0755]
examples/primitive-shapes/primitive-shapes-example.cpp [changed mode: 0644->0755]
examples/reflection-demo/reflection-example.cpp [changed mode: 0644->0755]
examples/shadows-and-lights/shadows-and-lights-example.cpp [changed mode: 0644->0755]
examples/sparkle/sparkle-effect-example.cpp [changed mode: 0644->0755]
examples/styling/styling-application.cpp [changed mode: 0644->0755]
examples/text-label/text-label-example.cpp [changed mode: 0644->0755]
examples/text-overlap/text-overlap-example.cpp [changed mode: 0644->0755]
examples/text-scrolling/text-scrolling-example.cpp [changed mode: 0644->0755]
examples/video-view/video-view-example.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index e9fddc8..ecf01c1
@@ -296,9 +296,10 @@ void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture )
     return;
   }
 
-  if( gesture.state == Gesture::Continuing )
+  if( gesture.GetState() == Gesture::Continuing )
   {
-    if( gesture.displacement.x < 0)
+    const Vector2& displacement = gesture.GetDisplacement();
+    if( displacement.x < 0)
     {
       mIndex = (mIndex + 1)%NUM_IMAGES;
     }
@@ -307,8 +308,8 @@ void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture )
       mIndex = (mIndex + NUM_IMAGES -1)%NUM_IMAGES;
     }
 
-    mPanPosition = gesture.position;
-    mPanDisplacement = gesture.displacement;
+    mPanPosition = gesture.GetPosition();
+    mPanDisplacement = displacement;
     GoToNextImage();
   }
 }
old mode 100644 (file)
new mode 100755 (executable)
index 7a1920f..4221187
@@ -770,8 +770,9 @@ private:
   void OnPan(Actor, PanGesture const& gesture)
   {
     Quaternion q = mAxis.GetProperty(Actor::Property::ORIENTATION).Get<Quaternion>();
-    Quaternion qx(Radian(Degree(gesture.screenDisplacement.y) * -.5f), Vector3::XAXIS);
-    Quaternion qy(Radian(Degree(gesture.screenDisplacement.x) * .5f), Vector3::YAXIS);
+    const Vector2& displacement = gesture.GetScreenDisplacement();
+    Quaternion qx(Radian(Degree(displacement.y) * -.5f), Vector3::XAXIS);
+    Quaternion qy(Radian(Degree(displacement.x) * .5f), Vector3::YAXIS);
     mAxis.SetProperty(Actor::Property::ORIENTATION, qy * qx * q);
   }
 
old mode 100644 (file)
new mode 100755 (executable)
index 4d9138f..77cd84b
@@ -276,9 +276,10 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture )
     return;
   }
 
-  if( gesture.state == Gesture::Continuing )
+  if( gesture.GetState() == Gesture::Continuing )
   {
-    if( gesture.displacement.x < 0)
+    const Vector2& displacement = gesture.GetDisplacement();
+    if( displacement.x < 0)
     {
       mIndex = (mIndex + 1)%NUM_IMAGES;
     }
@@ -294,7 +295,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture )
     mNextImage.SetProperty( Actor::Property::POSITION_Z, INITIAL_DEPTH);
     mParent.Add( mNextImage );
     Vector2 size = Vector2( mCurrentImage.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
-    StartTransition( gesture.position / size, gesture.displacement * Vector2(1.0, size.x/size.y));
+    StartTransition( gesture.GetPosition() / size, displacement * Vector2(1.0, size.x/size.y));
   }
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index e2d8e8a..884c3f9
@@ -266,7 +266,7 @@ private:
    */
   void OnLongPress( Actor actor, const LongPressGesture& longPress )
   {
-    if( longPress.state == Gesture::Started )
+    if( longPress.GetState() == Gesture::Started )
     {
       // When we first receive a long press, attach the actor to the pan detector.
       mPanDetector.Attach( actor );
@@ -294,7 +294,7 @@ private:
 
     // As the displacement is in local actor coords, we will have to multiply the displacement by the
     // actor's scale so that it moves the correct amount in the parent's coordinate system.
-    Vector3 scaledDisplacement( pan.displacement );
+    Vector3 scaledDisplacement( pan.GetDisplacement() );
     scaledDisplacement *= actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
 
     Vector3 currentPosition;
@@ -303,7 +303,7 @@ private:
     Vector3 newPosition = currentPosition + scaledDisplacement;
     actor.SetProperty( Actor::Property::POSITION, newPosition );
 
-    switch( pan.state )
+    switch( pan.GetState() )
     {
       case Gesture::Started:
       {
@@ -369,7 +369,7 @@ private:
    */
   void OnPinch( Actor actor, const PinchGesture& pinch )
   {
-    switch( pinch.state )
+    switch( pinch.GetState() )
     {
       case Gesture::Started:
       {
@@ -406,7 +406,7 @@ private:
       }
     }
 
-    actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.scale );
+    actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.GetScale() );
   }
 
   /**
@@ -417,7 +417,7 @@ private:
    */
   void OnRotation( Actor actor, const RotationGesture& rotation )
   {
-    switch( rotation.state )
+    switch( rotation.GetState() )
     {
       case Gesture::Started:
       {
@@ -442,7 +442,7 @@ private:
       }
     }
 
-    actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( mStartingOrientation * Quaternion( rotation.rotation, Vector3::ZAXIS ) ) );
+    actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( mStartingOrientation * Quaternion( rotation.GetRotation(), Vector3::ZAXIS ) ) );
   }
 
   /**
old mode 100644 (file)
new mode 100755 (executable)
index d79a272..8ffb9a8
@@ -530,11 +530,11 @@ public:
 
   void OnPinch( Actor actor, const PinchGesture& pinch )
   {
-    if( pinch.state == Gesture::Started )
+    if( pinch.GetState() == Gesture::Started )
     {
-      mLastPinchScale = pinch.scale;
+      mLastPinchScale = pinch.GetScale();
     }
-    const float scale = pinch.scale;
+    const float scale = pinch.GetScale();
 
     if( ! Equals( scale, mLastPinchScale ) )
     {
@@ -557,9 +557,11 @@ public:
   {
     Window window = mApplication.GetWindow();
     Vector2 windowSize = window.GetSize();
+    const Vector2& displacement = gesture.GetDisplacement();
+
     // 1.0f and 0.75f are the maximum size caps of the resized image, as a factor of window-size.
-    mImageWindowScale.x = std::max( 0.05f, std::min( 0.95f,  mImageWindowScale.x + ( gesture.displacement.x * 2.0f / windowSize.width ) ) );
-    mImageWindowScale.y = std::max( 0.05f, std::min( 0.70f, mImageWindowScale.y + ( gesture.displacement.y * 2.0f / windowSize.height ) ) );
+    mImageWindowScale.x = std::max( 0.05f, std::min( 0.95f,  mImageWindowScale.x + ( displacement.x * 2.0f / windowSize.width ) ) );
+    mImageWindowScale.y = std::max( 0.05f, std::min( 0.70f, mImageWindowScale.y + ( displacement.y * 2.0f / windowSize.height ) ) );
 
     ResizeImage();
   }
old mode 100644 (file)
new mode 100755 (executable)
index bfbe038..05eae9a
@@ -153,11 +153,11 @@ public:
   // Callback of pan gesture, for moving the actors
   void OnPanGesture( Actor actor, const PanGesture& gesture )
   {
-    if( gesture.state == Gesture::Continuing )
+    if( gesture.GetState() == Gesture::Continuing )
     {
       for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
       {
-        mSvgActor[i].TranslateBy(Vector3(gesture.displacement));
+        mSvgActor[i].TranslateBy(Vector3(gesture.GetDisplacement()));
       }
     }
   }
@@ -165,14 +165,14 @@ public:
   // Callback of pinch gesture, for resizing the actors
   void OnPinch(Actor actor, const PinchGesture& gesture)
   {
-    switch( gesture.state )
+    switch( gesture.GetState() )
     {
       // Only scale the image when we start or continue pinching
 
       case Gesture::Started:
       case Gesture::Continuing:
       {
-        float scale = std::max( gesture.scale, MIN_SCALE / mScale );
+        float scale = std::max( gesture.GetScale(), MIN_SCALE / mScale );
         scale = std::min( MAX_SCALE / mScale, scale );
 
         for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
@@ -186,7 +186,7 @@ public:
       {
         // Resize the image when pinching is complete, this will rasterize the SVG to the new size
 
-        mScale = mScale * gesture.scale;
+        mScale = mScale * gesture.GetScale();
         mScale = mScale > MAX_SCALE ? MAX_SCALE : mScale;
         mScale = mScale < MIN_SCALE ? MIN_SCALE : mScale;
         for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
old mode 100644 (file)
new mode 100755 (executable)
index f205377..237c807
@@ -549,7 +549,7 @@ public:
 
   void OnLongPress( Actor actor, const LongPressGesture& gesture )
   {
-    switch( gesture.state )
+    switch( gesture.GetState() )
     {
       case Gesture::Started:
       {
@@ -558,7 +558,7 @@ public:
         ItemRange range( 0u, 0u );
         mItemView.GetItemsRange( range );
 
-        const unsigned int item = ( gesture.screenPoint.y < 0.5f * size.height ) ? range.begin : range.end;
+        const unsigned int item = ( gesture.GetScreenPoint().y < 0.5f * size.height ) ? range.begin : range.end;
         mItemView.ScrollToItem( item, SCROLL_TO_ITEM_ANIMATION_TIME );
 
         break;
old mode 100644 (file)
new mode 100755 (executable)
index 7021e55..2b1c08a
@@ -179,9 +179,10 @@ public:
       Window window = mApplication.GetWindow();
       Vector2 screenSize = window.GetSize();
 
+      const Vector2& screenPoint = tap.GetScreenPoint();
       Vector2 position;
-      position.x = tap.screenPoint.x - screenSize.x * 0.5;
-      position.y = tap.screenPoint.y - screenSize.y * 0.5;
+      position.x = screenPoint.x - screenSize.x * 0.5;
+      position.y = screenPoint.y - screenSize.y * 0.5;
 
       float size = 2.5;
 
old mode 100644 (file)
new mode 100755 (executable)
index 186db1a..5f82eba
@@ -285,8 +285,9 @@ public:
     actor.ScreenToLocal(originOffsetX, originOffsetY, windowSize.width * 0.5f, windowSize.height * 0.5f);
 
     // get dest point in local actor space
-    destPos.x = tapGesture.localPoint.x - originOffsetX;
-    destPos.y = tapGesture.localPoint.y - originOffsetY;
+    const Vector2& localPoint = tapGesture.GetLocalPoint();
+    destPos.x = localPoint.x - originOffsetX;
+    destPos.y = localPoint.y - originOffsetY;
     destPos.z = 0.0f;
 
     float animDuration = 0.5f;
old mode 100644 (file)
new mode 100755 (executable)
index 7b8c0bd..8167dfc
@@ -257,8 +257,9 @@ public:
     actor.ScreenToLocal(originOffsetX, originOffsetY, windowSize.width * 0.5f, windowSize.height * 0.5f);
 
     // get dest point in local actor space
-    destPos.x = tapGesture.localPoint.x - originOffsetX;
-    destPos.y = tapGesture.localPoint.y - originOffsetY;
+    const Vector2& localPoint = tapGesture.GetLocalPoint();
+    destPos.x = localPoint.x - originOffsetX;
+    destPos.y = localPoint.y - originOffsetY;
     destPos.z = 0.0f;
 
     float animDuration = 0.5f;
old mode 100644 (file)
new mode 100755 (executable)
index 54fffa1..675e076
@@ -631,7 +631,7 @@ public:
   //Panning around the shape rotates it.
   void OnPan( Actor actor, const PanGesture& gesture )
   {
-    switch( gesture.state )
+    switch( gesture.GetState() )
     {
       case Gesture::Started:
       {
@@ -643,8 +643,9 @@ public:
       case Gesture::Continuing:
       {
         //Rotate based off the gesture.
-        mRotation.x -= gesture.displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
-        mRotation.y += gesture.displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
+        const Vector2& displacement = gesture.GetDisplacement();
+        mRotation.x -= displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
+        mRotation.y += displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
         Quaternion rotation = Quaternion( Radian( mRotation.x ), Vector3::XAXIS) *
                               Quaternion( Radian( mRotation.y ), Vector3::YAXIS);
 
old mode 100644 (file)
new mode 100755 (executable)
index 4dff874..1f91e21
@@ -610,7 +610,7 @@ private:
 
   void OnPan( Actor actor, const PanGesture& panGesture )
   {
-    auto displacement = panGesture.screenDisplacement;
+    const auto& displacement = panGesture.GetScreenDisplacement();
     mCenterActor.RotateBy( Degree( displacement.y *0.1f ), Vector3( 0.0, 0.0, 1.0) );
     mCenterActor.RotateBy( Degree( displacement.x *0.1f ), Vector3( 0.0, 1.0, 0.0) );
     Quaternion q;
old mode 100644 (file)
new mode 100755 (executable)
index cc2b2bb..157dcbc
@@ -335,17 +335,18 @@ public:
 
   void OnPan(Actor actor, const PanGesture& gesture)
   {
-    switch (gesture.state)
+    switch (gesture.GetState())
     {
       case Gesture::Continuing:
       {
+        const Vector2& displacement = gesture.GetDisplacement();
         switch(mPanState)
         {
           case PAN_LIGHT:
           {
-            mLightXRotation = mLightXRotation - gesture.displacement.y * LIGHT_PAN_X_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
+            mLightXRotation = mLightXRotation - displacement.y * LIGHT_PAN_X_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
             mLightXRotation = Clamp(mLightXRotation, -Dali::ANGLE_45, Dali::ANGLE_45 );
-            mLightYRotation = mLightYRotation + gesture.displacement.x * LIGHT_PAN_Y_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
+            mLightYRotation = mLightYRotation + displacement.x * LIGHT_PAN_Y_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
             mLightYRotation = Clamp(mLightYRotation, -Dali::ANGLE_45, Dali::ANGLE_45 );
             mLightAnchor.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mLightXRotation, mLightYRotation ) );
             break;
@@ -353,16 +354,16 @@ public:
 
           case PAN_SCENE:
           {
-            mTranslation += Vector3(gesture.displacement.x, gesture.displacement.y, 0.f);
+            mTranslation += Vector3(displacement.x, displacement.y, 0.f);
             mContents.SetProperty( Actor::Property::POSITION, mTranslation );
             break;
           }
 
           case ROTATE_SCENE:
           {
-            mSceneXRotation = mSceneXRotation - gesture.displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
+            mSceneXRotation = mSceneXRotation - displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
             mSceneXRotation = Clamp( mSceneXRotation, -Dali::ANGLE_90, Dali::ANGLE_90 );
-            mSceneYRotation = mSceneYRotation + gesture.displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
+            mSceneYRotation = mSceneYRotation + displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
             mSceneYRotation = Clamp( mSceneYRotation, -Dali::ANGLE_90, Dali::ANGLE_90 );
             mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) );
             break;
@@ -370,8 +371,8 @@ public:
 
           case ROTATE_OBJECT:
           {
-            mObjectXRotation = mObjectXRotation - gesture.displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
-            mObjectYRotation = mObjectYRotation + gesture.displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
+            mObjectXRotation = mObjectXRotation - displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
+            mObjectYRotation = mObjectYRotation + displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
             mSceneActor.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mObjectXRotation, mObjectYRotation ) );
             break;
           }
@@ -390,11 +391,11 @@ public:
 
   void OnPinch(Actor actor, const PinchGesture& gesture)
   {
-    if (gesture.state == Gesture::Started)
+    if (gesture.GetState() == Gesture::Started)
     {
       mScaleAtPinchStart = mContents.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x;
     }
-    mPinchScale = Clamp(mScaleAtPinchStart * gesture.scale, MIN_PINCH_SCALE, MAX_PINCH_SCALE);
+    mPinchScale = Clamp(mScaleAtPinchStart * gesture.GetScale(), MIN_PINCH_SCALE, MAX_PINCH_SCALE);
 
     mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) );
   }
old mode 100644 (file)
new mode 100755 (executable)
index d3c0bc0..08227b4
@@ -263,7 +263,7 @@ private:
   void OnTap( Actor actor, const TapGesture& tap )
   {
     {
-      PlayTapAnimation(5.f, tap.localPoint);
+      PlayTapAnimation(5.f, tap.GetLocalPoint());
     }
   }
 
@@ -272,7 +272,7 @@ private:
    */
   void OnPan( Actor actor, const PanGesture& gesture )
   {
-    if( gesture.state == Gesture::Finished )
+    if( gesture.GetState() == Gesture::Finished )
     {
       switch(mAnimationIndex)
       {
old mode 100644 (file)
new mode 100755 (executable)
index d50b731..197d559
@@ -628,7 +628,7 @@ void StylingApplication::PopupHidden()
 void StylingApplication::OnPan( Actor actor, const PanGesture& gesture )
 {
   Vector3 size = mContentPane.GetTargetSize();
-  mContentPane.SetProperty( Actor::Property::SIZE, Vector2( size.GetVectorXY() + gesture.displacement * 2.0f ) );
+  mContentPane.SetProperty( Actor::Property::SIZE, Vector2( size.GetVectorXY() + gesture.GetDisplacement() * 2.0f ) );
 }
 
 void StylingApplication::OnKeyEvent( const KeyEvent& keyEvent )
old mode 100644 (file)
new mode 100755 (executable)
index f432bd2..8874fcb
@@ -572,7 +572,8 @@ public:
   void OnPan( Actor actor, const PanGesture& gesture )
   {
     // Reset mLayoutSize when the pan starts
-    if( gesture.state == Gesture::Started )
+    Gesture::State state = gesture.GetState();
+    if( state == Gesture::Started )
     {
       if( mLayoutSize.x < 2.0f )
       {
@@ -590,8 +591,9 @@ public:
       HideStyleAndColorButtons();
     }
 
-    mLayoutSize.x += gesture.displacement.x * 2.0f;
-    mLayoutSize.y += gesture.displacement.y * 2.0f;
+    const Vector2& displacement = gesture.GetDisplacement();
+    mLayoutSize.x += displacement.x * 2.0f;
+    mLayoutSize.y += displacement.y * 2.0f;
 
     if( mLayoutSize.x >= 2.0f ||
         mLayoutSize.y >= 2.0f )
@@ -606,7 +608,7 @@ public:
       mContainer.SetProperty( Actor::Property::SIZE, clampedSize );
     }
 
-    if( gesture.state == Gesture::Cancelled || gesture.state == Gesture::Finished )
+    if( state == Gesture::Cancelled || state == Gesture::Finished )
     {
       // Resize the text label to match the container size when panning is finished
       mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize );
old mode 100644 (file)
new mode 100755 (executable)
index 05f5e65..bbd7c0f
@@ -75,25 +75,29 @@ void TextOverlapController::Create( Application& app )
 
 void TextOverlapController::OnPan( Actor actor, const PanGesture& gesture )
 {
-  if( ! mGrabbedActor || gesture.state == PanGesture::Started )
+  const Gesture::State state = gesture.GetState();
+  if( ! mGrabbedActor || state == PanGesture::Started )
   {
+    const Vector2& gesturePosition = gesture.GetPosition();
     for( int i=0; i<NUMBER_OF_LABELS; ++i )
     {
       Vector3 position = mLabels[i].GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
       Vector3 size = mLabels[i].GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
-      if( gesture.position.y > position.y - size.y * 0.5f &&
-          gesture.position.y <= position.y + size.y * 0.5f )
+      if( gesturePosition.y > position.y - size.y * 0.5f &&
+          gesturePosition.y <= position.y + size.y * 0.5f )
       {
         mGrabbedActor = mLabels[i];
         break;
       }
     }
   }
-  else if( mGrabbedActor && gesture.state == PanGesture::Continuing )
+  else if( mGrabbedActor && state == PanGesture::Continuing )
   {
     Vector2 windowSize = mApplication.GetWindow().GetSize();
     Vector3 size = mGrabbedActor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
-    float y = Clamp( gesture.position.y, size.y * 0.5f, windowSize.y - size.y*0.5f );
+    const Vector2& gesturePosition = gesture.GetPosition();
+
+    float y = Clamp( gesturePosition.y, size.y * 0.5f, windowSize.y - size.y*0.5f );
     mGrabbedActor.SetProperty( Actor::Property::POSITION, Vector2( 0, y ));
   }
   else
old mode 100644 (file)
new mode 100755 (executable)
index 4144687..c660ef4
@@ -377,10 +377,9 @@ public:
 
   void OnPanGesture( Actor actor, const PanGesture& gesture )
   {
-    if( gesture.state == Gesture::Continuing )
+    if( gesture.GetState() == Gesture::Continuing )
     {
-      Vector2 position = Vector2( gesture.displacement );
-      mTargetActorPosition.y = mTargetActorPosition.y + position.y;
+      mTargetActorPosition.y = mTargetActorPosition.y + gesture.GetDisplacement().y;
       mTargetActorPosition.y = std::min( mTargetActorPosition.y, -mTargetActorSize.height );
       mTargetActorPosition.y = std::max( mTargetActorPosition.y, ( mTargetActorSize.height - mWindowSize.height*0.25f ) );
       actor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, mTargetActorPosition.y ));
old mode 100644 (file)
new mode 100755 (executable)
index fb5b5a3..7f56b19
@@ -221,22 +221,23 @@ class VideoViewController: public ConnectionTracker
 
   void OnPan( Actor actor, const PanGesture& gesture )
   {
-    if( !mIsFullScreen && gesture.state == Gesture::Continuing )
+    if( !mIsFullScreen && gesture.GetState() == Gesture::Continuing )
     {
-      mVideoView.TranslateBy( Vector3( gesture.displacement ) );
+      mVideoView.TranslateBy( Vector3( gesture.GetDisplacement() ) );
     }
   }
 
   void OnPinch( Actor actor, const PinchGesture& gesture )
   {
-    if( gesture.state == Gesture::Started )
+    Gesture::State state = gesture.GetState();
+    if( state == Gesture::Started )
     {
       mPinchStartScale = mScale;
     }
 
-    if( gesture.state == Gesture::Finished )
+    if( state == Gesture::Finished )
     {
-      mScale = mPinchStartScale * gesture.scale;
+      mScale = mPinchStartScale * gesture.GetScale();
       mVideoView.SetProperty( Actor::Property::SCALE, mScale );
     }
   }