[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / tizen-wayland / ecore-wl / window-base-ecore-wl.cpp
index 7a77b01..4258b7f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // INTERNAL HEADERS
 #include <dali/internal/window-system/common/window-impl.h>
-#include <dali/internal/window-system/tizen-wayland/ecore-wl/window-render-surface-ecore-wl.h>
+#include <dali/internal/window-system/common/window-system.h>
+#include <dali/internal/window-system/common/window-render-surface.h>
 #include <dali/internal/input/common/key-impl.h>
 
 // EXTERNAL_HEADERS
 #include <dali/public-api/object/any.h>
 #include <dali/integration-api/debug.h>
+#include <Ecore_Input.h>
+#include <vconf.h>
+#include <vconf-keys.h>
 
 namespace Dali
 {
@@ -48,6 +52,153 @@ Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New( Debug::NoLogging, fals
 #endif
 
 const uint32_t MAX_TIZEN_CLIENT_VERSION = 7;
+const unsigned int PRIMARY_TOUCH_BUTTON_ID = 1;
+
+const char* DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME = "db/setting/accessibility/font_name";  // It will be update at vconf-key.h and replaced.
+
+// DBUS accessibility
+const char* BUS = "org.enlightenment.wm-screen-reader";
+const char* INTERFACE = "org.tizen.GestureNavigation";
+const char* PATH = "/org/tizen/GestureNavigation";
+
+/**
+ * Get the device name from the provided ecore key event
+ */
+void GetDeviceName( Ecore_Event_Key* keyEvent, std::string& result )
+{
+  const char* ecoreDeviceName = ecore_device_name_get( keyEvent->dev );
+
+  if( ecoreDeviceName )
+  {
+    result = ecoreDeviceName;
+  }
+}
+
+/**
+ * Get the device class from the provided ecore event
+ */
+void GetDeviceClass( Ecore_Device_Class ecoreDeviceClass, Device::Class::Type& deviceClass )
+{
+  switch( ecoreDeviceClass )
+  {
+    case ECORE_DEVICE_CLASS_SEAT:
+    {
+      deviceClass = Device::Class::USER;
+      break;
+    }
+    case ECORE_DEVICE_CLASS_KEYBOARD:
+    {
+      deviceClass = Device::Class::KEYBOARD;
+      break;
+    }
+    case ECORE_DEVICE_CLASS_MOUSE:
+    {
+      deviceClass = Device::Class::MOUSE;
+      break;
+    }
+    case ECORE_DEVICE_CLASS_TOUCH:
+    {
+      deviceClass = Device::Class::TOUCH;
+      break;
+    }
+    case ECORE_DEVICE_CLASS_PEN:
+    {
+      deviceClass = Device::Class::PEN;
+      break;
+    }
+    case ECORE_DEVICE_CLASS_POINTER:
+    {
+      deviceClass = Device::Class::POINTER;
+      break;
+    }
+    case ECORE_DEVICE_CLASS_GAMEPAD:
+    {
+      deviceClass = Device::Class::GAMEPAD;
+      break;
+    }
+    default:
+    {
+      deviceClass = Device::Class::NONE;
+      break;
+    }
+  }
+}
+
+void GetDeviceSubclass( Ecore_Device_Subclass ecoreDeviceSubclass, Device::Subclass::Type& deviceSubclass )
+{
+  switch( ecoreDeviceSubclass )
+  {
+    case ECORE_DEVICE_SUBCLASS_FINGER:
+    {
+      deviceSubclass = Device::Subclass::FINGER;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_FINGERNAIL:
+    {
+      deviceSubclass = Device::Subclass::FINGERNAIL;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_KNUCKLE:
+    {
+      deviceSubclass = Device::Subclass::KNUCKLE;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_PALM:
+    {
+      deviceSubclass = Device::Subclass::PALM;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_HAND_SIZE:
+    {
+      deviceSubclass = Device::Subclass::HAND_SIDE;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_HAND_FLAT:
+    {
+      deviceSubclass = Device::Subclass::HAND_FLAT;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_PEN_TIP:
+    {
+      deviceSubclass = Device::Subclass::PEN_TIP;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_TRACKPAD:
+    {
+      deviceSubclass = Device::Subclass::TRACKPAD;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_TRACKPOINT:
+    {
+      deviceSubclass = Device::Subclass::TRACKPOINT;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_TRACKBALL:
+    {
+      deviceSubclass = Device::Subclass::TRACKBALL;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_REMOCON:
+    {
+      deviceSubclass = Device::Subclass::REMOCON;
+      break;
+    }
+    case ECORE_DEVICE_SUBCLASS_VIRTUAL_KEYBOARD:
+    {
+      deviceSubclass = Device::Subclass::VIRTUAL_KEYBOARD;
+      break;
+    }
+    default:
+    {
+      deviceSubclass = Device::Subclass::NONE;
+      break;
+    }
+  }
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// Window Callbacks
+/////////////////////////////////////////////////////////////////////////////////////////////////
 
 /// Called when the window iconify state is changed.
 static Eina_Bool EcoreEventWindowIconifyStateChanged( void* data, int type, void* event )
@@ -109,6 +260,207 @@ static Eina_Bool EcoreEventIgnoreOutputTransform( void* data, int type, void* ev
   return ECORE_CALLBACK_PASS_ON;
 }
 
+/**
+ * Called when rotate event is recevied.
+ */
+static Eina_Bool EcoreEventRotate( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl::EcoreEventRotate\n" );
+    windowBase->OnRotation( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// Touch Callbacks
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Called when a touch down is received.
+ */
+static Eina_Bool EcoreEventMouseButtonDown( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnMouseButtonDown( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a touch up is received.
+ */
+static Eina_Bool EcoreEventMouseButtonUp( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnMouseButtonUp( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a touch motion is received.
+ */
+static Eina_Bool EcoreEventMouseButtonMove( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnMouseButtonMove( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a touch is canceled.
+ */
+static Eina_Bool EcoreEventMouseButtonCancel( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnMouseButtonCancel( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a mouse wheel is received.
+ */
+static Eina_Bool EcoreEventMouseWheel( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnMouseWheel( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a detent rotation event is recevied.
+ */
+static Eina_Bool EcoreEventDetentRotation( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnDetentRotation( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// Key Callbacks
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Called when a key down is received.
+ */
+static Eina_Bool EcoreEventKeyDown( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnKeyDown( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a key up is received.
+ */
+static Eina_Bool EcoreEventKeyUp( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnKeyUp( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// Selection Callbacks
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Called when the source window notifies us the content in clipboard is selected.
+ */
+static Eina_Bool EcoreEventDataSend( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnDataSend( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+* Called when the source window sends us about the selected content.
+* For example, when item is selected in the clipboard.
+*/
+static Eina_Bool EcoreEventDataReceive( void* data, int type, void* event )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnDataReceive( data, type, event );
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// Font Callbacks
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Called when a font name is changed.
+ */
+static void VconfNotifyFontNameChanged( keynode_t* node, void* data )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnFontNameChanged();
+  }
+}
+
+/**
+ * Called when a font size is changed.
+ */
+static void VconfNotifyFontSizeChanged( keynode_t* node, void* data )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
+  if( windowBase )
+  {
+    windowBase->OnFontSizeChanged();
+  }
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+// ElDBus Accessibility Callbacks
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef DALI_ELDBUS_AVAILABLE
+// Callback for Ecore ElDBus accessibility events.
+static void EcoreElDBusAccessibilityNotification( void* context, const Eldbus_Message* message )
+{
+  WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( context );
+  if( windowBase )
+  {
+    windowBase->OnEcoreElDBusAccessibilityNotification( context, message );
+  }
+}
+#endif // DALI_ELDBUS_AVAILABLE
+
 static void RegistryGlobalCallback( void* data, struct wl_registry *registry, uint32_t name, const char* interface, uint32_t version )
 {
   WindowBaseEcoreWl* windowBase = static_cast< WindowBaseEcoreWl* >( data );
@@ -213,11 +565,11 @@ const struct tizen_display_policy_listener tizenDisplayPolicyListener =
 
 } // unnamed namespace
 
-WindowBaseEcoreWl::WindowBaseEcoreWl( Window* window, WindowRenderSurface* windowRenderSurface )
+WindowBaseEcoreWl::WindowBaseEcoreWl( Dali::PositionSize positionSize, Any surface, bool isTransparent )
 : mEcoreEventHandler(),
-  mWindow( window ),
-  mWindowSurface( NULL ),
   mEcoreWindow( NULL ),
+  mWlSurface( NULL ),
+  mEglWindow( NULL ),
   mDisplay( NULL ),
   mEventQueue( NULL ),
   mTizenPolicy( NULL ),
@@ -232,13 +584,31 @@ WindowBaseEcoreWl::WindowBaseEcoreWl( Window* window, WindowRenderSurface* windo
   mScreenOffModeChangeDone( true ),
   mBrightness( 0 ),
   mBrightnessChangeState( 0 ),
-  mBrightnessChangeDone( true )
+  mBrightnessChangeDone( true ),
+  mOwnSurface( false ),
+  mWindowRotationAngle( 0 ),
+  mScreenRotationAngle( 0 ),
+  mSupportedPreProtation( 0 )
+#ifdef DALI_ELDBUS_AVAILABLE
+  , mSystemConnection( NULL )
+#endif
 {
-  mWindowSurface = dynamic_cast< WindowRenderSurfaceEcoreWl* >( windowRenderSurface );
+  Initialize( positionSize, surface, isTransparent );
 }
 
 WindowBaseEcoreWl::~WindowBaseEcoreWl()
 {
+#ifdef DALI_ELDBUS_AVAILABLE
+    // Close down ElDBus connections.
+    if( mSystemConnection )
+    {
+      eldbus_connection_unref( mSystemConnection );
+    }
+#endif // DALI_ELDBUS_AVAILABLE
+
+  vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged );
+  vconf_ignore_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged );
+
   for( Dali::Vector< Ecore_Event_Handler* >::Iterator iter = mEcoreEventHandler.Begin(), endIter = mEcoreEventHandler.End(); iter != endIter; ++iter )
   {
     ecore_event_handler_del( *iter );
@@ -252,23 +622,77 @@ WindowBaseEcoreWl::~WindowBaseEcoreWl()
 
   mSupportedAuxiliaryHints.clear();
   mAuxiliaryHints.clear();
+
+  if( mEglWindow != NULL )
+  {
+    wl_egl_window_destroy( mEglWindow );
+    mEglWindow = NULL;
+  }
+
+  if( mOwnSurface )
+  {
+    ecore_wl_window_free( mEcoreWindow );
+
+    WindowSystem::Shutdown();
+  }
 }
 
-void WindowBaseEcoreWl::Initialize()
+void WindowBaseEcoreWl::Initialize( PositionSize positionSize, Any surface, bool isTransparent )
 {
-  if( !mWindowSurface )
+  if( surface.Empty() == false )
+  {
+    // check we have a valid type
+    DALI_ASSERT_ALWAYS( ( surface.GetType() == typeid (Ecore_Wl_Window *) ) && "Surface type is invalid" );
+
+    mEcoreWindow = AnyCast< Ecore_Wl_Window* >( surface );
+  }
+  else
   {
-    DALI_ASSERT_ALWAYS( "Invalid window surface" );
+    // we own the surface about to created
+    WindowSystem::Initialize();
+
+    mOwnSurface = true;
+    CreateWindow( positionSize );
   }
 
-  mEcoreWindow = mWindowSurface->GetWlWindow();
-  DALI_ASSERT_ALWAYS( mEcoreWindow != 0 && "There is no EcoreWl window" );
+  mWlSurface = ecore_wl_window_surface_create( mEcoreWindow );
+
+  SetTransparency( isTransparent );
 
   mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, EcoreEventWindowIconifyStateChanged, this ) );
-  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_IN, EcoreEventWindowFocusIn, this ) );
-  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_OUT, EcoreEventWindowFocusOut, this ) );
-  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_OUTPUT_TRANSFORM, EcoreEventOutputTransform, this) );
-  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_IGNORE_OUTPUT_TRANSFORM, EcoreEventIgnoreOutputTransform, this) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_IN,                    EcoreEventWindowFocusIn,             this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_OUT,                   EcoreEventWindowFocusOut,            this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_OUTPUT_TRANSFORM,            EcoreEventOutputTransform,           this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_IGNORE_OUTPUT_TRANSFORM,     EcoreEventIgnoreOutputTransform,     this ) );
+
+  // Register Rotate event
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_ROTATE,               EcoreEventRotate,                    this ) );
+
+  // Register Touch events
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_MOUSE_BUTTON_DOWN,              EcoreEventMouseButtonDown,           this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_MOUSE_BUTTON_UP,                EcoreEventMouseButtonUp,             this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_MOUSE_MOVE,                     EcoreEventMouseButtonMove,           this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_MOUSE_BUTTON_CANCEL,            EcoreEventMouseButtonCancel,         this ) );
+
+  // Register Mouse wheel events
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_MOUSE_WHEEL,                    EcoreEventMouseWheel,                this ) );
+
+  // Register Detent event
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_DETENT_ROTATE,                  EcoreEventDetentRotation,            this ) );
+
+  // Register Key events
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_KEY_DOWN,                       EcoreEventKeyDown,                   this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_EVENT_KEY_UP,                         EcoreEventKeyUp,                     this ) );
+
+  // Register Selection event - clipboard selection
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_DATA_SOURCE_SEND,            EcoreEventDataSend,                  this ) );
+  mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_SELECTION_DATA_READY,        EcoreEventDataReceive,               this ) );
+
+  // Register Vconf notify - font name and size
+  vconf_notify_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged, this );
+  vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged, this );
+
+  InitializeEcoreElDBus();
 
   mDisplay = ecore_wl_display_get();
 
@@ -315,11 +739,11 @@ Eina_Bool WindowBaseEcoreWl::OnIconifyStateChanged( void* data, int type, void*
   {
     if( iconifyChangedEvent->iconified == EINA_TRUE )
     {
-      mWindow->OnIconifyChanged( true );
+      mIconifyChangedSignal.Emit( true );
     }
     else
     {
-      mWindow->OnIconifyChanged( false );
+      mIconifyChangedSignal.Emit( false );
     }
     handled = ECORE_CALLBACK_DONE;
   }
@@ -335,7 +759,7 @@ Eina_Bool WindowBaseEcoreWl::OnFocusIn( void* data, int type, void* event )
   {
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n" );
 
-    mWindow->OnFocusChanged( true );
+    mFocusChangedSignal.Emit( true );
   }
 
   return ECORE_CALLBACK_PASS_ON;
@@ -349,7 +773,7 @@ Eina_Bool WindowBaseEcoreWl::OnFocusOut( void* data, int type, void* event )
   {
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n" );
 
-    mWindow->OnFocusChanged( false );
+    mFocusChangedSignal.Emit( false );
   }
 
   return ECORE_CALLBACK_PASS_ON;
@@ -363,9 +787,7 @@ Eina_Bool WindowBaseEcoreWl::OnOutputTransform( void* data, int type, void* even
   {
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventOutputTransform\n", mEcoreWindow );
 
-    mWindowSurface->OutputTransformed();
-
-    mWindow->OnOutputTransformed();
+    mOutputTransformedSignal.Emit();
   }
 
   return ECORE_CALLBACK_PASS_ON;
@@ -379,14 +801,315 @@ Eina_Bool WindowBaseEcoreWl::OnIgnoreOutputTransform( void* data, int type, void
   {
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventIgnoreOutputTransform\n", mEcoreWindow );
 
-    mWindowSurface->OutputTransformed();
-
-    mWindow->OnOutputTransformed();
+    mOutputTransformedSignal.Emit();
   }
 
   return ECORE_CALLBACK_PASS_ON;
 }
 
+void WindowBaseEcoreWl::OnRotation( void* data, int type, void* event )
+{
+  Ecore_Wl_Event_Window_Rotate* ev( static_cast< Ecore_Wl_Event_Window_Rotate* >( event ) );
+
+  if( ev->win == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl::OnRotation, angle: %d, width: %d, height: %d\n", ev->angle, ev->w, ev->h );
+
+    RotationEvent rotationEvent;
+    rotationEvent.angle = ev->angle;
+    rotationEvent.winResize = 0;
+
+    if( ev->angle == 0 || ev->angle == 180 )
+    {
+      rotationEvent.width = ev->w;
+      rotationEvent.height = ev->h;
+    }
+    else
+    {
+      rotationEvent.width = ev->h;
+      rotationEvent.height = ev->w;
+    }
+
+    mRotationSignal.Emit( rotationEvent );
+  }
+}
+
+void WindowBaseEcoreWl::OnMouseButtonDown( void* data, int type, void* event )
+{
+  Ecore_Event_Mouse_Button* touchEvent = static_cast< Ecore_Event_Mouse_Button* >( event );
+
+  if( touchEvent->window == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    PointState::Type state ( PointState::DOWN );
+
+    // Check if the buttons field is set and ensure it's the primary touch button.
+    // If this event was triggered by buttons other than the primary button (used for touch), then
+    // just send an interrupted event to Core.
+    if( touchEvent->buttons && (touchEvent->buttons != PRIMARY_TOUCH_BUTTON_ID ) )
+    {
+      state = PointState::INTERRUPTED;
+    }
+
+    Device::Class::Type deviceClass;
+    Device::Subclass::Type deviceSubclass;
+
+    GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
+    GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
+
+    Integration::Point point;
+    point.SetDeviceId( touchEvent->multi.device );
+    point.SetState( state );
+    point.SetScreenPosition( Vector2( touchEvent->x, touchEvent->y ) );
+    point.SetRadius( touchEvent->multi.radius, Vector2( touchEvent->multi.radius_x, touchEvent->multi.radius_y ) );
+    point.SetPressure( touchEvent->multi.pressure );
+    point.SetAngle( Degree( touchEvent->multi.angle ) );
+    point.SetDeviceClass( deviceClass );
+    point.SetDeviceSubclass( deviceSubclass );
+
+    mTouchEventSignal.Emit( point, touchEvent->timestamp );
+  }
+}
+
+void WindowBaseEcoreWl::OnMouseButtonUp( void* data, int type, void* event )
+{
+  Ecore_Event_Mouse_Button* touchEvent = static_cast< Ecore_Event_Mouse_Button* >( event );
+
+  if( touchEvent->window == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    Device::Class::Type deviceClass;
+    Device::Subclass::Type deviceSubclass;
+
+    GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
+    GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
+
+    Integration::Point point;
+    point.SetDeviceId( touchEvent->multi.device );
+    point.SetState( PointState::UP );
+    point.SetScreenPosition( Vector2( touchEvent->x, touchEvent->y ) );
+    point.SetRadius( touchEvent->multi.radius, Vector2( touchEvent->multi.radius_x, touchEvent->multi.radius_y ) );
+    point.SetPressure( touchEvent->multi.pressure );
+    point.SetAngle( Degree( touchEvent->multi.angle ) );
+    point.SetDeviceClass( deviceClass );
+    point.SetDeviceSubclass( deviceSubclass );
+
+    mTouchEventSignal.Emit( point, touchEvent->timestamp );
+  }
+}
+
+void WindowBaseEcoreWl::OnMouseButtonMove( void* data, int type, void* event )
+{
+  Ecore_Event_Mouse_Move* touchEvent = static_cast< Ecore_Event_Mouse_Move* >( event );
+
+  if( touchEvent->window == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    Device::Class::Type deviceClass;
+    Device::Subclass::Type deviceSubclass;
+
+    GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
+    GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
+
+    Integration::Point point;
+    point.SetDeviceId( touchEvent->multi.device );
+    point.SetState( PointState::MOTION );
+    point.SetScreenPosition( Vector2( touchEvent->x, touchEvent->y ) );
+    point.SetRadius( touchEvent->multi.radius, Vector2( touchEvent->multi.radius_x, touchEvent->multi.radius_y ) );
+    point.SetPressure( touchEvent->multi.pressure );
+    point.SetAngle( Degree( touchEvent->multi.angle ) );
+    point.SetDeviceClass( deviceClass );
+    point.SetDeviceSubclass( deviceSubclass );
+
+    mTouchEventSignal.Emit( point, touchEvent->timestamp );
+  }
+}
+
+void WindowBaseEcoreWl::OnMouseButtonCancel( void* data, int type, void* event )
+{
+  Ecore_Event_Mouse_Button* touchEvent = static_cast< Ecore_Event_Mouse_Button* >( event );
+
+  if( touchEvent->window == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    Integration::Point point;
+    point.SetDeviceId( touchEvent->multi.device );
+    point.SetState( PointState::INTERRUPTED );
+    point.SetScreenPosition( Vector2( 0.0f, 0.0f ) );
+
+    mTouchEventSignal.Emit( point, touchEvent->timestamp );
+
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n" );
+  }
+}
+
+void WindowBaseEcoreWl::OnMouseWheel( void* data, int type, void* event )
+{
+  Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast< Ecore_Event_Mouse_Wheel* >( event );
+
+  if( mouseWheelEvent->window == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z );
+
+    WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( mouseWheelEvent->x, mouseWheelEvent->y ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
+
+    mWheelEventSignal.Emit( wheelEvent );
+  }
+}
+
+void WindowBaseEcoreWl::OnDetentRotation( void* data, int type, void* event )
+{
+  Ecore_Event_Detent_Rotate* detentEvent = static_cast< Ecore_Event_Detent_Rotate* >( event );
+
+  DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n" );
+
+  int direction = ( detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE ) ? 1 : -1;
+  int timeStamp = detentEvent->timestamp;
+
+  WheelEvent wheelEvent( WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2( 0.0f, 0.0f ), direction, timeStamp );
+
+  mWheelEventSignal.Emit( wheelEvent );
+}
+
+void WindowBaseEcoreWl::OnKeyDown( void* data, int type, void* event )
+{
+  Ecore_Event_Key* keyEvent = static_cast< Ecore_Event_Key* >( event );
+
+  if( keyEvent->window == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyDown\n" );
+
+    std::string keyName( keyEvent->keyname );
+    std::string logicalKey( "" );
+    std::string keyString( "" );
+    std::string compose( "" );
+
+    // Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
+    if( keyEvent->compose )
+    {
+      compose = keyEvent->compose;
+    }
+
+    // Ensure key symbol is not NULL as keys like SHIFT have a null string.
+    if( keyEvent->key )
+    {
+      logicalKey = keyEvent->key;
+    }
+
+    int keyCode = KeyLookup::GetDaliKeyCode( keyEvent->keyname );
+    keyCode = ( keyCode == -1 ) ? 0 : keyCode;
+    int modifier( keyEvent->modifiers );
+    unsigned long time = keyEvent->timestamp;
+    if( !strncmp( keyEvent->keyname, "Keycode-", 8 ) )
+    {
+      keyCode = atoi( keyEvent->keyname + 8 );
+    }
+
+    // Ensure key event string is not NULL as keys like SHIFT have a null string.
+    if( keyEvent->string )
+    {
+      keyString = keyEvent->string;
+    }
+
+    std::string deviceName;
+    Device::Class::Type deviceClass;
+    Device::Subclass::Type deviceSubclass;
+
+    GetDeviceName( keyEvent, deviceName );
+    GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
+    GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass );
+
+    Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, deviceName, deviceClass, deviceSubclass );
+
+     mKeyEventSignal.Emit( keyEvent );
+  }
+}
+
+void WindowBaseEcoreWl::OnKeyUp( void* data, int type, void* event )
+{
+  Ecore_Event_Key* keyEvent = static_cast< Ecore_Event_Key* >( event );
+
+  if( keyEvent->window == static_cast< unsigned int >( ecore_wl_window_id_get( mEcoreWindow ) ) )
+  {
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n" );
+
+    std::string keyName( keyEvent->keyname );
+    std::string logicalKey( "" );
+    std::string keyString( "" );
+    std::string compose( "" );
+
+    // Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
+    if( keyEvent->compose )
+    {
+      compose = keyEvent->compose;
+    }
+
+    // Ensure key symbol is not NULL as keys like SHIFT have a null string.
+    if( keyEvent->key )
+    {
+      logicalKey = keyEvent->key;
+    }
+
+    int keyCode = KeyLookup::GetDaliKeyCode( keyEvent->keyname );
+    keyCode = ( keyCode == -1 ) ? 0 : keyCode;
+    int modifier( keyEvent->modifiers );
+    unsigned long time = keyEvent->timestamp;
+    if( !strncmp( keyEvent->keyname, "Keycode-", 8 ) )
+    {
+      keyCode = atoi( keyEvent->keyname + 8 );
+    }
+
+    // Ensure key event string is not NULL as keys like SHIFT have a null string.
+    if( keyEvent->string )
+    {
+      keyString = keyEvent->string;
+    }
+
+    std::string deviceName;
+    Device::Class::Type deviceClass;
+    Device::Subclass::Type deviceSubclass;
+
+    GetDeviceName( keyEvent, deviceName );
+    GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
+    GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass );
+
+    Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, deviceName, deviceClass, deviceSubclass );
+
+     mKeyEventSignal.Emit( keyEvent );
+  }
+}
+
+void WindowBaseEcoreWl::OnDataSend( void* data, int type, void* event )
+{
+  mSelectionDataSendSignal.Emit( event );
+}
+
+void WindowBaseEcoreWl::OnDataReceive( void* data, int type, void* event )
+{
+  mSelectionDataReceivedSignal.Emit( event  );
+}
+
+void WindowBaseEcoreWl::OnFontNameChanged()
+{
+  mStyleChangedSignal.Emit( StyleChange::DEFAULT_FONT_CHANGE );
+}
+
+void WindowBaseEcoreWl::OnFontSizeChanged()
+{
+  mStyleChangedSignal.Emit( StyleChange::DEFAULT_FONT_SIZE_CHANGE );
+}
+
+void WindowBaseEcoreWl::OnEcoreElDBusAccessibilityNotification( void* context, const Eldbus_Message* message )
+{
+#ifdef DALI_ELDBUS_AVAILABLE
+  AccessibilityInfo info;
+
+  // The string defines the arg-list's respective types.
+  if( !eldbus_message_arguments_get( message, "iiiiiiu", &info.gestureValue, &info.startX, &info.startY, &info.endX, &info.endY, &info.state, &info.eventTime ) )
+  {
+    DALI_LOG_ERROR( "OnEcoreElDBusAccessibilityNotification: Error getting arguments\n" );
+  }
+
+  mAccessibilitySignal.Emit( info );
+#endif
+}
+
 void WindowBaseEcoreWl::RegistryGlobalCallback( void* data, struct wl_registry *registry, uint32_t name, const char* interface, uint32_t version )
 {
   if( strcmp( interface, tizen_policy_interface.name ) == 0 )
@@ -452,70 +1175,175 @@ void WindowBaseEcoreWl::DisplayPolicyBrightnessChangeDone( void* data, struct ti
   DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::DisplayPolicyBrightnessChangeDone: brightness = %d, state = %d\n", brightness, state );
 }
 
-void WindowBaseEcoreWl::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode )
+Any WindowBaseEcoreWl::GetNativeWindow()
+{
+  return mEcoreWindow;
+}
+
+int WindowBaseEcoreWl::GetNativeWindowId()
 {
-  DALI_LOG_TRACE_METHOD_FMT( gWindowBaseLogFilter, "visible : %d\n", visibleMode );
+  return ecore_wl_window_id_get( mEcoreWindow );
+}
+
+EGLNativeWindowType WindowBaseEcoreWl::CreateEglWindow( int width, int height )
+{
+  mEglWindow = wl_egl_window_create( mWlSurface, width, height );
+
+  return static_cast< EGLNativeWindowType >( mEglWindow );
+}
 
-  if( visibleMode == Dali::Window::VISIBLE )
+void WindowBaseEcoreWl::DestroyEglWindow()
+{
+  if( mEglWindow != NULL )
   {
-    // when the indicator is visible, set proper mode for indicator server according to bg mode
-    if( opacityMode == Dali::Window::OPAQUE )
+    wl_egl_window_destroy( mEglWindow );
+    mEglWindow = NULL;
+  }
+}
+
+void WindowBaseEcoreWl::SetEglWindowRotation( int angle )
+{
+  wl_egl_window_rotation rotation;
+
+  switch( angle )
+  {
+    case 0:
+    {
+      rotation = ROTATION_0;
+      break;
+    }
+    case 90:
     {
-      ecore_wl_window_indicator_opacity_set( mEcoreWindow, ECORE_WL_INDICATOR_OPAQUE );
+      rotation = ROTATION_270;
+      break;
     }
-    else if( opacityMode == Dali::Window::TRANSLUCENT )
+    case 180:
     {
-      ecore_wl_window_indicator_opacity_set( mEcoreWindow, ECORE_WL_INDICATOR_TRANSLUCENT );
+      rotation = ROTATION_180;
+      break;
     }
-    else if( opacityMode == Dali::Window::TRANSPARENT )
+    case 270:
     {
-      ecore_wl_window_indicator_opacity_set( mEcoreWindow, ECORE_WL_INDICATOR_OPAQUE );
+      rotation = ROTATION_90;
+      break;
+    }
+    default:
+    {
+      rotation = ROTATION_0;
+      break;
     }
   }
-  else
-  {
-    // when the indicator is not visible, set TRANSPARENT mode for indicator server
-    ecore_wl_window_indicator_opacity_set( mEcoreWindow, ECORE_WL_INDICATOR_TRANSPARENT); // it means hidden indicator
-  }
+
+  wl_egl_window_set_rotation( mEglWindow, rotation );
 }
 
-void WindowBaseEcoreWl::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation )
+void WindowBaseEcoreWl::SetEglWindowBufferTransform( int angle )
 {
-  if( isShow )
-  {
-    ecore_wl_window_indicator_state_set( mEcoreWindow, ECORE_WL_INDICATOR_STATE_ON );
-  }
-  else
+  wl_output_transform bufferTransform;
+
+  switch( angle )
   {
-    ecore_wl_window_indicator_state_set( mEcoreWindow, ECORE_WL_INDICATOR_STATE_OFF );
+    case 0:
+    {
+      bufferTransform = WL_OUTPUT_TRANSFORM_NORMAL;
+      break;
+    }
+    case 90:
+    {
+      bufferTransform = WL_OUTPUT_TRANSFORM_90;
+      break;
+    }
+    case 180:
+    {
+      bufferTransform = WL_OUTPUT_TRANSFORM_180;
+      break;
+    }
+    case 270:
+    {
+      bufferTransform = WL_OUTPUT_TRANSFORM_270;
+      break;
+    }
+    default:
+    {
+      bufferTransform = WL_OUTPUT_TRANSFORM_NORMAL;
+      break;
+    }
   }
+
+  wl_egl_window_set_buffer_transform( mEglWindow, bufferTransform );
 }
 
-void WindowBaseEcoreWl::IndicatorTypeChanged( IndicatorInterface::Type type )
+void WindowBaseEcoreWl::SetEglWindowTransform( int angle )
 {
-#if defined(DALI_PROFILE_MOBILE)
-  switch( type )
+  wl_output_transform windowTransform;
+
+  switch( angle )
   {
-    case IndicatorInterface::INDICATOR_TYPE_1:
+    case 0:
+    {
+      windowTransform = WL_OUTPUT_TRANSFORM_NORMAL;
+      break;
+    }
+    case 90:
+    {
+      windowTransform = WL_OUTPUT_TRANSFORM_90;
+      break;
+    }
+    case 180:
     {
-      ecore_wl_indicator_visible_type_set( mEcoreWindow, ECORE_WL_INDICATOR_VISIBLE_TYPE_SHOWN );
+      windowTransform = WL_OUTPUT_TRANSFORM_180;
       break;
     }
-    case IndicatorInterface::INDICATOR_TYPE_2:
+    case 270:
     {
-      ecore_wl_indicator_visible_type_set( mEcoreWindow, ECORE_WL_INDICATOR_VISIBLE_TYPE_HIDDEN );
+      windowTransform = WL_OUTPUT_TRANSFORM_270;
       break;
     }
-    case IndicatorInterface::INDICATOR_TYPE_UNKNOWN:
     default:
     {
+      windowTransform = WL_OUTPUT_TRANSFORM_NORMAL;
       break;
     }
   }
-#endif //MOBILE
+
+  wl_egl_window_set_window_transform( mEglWindow, windowTransform );
+}
+
+void WindowBaseEcoreWl::ResizeEglWindow( PositionSize positionSize )
+{
+  wl_egl_window_resize( mEglWindow, positionSize.width, positionSize.height, positionSize.x, positionSize.y );
+}
+
+bool WindowBaseEcoreWl::IsEglWindowRotationSupported()
+{
+  // Check capability
+  wl_egl_window_capability capability = static_cast< wl_egl_window_capability >( wl_egl_window_get_capabilities( mEglWindow ) );
+  if( capability == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED )
+  {
+    mSupportedPreProtation = true;
+    return true;
+  }
+  mSupportedPreProtation = false;
+  return false;
+}
+
+void WindowBaseEcoreWl::Move( PositionSize positionSize )
+{
+  ecore_wl_window_position_set( mEcoreWindow, positionSize.x, positionSize.y );
 }
 
-void WindowBaseEcoreWl::SetClass( std::string name, std::string className )
+void WindowBaseEcoreWl::Resize( PositionSize positionSize )
+{
+  ecore_wl_window_update_size( mEcoreWindow, positionSize.width, positionSize.height );
+}
+
+void WindowBaseEcoreWl::MoveResize( PositionSize positionSize )
+{
+  ecore_wl_window_position_set( mEcoreWindow, positionSize.x, positionSize.y );
+  ecore_wl_window_update_size( mEcoreWindow, positionSize.width, positionSize.height );
+}
+
+void WindowBaseEcoreWl::SetClass( const std::string& name, const std::string& className )
 {
   ecore_wl_window_title_set( mEcoreWindow, name.c_str() );
   ecore_wl_window_class_name_set( mEcoreWindow, className.c_str() );
@@ -537,19 +1365,21 @@ void WindowBaseEcoreWl::Activate()
   ecore_wl_window_activate( mEcoreWindow );
 }
 
-void WindowBaseEcoreWl::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations )
+void WindowBaseEcoreWl::SetAvailableAnlges( const std::vector< int >& angles )
 {
   int rotations[4] = { 0 };
-  for( std::size_t i = 0; i < orientations.size(); ++i )
+  DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl::SetAvailableAnlges, angle's count: %d\n", angles.size() );
+  for( std::size_t i = 0; i < angles.size(); ++i )
   {
-    rotations[i] = static_cast< int >( orientations[i] );
+    rotations[i] = static_cast< int >( angles[i] );
+    DALI_LOG_RELEASE_INFO( "%d ", rotations[i] );
   }
-  ecore_wl_window_rotation_available_rotations_set( mEcoreWindow, rotations, orientations.size() );
+  ecore_wl_window_rotation_available_rotations_set( mEcoreWindow, rotations, angles.size() );
 }
 
-void WindowBaseEcoreWl::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
+void WindowBaseEcoreWl::SetPreferredAngle( int angle )
 {
-  ecore_wl_window_rotation_preferred_rotation_set( mEcoreWindow, orientation );
+  ecore_wl_window_rotation_preferred_rotation_set( mEcoreWindow, angle );
 }
 
 void WindowBaseEcoreWl::SetAcceptFocus( bool accept )
@@ -1223,6 +2053,120 @@ bool WindowBaseEcoreWl::UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dal
   return true;
 }
 
+void WindowBaseEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )
+{
+  // calculate DPI
+  float xres, yres;
+
+  // 1 inch = 25.4 millimeters
+  xres = ecore_wl_dpi_get();
+  yres = ecore_wl_dpi_get();
+
+  dpiHorizontal = int( xres + 0.5f );  // rounding
+  dpiVertical   = int( yres + 0.5f );
+}
+
+int WindowBaseEcoreWl::GetOrientation() const
+{
+  int orientation = (mScreenRotationAngle + mWindowRotationAngle) % 360;
+  if( mSupportedPreProtation )
+  {
+    orientation = 0;
+  }
+  return orientation;
+}
+
+int WindowBaseEcoreWl::GetScreenRotationAngle()
+{
+  int transform = 0;
+
+  if( ecore_wl_window_ignore_output_transform_get( mEcoreWindow ) )
+  {
+    transform = 0;
+  }
+  else
+  {
+    transform = ecore_wl_output_transform_get( ecore_wl_window_output_find( mEcoreWindow ) );
+  }
+
+  mScreenRotationAngle = transform * 90;
+  return mScreenRotationAngle;
+}
+
+void WindowBaseEcoreWl::SetWindowRotationAngle( int degree )
+{
+  mWindowRotationAngle = degree;
+  ecore_wl_window_rotation_set( mEcoreWindow, degree );
+}
+
+int WindowBaseEcoreWl::GetWindowRotationAngle()
+{
+  return mWindowRotationAngle;
+}
+
+void WindowBaseEcoreWl::WindowRotationCompleted( int degree, int width, int height )
+{
+  ecore_wl_window_rotation_change_done_send( mEcoreWindow );
+}
+
+void WindowBaseEcoreWl::SetTransparency( bool transparent )
+{
+  ecore_wl_window_alpha_set( mEcoreWindow, transparent );
+}
+
+void WindowBaseEcoreWl::InitializeEcoreElDBus()
+{
+#ifdef DALI_ELDBUS_AVAILABLE
+  Eldbus_Object* object;
+  Eldbus_Proxy* manager;
+
+  if( !( mSystemConnection = eldbus_connection_get( ELDBUS_CONNECTION_TYPE_SYSTEM ) ) )
+  {
+    DALI_LOG_ERROR( "Unable to get system bus\n" );
+  }
+
+  object = eldbus_object_get( mSystemConnection, BUS, PATH );
+  if( !object )
+  {
+    DALI_LOG_ERROR( "Getting object failed\n" );
+    return;
+  }
+
+  manager = eldbus_proxy_get( object, INTERFACE );
+  if( !manager )
+  {
+    DALI_LOG_ERROR( "Getting proxy failed\n" );
+    return;
+  }
+
+  if( !eldbus_proxy_signal_handler_add( manager, "GestureDetected", EcoreElDBusAccessibilityNotification, this ) )
+  {
+    DALI_LOG_ERROR( "No signal handler returned\n" );
+  }
+#endif
+}
+
+void WindowBaseEcoreWl::CreateWindow( PositionSize positionSize )
+{
+  mEcoreWindow = ecore_wl_window_new( 0, positionSize.x, positionSize.y, positionSize.width, positionSize.height, ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW );
+
+  if ( mEcoreWindow == 0 )
+  {
+    DALI_ASSERT_ALWAYS( 0 && "Failed to create Wayland window" );
+  }
+}
+
+void WindowBaseEcoreWl::SetParent( WindowBase* parentWinBase )
+{
+  Ecore_Wl_Window* ecoreParent = NULL;
+  if( parentWinBase )
+  {
+    WindowBaseEcoreWl* winBaseEcore = static_cast<WindowBaseEcoreWl*>( parentWinBase );
+    ecoreParent = winBaseEcore->mEcoreWindow;
+  }
+  ecore_wl_window_parent_set( mEcoreWindow, ecoreParent );
+}
+
 } // namespace Adaptor
 
 } // namespace Internal