[dali_1.0.39] Merge branch 'tizen'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / scroll-view / scroll-view-depth-effect.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
18 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
19 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-depth-effect.h>
20 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
21 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.h>
22
23 using namespace Dali;
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 ScrollViewDepthEffect ScrollViewDepthEffect::New()
32 {
33   return ScrollViewDepthEffect(new Internal::ScrollViewDepthEffect());
34 }
35
36 ScrollViewDepthEffect::ScrollViewDepthEffect()
37 {
38
39 }
40
41 ScrollViewDepthEffect::ScrollViewDepthEffect(Internal::ScrollViewDepthEffect *impl)
42 : ScrollViewEffect(impl)
43 {
44 }
45
46 ScrollViewDepthEffect ScrollViewDepthEffect::DownCast( BaseHandle handle )
47 {
48   return ScrollViewDepthEffect( dynamic_cast<Internal::ScrollViewDepthEffect*>(handle.GetObjectPtr()) );
49 }
50
51 void ScrollViewDepthEffect::ApplyToActor(Actor child,
52                                          const Vector2& positionExtent,
53                                          const Vector2& offsetExtent,
54                                          float positionScale,
55                                          float scaleExtent)
56 {
57   GetImpl(*this).ApplyToActor( child, positionExtent, offsetExtent, positionScale, scaleExtent );
58 }
59
60 } // namespace Toolkit
61
62 } // namespace Dali