Merge "Fix PropertyNotification issue" into devel/master
[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
27 using Dali::Layer;
28
29 Layer::Layer()
30 {
31 }
32
33 Layer Layer::New()
34 {
35   Internal::LayerPtr internal = Internal::Layer::New();
36
37   return Layer(internal.Get());
38 }
39
40 Layer Layer::DownCast( BaseHandle handle )
41 {
42   return Layer( dynamic_cast<Dali::Internal::Layer*>(handle.GetObjectPtr()) );
43 }
44
45 Layer::~Layer()
46 {
47 }
48
49 Layer::Layer(const Layer& copy)
50 : Actor(copy)
51 {
52 }
53
54 Layer& Layer::operator=(const Layer& rhs)
55 {
56   BaseHandle::operator=(rhs);
57   return *this;
58 }
59
60 Layer::Layer( Layer&& rhs ) = default;
61
62 Layer& Layer::operator=( Layer&& rhs ) = default;
63
64 void Layer::Raise()
65 {
66   GetImplementation(*this).Raise();
67 }
68
69 void Layer::Lower()
70 {
71   GetImplementation(*this).Lower();
72 }
73
74 void Layer::RaiseAbove( Layer target )
75 {
76   GetImplementation(*this).RaiseAbove( GetImplementation( target ) );
77 }
78
79 void Layer::LowerBelow( Layer target )
80 {
81   GetImplementation(*this).LowerBelow( GetImplementation( target ) );
82 }
83
84 void Layer::RaiseToTop()
85 {
86   GetImplementation(*this).RaiseToTop();
87 }
88
89 void Layer::LowerToBottom()
90 {
91   GetImplementation(*this).LowerToBottom();
92 }
93
94 void Layer::MoveAbove( Layer target )
95 {
96   GetImplementation(*this).MoveAbove( GetImplementation( target ) );
97 }
98
99 void Layer::MoveBelow( Layer target )
100 {
101   GetImplementation(*this).MoveBelow( GetImplementation( target ) );
102 }
103
104 void Layer::SetSortFunction(SortFunctionType function)
105 {
106   GetImplementation(*this).SetSortFunction(function);
107 }
108
109 Layer::Layer(Internal::Layer* internal)
110 : Actor(internal)
111 {
112 }
113
114 } // namespace Dali