[dali_2.3.31] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / devel-api / events / pan-gesture-devel.h
1 #ifndef DALI_PAN_GESTURE_DEVEL_H
2 #define DALI_PAN_GESTURE_DEVEL_H
3
4 /*
5  * Copyright (c) 2020 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 // INTERNAL INCLUDES
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/public-api/events/pan-gesture.h>
24
25 namespace Dali
26 {
27 namespace DevelPanGesture
28 {
29 /**
30  * @brief Create a PanGeture for internal.
31  * @param[in] state The state of the PanGesture
32  */
33 DALI_CORE_API Dali::PanGesture New(GestureState state);
34
35 /**
36  * @brief Set the time the gesture took place.
37  * @param[in] gesture The PanGesture to set
38  * @param[in] time The time the gesture took place
39  */
40 DALI_CORE_API void SetTime(Dali::PanGesture& gesture, uint32_t time);
41
42 /**
43  * @brief Set the velocity at which the user is moving their fingers.
44  * @param[in] gesture The PanGesture to set
45  * @param[in] velocity The Vector2 in local coordinates to set
46  */
47 DALI_CORE_API void SetVelocity(Dali::PanGesture& gesture, const Vector2& velocity);
48
49 /**
50  * @brief Set the displacement.
51  * @param[in] gesture The PanGesture to set
52  * @param[in] displacement The Vector2 in local coordinates to set
53  */
54 DALI_CORE_API void SetDisplacement(Dali::PanGesture& gesture, const Vector2& displacement);
55
56 /**
57  * @brief Set the current touch position of the primary touch point in local actor coordinates.
58  * @param[in] gesture The PanGesture to set.
59  * @param[in] position The current touch position to set.
60  */
61 DALI_CORE_API void SetPosition(Dali::PanGesture& gesture, const Vector2& position);
62
63 /**
64  * @brief Set the velocity at which the user is moving their fingers.
65  * @param[in] gesture The PanGesture to set
66  * @param[in] screenVelocity The Vector2 in screen coordinates to set
67  */
68 DALI_CORE_API void SetScreenVelocity(Dali::PanGesture& gesture, const Vector2& screenVelocity);
69
70 /**
71  * @brief Set the screen displacement.
72  * @param[in] gesture The PanGesture to set
73  * @param[in] screenDisplacement The Vector2 in screen coordinates to set
74  */
75 DALI_CORE_API void SetScreenDisplacement(Dali::PanGesture& gesture, const Vector2& screenDisplacement);
76
77 /**
78  * @brief Set the current touch position of the primary touch point in screen coordinates.
79  * @param[in] gesture The PanGesture to set.
80  * @param[in] screenPosition The Vector2 in screen coordinates to set.
81  */
82 DALI_CORE_API void SetScreenPosition(Dali::PanGesture& gesture, const Vector2& screenPosition);
83
84 /**
85  * @brief Set the total number of fingers touching the screen in a pan gesture.
86  * @param[in] gesture The PanGesture to set
87  * @param[in] numberOfTouches The total number of fingers touching the screen to set
88  */
89 DALI_CORE_API void SetNumberOfTouches(Dali::PanGesture& gesture, uint32_t numberOfTouches);
90
91 } // namespace DevelPanGesture
92
93 } // namespace Dali
94
95 #endif // DALI_PAN_GESTURE_DEVEL_H