Remove RenderSurface from Core
[platform/core/uifw/dali-core.git] / dali / integration-api / scene.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/integration-api/scene.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/actors/layer.h>
23 #include <dali/public-api/render-tasks/render-task-list.h>
24 #include <dali/internal/event/common/scene-impl.h>
25
26 namespace Dali
27 {
28
29 namespace Integration
30 {
31
32 Scene Scene::New( Size size )
33 {
34   Internal::ScenePtr internal = Internal::Scene::New( size );
35   return Scene( internal.Get() );
36 }
37
38 Scene Scene::DownCast( BaseHandle handle )
39 {
40   return Scene( dynamic_cast<Dali::Internal::Scene*>( handle.GetObjectPtr()) );
41 }
42
43 Scene::Scene()
44 {
45 }
46
47 Scene::~Scene()
48 {
49 }
50
51 Scene::Scene( const Scene& handle )
52 :BaseHandle(handle)
53 {
54 }
55
56 Scene::Scene( Internal::Scene* internal )
57 : BaseHandle(internal)
58 {
59 }
60
61 Scene& Scene::operator=( const Scene& rhs )
62 {
63   BaseHandle::operator=(rhs);
64   return *this;
65 }
66
67 void Scene::Add( Actor actor )
68 {
69   GetImplementation(*this).Add( GetImplementation(actor) );
70 }
71
72 void Scene::Remove( Actor actor )
73 {
74   GetImplementation(*this).Remove( GetImplementation(actor) );
75 }
76
77 Size Scene::GetSize() const
78 {
79   return GetImplementation(*this).GetSize();
80 }
81
82 void Scene::SetDpi( Vector2 dpi )
83 {
84   GetImplementation(*this).SetDpi( dpi );
85 }
86
87 Vector2 Scene::GetDpi() const
88 {
89   return GetImplementation(*this).GetDpi();
90 }
91
92 void Scene::SetBackgroundColor( const Vector4& color )
93 {
94   GetImplementation(*this).SetBackgroundColor( color );
95 }
96
97 Vector4 Scene::GetBackgroundColor() const
98 {
99   return GetImplementation(*this).GetBackgroundColor();
100 }
101
102 RenderTaskList Scene::GetRenderTaskList() const
103 {
104   return RenderTaskList( &GetImplementation(*this).GetRenderTaskList() );
105 }
106
107 Layer Scene::GetRootLayer() const
108 {
109   return GetImplementation(*this).GetRootLayer();
110 }
111
112 uint32_t Scene::GetLayerCount() const
113 {
114   return GetImplementation(*this).GetLayerCount();
115 }
116
117 Layer Scene::GetLayer( uint32_t depth ) const
118 {
119   return GetImplementation(*this).GetLayer( depth );
120 }
121
122 void Scene::SurfaceResized( float width, float height )
123 {
124   GetImplementation( *this ).SurfaceResized( width, height );
125 }
126
127 void Scene::SurfaceReplaced()
128 {
129   GetImplementation( *this ).SurfaceReplaced();
130 }
131
132 void Scene::Discard()
133 {
134   GetImplementation(*this).Discard();
135 }
136
137 Integration::Scene Scene::Get( Actor actor )
138 {
139   return Dali::Integration::Scene( &GetImplementation( actor ).GetScene() );
140 }
141
142 void Scene::QueueEvent( const Integration::Event& event )
143 {
144   GetImplementation(*this).QueueEvent( event );
145 }
146
147 void Scene::ProcessEvents()
148 {
149   GetImplementation(*this).ProcessEvents();
150 }
151
152 Scene::EventProcessingFinishedSignalType& Scene::EventProcessingFinishedSignal()
153 {
154   return GetImplementation(*this).EventProcessingFinishedSignal();
155 }
156
157 Scene::KeyEventSignalType& Scene::KeyEventSignal()
158 {
159   return GetImplementation(*this).KeyEventSignal();
160 }
161
162 Scene::KeyEventGeneratedSignalType& Scene::KeyEventGeneratedSignal()
163 {
164   return GetImplementation(*this).KeyEventGeneratedSignal();
165 }
166
167 Scene::TouchSignalType& Scene::TouchSignal()
168 {
169   return GetImplementation(*this).TouchSignal();
170 }
171
172 Scene::WheelEventSignalType& Scene::WheelEventSignal()
173 {
174   return GetImplementation(*this).WheelEventSignal();
175 }
176
177 } // Integration
178
179 } // Dali