Revert "[Tizen] Revert "Support multiple window rendering""
[platform/core/uifw/dali-core.git] / dali / integration-api / scene.cpp
1 /*
2  * Copyright (c) 2019 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 RenderTaskList Scene::GetRenderTaskList() const
93 {
94   return RenderTaskList( &GetImplementation(*this).GetRenderTaskList() );
95 }
96
97 Layer Scene::GetRootLayer() const
98 {
99   return GetImplementation(*this).GetRootLayer();
100 }
101
102 uint32_t Scene::GetLayerCount() const
103 {
104   return GetImplementation(*this).GetLayerCount();
105 }
106
107 Layer Scene::GetLayer( uint32_t depth ) const
108 {
109   return GetImplementation(*this).GetLayer( depth );
110 }
111
112 void Scene::SetSurface( Integration::RenderSurface& surface )
113 {
114   GetImplementation(*this).SetSurface( surface );
115 }
116
117 } // Integration
118
119 } // Dali