[Tizen] Implement partial update
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / 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 // CLASS HEADER
19 #include <dali/integration-api/scene-holder.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/events/wheel-event.h>
23 #include <dali/integration-api/events/key-event-integ.h>
24 #include <dali/integration-api/events/touch-event-integ.h>
25 #include <dali/integration-api/events/wheel-event-integ.h>
26
27 // INTERNAL INCLUDES
28 #include <dali/public-api/actors/layer.h>
29 #include <dali/integration-api/scene-holder-impl.h>
30
31 namespace Dali
32 {
33
34 namespace Integration
35 {
36
37 SceneHolder::SceneHolder()
38 {
39 }
40
41 SceneHolder::~SceneHolder()
42 {
43 }
44
45 SceneHolder::SceneHolder( const SceneHolder& handle )
46 :BaseHandle(handle)
47 {
48 }
49
50 SceneHolder::SceneHolder( Internal::Adaptor::SceneHolder* internal )
51 : BaseHandle(internal)
52 {
53 }
54
55 SceneHolder& SceneHolder::operator=( const SceneHolder& rhs )
56 {
57   BaseHandle::operator=(rhs);
58   return *this;
59 }
60
61 void SceneHolder::Add( Actor actor )
62 {
63   GetImplementation(*this).Add( actor );
64 }
65
66 void SceneHolder::Remove( Actor actor )
67 {
68   GetImplementation(*this).Remove( actor );
69 }
70
71 Layer SceneHolder::GetRootLayer() const
72 {
73   return GetImplementation(*this).GetRootLayer();
74 }
75
76 void SceneHolder::SetBackgroundColor( Vector4 color )
77 {
78   GetImplementation(*this).SetBackgroundColor( color );
79 }
80
81 Vector4 SceneHolder::GetBackgroundColor() const
82 {
83   return GetImplementation(*this).GetBackgroundColor();
84 }
85
86 void SceneHolder::FeedTouchPoint( Dali::TouchPoint& point, int timeStamp )
87 {
88   Integration::Point convertedPoint( point );
89   GetImplementation(*this).FeedTouchPoint( convertedPoint, timeStamp );
90 }
91
92 void SceneHolder::FeedWheelEvent( Dali::WheelEvent& wheelEvent )
93 {
94   Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp );
95   GetImplementation(*this).FeedWheelEvent( event );
96 }
97
98 void SceneHolder::FeedKeyEvent( Dali::KeyEvent& keyEvent )
99 {
100   Integration::KeyEvent convertedEvent( keyEvent );
101   GetImplementation(*this).FeedKeyEvent( convertedEvent );
102 }
103
104 }// Integration
105
106 } // Dali