[Tizen] Support Ecore-Wayland2
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / tizen-wayland / indicator-impl-ecore-wl.h
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_ECORE_INDICATOR_H__
-#define __DALI_INTERNAL_ECORE_INDICATOR_H__
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_INDICATOR_IMPL_ECORE_WL_H
+#define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_INDICATOR_IMPL_ECORE_WL_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
 
 namespace Dali
 {
-namespace Integration
-{
-class Core;
-}
-
 namespace Internal
 {
 namespace Adaptor
 {
-class Adaptor;
 
-typedef unsigned int PixmapId;
+class Adaptor;
 
 /**
  * The Indicator class connects to the indicator server, and gets and draws the indicator
  * for the given orientation.
  */
-class Indicator : public ConnectionTracker, public ServerConnection::Observer, public IndicatorInterface
+class IndicatorEcoreWl : public ConnectionTracker, public ServerConnection::Observer, public IndicatorInterface
 {
 public:
 
@@ -62,17 +56,6 @@ public:
     CONNECTED
   };
 
-  /**
-   * copied from ecore_evas_extn_engine.h
-   */
-  enum BufferType
-  {
-    BUFFER_TYPE_SHM = 0,        ///< shared memory-based buffer backend
-    BUFFER_TYPE_DRI2_PIXMAP,    ///< dri2 pixmap-based buffer backend
-    BUFFER_TYPE_EVASGL_PIXMAP,  ///< pixmap backend for Evas GL only (DEPRECATED)
-    BUFFER_TYPE_GL_PIXMAP,      ///< double buffered GL pixmap backend
-  };
-
 protected:
   /**
    * Class to encapsulate lock file
@@ -147,16 +130,19 @@ public:  // Dali::Internal::Adaptor::IndicicatorInterface
   /**
    * @copydoc Dali::Internal::IndicatorInterface::IndicatorInterface
    */
-  Indicator( Adaptor* adaptor,
+  IndicatorEcoreWl( Adaptor* adaptor,
              Dali::Window::WindowOrientation orientation,
              IndicatorInterface::Observer* observer );
 
   /**
    * @copydoc Dali::Internal::IndicatorInterface::~IndicatorInterface
    */
-  virtual ~Indicator();
+  virtual ~IndicatorEcoreWl();
 
 
+  /**
+   * @copydoc Dali::Internal::IndicatorInterface::SetAdaptor
+   */
   virtual void SetAdaptor(Adaptor* adaptor);
 
   /**
@@ -284,12 +270,6 @@ private:
   void LoadSharedImage( Ecore_Ipc_Event_Server_Data *epcEvent );
 
   /**
-   * Load the pixmap indicator image
-   * @param[in] epcEvent The event containing the image data
-   */
-  void LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent );
-
-  /**
    * Update top margin of the stage as much as indicator height
    */
   void UpdateTopMargin();
@@ -320,11 +300,6 @@ private:
   void CreateNewImage( int bufferNumber );
 
   /**
-   * Create a new pixmap image for the indicator, and set up signal handling for it.
-   */
-  void CreateNewPixmapImage();
-
-  /**
    * Indicator type has changed.
    * Inform observer
    * @param[in] type The new indicator type
@@ -409,7 +384,6 @@ private:
   Dali::Shader                     mBackgroundShader;    ///< Shader used for rendering the background
 
   IndicatorBufferPtr               mIndicatorBuffer;     ///< class which handles indicator rendering
-  PixmapId                         mPixmap;              ///< Pixmap including indicator content
   Dali::Renderer                   mForegroundRenderer;  ///< Renderer renders the indicator foreground
   Dali::Renderer                   mBackgroundRenderer;  ///< Renderer renders the indicator background
 
@@ -417,14 +391,12 @@ private:
   Dali::Actor                      mIndicatorActor;      ///< Handle to topmost indicator actor
   Dali::Actor                      mEventActor;          ///< Handle to event
   Dali::PanGestureDetector         mPanDetector;         ///< Pan detector to find flick gesture for hidden indicator
-  float                            mGestureDeltaY;       ///< Checking how much panning moved
-  bool                             mGestureDetected;     ///< Whether find the flick gesture
 
   Dali::Timer                      mReconnectTimer;      ///< Reconnection timer
-  SlotDelegate< Indicator >        mConnection;
+  SlotDelegate< IndicatorEcoreWl > mConnection;
 
   Dali::Window::IndicatorBgOpacity mOpacityMode;         ///< Opacity enum for background
-  Indicator::State                 mState;               ///< The connection state
+  IndicatorEcoreWl::State          mState;               ///< The connection state
 
   Adaptor*                         mAdaptor;
   ServerConnection*                mServerConnection;
@@ -444,8 +416,6 @@ private:
   int                              mCurrentSharedFile;   ///< Current shared file number
   SharedFileInfo                   mSharedFileInfo[SHARED_FILE_NUMBER];    ///< Table to store shared file info
 
-  BufferType                       mSharedBufferType;    ///< Shared buffer type which is used to render indicator
-
   struct Impl; ///< Contains Ecore specific information
   Impl* mImpl; ///< Created on construction and destroyed on destruction.
 
@@ -457,4 +427,4 @@ private:
 } // Internal
 } // Dali
 
-#endif
+#endif // DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_INDICATOR_IMPL_ECORE_WL_H