$(platform_abstraction_src_dir)/image-data.cpp \
$(platform_abstraction_src_dir)/debug.cpp \
$(platform_abstraction_src_dir)/profiling.cpp \
+ $(platform_abstraction_src_dir)/input-options.cpp \
$(platform_abstraction_src_dir)/shader-data.cpp \
$(platform_abstraction_src_dir)/system-overlay.cpp \
$(platform_abstraction_src_dir)/common/lockless-buffer.cpp \
$(platform_abstraction_src_dir)/glyph-set.h \
$(platform_abstraction_src_dir)/debug.h \
$(platform_abstraction_src_dir)/profiling.h \
+ $(platform_abstraction_src_dir)/input-options.h \
$(platform_abstraction_src_dir)/bitmap.h \
$(platform_abstraction_src_dir)/image-data.h \
$(platform_abstraction_src_dir)/resource-types.h \
--- /dev/null
+#include "input-options.h"
+
+#include <dali/internal/event/common/thread-local-storage.h>
+#include <dali/internal/event/events/gesture-event-processor.h>
+
+using Dali::Internal::GestureEventProcessor;
+using Dali::Internal::ThreadLocalStorage;
+
+namespace Dali
+{
+
+namespace Integration
+{
+
+void SetPanGesturePredictionMode( int mode )
+{
+ GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
+ eventProcessor.SetPanGesturePredictionMode(mode);
+}
+
+void SetPanGesturePredictionAmount(unsigned int amount)
+{
+ GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
+ eventProcessor.SetPanGesturePredictionAmount(amount);
+}
+
+void SetPanGestureSmoothingMode(int mode)
+{
+ GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
+ eventProcessor.SetPanGestureSmoothingMode(mode);
+}
+
+void SetPanGestureSmoothingAmount( float amount )
+{
+ GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
+ eventProcessor.SetPanGestureSmoothingAmount(amount);
+}
+
+} // namespace Integration
+
+} // namespace Dali
--- /dev/null
+#ifndef __DALI_INTEGRATION_INPUT_OPTIONS_H__
+#define __DALI_INTEGRATION_INPUT_OPTIONS_H__
+
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+
+// INTERNAL INCLUDES
+#include <dali/public-api/common/dali-common.h>
+
+namespace Dali
+{
+
+namespace Integration
+{
+
+/**
+ * @brief Called by adaptor to set the pan gesture prediction mode from
+ * an environment variable
+ *
+ * @pre Should be called after Core creation.
+ * @param mode The pan gesture prediction mode.
+ */
+DALI_IMPORT_API void SetPanGesturePredictionMode( int mode );
+
+/**
+ * @brief Called by adaptor to set the prediction amount of the pan gesture from an environment variable
+ *
+ * @param[in] amount The prediction amount in milliseconds
+ */
+DALI_IMPORT_API void SetPanGesturePredictionAmount(unsigned int amount);
+
+/**
+ * @brief Called to set how pan gestures smooth input
+ *
+ * @param[in] mode The smoothing mode to use
+ */
+DALI_IMPORT_API void SetPanGestureSmoothingMode( int mode );
+
+/**
+ * @brief Sets the prediction amount of the pan gesture
+ *
+ * @param[in] amount The smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing
+ */
+DALI_IMPORT_API void SetPanGestureSmoothingAmount( float amount );
+
+} // namespace Integration
+
+} // namespace Dali
+
+#endif // __DALI_INTEGRATION_INPUT_OPTIONS_H__
}
}
-void SetPanGesturePredictionMode( int mode )
-{
- GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
- eventProcessor.SetPanGesturePredictionMode(mode);
-}
-
-void SetPanGesturePredictionAmount(unsigned int amount)
-{
- GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
- eventProcessor.SetPanGesturePredictionAmount(amount);
-}
-
-void SetPanGestureSmoothingMode(int mode)
-{
- GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
- eventProcessor.SetPanGestureSmoothingMode(mode);
-}
-
-void SetPanGestureSmoothingAmount( float amount )
-{
- GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
- eventProcessor.SetPanGestureSmoothingAmount(amount);
-}
-
namespace Profiling
{
*/
DALI_IMPORT_API void EnableProfiling( ProfilingType type );
-/**
- * @brief Called by adaptor to set the pan gesture prediction mode from
- * an environment variable
- *
- * @pre Should be called after Core creation.
- * @param mode The pan gesture prediction mode.
- */
-DALI_IMPORT_API void SetPanGesturePredictionMode( int mode );
-
-/**
- * @brief Called by adaptor to set the prediction amount of the pan gesture from an environment variable
- *
- * @param[in] amount The prediction amount in milliseconds
- */
-DALI_IMPORT_API void SetPanGesturePredictionAmount(unsigned int amount);
-
-/**
- * @brief Called to set how pan gestures smooth input
- *
- * @param[in] mode The smoothing mode to use
- */
-DALI_IMPORT_API void SetPanGestureSmoothingMode( int mode );
-
-/**
- * @brief Sets the prediction amount of the pan gesture
- *
- * @param[in] amount The smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing
- */
-DALI_IMPORT_API void SetPanGestureSmoothingAmount( float amount );
-
namespace Profiling
{
*
* Valid modes:
* 0 - No prediction
- * 1 - Average Smoothing (no actual prediction)
- * 2 - Interpolation using last vsync time and event time
- * 3 - Same as 2 for now, in progress
+ * 1 - Prediction using average acceleration
*/
void SetPredictionMode(int mode);