[Tizen] Add GetRenderTaskList to SceneHolder
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / adaptor-framework / scene-holder.cpp
1 /*
2  * Copyright (c) 2023 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/adaptor-framework/scene-holder.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/integration-api/events/key-event-integ.h>
23 #include <dali/integration-api/events/touch-event-integ.h>
24 #include <dali/integration-api/events/wheel-event-integ.h>
25 #include <dali/public-api/events/wheel-event.h>
26 #include <dali/public-api/render-tasks/render-task-list.h>
27
28 // INTERNAL INCLUDES
29 #include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
30 #include <dali/public-api/actors/layer.h>
31
32 namespace Dali
33 {
34 namespace Integration
35 {
36 SceneHolder::SceneHolder()
37 {
38 }
39
40 SceneHolder::~SceneHolder()
41 {
42 }
43
44 SceneHolder::SceneHolder(const SceneHolder& handle)
45 : BaseHandle(handle)
46 {
47 }
48
49 SceneHolder::SceneHolder(Internal::Adaptor::SceneHolder* internal)
50 : BaseHandle(internal)
51 {
52 }
53
54 SceneHolder& SceneHolder::operator=(const SceneHolder& rhs)
55 {
56   BaseHandle::operator=(rhs);
57   return *this;
58 }
59
60 void SceneHolder::Add(Actor actor)
61 {
62   GetImplementation(*this).Add(actor);
63 }
64
65 void SceneHolder::Remove(Actor actor)
66 {
67   GetImplementation(*this).Remove(actor);
68 }
69
70 Layer SceneHolder::GetRootLayer() const
71 {
72   return GetImplementation(*this).GetRootLayer();
73 }
74
75 void SceneHolder::SetBackgroundColor(Vector4 color)
76 {
77   GetImplementation(*this).SetBackgroundColor(color);
78 }
79
80 Vector4 SceneHolder::GetBackgroundColor() const
81 {
82   return GetImplementation(*this).GetBackgroundColor();
83 }
84
85 Any SceneHolder::GetNativeHandle() const
86 {
87   return GetImplementation(*this).GetNativeHandle();
88 }
89
90 void SceneHolder::FeedTouchPoint(Dali::TouchPoint& point, int timeStamp)
91 {
92   Integration::Point convertedPoint(point);
93   GetImplementation(*this).FeedTouchPoint(convertedPoint, timeStamp);
94 }
95
96 void SceneHolder::FeedWheelEvent(Dali::WheelEvent& wheelEvent)
97 {
98   Integration::WheelEvent event(static_cast<Integration::WheelEvent::Type>(wheelEvent.GetType()), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime());
99   GetImplementation(*this).FeedWheelEvent(event);
100 }
101
102 void SceneHolder::FeedKeyEvent(Dali::KeyEvent& keyEvent)
103 {
104   Integration::KeyEvent event(keyEvent.GetKeyName(), keyEvent.GetLogicalKey(), keyEvent.GetKeyString(), keyEvent.GetKeyCode(), keyEvent.GetKeyModifier(), keyEvent.GetTime(), static_cast<Integration::KeyEvent::State>(keyEvent.GetState()), keyEvent.GetCompose(), keyEvent.GetDeviceName(), keyEvent.GetDeviceClass(), keyEvent.GetDeviceSubclass());
105   GetImplementation(*this).FeedKeyEvent(event);
106 }
107
108 RenderTaskList SceneHolder::GetRenderTaskList()
109 {
110   return GetImplementation(*this).GetRenderTaskList();
111 }
112
113 SceneHolder SceneHolder::Get(Actor actor)
114 {
115   return Internal::Adaptor::SceneHolder::Get(actor);
116 }
117
118 SceneHolder::KeyEventSignalType& SceneHolder::KeyEventSignal()
119 {
120   return GetImplementation(*this).KeyEventSignal();
121 }
122
123 SceneHolder::KeyEventGeneratedSignalType& SceneHolder::KeyEventGeneratedSignal()
124 {
125   return GetImplementation(*this).KeyEventGeneratedSignal();
126 }
127
128 SceneHolder::KeyEventGeneratedSignalType& SceneHolder::InterceptKeyEventSignal()
129 {
130   return GetImplementation(*this).InterceptKeyEventSignal();
131 }
132
133 SceneHolder::TouchEventSignalType& SceneHolder::TouchedSignal()
134 {
135   return GetImplementation(*this).TouchedSignal();
136 }
137
138 SceneHolder::WheelEventSignalType& SceneHolder::WheelEventSignal()
139 {
140   return GetImplementation(*this).WheelEventSignal();
141 }
142
143 SceneHolder::WheelEventGeneratedSignalType& SceneHolder::WheelEventGeneratedSignal()
144 {
145   return GetImplementation(*this).WheelEventGeneratedSignal();
146 }
147
148 } // namespace Integration
149
150 } // namespace Dali