c64ee4b9c79c45022c686ccfb89e25e3879b953a
[platform/core/uifw/dali-core.git] / dali / integration-api / input-options.h
1 #ifndef DALI_INTEGRATION_INPUT_OPTIONS_H
2 #define DALI_INTEGRATION_INPUT_OPTIONS_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <dali/public-api/common/dali-common.h>
25 #include <dali/public-api/object/type-info.h>
26
27 namespace Dali
28 {
29
30 namespace Integration
31 {
32
33 /**
34  * @brief Called by adaptor to set the pan gesture prediction mode from
35  * an environment variable
36  *
37  * @pre Should be called after Core creation.
38  * @param mode The pan gesture prediction mode.
39  */
40 DALI_CORE_API void SetPanGesturePredictionMode( int mode );
41
42 /**
43  * @brief Called by adaptor to set the prediction amount of the pan gesture
44  * from an environment variable
45  *
46  * @param[in] amount The prediction amount in milliseconds
47  */
48 DALI_CORE_API void SetPanGesturePredictionAmount(unsigned int amount);
49
50 /**
51  * @brief Sets the upper bound of the prediction amount for clamping
52  * from an environment variable
53  *
54  * @param[in] amount The prediction amount in milliseconds
55  */
56 DALI_CORE_API void SetPanGestureMaximumPredictionAmount( unsigned int amount );
57
58 /**
59  * @brief Sets the lower bound of the prediction amount for clamping
60  * from an environment variable
61  *
62  * @param[in] amount The prediction amount in milliseconds
63  */
64 DALI_CORE_API void SetPanGestureMinimumPredictionAmount( unsigned int amount );
65
66 /**
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.
72  *
73  * @param[in] amount The prediction amount in milliseconds
74  */
75 DALI_CORE_API void SetPanGesturePredictionAmountAdjustment( unsigned int amount );
76
77 /**
78  * @brief Called to set how pan gestures smooth input
79  *
80  * @param[in] mode The smoothing mode to use
81  */
82 DALI_CORE_API void SetPanGestureSmoothingMode( int mode );
83
84 /**
85  * @brief Sets the smoothing amount of the pan gesture
86  *
87  * @param[in] amount The smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing
88  */
89 DALI_CORE_API void SetPanGestureSmoothingAmount( float amount );
90
91 /**
92  * @brief Sets whether to use actual times of the real gesture and frames or not.
93  *
94  * @param[in] value True = use actual times, False = use perfect values
95  */
96 DALI_CORE_API void SetPanGestureUseActualTimes( bool value );
97
98 /**
99  * @brief Sets the interpolation time range (ms) of past points to use (with weights) when interpolating.
100  *
101  * @param[in] value Time range in ms
102  */
103 DALI_CORE_API void SetPanGestureInterpolationTimeRange( int value );
104
105 /**
106  * @brief Sets whether to use scalar only prediction, which when enabled, ignores acceleration.
107  *
108  * @param[in] value True = use scalar prediction only
109  */
110 DALI_CORE_API void SetPanGestureScalarOnlyPredictionEnabled( bool value );
111
112 /**
113  * @brief Sets whether to use two point prediction. This combines two interpolated points to get more steady acceleration and velocity values.
114  *
115  * @param[in] value True = use two point prediction
116  */
117 DALI_CORE_API void SetPanGestureTwoPointPredictionEnabled( bool value );
118
119 /**
120  * @brief Sets the time in the past to interpolate the second point when using two point interpolation.
121  *
122  * @param[in] value Time in past in ms
123  */
124 DALI_CORE_API void SetPanGestureTwoPointInterpolatePastTime( int value );
125
126 /**
127  * @brief Sets the two point velocity bias. This is the ratio of first and second points to use for velocity.
128  *
129  * @param[in] value 0.0f = 100% first point. 1.0f = 100% of second point.
130  */
131 DALI_CORE_API void SetPanGestureTwoPointVelocityBias( float value );
132
133 /**
134  * @brief Sets the two point acceleration bias. This is the ratio of first and second points to use for acceleration.
135  *
136  * @param[in] value 0.0f = 100% first point. 1.0f = 100% of second point.
137  */
138 DALI_CORE_API void SetPanGestureTwoPointAccelerationBias( float value );
139
140 /**
141  * @brief Sets the range of time (ms) of points in the history to perform multitap smoothing with (if enabled).
142  *
143  * @param[in] value Time in past in ms
144  */
145 DALI_CORE_API void SetPanGestureMultitapSmoothingRange( int value );
146
147 /**
148  * @brief Sets the minimum distance required to start a pan gesture
149  *
150  * @param[in] value Distance to move
151  */
152 DALI_CORE_API void SetPanGestureMinimumDistance( int value );
153
154 /**
155  * @brief Sets the minimum number of touch events to start a pan
156  *
157  * @param[in] value Number of pan events
158  */
159 DALI_CORE_API void SetPanGestureMinimumPanEvents( int value );
160
161 /**
162  * @brief Sets the minimum distance required to start a pinch gesture
163  *
164  * @param[in] value Distance to move in pixels
165  */
166 DALI_CORE_API void SetPinchGestureMinimumDistance( float value );
167
168 /**
169  * @brief Sets the minimum touch events required before a pinch can be started
170  *
171  * @param[in] value The number of touch events
172  */
173 DALI_CORE_API void SetPinchGestureMinimumTouchEvents( uint32_t value );
174
175 /**
176  * @brief Sets the minimum touch events required after a pinch started
177  *
178  * @param[in] value The number of touch events
179  */
180 DALI_CORE_API void SetPinchGestureMinimumTouchEventsAfterStart( uint32_t value );
181
182 /**
183  * @brief Sets the minimum touch events required before a rotation can be started
184  *
185  * @param[in] value The number of touch events
186  */
187 DALI_CORE_API void SetRotationGestureMinimumTouchEvents( uint32_t value );
188
189 /**
190  * @brief Sets the minimum touch events required after a rotation started
191  *
192  * @param[in] value The number of touch events
193  */
194 DALI_CORE_API void SetRotationGestureMinimumTouchEventsAfterStart( uint32_t value );
195
196 /**
197  * @brief Sets the minimum holding time required to be recognized as a long press gesture
198  *
199  * @param[in] value The time value in milliseconds
200  */
201 DALI_CORE_API void SetLongPressMinimumHoldingTime( unsigned int value );
202
203 } // namespace Integration
204
205 } // namespace Dali
206
207 #endif // DALI_INTEGRATION_INPUT_OPTIONS_H