1 #ifndef DALI_INTEGRATION_INPUT_OPTIONS_H
2 #define DALI_INTEGRATION_INPUT_OPTIONS_H
5 * Copyright (c) 2020 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>
32 * @brief Called by adaptor to set the pan gesture prediction mode from
33 * an environment variable
35 * @pre Should be called after Core creation.
36 * @param mode The pan gesture prediction mode.
38 DALI_CORE_API void SetPanGesturePredictionMode(int mode);
41 * @brief Called by adaptor to set the prediction amount of the pan gesture
42 * from an environment variable
44 * @param[in] amount The prediction amount in milliseconds
46 DALI_CORE_API void SetPanGesturePredictionAmount(unsigned int amount);
49 * @brief Sets the upper bound of the prediction amount for clamping
50 * from an environment variable
52 * @param[in] amount The prediction amount in milliseconds
54 DALI_CORE_API void SetPanGestureMaximumPredictionAmount(unsigned int amount);
57 * @brief Sets the lower bound of the prediction amount for clamping
58 * from an environment variable
60 * @param[in] amount The prediction amount in milliseconds
62 DALI_CORE_API void SetPanGestureMinimumPredictionAmount(unsigned int amount);
65 * @brief Sets the prediction amount to adjust when the pan velocity is changed
66 * from an environment variable. If the pan velocity is accelerating, the prediction
67 * amount will be increased by the specified amount until it reaches the upper bound.
68 * If the pan velocity is decelerating, the prediction amount will be decreased by
69 * the specified amount until it reaches the lower bound.
71 * @param[in] amount The prediction amount in milliseconds
73 DALI_CORE_API void SetPanGesturePredictionAmountAdjustment(unsigned int amount);
76 * @brief Called to set how pan gestures smooth input
78 * @param[in] mode The smoothing mode to use
80 DALI_CORE_API void SetPanGestureSmoothingMode(int mode);
83 * @brief Sets the smoothing amount of the pan gesture
85 * @param[in] amount The smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing
87 DALI_CORE_API void SetPanGestureSmoothingAmount(float amount);
90 * @brief Sets whether to use actual times of the real gesture and frames or not.
92 * @param[in] value True = use actual times, False = use perfect values
94 DALI_CORE_API void SetPanGestureUseActualTimes(bool value);
97 * @brief Sets the interpolation time range (ms) of past points to use (with weights) when interpolating.
99 * @param[in] value Time range in ms
101 DALI_CORE_API void SetPanGestureInterpolationTimeRange(int value);
104 * @brief Sets whether to use scalar only prediction, which when enabled, ignores acceleration.
106 * @param[in] value True = use scalar prediction only
108 DALI_CORE_API void SetPanGestureScalarOnlyPredictionEnabled(bool value);
111 * @brief Sets whether to use two point prediction. This combines two interpolated points to get more steady acceleration and velocity values.
113 * @param[in] value True = use two point prediction
115 DALI_CORE_API void SetPanGestureTwoPointPredictionEnabled(bool value);
118 * @brief Sets the time in the past to interpolate the second point when using two point interpolation.
120 * @param[in] value Time in past in ms
122 DALI_CORE_API void SetPanGestureTwoPointInterpolatePastTime(int value);
125 * @brief Sets the two point velocity bias. This is the ratio of first and second points to use for velocity.
127 * @param[in] value 0.0f = 100% first point. 1.0f = 100% of second point.
129 DALI_CORE_API void SetPanGestureTwoPointVelocityBias(float value);
132 * @brief Sets the two point acceleration bias. This is the ratio of first and second points to use for acceleration.
134 * @param[in] value 0.0f = 100% first point. 1.0f = 100% of second point.
136 DALI_CORE_API void SetPanGestureTwoPointAccelerationBias(float value);
139 * @brief Sets the range of time (ms) of points in the history to perform multitap smoothing with (if enabled).
141 * @param[in] value Time in past in ms
143 DALI_CORE_API void SetPanGestureMultitapSmoothingRange(int value);
146 * @brief Sets the minimum distance required to start a pan gesture
148 * @param[in] value Distance to move
150 DALI_CORE_API void SetPanGestureMinimumDistance(int value);
153 * @brief Sets the minimum number of touch events to start a pan
155 * @param[in] value Number of pan events
157 DALI_CORE_API void SetPanGestureMinimumPanEvents(int value);
160 * @brief Sets the minimum distance required to start a pinch gesture
162 * @param[in] value Distance to move in pixels
164 DALI_CORE_API void SetPinchGestureMinimumDistance(float value);
167 * @brief Sets the minimum touch events required before a pinch can be started
169 * @param[in] value The number of touch events
171 DALI_CORE_API void SetPinchGestureMinimumTouchEvents(uint32_t value);
174 * @brief Sets the minimum touch events required after a pinch started
176 * @param[in] value The number of touch events
178 DALI_CORE_API void SetPinchGestureMinimumTouchEventsAfterStart(uint32_t value);
181 * @brief Sets the minimum touch events required before a rotation can be started
183 * @param[in] value The number of touch events
185 DALI_CORE_API void SetRotationGestureMinimumTouchEvents(uint32_t value);
188 * @brief Sets the minimum touch events required after a rotation started
190 * @param[in] value The number of touch events
192 DALI_CORE_API void SetRotationGestureMinimumTouchEventsAfterStart(uint32_t value);
195 * @brief Sets the minimum holding time required to be recognized as a long press gesture
197 * @param[in] value The time value in milliseconds
199 DALI_CORE_API void SetLongPressMinimumHoldingTime(unsigned int value);
201 } // namespace Integration
205 #endif // DALI_INTEGRATION_INPUT_OPTIONS_H