1 #ifndef __DALI_PINCH_GESTURE_H__
2 #define __DALI_PINCH_GESTURE_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
21 * @addtogroup CAPI_DALI_EVENTS_MODULE
26 #include <dali/public-api/events/gesture.h>
27 #include <dali/public-api/math/vector2.h>
29 namespace Dali DALI_IMPORT_API
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.
43 struct PinchGesture: public Gesture
45 // Construction & Destruction
48 * @brief Default Constructor.
50 * @param[in] state The state of the gesture
52 PinchGesture(Gesture::State state);
55 * @brief Copy constructor.
57 PinchGesture( const PinchGesture& rhs );
60 * @brief Assignment operator.
62 PinchGesture& operator=( const PinchGesture& rhs );
65 * @brief Virtual destructor.
67 virtual ~PinchGesture();
72 * @brief The scale factor from the start of the pinch gesture till the latest pinch gesture.
74 * If the user is moving their fingers away from each other, then
75 * this value increases. Conversely, if the user is moving their
76 * fingers towards each other, this value will decrease.
81 * @brief The speed at which the user is moving their fingers.
83 * This is the pixel movement per second.
88 * @brief The center point of the two points that caused the pinch gesture in screen coordinates.
90 Vector2 screenCenterPoint;
93 * @brief The center point of the two points that caused the pinch gesture in local actor coordinates.
95 Vector2 localCenterPoint;
103 #endif // __DALI_PINCH_GESTURE_H__