Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / public-api / events / pan-gesture-detector.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 // CLASS HEADER
18 #include <dali/public-api/events/pan-gesture-detector.h>
19
20 // INTERNAL INCLUDES
21 #include <dali/internal/event/events/pan-gesture-detector-impl.h>
22
23 namespace Dali
24 {
25
26 const char* const PanGestureDetector::SIGNAL_PAN_DETECTED = "pan-detected";
27
28 const Radian PanGestureDetector::DIRECTION_LEFT( -Math::PI );
29 const Radian PanGestureDetector::DIRECTION_RIGHT( 0.0f );
30 const Radian PanGestureDetector::DIRECTION_UP( -0.5f * Math::PI );
31 const Radian PanGestureDetector::DIRECTION_DOWN( 0.5f * Math::PI );
32 const Radian PanGestureDetector::DIRECTION_HORIZONTAL( Math::PI );
33 const Radian PanGestureDetector::DIRECTION_VERTICAL( -0.5f * Math::PI );
34 const Radian PanGestureDetector::DEFAULT_THRESHOLD( 0.25f * Math::PI );
35
36 PanGestureDetector::PanGestureDetector(Internal::PanGestureDetector* internal)
37 : GestureDetector(internal)
38 {
39 }
40
41 PanGestureDetector::PanGestureDetector()
42 {
43 }
44
45 PanGestureDetector PanGestureDetector::New()
46 {
47   Internal::PanGestureDetectorPtr internal = Internal::PanGestureDetector::New();
48
49   return PanGestureDetector(internal.Get());
50 }
51
52 PanGestureDetector PanGestureDetector::DownCast( BaseHandle handle )
53 {
54   return PanGestureDetector( dynamic_cast<Dali::Internal::PanGestureDetector*>(handle.GetObjectPtr()) );
55 }
56
57 PanGestureDetector::~PanGestureDetector()
58 {
59 }
60
61 void PanGestureDetector::SetMinimumTouchesRequired(unsigned int minimum)
62 {
63   GetImplementation(*this).SetMinimumTouchesRequired(minimum);
64 }
65
66 void PanGestureDetector::SetMaximumTouchesRequired(unsigned int maximum)
67 {
68   GetImplementation(*this).SetMaximumTouchesRequired(maximum);
69 }
70
71 unsigned int PanGestureDetector::GetMinimumTouchesRequired() const
72 {
73   return GetImplementation(*this).GetMinimumTouchesRequired();
74 }
75
76 unsigned int PanGestureDetector::GetMaximumTouchesRequired() const
77 {
78   return GetImplementation(*this).GetMaximumTouchesRequired();
79 }
80
81 void PanGestureDetector::AddAngle( Radian angle, Radian threshold )
82 {
83   GetImplementation(*this).AddAngle( angle, threshold );
84 }
85
86 void PanGestureDetector::AddDirection( Radian direction, Radian threshold )
87 {
88   GetImplementation(*this).AddDirection( direction, threshold );
89 }
90
91 const PanGestureDetector::AngleContainer& PanGestureDetector::GetAngles() const
92 {
93   return GetImplementation(*this).GetAngles();
94 }
95
96 void PanGestureDetector::ClearAngles()
97 {
98   GetImplementation(*this).ClearAngles();
99 }
100
101 void PanGestureDetector::RemoveAngle( Radian angle )
102 {
103   GetImplementation(*this).RemoveAngle( angle );
104 }
105
106 void PanGestureDetector::RemoveDirection( Radian direction )
107 {
108   GetImplementation(*this).RemoveDirection( direction );
109 }
110
111 PanGestureDetector::DetectedSignalV2& PanGestureDetector::DetectedSignal()
112 {
113   return GetImplementation(*this).DetectedSignal();
114 }
115
116 void PanGestureDetector::SetPanGestureProperties( const PanGesture& pan )
117 {
118   Internal::PanGestureDetector::SetPanGestureProperties( pan );
119 }
120
121 } // namespace Dali