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 e93287e..01d3650 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
 
 /*
- * Copyright (c) 2019 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.
  *
  */
 
-// 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/damage-observer.h>
-#include <dali/internal/window-system/common/rotation-observer.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 <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/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-event.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
+
 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&, uint32_t ) > TouchEventSignalType;
-  typedef Signal< void ( WheelEvent& ) > WheelEventSignalType;
+  typedef Signal< void ( Integration::WheelEvent& ) > WheelEventSignalType;
   typedef Signal< void( Integration::KeyEvent& ) > KeyEventSignalType;
 
   // Clipboard
@@ -179,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()
@@ -244,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()
@@ -264,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()
@@ -328,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
 
   /**
@@ -395,6 +417,21 @@ public:
    */
   AccessibilitySignalType& AccessibilitySignal();
 
+  /**
+   * @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.
+   */
+  WindowRedrawRequestSignalType& WindowRedrawRequestSignal();
+
 protected:
 
   // Undefined
@@ -405,19 +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;
+  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