4cad3136efbd8a8e363a2e96f5741da64c3cb117
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / effects-view / effects-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/effects-view/effects-view.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/effects-view/effects-view-impl.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 EffectsView EffectsView::New(EffectType type)
29 {
30   EffectsView effectsView = Internal::EffectsView::New();
31   GetImpl(effectsView).SetType(type);
32   return effectsView;
33 }
34
35 EffectsView::EffectsView()
36 {
37 }
38
39 EffectsView::EffectsView(const EffectsView& handle)
40 : Control(handle)
41 {
42 }
43
44 EffectsView& EffectsView::operator=(const EffectsView& rhs)
45 {
46   if(&rhs != this)
47   {
48     Control::operator=(rhs);
49   }
50   return *this;
51 }
52
53 EffectsView EffectsView::DownCast(BaseHandle handle)
54 {
55   return Control::DownCast<EffectsView, Internal::EffectsView>(handle);
56 }
57
58 EffectsView::~EffectsView()
59 {
60 }
61
62 EffectsView::EffectType EffectsView::GetType() const
63 {
64   return GetImpl(*this).GetType();
65 }
66
67 void EffectsView::Refresh()
68 {
69   GetImpl(*this).Refresh();
70 }
71
72 void EffectsView::SetRefreshOnDemand(bool onDemand)
73 {
74   GetImpl(*this).SetRefreshOnDemand(onDemand);
75 }
76
77 void EffectsView::SetPixelFormat(Pixel::Format pixelFormat)
78 {
79   GetImpl(*this).SetPixelFormat(pixelFormat);
80 }
81
82 void EffectsView::SetBackgroundColor(const Vector4& color)
83 {
84   GetImpl(*this).SetBackgroundColor(color);
85 }
86
87 Vector4 EffectsView::GetBackgroundColor() const
88 {
89   return GetImpl(*this).GetBackgroundColor();
90 }
91
92 EffectsView::EffectsView(Internal::EffectsView& implementation)
93 : Control(implementation)
94 {
95 }
96
97 EffectsView::EffectsView(Dali::Internal::CustomActor* internal)
98 : Control(internal)
99 {
100   VerifyCustomActorPointer<Internal::EffectsView>(internal);
101 }
102
103 } //namespace Toolkit
104
105 } //namespace Dali