[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / effects-view / effects-view.cpp
1 /*
2  * Copyright (c) 2022 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) = default;
40
41 EffectsView& EffectsView::operator=(const EffectsView& handle) = default;
42
43 EffectsView::EffectsView(EffectsView&& handle) = default;
44
45 EffectsView& EffectsView::operator=(EffectsView&& handle) = default;
46
47 EffectsView EffectsView::DownCast(BaseHandle handle)
48 {
49   return Control::DownCast<EffectsView, Internal::EffectsView>(handle);
50 }
51
52 EffectsView::~EffectsView()
53 {
54 }
55
56 EffectsView::EffectType EffectsView::GetType() const
57 {
58   return GetImpl(*this).GetType();
59 }
60
61 void EffectsView::Refresh()
62 {
63   GetImpl(*this).Refresh();
64 }
65
66 void EffectsView::SetRefreshOnDemand(bool onDemand)
67 {
68   GetImpl(*this).SetRefreshOnDemand(onDemand);
69 }
70
71 void EffectsView::SetPixelFormat(Pixel::Format pixelFormat)
72 {
73   GetImpl(*this).SetPixelFormat(pixelFormat);
74 }
75
76 void EffectsView::SetBackgroundColor(const Vector4& color)
77 {
78   GetImpl(*this).SetBackgroundColor(color);
79 }
80
81 Vector4 EffectsView::GetBackgroundColor() const
82 {
83   return GetImpl(*this).GetBackgroundColor();
84 }
85
86 EffectsView::EffectsView(Internal::EffectsView& implementation)
87 : Control(implementation)
88 {
89 }
90
91 EffectsView::EffectsView(Dali::Internal::CustomActor* internal)
92 : Control(internal)
93 {
94   VerifyCustomActorPointer<Internal::EffectsView>(internal);
95 }
96
97 } //namespace Toolkit
98
99 } //namespace Dali