[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / window-base-win.h
index 381def3..fd6d2af 100755 (executable)
@@ -54,11 +54,6 @@ public:
 public:
 
   /**
-   * @brief Called when the window property is changed.
-   */
-  bool OnWindowPropertyChanged( void* data, int type, TWinEventInfo *event );
-
-  /**
    * Called when the window receives a delete request
    */
   void OnDeleteRequest();
@@ -66,57 +61,48 @@ public:
   /**
    * @brief Called when the window gains focus.
    */
-  void OnFocusIn( void* data, int type, TWinEventInfo *event );
+  void OnFocusIn( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when the window loses focus.
    */
-  void OnFocusOut( void* data, int type, TWinEventInfo *event );
+  void OnFocusOut( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when the window is damaged.
    */
-  void OnWindowDamaged( void* data, int type, TWinEventInfo *event );
+  void OnWindowDamaged( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when a touch down is received.
    */
-  void OnMouseButtonDown( void* data, int type, TWinEventInfo *event );
+  void OnMouseButtonDown( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when a touch up is received.
    */
-  void OnMouseButtonUp( void* data, int type, TWinEventInfo *event );
+  void OnMouseButtonUp( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when a touch motion is received.
    */
-  void OnMouseButtonMove( void* data, int type, TWinEventInfo *event );
+  void OnMouseButtonMove( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when a mouse wheel is received.
    */
-  void OnMouseWheel( void* data, int type, TWinEventInfo *event );
+  void OnMouseWheel( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when a key down is received.
    */
-  void OnKeyDown( void* data, int type, TWinEventInfo *event );
+  void OnKeyDown( int type, TWinEventInfo *event );
 
   /**
    * @brief Called when a key up is received.
    */
-  void OnKeyUp( void* data, int type, TWinEventInfo *event );
-
-  /**
-   * @brief Called when the source window notifies us the content in clipboard is selected.
-   */
-  void OnSelectionClear( void* data, int type, TWinEventInfo *event );
+  void OnKeyUp( int type, TWinEventInfo *event );
 
-  /**
-   * @brief Called when the source window sends us about the selected content.
-   */
-  void OnSelectionNotify( void* data, int type, TWinEventInfo *event );
 
 public:
 
@@ -181,21 +167,6 @@ public:
   virtual void MoveResize( PositionSize positionSize ) override;
 
   /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::ShowIndicator()
-   */
-  virtual void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) override;
-
-  /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::SetIndicatorProperties()
-   */
-  virtual void SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation ) override;
-
-  /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::IndicatorTypeChanged()
-   */
-  virtual void IndicatorTypeChanged( IndicatorInterface::Type type ) override;
-
-  /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::SetClass()
    */
   virtual void SetClass( const std::string& name, const std::string& className ) override;
@@ -216,14 +187,14 @@ public:
   virtual void Activate() override;
 
   /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::SetAvailableOrientations()
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetAvailableAnlges()
    */
-  virtual void SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations ) override;
+  virtual void SetAvailableAnlges( const std::vector< int >& angles ) override;
 
   /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::SetPreferredOrientation()
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetPreferredAngle()
    */
-  virtual void SetPreferredOrientation( Dali::Window::WindowOrientation orientation ) override;
+  virtual void SetPreferredAngle( int angle ) override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::SetAcceptFocus()
@@ -346,11 +317,6 @@ public:
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
   /**
-   * @copydoc Dali::Internal::Adaptor::WindowBase::SetViewMode()
-   */
-  virtual void SetViewMode( ViewMode viewMode ) override;
-
-  /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
    */
   virtual int GetScreenRotationAngle() override;
@@ -361,6 +327,11 @@ public:
   virtual void SetWindowRotationAngle( int degree ) override;
 
   /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
+   */
+  virtual void GetWindowRotationAngle() override;
+
+  /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
   virtual void WindowRotationCompleted( int degree, int width, int height ) override;
@@ -370,6 +341,17 @@ public:
    */
   virtual void SetTransparency( bool transparent ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetParent()
+   */
+  virtual void SetParent( WindowBase* parentWinBase ) override;
+
 private:
 
   /**
@@ -389,7 +371,7 @@ private:
    */
   void CreateWinWindow( PositionSize positionSize, bool isTransparent );
 
-protected:
+private:
 
   // Undefined
   WindowBaseWin(const WindowBaseWin&) = delete;
@@ -398,12 +380,15 @@ protected:
   WindowBaseWin& operator=(const WindowBaseWin& rhs) = delete;
 
 private:
+  void EventEntry( TWinEventInfo *event );
 
-  Dali::Vector< Event_Handler >        mEventHandler;
-  Win_Window_Handle                    mWin32Window;        ///< Native window handle
+private:
+  WinWindowHandle                      mWin32Window;        ///< Native window handle
   bool                                 mOwnSurface:1;       ///< Whether we own the surface (responsible for deleting it)
-  bool                                 mIsTransparent;      ///< Whether the window is transparent (32 bit or 24 bit)
+  bool                                 mIsTransparent:1;    ///< Whether the window is transparent (32 bit or 24 bit)
   bool                                 mRotationAppSet:1;
+
+  WindowsPlatformImplementation::WindowImpl mWindowImpl;
 };
 
 } // namespace Adaptor