[Tizen] Fix i586 build error
[platform/core/uifw/dali-adaptor.git] / adaptors / ecore / wayland / window-render-surface.h
index 7aea88b..19d7c7a 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_ECORE_WL_WINDOW_RENDER_SURFACE_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
  *
  */
 
+// EXTERNAL INCLUDES
+#include <wayland-egl.h>
+
 // INTERNAL INCLUDES
 #include <ecore-wl-render-surface.h>
-#include <wayland-egl.h>
+#include <window.h>
+#include <integration-api/thread-synchronization-interface.h>
 
 namespace Dali
 {
@@ -61,12 +65,6 @@ public: // API
   virtual Ecore_Wl_Window* GetDrawable();
 
   /**
-   * Request to approve deiconify operation
-   * If it is requested, it will send ECORE_X_ATOM_E_DEICONIFY_APPROVE event to window manager after rendering
-   */
-  void RequestToApproveDeiconify();
-
-  /**
    * Map window
    */
   virtual void Map();
@@ -81,6 +79,14 @@ public: // API
    */
   virtual Ecore_Wl_Window* GetWlWindow();
 
+  /**
+   * Request surface rotation
+   * @param[in] orientation A new orientation of the surface
+   * @param[in] width A new width of the surface
+   * @param[in] height A new height of the surface
+   */
+  void RequestRotation( Dali::Window::WindowOrientation orientation, int width, int height );
+
 public: // from Dali::RenderSurface
 
   /**
@@ -155,11 +161,28 @@ protected:
    */
   virtual void UseExistingRenderable( unsigned int surfaceId );
 
+private:
+
+  /**
+   * Used as the callback for the rotation-trigger.
+   */
+  void ProcessRotationRequest();
+
 private: // Data
 
-  Ecore_Wl_Window*   mWlWindow; ///< Wayland-Window
-  wl_egl_window*     mEglWindow;
-  bool             mNeedToApproveDeiconify; ///< Whether need to send ECORE_X_ATOM_E_DEICONIFY_APPROVE event
+  typedef int (*EglWinGetCapabilitiesFunction)( wl_egl_window* eglWindow );
+  typedef int (*EglWinSetRotationFunction)( wl_egl_window* eglWindow, int rotation );
+
+  EglWinGetCapabilitiesFunction  mEglWinGetCapabilitiesPtr;
+  EglWinSetRotationFunction      mEglWinSetRotationPtr;
+
+  void*                           mLibHandle; ///< Handle for the loaded library
+  Ecore_Wl_Window*                mWlWindow;  ///< Wayland-Window
+  wl_egl_window*                  mEglWindow;
+  ThreadSynchronizationInterface* mThreadSynchronization;
+  TriggerEventInterface*          mRotationTrigger;
+  bool                            mRotationSupported;
+  bool                            mRotated;
 
 }; // class WindowRenderSurface
 
@@ -167,4 +190,4 @@ private: // Data
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_ECORE_X_WINDOW_RENDER_SURFACE_H__
+#endif // __DALI_INTERNAL_ECORE_WL_WINDOW_RENDER_SURFACE_H__