Revert "[Tizen](ATSPI) squashed implementation"
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-scene-holder.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 #include <dali/integration-api/adaptors/scene-holder.h>
19
20 #include <dali/public-api/actors/actor.h>
21 #include <dali/public-api/actors/layer.h>
22 #include <dali/public-api/common/stage.h>
23 #include <dali/public-api/object/base-object.h>
24
25 namespace Dali
26 {
27
28 namespace Internal
29 {
30
31 namespace Adaptor
32 {
33
34 class SceneHolder: public Dali::BaseObject
35 {
36
37 };
38
39 } // Adaptor
40
41 } // Internal
42
43 namespace Integration
44 {
45
46 SceneHolder::SceneHolder()
47 {
48 }
49
50 SceneHolder::~SceneHolder()
51 {
52 }
53
54 SceneHolder::SceneHolder( const SceneHolder& handle )
55 : BaseHandle(handle)
56 {
57 }
58
59 SceneHolder::SceneHolder( Internal::Adaptor::SceneHolder* internal )
60 : BaseHandle(internal)
61 {
62 }
63
64 SceneHolder& SceneHolder::operator=( const SceneHolder& rhs )
65 {
66   BaseHandle::operator=(rhs);
67   return *this;
68 }
69
70 Dali::Integration::SceneHolder SceneHolder::Get( Dali::Actor actor )
71 {
72   Internal::Adaptor::SceneHolder* sceneHolderImpl = nullptr;
73
74   if ( Dali::Adaptor::IsAvailable() )
75   {
76     sceneHolderImpl = AdaptorImpl::GetImpl( AdaptorImpl::Get() ).GetWindow( actor );
77   }
78
79   return Dali::Integration::SceneHolder( sceneHolderImpl );
80 }
81
82 void SceneHolder::Add( Actor actor )
83 {
84   GetImplementation( *this ).Add( actor );
85 }
86
87 void SceneHolder::Remove( Actor actor )
88 {
89   GetImplementation( *this ).Remove( actor );
90 }
91
92 Layer SceneHolder::GetRootLayer() const
93 {
94   return GetImplementation( *this ).GetRootLayer();
95 }
96
97 void SceneHolder::SetBackgroundColor( Vector4 color )
98 {
99 }
100
101 Vector4 SceneHolder::GetBackgroundColor() const
102 {
103   return Dali::Stage::GetCurrent().GetBackgroundColor();
104 }
105
106 void SceneHolder::FeedTouchPoint( Dali::TouchPoint& point, int timeStamp )
107 {
108 }
109
110 void SceneHolder::FeedWheelEvent( Dali::WheelEvent& wheelEvent )
111 {
112 }
113
114 void SceneHolder::FeedKeyEvent( Dali::KeyEvent& keyEvent )
115 {
116 }
117
118 } // Integration
119
120 } // Dali