Clean up the code to build successfully on macOS
[platform/core/uifw/dali-core.git] / dali / public-api / actors / layer.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/public-api/actors/layer.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/actors/layer-impl.h>
23
24 namespace Dali
25 {
26 using Dali::Layer;
27
28 Layer::Layer()
29 {
30 }
31
32 Layer Layer::New()
33 {
34   Internal::LayerPtr internal = Internal::Layer::New();
35
36   return Layer(internal.Get());
37 }
38
39 Layer Layer::DownCast(BaseHandle handle)
40 {
41   return Layer(dynamic_cast<Dali::Internal::Layer*>(handle.GetObjectPtr()));
42 }
43
44 Layer::~Layer()
45 {
46 }
47
48 Layer::Layer(const Layer& copy) = default;
49
50 Layer& Layer::operator=(const Layer& rhs) = default;
51
52 Layer::Layer(Layer&& rhs) = default;
53
54 Layer& Layer::operator=(Layer&& rhs) = default;
55
56 void Layer::Raise()
57 {
58   GetImplementation(*this).Raise();
59 }
60
61 void Layer::Lower()
62 {
63   GetImplementation(*this).Lower();
64 }
65
66 void Layer::RaiseAbove(Layer target)
67 {
68   GetImplementation(*this).RaiseAbove(GetImplementation(target));
69 }
70
71 void Layer::LowerBelow(Layer target)
72 {
73   GetImplementation(*this).LowerBelow(GetImplementation(target));
74 }
75
76 void Layer::RaiseToTop()
77 {
78   GetImplementation(*this).RaiseToTop();
79 }
80
81 void Layer::LowerToBottom()
82 {
83   GetImplementation(*this).LowerToBottom();
84 }
85
86 void Layer::MoveAbove(Layer target)
87 {
88   GetImplementation(*this).MoveAbove(GetImplementation(target));
89 }
90
91 void Layer::MoveBelow(Layer target)
92 {
93   GetImplementation(*this).MoveBelow(GetImplementation(target));
94 }
95
96 void Layer::SetSortFunction(SortFunctionType function)
97 {
98   GetImplementation(*this).SetSortFunction(function);
99 }
100
101 Layer::Layer(Internal::Layer* internal)
102 : Actor(internal)
103 {
104 }
105
106 } // namespace Dali