Merge "[windows] Return the key name for ascii letters" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-base.h
index 91a958c..01d3650 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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 <dali/integration-api/events/key-event-integ.h>
+#include <dali/integration-api/events/point.h>
+#include <dali/integration-api/events/wheel-event-integ.h>
+#include <string>
+#include <vector>
+#include <cstdint>
+
 // INTERNAL INCLUDES
 #include <dali/public-api/adaptor-framework/window.h>
 #include <dali/public-api/adaptor-framework/key-grab.h>
 #include <dali/public-api/adaptor-framework/style-change.h>
-#include <dali/internal/window-system/common/indicator-interface.h>
+#include <dali/public-api/adaptor-framework/window-enumerations.h>
+#include <dali/devel-api/adaptor-framework/window-devel.h>
 #include <dali/internal/window-system/common/damage-observer.h>
-#include <dali/internal/window-system/common/rotation-observer.h>
+#include <dali/internal/window-system/common/rotation-event.h>
 #include <dali/internal/graphics/gles/egl-implementation.h>
 
-// EXTERNAL INCLUDES
-#include <dali/integration-api/events/key-event-integ.h>
-#include <dali/integration-api/events/point.h>
-#include <dali/public-api/events/wheel-event.h>
-#include <string>
-#include <vector>
-
 namespace Dali
 {
 namespace Internal
@@ -69,10 +71,13 @@ public:
   typedef Signal< void ( ) > DeleteSignalType;
   typedef Signal< void ( const DamageArea& ) > DamageSignalType;
   typedef Signal< void ( const RotationEvent& ) > RotationSignalType;
+  typedef Signal< void ( WindowEffectState, WindowEffectType ) > TransitionEffectEventSignalType;
+  typedef Signal< void ( ) > KeyboardRepeatSettingsChangedSignalType;
+  typedef Signal< void ( ) > WindowRedrawRequestSignalType;
 
   // Input events
-  typedef Signal< void ( Integration::Point&, unsigned long ) > TouchEventSignalType;
-  typedef Signal< void ( WheelEvent& ) > WheelEventSignalType;
+  typedef Signal< void ( Integration::Point&, uint32_t ) > TouchEventSignalType;
+  typedef Signal< void ( Integration::WheelEvent& ) > WheelEventSignalType;
   typedef Signal< void( Integration::KeyEvent& ) > KeyEventSignalType;
 
   // Clipboard
@@ -82,9 +87,6 @@ public:
   typedef Signal< void ( StyleChange::Type ) > StyleSignalType;
   typedef Signal< void ( const AccessibilityInfo& ) > AccessibilitySignalType;
 
-  // Indicator
-  typedef Signal< void ( ) > IndicatorSignalType;
-
   /**
    * @brief Default constructor
    */
@@ -160,21 +162,6 @@ public:
   virtual void MoveResize( Dali::PositionSize positionSize ) = 0;
 
   /**
-   * @copydoc Dali::Window::ShowIndicator()
-   */
-  virtual void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) = 0;
-
-  /**
-   * Set the indicator properties on the window
-   */
-  virtual void SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation ) = 0;
-
-  /**
-   * @copydoc Dali::Internal::Adaptor::IndicatorInterface::Observer::IndicatorTypeChanged()
-   */
-  virtual void IndicatorTypeChanged( IndicatorInterface::Type type ) = 0;
-
-  /**
    * @copydoc Dali::Window::SetClass()
    */
   virtual void SetClass( const std::string& name, const std::string& className ) = 0;
@@ -197,12 +184,12 @@ public:
   /**
    * @copydoc Dali::Window::SetAvailableOrientations()
    */
-  virtual void SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations ) = 0;
+  virtual void SetAvailableAnlges( const std::vector< int >& angles ) = 0;
 
   /**
    * @copydoc Dali::Window::SetPreferredOrientation()
    */
-  virtual void SetPreferredOrientation( Dali::Window::WindowOrientation orientation ) = 0;
+  virtual void SetPreferredAngle( int angle ) = 0;
 
   /**
    * @copydoc Dali::Window::SetAcceptFocus()
@@ -262,17 +249,17 @@ public:
   /**
    * @copydoc Dali::Window::SetType()
    */
-  virtual void SetType( Dali::Window::Type type ) = 0;
+  virtual void SetType( Dali::WindowType type ) = 0;
 
   /**
    * @copydoc Dali::Window::SetNotificationLevel()
    */
-  virtual bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) = 0;
+  virtual bool SetNotificationLevel( Dali::WindowNotificationLevel level ) = 0;
 
   /**
    * @copydoc Dali::Window::GetNotificationLevel()
    */
-  virtual Dali::Window::NotificationLevel::Type GetNotificationLevel() const = 0;
+  virtual Dali::WindowNotificationLevel GetNotificationLevel() const = 0;
 
   /**
    * @copydoc Dali::Window::SetOpaqueState()
@@ -282,12 +269,12 @@ public:
   /**
    * @copydoc Dali::Window::SetScreenOffMode()
    */
-  virtual bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) = 0;
+  virtual bool SetScreenOffMode(WindowScreenOffMode screenOffMode) = 0;
 
   /**
    * @copydoc Dali::Window::GetScreenOffMode()
    */
-  virtual Dali::Window::ScreenOffMode::Type GetScreenOffMode() const = 0;
+  virtual WindowScreenOffMode GetScreenOffMode() const = 0;
 
   /**
    * @copydoc Dali::Window::SetBrightness()
@@ -327,12 +314,6 @@ public:
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) = 0;
 
   /**
-   * @brief Set the stereoscopic 3D view mode
-   * @param[in] viewMode The new view mode
-   */
-  virtual void SetViewMode( ViewMode viewMode ) = 0;
-
-  /**
    * @brief Get the screen rotation angle of the window
    */
   virtual int GetScreenRotationAngle() = 0;
@@ -352,6 +333,23 @@ public:
    */
   virtual void SetTransparency( bool transparent ) = 0;
 
+  /**
+   * @copydoc Dali::Window::SetParent()
+   */
+  virtual void SetParent( WindowBase* parentWinBase ) = 0;
+
+  /**
+   * @brief Create a sync fence that can tell the frame is rendered by the graphics driver.
+   * @return The file descriptor that tells when it is rendered.
+   */
+  virtual int CreateFrameRenderedSyncFence() = 0;
+
+  /**
+   * @brief Create a sync fence that can tell the frame is presented by the display server.
+   * @return The file descriptor that tells when it is presented.
+   */
+  virtual int CreateFramePresentedSyncFence() = 0;
+
   // Signals
 
   /**
@@ -420,9 +418,19 @@ public:
   AccessibilitySignalType& AccessibilitySignal();
 
   /**
-   * @brief This signal is emitted when an indicator is flicked.
+   * @brief This signal is emitted when window's transition animation is started or ended.
+   */
+  TransitionEffectEventSignalType& TransitionEffectEventSignal();
+
+  /**
+   * @brief This signal is emitted when the keyboard repeat is changed.
+   */
+  KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal();
+
+  /**
+   * @brief This signal is emitted when the window redraw is requested.
    */
-  IndicatorSignalType& IndicatorFlickedSignal();
+  WindowRedrawRequestSignalType& WindowRedrawRequestSignal();
 
 protected:
 
@@ -434,20 +442,22 @@ protected:
 
 protected:
 
-  IconifySignalType                    mIconifyChangedSignal;
-  FocusSignalType                      mFocusChangedSignal;
-  OutputSignalType                     mOutputTransformedSignal;
-  DeleteSignalType                     mDeleteRequestSignal;
-  DamageSignalType                     mWindowDamagedSignal;
-  RotationSignalType                   mRotationSignal;
-  TouchEventSignalType                 mTouchEventSignal;
-  WheelEventSignalType                 mWheelEventSignal;
-  KeyEventSignalType                   mKeyEventSignal;
-  SelectionSignalType                  mSelectionDataSendSignal;
-  SelectionSignalType                  mSelectionDataReceivedSignal;
-  StyleSignalType                      mStyleChangedSignal;
-  AccessibilitySignalType              mAccessibilitySignal;
-  IndicatorSignalType                  mIndicatorFlickedSignal;
+  IconifySignalType                       mIconifyChangedSignal;
+  FocusSignalType                         mFocusChangedSignal;
+  OutputSignalType                        mOutputTransformedSignal;
+  DeleteSignalType                        mDeleteRequestSignal;
+  DamageSignalType                        mWindowDamagedSignal;
+  RotationSignalType                      mRotationSignal;
+  TouchEventSignalType                    mTouchEventSignal;
+  WheelEventSignalType                    mWheelEventSignal;
+  KeyEventSignalType                      mKeyEventSignal;
+  SelectionSignalType                     mSelectionDataSendSignal;
+  SelectionSignalType                     mSelectionDataReceivedSignal;
+  StyleSignalType                         mStyleChangedSignal;
+  AccessibilitySignalType                 mAccessibilitySignal;
+  TransitionEffectEventSignalType         mTransitionEffectEventSignal;
+  KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
+  WindowRedrawRequestSignalType           mWindowRedrawRequestSignal;
 };
 
 } // namespace Adaptor