2 * Copyright (c) 2014 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.
22 #include <dali/integration-api/debug.h>
25 #include <accessibility-adaptor.h>
26 #include <imf-manager.h>
27 #include <style-monitor.h>
28 #include <render-surface.h>
29 #include <adaptor-impl.h>
34 Adaptor& Adaptor::New( Window window )
36 return New( window, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
39 Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration )
41 Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, configuration, NULL );
45 Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface )
47 return New( nativeWindow, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
50 Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration )
52 Dali::RenderSurface* pSurface = const_cast<Dali::RenderSurface *>(&surface);
53 Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, configuration, NULL );
72 void Adaptor::Resume()
82 bool Adaptor::AddIdle( CallbackBase* callback )
84 return mImpl->AddIdle( callback );
87 void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface )
89 mImpl->ReplaceSurface(nativeWindow, surface);
92 Adaptor::AdaptorSignalType& Adaptor::ResizedSignal()
94 return mImpl->ResizedSignal();
97 Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal()
99 return mImpl->LanguageChangedSignal();
102 RenderSurface& Adaptor::GetSurface()
104 return mImpl->GetSurface();
107 void Adaptor::ReleaseSurfaceLock()
109 mImpl->ReleaseSurfaceLock();
112 void Adaptor::SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender )
114 mImpl->SetRenderRefreshRate( numberOfVSyncsPerRender );
117 void Adaptor::SetUseHardwareVSync(bool useHardware)
119 mImpl->SetUseHardwareVSync( useHardware );
122 Adaptor& Adaptor::Get()
124 return Internal::Adaptor::Adaptor::Get();
127 bool Adaptor::IsAvailable()
129 return Internal::Adaptor::Adaptor::IsAvailable();
132 void Adaptor::NotifySceneCreated()
134 mImpl->NotifySceneCreated();
137 void Adaptor::NotifyLanguageChanged()
139 mImpl->NotifyLanguageChanged();
142 void Adaptor::SetMinimumPinchDistance(float distance)
144 mImpl->SetMinimumPinchDistance(distance);
147 void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
149 mImpl->FeedTouchPoint(point, timeStamp);
152 void Adaptor::FeedWheelEvent( WheelEvent& wheelEvent )
154 mImpl->FeedWheelEvent(wheelEvent);
157 void Adaptor::FeedKeyEvent( KeyEvent& keyEvent )
159 mImpl->FeedKeyEvent(keyEvent);
162 void Adaptor::SceneCreated()
164 mImpl->SceneCreated();
167 void Adaptor::SetViewMode( ViewMode mode )
169 mImpl->SetViewMode( mode );
172 void Adaptor::SetStereoBase( float stereoBase )
174 mImpl->SetStereoBase( stereoBase );