Remove unused #includes
[platform/core/uifw/dali-core.git] / dali / integration-api / core.cpp
1 /*
2  * Copyright (c) 2014 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/core.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/integration-api/events/event.h>
24 #include <dali/integration-api/gl-sync-abstraction.h>
25 #include <dali/internal/common/core-impl.h>
26
27 namespace Dali
28 {
29
30 namespace Integration
31 {
32
33 Core* Core::New(RenderController& renderController, PlatformAbstraction& platformAbstraction,
34                 GlAbstraction& glAbstraction, GlSyncAbstraction& glSyncAbstraction, GestureManager& gestureManager, ResourcePolicy::DataRetention policy )
35 {
36   Core* instance = new Core;
37   instance->mImpl = new Internal::Core( renderController, platformAbstraction, glAbstraction, glSyncAbstraction, gestureManager, policy );
38
39   return instance;
40 }
41
42 Core::~Core()
43 {
44   delete mImpl;
45 }
46
47 ContextNotifierInterface* Core::GetContextNotifier()
48 {
49   return mImpl->GetContextNotifier();
50 }
51
52 // @todo Rename to ResetGlContext
53 void Core::ContextCreated()
54 {
55   mImpl->ContextCreated();
56 }
57
58 // @todo Replace with StopRendering that prevents RenderManager from rendering
59 // until we get ResetGLContext again, change ContextCreated to reset gpu buffer cache,
60 // gl texture id's
61 void Core::ContextDestroyed()
62 {
63   mImpl->ContextDestroyed();
64 }
65
66 void Core::RecoverFromContextLoss()
67 {
68   mImpl->RecoverFromContextLoss();
69 }
70
71 void Core::SurfaceResized(unsigned int width, unsigned int height)
72 {
73   mImpl->SurfaceResized(width, height);
74 }
75
76 void Core::SetDpi(unsigned int dpiHorizontal, unsigned int dpiVertical)
77 {
78   mImpl->SetDpi(dpiHorizontal, dpiVertical);
79 }
80
81 void Core::Suspend()
82 {
83   mImpl->Suspend();
84 }
85
86 void Core::Resume()
87 {
88   mImpl->Resume();
89 }
90
91 void Core::SceneCreated()
92 {
93   mImpl->SceneCreated();
94 }
95
96 void Core::QueueEvent(const Event& event)
97 {
98   mImpl->QueueEvent(event);
99 }
100
101 void Core::ProcessEvents()
102 {
103   mImpl->ProcessEvents();
104 }
105
106 void Core::UpdateTouchData(const TouchData& touch)
107 {
108   mImpl->UpdateTouchData(touch);
109 }
110
111 unsigned int Core::GetMaximumUpdateCount() const
112 {
113   return mImpl->GetMaximumUpdateCount();
114 }
115
116 void Core::Update( float elapsedSeconds, unsigned int lastVSyncTimeMilliseconds, unsigned int nextVSyncTimeMilliseconds, UpdateStatus& status )
117 {
118   mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status );
119 }
120
121 void Core::Render( RenderStatus& status )
122 {
123   mImpl->Render( status );
124 }
125
126 SystemOverlay& Core::GetSystemOverlay()
127 {
128   return mImpl->GetSystemOverlay();
129 }
130
131 void Core::SetViewMode( ViewMode viewMode )
132 {
133   mImpl->SetViewMode( viewMode );
134 }
135
136 ViewMode Core::GetViewMode() const
137 {
138   return mImpl->GetViewMode();
139 }
140
141 void Core::SetStereoBase( float stereoBase )
142 {
143   mImpl->SetStereoBase( stereoBase );
144 }
145
146 float Core::GetStereoBase() const
147 {
148   return mImpl->GetStereoBase();
149 }
150
151 Core::Core()
152 : mImpl( NULL )
153 {
154 }
155
156 } // namespace Integration
157
158 } // namespace Dali