[Tizen] Revert "Support screen rotation"
[platform/core/uifw/dali-adaptor.git] / adaptors / x11 / window-render-surface.h
index 3074aeb..f9b5b41 100644 (file)
 namespace Dali
 {
 
-namespace Internal
-{
-
-namespace Adaptor
-{
-
 namespace ECore
 {
 
 /**
- * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface.
+ * @copydoc Dali::ECore::EcoreXRenderSurface.
  * Window specialization.
  */
-class WindowRenderSurface : public RenderSurface
+class WindowRenderSurface : public EcoreXRenderSurface
 {
 public:
 
@@ -45,18 +39,18 @@ public:
     * Uses an X11 surface to render to.
     * @param [in] positionSize the position and size of the surface
     * @param [in] surface can be a X-window or X-pixmap (type must be unsigned int).
-    * @param [in] display connection to X-server if the surface is a X window or pixmap (type must be void * to X display struct)
     * @param [in] name optional name of surface passed in
+    * @param [in] className optional class name of the surface passed in
     * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
     */
   WindowRenderSurface( Dali::PositionSize positionSize,
                        Any surface,
-                       Any display,
                        const std::string& name,
+                       const std::string& className,
                        bool isTransparent = false );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::~RenderSurface
+   * @copydoc Dali::ECore::EcoreXRenderSurface::~EcoreXRenderSurface
    */
   virtual ~WindowRenderSurface();
 
@@ -73,82 +67,80 @@ public: // API
    */
   void RequestToApproveDeiconify();
 
-public: // from Dali::RenderSurface
-
   /**
-   * @copydoc Dali::RenderSurface::GetType()
+   * Map window
    */
-  virtual Dali::RenderSurface::SurfaceType GetType();
+  virtual void Map();
 
   /**
-   * @copydoc Dali::RenderSurface::GetSurface()
+   * @copydoc Dali::ECore::EcoreXRenderSurface::GetSurface()
    */
   virtual Any GetSurface();
 
   /**
-   * @copydoc Dali::RenderSurface::GetDrawable()
+   * @copydoc Dali::ECore::EcoreXRenderSurface::GetXWindow()
    */
   virtual Ecore_X_Window GetXWindow();
 
-public:  // from Internal::Adaptor::RenderSurface
+public: // from Dali::RenderSurface
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::InitializeEgl()
+   * @copydoc Dali::RenderSurface::InitializeEgl()
    */
   virtual void InitializeEgl( EglInterface& egl );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::CreateEglSurface()
+   * @copydoc Dali::RenderSurface::CreateEglSurface()
    */
   virtual void CreateEglSurface( EglInterface& egl );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::DestroyEglSurface()
+   * @copydoc Dali::RenderSurface::DestroyEglSurface()
    */
   virtual void DestroyEglSurface( EglInterface& egl );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::ReplaceEGLSurface()
+   * @copydoc Dali::RenderSurface::ReplaceEGLSurface()
    */
   virtual bool ReplaceEGLSurface( EglInterface& egl );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::MoveResize()
+   * @copydoc Dali::RenderSurface::MoveResize()
    */
   virtual void MoveResize( Dali::PositionSize positionSize);
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::Map()
+   * @copydoc Dali::RenderSurface::SetViewMode()
    */
-  virtual void Map();
+  void SetViewMode( ViewMode viewMode );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::StartRender()
+   * @copydoc Dali::RenderSurface::StartRender()
    */
   virtual void StartRender();
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::PreRender()
+   * @copydoc Dali::RenderSurface::PreRender()
    */
   virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::PostRender()
+   * @copydoc Dali::RenderSurface::PostRender()
    */
-  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int timeDelta, bool replacingSurface );
+  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::StopRender()
+   * @copydoc Dali::RenderSurface::StopRender()
    */
   virtual void StopRender();
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::SetViewMode()
+   * @copydoc Dali::RenderSurface::SetThreadSynchronization
    */
-  void SetViewMode( ViewMode viewMode );
+  virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::RenderSurface::ReleaseLock()
+   * @copydoc Dali::RenderSurface::ReleaseLock()
    */
   virtual void ReleaseLock();
 
@@ -160,7 +152,7 @@ protected:
   virtual void CreateXRenderable();
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::UseExistingRenderable
+   * @copydoc Dali::Internal::Adaptor::ECore::EcoreXRenderSurface::UseExistingRenderable
    */
   virtual void UseExistingRenderable( unsigned int surfaceId );
 
@@ -168,15 +160,12 @@ private: // Data
 
   Ecore_X_Window   mX11Window; ///< X-Window
   bool             mNeedToApproveDeiconify; ///< Whether need to send ECORE_X_ATOM_E_DEICONIFY_APPROVE event
+  std::string      mClassName;          ///< The class name of the window
 
 }; // class WindowRenderSurface
 
 } // namespace ECore
 
-} // namespace Adaptor
-
-} // namespace internal
-
 } // namespace Dali
 
 #endif // __DALI_INTERNAL_ECORE_X_WINDOW_RENDER_SURFACE_H__