Add 'ExclusiveArch: armv7l' limit build to arm architecture
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / scrollable / scroll-view / scroll-view-twist-effect.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 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
18 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h>
19 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
20 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.h>
21
22 using namespace Dali;
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 const float ScrollViewTwistEffect::DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK( 0.0f );
31
32 ScrollViewTwistEffect ScrollViewTwistEffect::New()
33 {
34   return ScrollViewTwistEffect(new Internal::ScrollViewTwistEffect());
35 }
36
37 ScrollViewTwistEffect::ScrollViewTwistEffect()
38 {
39
40 }
41
42 ScrollViewTwistEffect::ScrollViewTwistEffect(Internal::ScrollViewTwistEffect *impl)
43 : ScrollViewEffect(impl)
44 {
45 }
46
47 ScrollViewTwistEffect ScrollViewTwistEffect::DownCast( BaseHandle handle )
48 {
49   return ScrollViewTwistEffect( dynamic_cast<Internal::ScrollViewTwistEffect*>(handle.GetObjectPtr()) );
50 }
51
52 float ScrollViewTwistEffect::GetMinimumDistanceForShrink() const
53 {
54   return GetImpl(*this).GetMinimumDistanceForShrink();
55 }
56
57 void ScrollViewTwistEffect::SetMinimumDistanceForShrink(float distance)
58 {
59   GetImpl(*this).SetMinimumDistanceForShrink( distance );
60 }
61
62 void ScrollViewTwistEffect::EnableEffect(bool enableFlag)
63 {
64   GetImpl(*this).EnableEffect(enableFlag);
65 }
66
67 void ScrollViewTwistEffect::ApplyToActor( Actor child,
68                                           bool additionalEffects,
69                                           const Vector2& angleSwing,
70                                           float scaleAmount,
71                                           float delayMin,
72                                           float delayMax )
73 {
74   GetImpl(*this).ApplyToActor( child,
75                                additionalEffects,
76                                angleSwing,
77                                scaleAmount,
78                                delayMin,
79                                delayMax );
80 }
81
82 void ScrollViewTwistEffect::SetMaxSwingAngle(const Vector2& maxSwingAngle)
83 {
84   GetImpl(*this).SetMaxSwingAngle(maxSwingAngle);
85 }
86
87 void ScrollViewTwistEffect::SetSwingDropOff(const Vector2& dropOff, const Vector2& distance, AlphaFunction function)
88 {
89   GetImpl(*this).SetSwingDropOff(dropOff, distance, function);
90 }
91
92 } // namespace Toolkit
93
94 } // namespace Dali