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_FRAMEWORK
26 #include <dali/public-api/events/gesture.h>
27 #include <dali/public-api/math/vector2.h>
29 namespace Dali DALI_IMPORT_API
33 * A PinchGesture is emitted when the user moves two fingers towards or away from each other.
34 * This gesture can be in one of three states; when the pinch gesture is first detected, its
35 * state is set to "Started". After this, if there is change in the gesture, the state will
36 * be "Continuing". Finally, when the gesture ends, the state of the gesture changes to
39 * A pinch gesture will continue to be sent to the actor under the center point of the pinch
40 * until the pinch ends.
42 struct PinchGesture: public Gesture
44 // Construction & Destruction
48 * @param[in] state The state of the gesture
50 PinchGesture(Gesture::State state);
55 PinchGesture( const PinchGesture& rhs );
60 PinchGesture& operator=( const PinchGesture& rhs );
65 virtual ~PinchGesture();
70 * The scale factor from the start of the pinch gesture till the latest pinch gesture. If the user
71 * is moving their fingers away from each other, then this value increases. Conversely, if the
72 * user is moving their fingers towards each other, this value will decrease.
77 * The speed at which the user is moving their fingers. This is the pixel movement per second.
82 * The center point of the two points that caused the pinch gesture in screen coordinates.
84 Vector2 screenCenterPoint;
87 * The center point of the two points that caused the pinch gesture in local actor coordinates.
89 Vector2 localCenterPoint;
97 #endif // __DALI_PINCH_GESTURE_H__