[Tizen] Add deprecated logs to Scene and Actor
[platform/core/uifw/dali-core-legacy.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   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: DALi is deprecated and will be removed from next version. Please use NUI(C# interface of DALi).\n For more information on NUI, see the NUI quick start page : https://docs.tizen.org/application/dotnet/get-started/nui/quickstart/ \n" );
35   Internal::ScenePtr internal = Internal::Scene::New( size );
36   return Scene( internal.Get() );
37 }
38
39 Scene Scene::DownCast( BaseHandle handle )
40 {
41   return Scene( dynamic_cast<Dali::Internal::Scene*>( handle.GetObjectPtr()) );
42 }
43
44 Scene::Scene()
45 {
46 }
47
48 Scene::~Scene()
49 {
50 }
51
52 Scene::Scene( const Scene& handle )
53 :BaseHandle(handle)
54 {
55 }
56
57 Scene::Scene( Internal::Scene* internal )
58 : BaseHandle(internal)
59 {
60 }
61
62 Scene& Scene::operator=( const Scene& rhs )
63 {
64   BaseHandle::operator=(rhs);
65   return *this;
66 }
67
68 void Scene::Add( Actor actor )
69 {
70   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: DALi is deprecated and will be removed from next version. Please use NUI(C# interface of DALi).\n For more information on NUI, see the NUI quick start page : https://docs.tizen.org/application/dotnet/get-started/nui/quickstart/ \n" );
71   GetImplementation(*this).Add( GetImplementation(actor) );
72 }
73
74 void Scene::Remove( Actor actor )
75 {
76   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: DALi is deprecated and will be removed from next version. Please use NUI(C# interface of DALi).\n For more information on NUI, see the NUI quick start page : https://docs.tizen.org/application/dotnet/get-started/nui/quickstart/ \n" );
77   GetImplementation(*this).Remove( GetImplementation(actor) );
78 }
79
80 Size Scene::GetSize() const
81 {
82   return GetImplementation(*this).GetSize();
83 }
84
85 void Scene::SetDpi( Vector2 dpi )
86 {
87   GetImplementation(*this).SetDpi( dpi );
88 }
89
90 Vector2 Scene::GetDpi() const
91 {
92   return GetImplementation(*this).GetDpi();
93 }
94
95 void Scene::SetBackgroundColor( const Vector4& color )
96 {
97   GetImplementation(*this).SetBackgroundColor( color );
98 }
99
100 Vector4 Scene::GetBackgroundColor() const
101 {
102   return GetImplementation(*this).GetBackgroundColor();
103 }
104
105 RenderTaskList Scene::GetRenderTaskList() const
106 {
107   return RenderTaskList( &GetImplementation(*this).GetRenderTaskList() );
108 }
109
110 Layer Scene::GetRootLayer() const
111 {
112   return GetImplementation(*this).GetRootLayer();
113 }
114
115 uint32_t Scene::GetLayerCount() const
116 {
117   return GetImplementation(*this).GetLayerCount();
118 }
119
120 Layer Scene::GetLayer( uint32_t depth ) const
121 {
122   return GetImplementation(*this).GetLayer( depth );
123 }
124
125 void Scene::SurfaceResized( float width, float height, int orientation, bool forceUpdate )
126 {
127   GetImplementation( *this ).SurfaceResized( width, height, orientation, forceUpdate );
128 }
129
130 void Scene::SurfaceReplaced()
131 {
132   GetImplementation( *this ).SurfaceReplaced();
133 }
134
135 void Scene::Discard()
136 {
137   GetImplementation(*this).Discard();
138 }
139
140 Integration::Scene Scene::Get( Actor actor )
141 {
142   return Dali::Integration::Scene( &GetImplementation( actor ).GetScene() );
143 }
144
145 void Scene::QueueEvent( const Integration::Event& event )
146 {
147   GetImplementation(*this).QueueEvent( event );
148 }
149
150 void Scene::ProcessEvents()
151 {
152   GetImplementation(*this).ProcessEvents();
153 }
154
155 void Scene::AddFrameRenderedCallback( std::unique_ptr< CallbackBase > callback, int32_t frameId )
156 {
157   GetImplementation( *this ).AddFrameRenderedCallback( std::move( callback ), frameId );
158 }
159
160 void Scene::AddFramePresentedCallback( std::unique_ptr< CallbackBase > callback, int32_t frameId )
161 {
162   GetImplementation( *this ).AddFramePresentedCallback( std::move( callback ), frameId );
163 }
164
165 void Scene::GetFrameRenderedCallback( FrameCallbackContainer& callbacks )
166 {
167   GetImplementation( *this ).GetFrameRenderedCallback( callbacks );
168 }
169
170 void Scene::GetFramePresentedCallback( FrameCallbackContainer& callbacks )
171 {
172   GetImplementation( *this ).GetFramePresentedCallback( callbacks );
173 }
174
175 Scene::EventProcessingFinishedSignalType& Scene::EventProcessingFinishedSignal()
176 {
177   return GetImplementation(*this).EventProcessingFinishedSignal();
178 }
179
180 Scene::KeyEventSignalType& Scene::KeyEventSignal()
181 {
182   return GetImplementation(*this).KeyEventSignal();
183 }
184
185 Scene::KeyEventGeneratedSignalType& Scene::KeyEventGeneratedSignal()
186 {
187   return GetImplementation(*this).KeyEventGeneratedSignal();
188 }
189
190 Scene::TouchSignalType& Scene::TouchSignal()
191 {
192   return GetImplementation(*this).TouchSignal();
193 }
194
195 Scene::WheelEventSignalType& Scene::WheelEventSignal()
196 {
197   return GetImplementation(*this).WheelEventSignal();
198 }
199
200 } // Integration
201
202 } // Dali