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