1 #ifndef DALI_INTEGRATION_INPUT_OPTIONS_H
2 #define DALI_INTEGRATION_INPUT_OPTIONS_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
24 #include <dali/public-api/common/dali-common.h>
25 #include <dali/public-api/object/type-info.h>
34 * @brief Called by adaptor to set the pan gesture prediction mode from
35 * an environment variable
37 * @pre Should be called after Core creation.
38 * @param mode The pan gesture prediction mode.
40 DALI_CORE_API void SetPanGesturePredictionMode( int mode );
43 * @brief Called by adaptor to set the prediction amount of the pan gesture
44 * from an environment variable
46 * @param[in] amount The prediction amount in milliseconds
48 DALI_CORE_API void SetPanGesturePredictionAmount(unsigned int amount);
51 * @brief Sets the upper bound of the prediction amount for clamping
52 * from an environment variable
54 * @param[in] amount The prediction amount in milliseconds
56 DALI_CORE_API void SetPanGestureMaximumPredictionAmount( unsigned int amount );
59 * @brief Sets the lower bound of the prediction amount for clamping
60 * from an environment variable
62 * @param[in] amount The prediction amount in milliseconds
64 DALI_CORE_API void SetPanGestureMinimumPredictionAmount( unsigned int amount );
67 * @brief Sets the prediction amount to adjust when the pan velocity is changed
68 * from an environment variable. If the pan velocity is accelerating, the prediction
69 * amount will be increased by the specified amount until it reaches the upper bound.
70 * If the pan velocity is decelerating, the prediction amount will be decreased by
71 * the specified amount until it reaches the lower bound.
73 * @param[in] amount The prediction amount in milliseconds
75 DALI_CORE_API void SetPanGesturePredictionAmountAdjustment( unsigned int amount );
78 * @brief Called to set how pan gestures smooth input
80 * @param[in] mode The smoothing mode to use
82 DALI_CORE_API void SetPanGestureSmoothingMode( int mode );
85 * @brief Sets the smoothing amount of the pan gesture
87 * @param[in] amount The smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing
89 DALI_CORE_API void SetPanGestureSmoothingAmount( float amount );
92 * @brief Sets whether to use actual times of the real gesture and frames or not.
94 * @param[in] value True = use actual times, False = use perfect values
96 DALI_CORE_API void SetPanGestureUseActualTimes( bool value );
99 * @brief Sets the interpolation time range (ms) of past points to use (with weights) when interpolating.
101 * @param[in] value Time range in ms
103 DALI_CORE_API void SetPanGestureInterpolationTimeRange( int value );
106 * @brief Sets whether to use scalar only prediction, which when enabled, ignores acceleration.
108 * @param[in] value True = use scalar prediction only
110 DALI_CORE_API void SetPanGestureScalarOnlyPredictionEnabled( bool value );
113 * @brief Sets whether to use two point prediction. This combines two interpolated points to get more steady acceleration and velocity values.
115 * @param[in] value True = use two point prediction
117 DALI_CORE_API void SetPanGestureTwoPointPredictionEnabled( bool value );
120 * @brief Sets the time in the past to interpolate the second point when using two point interpolation.
122 * @param[in] value Time in past in ms
124 DALI_CORE_API void SetPanGestureTwoPointInterpolatePastTime( int value );
127 * @brief Sets the two point velocity bias. This is the ratio of first and second points to use for velocity.
129 * @param[in] value 0.0f = 100% first point. 1.0f = 100% of second point.
131 DALI_CORE_API void SetPanGestureTwoPointVelocityBias( float value );
134 * @brief Sets the two point acceleration bias. This is the ratio of first and second points to use for acceleration.
136 * @param[in] value 0.0f = 100% first point. 1.0f = 100% of second point.
138 DALI_CORE_API void SetPanGestureTwoPointAccelerationBias( float value );
141 * @brief Sets the range of time (ms) of points in the history to perform multitap smoothing with (if enabled).
143 * @param[in] value Time in past in ms
145 DALI_CORE_API void SetPanGestureMultitapSmoothingRange( int value );
148 * @brief Sets the minimum distance required to start a pan gesture
150 * @param[in] value Distance to move
152 DALI_CORE_API void SetPanGestureMinimumDistance( int value );
155 * @brief Sets the minimum number of touch events to start a pan
157 * @param[in] value Number of pan events
159 DALI_CORE_API void SetPanGestureMinimumPanEvents( int value );
162 * @brief Sets the minimum distance required to start a pinch gesture
164 * @param[in] value Distance to move in pixels
166 DALI_CORE_API void SetPinchGestureMinimumDistance( float value );
169 * @brief Sets the minimum touch events required before a pinch can be started
171 * @param[in] value The number of touch events
173 DALI_CORE_API void SetPinchGestureMinimumTouchEvents( uint32_t value );
176 * @brief Sets the minimum touch events required after a pinch started
178 * @param[in] value The number of touch events
180 DALI_CORE_API void SetPinchGestureMinimumTouchEventsAfterStart( uint32_t value );
183 * @brief Sets the minimum touch events required before a rotation can be started
185 * @param[in] value The number of touch events
187 DALI_CORE_API void SetRotationGestureMinimumTouchEvents( uint32_t value );
190 * @brief Sets the minimum touch events required after a rotation started
192 * @param[in] value The number of touch events
194 DALI_CORE_API void SetRotationGestureMinimumTouchEventsAfterStart( uint32_t value );
197 * @brief Sets the minimum holding time required to be recognized as a long press gesture
199 * @param[in] value The time value in milliseconds
201 DALI_CORE_API void SetLongPressMinimumHoldingTime( unsigned int value );
203 } // namespace Integration
207 #endif // DALI_INTEGRATION_INPUT_OPTIONS_H