1 #ifndef __DALI_PINCH_GESTURE_H__
2 #define __DALI_PINCH_GESTURE_H__
5 * Copyright (c) 2014 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/vector2.h>
29 * @brief A PinchGesture is emitted when the user moves two fingers towards or away from each other.
31 * This gesture can be in one of three states; when the pinch gesture is first detected, its
32 * state is set to "Started". After this, if there is change in the gesture, the state will
33 * be "Continuing". Finally, when the gesture ends, the state of the gesture changes to
36 * A pinch gesture will continue to be sent to the actor under the center point of the pinch
37 * until the pinch ends.
39 struct DALI_IMPORT_API PinchGesture: public Gesture
41 // Construction & Destruction
44 * @brief Default Constructor.
46 * @param[in] state The state of the gesture
48 PinchGesture(Gesture::State state);
51 * @brief Copy constructor.
53 PinchGesture( const PinchGesture& rhs );
56 * @brief Assignment operator.
58 PinchGesture& operator=( const PinchGesture& rhs );
61 * @brief Virtual destructor.
63 virtual ~PinchGesture();
68 * @brief The scale factor from the start of the pinch gesture till the latest pinch gesture.
70 * If the user is moving their fingers away from each other, then
71 * this value increases. Conversely, if the user is moving their
72 * fingers towards each other, this value will decrease.
77 * @brief The speed at which the user is moving their fingers.
79 * This is the pixel movement per second.
84 * @brief The center point of the two points that caused the pinch gesture in screen coordinates.
86 Vector2 screenCenterPoint;
89 * @brief The center point of the two points that caused the pinch gesture in local actor coordinates.
91 Vector2 localCenterPoint;
96 #endif // __DALI_PINCH_GESTURE_H__