[4.0] Create Widget Application
[platform/core/uifw/dali-adaptor.git] / adaptors / common / adaptor-impl.cpp
index 7675c90..1f8d21a 100644 (file)
@@ -90,8 +90,11 @@ Dali::Adaptor* Adaptor::New( Any nativeWindow, RenderSurface *surface, Dali::Con
 Dali::Adaptor* Adaptor::New( Dali::Window window, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
 {
   Any winId = window.GetNativeHandle();
+
   Window& windowImpl = Dali::GetImplementation(window);
   Dali::Adaptor* adaptor = New( winId, windowImpl.GetSurface(), configuration, environmentOptions );
+
+  Internal::Adaptor::Adaptor::GetImplementation( *adaptor ).SetWindow( window );
   windowImpl.SetAdaptor(*adaptor);
   return adaptor;
 }
@@ -808,6 +811,7 @@ Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surfac
   mTriggerEventFactory(),
   mObjectProfiler( NULL ),
   mSocketFactory(),
+  mWindow(),
   mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),
   mUseRemoteSurface( false )
 {
@@ -842,8 +846,18 @@ void Adaptor::SetRootLayoutDirection( std::string locale )
 {
   Dali::Stage stage = Dali::Stage::GetCurrent();
 
-  stage.GetRootLayer().SetProperty( DevelActor::Property::LAYOUT_DIRECTION,
-                                    static_cast< DevelActor::LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
+  stage.GetRootLayer().SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION,
+                                    static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
+}
+
+void Adaptor::SetWindow( Dali::Window window )
+{
+  mWindow = window;
+}
+
+Dali::Window Adaptor::GetWindow()
+{
+  return mWindow;
 }
 
 } // namespace Adaptor