1 #ifndef DALI_ROTATION_GESTURE_H
2 #define DALI_ROTATION_GESTURE_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.
22 #include <dali/public-api/events/gesture.h>
23 #include <dali/public-api/math/radian.h>
24 #include <dali/public-api/math/vector2.h>
30 * @brief A RotationGesture is emitted when the user moves two fingers that are opposite each other
31 * in a rotational/circular gesture.
33 * This gesture can be in one of three states; when the rotation gesture is first detected, its
34 * state is set to Gesture::Started. After this, if there is change in the gesture, the state will
35 * be Gesture::Continuing. Finally, when the gesture ends, the state of the gesture changes to
38 * A rotation gesture will continue to be sent to the actor under the center point of the rotation
39 * until the rotation ends.
41 struct DALI_CORE_API RotationGesture: public Gesture
43 // Construction & Destruction
46 * @brief Default Constructor.
48 * @param[in] state The state of the gesture
50 RotationGesture( Gesture::State state );
53 * @brief Copy constructor.
54 * @param[in] rhs A reference to the copied handle
56 RotationGesture( const RotationGesture& rhs );
59 * @brief Assignment operator.
60 * @param[in] rhs A reference to the copied handle
61 * @return A reference to this
63 RotationGesture& operator=( const RotationGesture& rhs );
66 * @brief Virtual destructor.
68 virtual ~RotationGesture();
73 * @brief The overall rotation from the start of the rotation gesture till the latest rotation gesture.
78 * @brief The center point of the two points that caused the rotation gesture in screen coordinates.
80 Vector2 screenCenterPoint;
83 * @brief The center point of the two points that caused the rotation gesture in local actor coordinates.
85 Vector2 localCenterPoint;
90 #endif // DALI_ROTATION_GESTURE_H