aabda195e1810bb8348a9b1847c246dc78bc9500
[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
28 namespace DevelPanGesture
29 {
30
31 /**
32  * @brief Create a PanGeture for internal.
33  * @param[in] state The state of the PanGesture
34  */
35 DALI_CORE_API Dali::PanGesture New(Gesture::State state);
36
37 /**
38  * @brief Set the time the gesture took place.
39  * @param[in] gesture The PanGesture to set
40  * @param[in] time The time the gesture took place
41  */
42 DALI_CORE_API void SetTime(Dali::PanGesture& gesture, uint32_t time);
43
44 /**
45  * @brief Set the velocity at which the user is moving their fingers.
46  * @param[in] gesture The PanGesture to set
47  * @param[in] velocity The Vector2 in local coordinates to set
48  */
49 DALI_CORE_API void SetVelocity(Dali::PanGesture& gesture, const Vector2& velocity);
50
51 /**
52  * @brief Set the displacement.
53  * @param[in] gesture The PanGesture to set
54  * @param[in] displacement The Vector2 in local coordinates to set
55  */
56 DALI_CORE_API void SetDisplacement(Dali::PanGesture& gesture, const Vector2& displacement);
57
58 /**
59  * @brief Set the current touch position of the primary touch point in local actor coordinates.
60  * @param[in] gesture The PanGesture to set.
61  * @param[in] position The current touch position to set.
62  */
63 DALI_CORE_API void SetPosition(Dali::PanGesture& gesture, const Vector2& position);
64
65 /**
66  * @brief Set the velocity at which the user is moving their fingers.
67  * @param[in] gesture The PanGesture to set
68  * @param[in] screenVelocity The Vector2 in screen coordinates to set
69  */
70 DALI_CORE_API void SetScreenVelocity(Dali::PanGesture& gesture, const Vector2& screenVelocity);
71
72 /**
73  * @brief Set the screen displacement.
74  * @param[in] gesture The PanGesture to set
75  * @param[in] screenDisplacement The Vector2 in screen coordinates to set
76  */
77 DALI_CORE_API void SetScreenDisplacement(Dali::PanGesture& gesture, const Vector2& screenDisplacement);
78
79 /**
80  * @brief Set the current touch position of the primary touch point in screen coordinates.
81  * @param[in] gesture The PanGesture to set.
82  * @param[in] screenPosition The Vector2 in screen coordinates to set.
83  */
84 DALI_CORE_API void SetScreenPosition(Dali::PanGesture& gesture, const Vector2& screenPosition);
85
86 /**
87  * @brief Set the total number of fingers touching the screen in a pan gesture.
88  * @param[in] gesture The PanGesture to set
89  * @param[in] numberOfTouches The total number of fingers touching the screen to set
90  */
91 DALI_CORE_API void SetNumberOfTouches(Dali::PanGesture& gesture, uint32_t numberOfTouches);
92
93 } // namespace DevelPanGesture
94
95 } // namespace Dali
96
97 #endif // DALI_PAN_GESTURE_DEVEL_H