Merge "Removed bogus consts and fixed out-of-line definitions." into tizen
[platform/core/uifw/dali-core.git] / dali / internal / event / events / gesture-event-processor.cpp
index a29f250..4a13feb 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // CLASS HEADER
 #include <dali/internal/event/events/gesture-event-processor.h>
@@ -27,6 +28,7 @@
 #include <dali/integration-api/render-controller.h>
 #include <dali/internal/event/common/stage-impl.h>
 #include <dali/internal/event/events/pinch-gesture-detector-impl.h>
+#include <dali/internal/update/gestures/scene-graph-pan-gesture.h>
 #include <dali/public-api/events/pan-gesture.h>
 
 namespace Dali
@@ -75,10 +77,6 @@ void GestureEventProcessor::ProcessGestureEvent(const Integration::GestureEvent&
     case Gesture::Tap:
       mTapGestureProcessor.Process(static_cast<const Integration::TapGestureEvent&>(event));
       break;
-
-    default:
-      DALI_ASSERT_ALWAYS( false && "Invalid gesture type sent from Integration\n" );
-      break;
   }
 }
 
@@ -113,10 +111,6 @@ void GestureEventProcessor::AddGestureDetector(GestureDetector* gestureDetector)
       mTapGestureProcessor.AddGestureDetector(tap);
       break;
     }
-
-    default:
-      DALI_ASSERT_DEBUG( false && "Invalid gesture detector type created\n" );
-      break;
   }
 }
 
@@ -151,10 +145,6 @@ void GestureEventProcessor::RemoveGestureDetector(GestureDetector* gestureDetect
       mTapGestureProcessor.RemoveGestureDetector(tap);
       break;
     }
-
-    default:
-      DALI_ASSERT_DEBUG( false && "Invalid gesture detector type removal request\n" );
-      break;
   }
 }
 
@@ -189,10 +179,6 @@ void GestureEventProcessor::GestureDetectorUpdated(GestureDetector* gestureDetec
       mTapGestureProcessor.GestureDetectorUpdated(tap);
       break;
     }
-
-    default:
-      DALI_ASSERT_DEBUG( false && "Invalid gesture type update request\n" );
-      break;
   }
 }
 
@@ -244,6 +230,26 @@ void GestureEventProcessor::EnablePanGestureProfiling()
   mPanGestureProcessor.EnableProfiling();
 }
 
+void GestureEventProcessor::SetPanGesturePredictionMode(int mode)
+{
+  mPanGestureProcessor.SetPredictionMode(mode);
+}
+
+void GestureEventProcessor::SetPanGesturePredictionAmount( unsigned int amount )
+{
+  mPanGestureProcessor.SetPredictionAmount(amount);
+}
+
+void GestureEventProcessor::SetPanGestureSmoothingMode(int mode)
+{
+  mPanGestureProcessor.SetSmoothingMode(mode);
+}
+
+void GestureEventProcessor::SetPanGestureSmoothingAmount( float amount )
+{
+  mPanGestureProcessor.SetSmoothingAmount(amount);
+}
+
 } // namespace Internal
 
 } // namespace Dali