2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/integration-api/core.h>
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/integration-api/events/event.h>
24 #include <dali/integration-api/debug.h>
25 #include <dali/integration-api/graphics/graphics.h>
26 #include <dali/internal/common/core-impl.h>
34 Core* Core::New( RenderController& renderController,
35 PlatformAbstraction& platformAbstraction,
36 Graphics::Graphics& graphics,
37 GestureManager& gestureManager,
38 ResourcePolicy::DataRetention policy,
39 bool renderToFboEnabled )
41 Core* instance = new Core;
42 instance->mImpl = new Internal::Core( renderController,
57 void Core::SurfaceResized( unsigned int width, unsigned int height )
59 mImpl->SurfaceResized(width, height);
62 void Core::SetTopMargin( unsigned int margin )
64 mImpl->SetTopMargin(margin);
67 void Core::SetDpi( unsigned int dpiHorizontal, unsigned int dpiVertical )
69 mImpl->SetDpi(dpiHorizontal, dpiVertical);
72 void Core::SceneCreated()
74 mImpl->SceneCreated();
77 void Core::QueueEvent( const Event& event )
79 mImpl->QueueEvent(event);
82 void Core::ProcessEvents()
84 mImpl->ProcessEvents();
87 unsigned int Core::GetMaximumUpdateCount() const
89 return mImpl->GetMaximumUpdateCount();
94 unsigned int lastVSyncTimeMilliseconds,
95 unsigned int nextVSyncTimeMilliseconds,
97 bool renderToFboEnabled,
98 bool isRenderingToFbo )
100 mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status,
101 renderToFboEnabled, isRenderingToFbo );
104 void Core::Render( RenderStatus& status )
106 DALI_LOG_ERROR("Core::Render() called in error");
109 SystemOverlay& Core::GetSystemOverlay()
111 return mImpl->GetSystemOverlay();
114 void Core::SetViewMode( ViewMode viewMode )
116 mImpl->SetViewMode( viewMode );
119 ViewMode Core::GetViewMode() const
121 return mImpl->GetViewMode();
124 void Core::SetStereoBase( float stereoBase )
126 mImpl->SetStereoBase( stereoBase );
129 float Core::GetStereoBase() const
131 return mImpl->GetStereoBase();
139 } // namespace Integration