2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/integration-api/scene.h>
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>
32 Scene Scene::New( Size size )
34 Internal::ScenePtr internal = Internal::Scene::New( size );
35 return Scene(internal.Get());
38 Scene Scene::DownCast( BaseHandle handle )
40 return Scene( dynamic_cast<Dali::Internal::Scene*>( handle.GetObjectPtr()) );
51 Scene::Scene( const Scene& handle )
56 Scene::Scene( Internal::Scene* internal )
57 : BaseHandle(internal)
61 Scene& Scene::operator=( const Scene& rhs )
63 BaseHandle::operator=(rhs);
67 void Scene::Add( Actor& actor )
69 GetImplementation(*this).Add( GetImplementation(actor) );
72 void Scene::Remove( Actor& actor )
74 GetImplementation(*this).Remove( GetImplementation(actor) );
77 Size Scene::GetSize() const
79 return GetImplementation(*this).GetSize();
82 void Scene::SetDpi( Vector2 dpi )
84 GetImplementation(*this).SetDpi( dpi );
87 Vector2 Scene::GetDpi() const
89 return GetImplementation(*this).GetDpi();
92 RenderTaskList Scene::GetRenderTaskList() const
94 return RenderTaskList( &GetImplementation(*this).GetRenderTaskList() );
97 Layer Scene::GetRootLayer() const
99 return GetImplementation(*this).GetRootLayer();
102 uint32_t Scene::GetLayerCount() const
104 return GetImplementation(*this).GetLayerCount();
107 Layer Scene::GetLayer( uint32_t depth ) const
109 return GetImplementation(*this).GetLayer( depth );
112 void Scene::SetSurface( Integration::RenderSurface& surface )
114 GetImplementation(*this).SetSurface( surface );