[AT-SPI] Squashed implementation
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / shadow-view / shadow-view.cpp
1 /*
2  * Copyright (c) 2020 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 // CLASS HEADER
19 #include <dali-toolkit/devel-api/controls/shadow-view/shadow-view.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/shadow-view/shadow-view-impl.h>
23
24 namespace
25 {
26 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE  = 1.0f;
27 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE = 1.0f;
28
29 } // namespace
30
31 namespace Dali
32 {
33 namespace Toolkit
34 {
35 ShadowView::ShadowView()
36 {
37 }
38
39 ShadowView::~ShadowView()
40 {
41 }
42
43 ShadowView::ShadowView(const ShadowView& handle)
44 : Control(handle)
45 {
46 }
47
48 ShadowView& ShadowView::operator=(const ShadowView& rhs)
49 {
50   if(&rhs != this)
51   {
52     Control::operator=(rhs);
53   }
54   return *this;
55 }
56
57 ShadowView ShadowView::New()
58 {
59   return Internal::ShadowView::New(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE,
60                                    GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE);
61 }
62
63 ShadowView ShadowView::New(float downsampleWidthScale, float downsampleHeightScale)
64 {
65   return Internal::ShadowView::New(downsampleWidthScale, downsampleHeightScale);
66 }
67
68 ShadowView::ShadowView(Internal::ShadowView& implementation)
69 : Control(implementation)
70 {
71 }
72
73 ShadowView::ShadowView(Dali::Internal::CustomActor* internal)
74 : Control(internal)
75 {
76   VerifyCustomActorPointer<Internal::ShadowView>(internal);
77 }
78
79 ShadowView ShadowView::DownCast(BaseHandle handle)
80 {
81   return Control::DownCast<ShadowView, Internal::ShadowView>(handle);
82 }
83
84 void ShadowView::SetShadowPlaneBackground(Actor shadowPlaneBackground)
85 {
86   GetImpl(*this).SetShadowPlaneBackground(shadowPlaneBackground);
87 }
88
89 void ShadowView::SetPointLight(Actor pointLight)
90 {
91   GetImpl(*this).SetPointLight(pointLight);
92 }
93
94 void ShadowView::SetPointLightFieldOfView(float fieldOfView)
95 {
96   GetImpl(*this).SetPointLightFieldOfView(fieldOfView);
97 }
98
99 void ShadowView::SetShadowColor(Vector4 color)
100 {
101   GetImpl(*this).SetShadowColor(color);
102 }
103
104 void ShadowView::Activate()
105 {
106   GetImpl(*this).Activate();
107 }
108
109 void ShadowView::Deactivate()
110 {
111   GetImpl(*this).Deactivate();
112 }
113
114 Property::Index ShadowView::GetBlurStrengthPropertyIndex() const
115 {
116   return GetImpl(*this).GetBlurStrengthPropertyIndex();
117 }
118
119 Property::Index ShadowView::GetShadowColorPropertyIndex() const
120 {
121   return GetImpl(*this).GetShadowColorPropertyIndex();
122 }
123
124 } // namespace Toolkit
125
126 } // namespace Dali