1 #ifndef __DALI_PINCH_GESTURE_H__
2 #define __DALI_PINCH_GESTURE_H__
5 * Copyright (c) 2015 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>
28 * @addtogroup dali_core_events
33 * @brief A PinchGesture is emitted when the user moves two fingers towards or away from each other.
35 * This gesture can be in one of three states; when the pinch gesture is first detected, its
36 * state is set to "Started". After this, if there is change in the gesture, the state will
37 * be "Continuing". Finally, when the gesture ends, the state of the gesture changes to
40 * A pinch gesture will continue to be sent to the actor under the center point of the pinch
41 * until the pinch ends.
44 struct DALI_IMPORT_API PinchGesture: public Gesture
46 // Construction & Destruction
49 * @brief Default Constructor.
52 * @param[in] state The state of the gesture
54 PinchGesture(Gesture::State state);
57 * @brief Copy constructor.
60 PinchGesture( const PinchGesture& rhs );
63 * @brief Assignment operator.
66 PinchGesture& operator=( const PinchGesture& rhs );
69 * @brief Virtual destructor.
72 virtual ~PinchGesture();
77 * @brief The scale factor from the start of the pinch gesture till the latest pinch gesture.
79 * If the user is moving their fingers away from each other, then
80 * this value increases. Conversely, if the user is moving their
81 * fingers towards each other, this value will decrease.
86 * @brief The speed at which the user is moving their fingers.
88 * This is the pixel movement per second.
93 * @brief The center point of the two points that caused the pinch gesture in screen coordinates.
95 Vector2 screenCenterPoint;
98 * @brief The center point of the two points that caused the pinch gesture in local actor coordinates.
100 Vector2 localCenterPoint;
108 #endif // __DALI_PINCH_GESTURE_H__