[Tizen] Change to latest wayland inputmethod protocol
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / tizen-wayland / ecore-wl2 / window-base-ecore-wl2.h
index 338d234..fce358e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_ECORE_WL2_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -24,6 +24,7 @@
 // EXTERNAL HEADERS
 #include <Ecore.h>
 #include <Ecore_Wl2.h>
+#include <input-method-client-protocol.h>
 #include <tizen-extension-client-protocol.h>
 #include <wayland-egl.h>
 #include <xkbcommon/xkbcommon.h>
@@ -168,6 +169,14 @@ public:
    */
   void OnEcoreEventWindowRedrawRequest();
 
+  /**
+   * @brief Called when window's auxiliary is changed then display server send the changed message.
+   *
+   * @param[in] auxiliary's message data. It has key, value and integer list data.
+   */
+  void OnEcoreEventWindowAuxiliaryMessage(void* event);
+
+
 #ifdef DALI_ELDBUS_AVAILABLE
   /**
    * @brief Called when Ecore ElDBus accessibility event is received.
@@ -362,6 +371,11 @@ public:
   void SetType(Dali::WindowType type) override;
 
   /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetType()
+   */
+  Dali::WindowType GetType() const override;
+
+  /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
    */
   Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
@@ -449,7 +463,7 @@ public:
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::SetParent()
    */
-  void SetParent(WindowBase* parentWinBase) override;
+  void SetParent(WindowBase* parentWinBase, bool belowParent) override;
 
   /**
    * @copydoc  Dali::Internal::Adaptor::WindowBase::CreateFrameRenderedSyncFence()
@@ -461,6 +475,51 @@ public:
    */
   int CreateFramePresentedSyncFence() override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetPositionSizeWithAngle()
+   */
+  void SetPositionSizeWithAngle(PositionSize positionSize, int angle) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::InitializeIme()
+   */
+  void InitializeIme() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::ImeWindowReadyToRender()
+   */
+  void ImeWindowReadyToRender() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::RequestMoveToServer()
+   */
+  void RequestMoveToServer() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::RequestResizeToServer()
+   */
+  void RequestResizeToServer(WindowResizeDirection direction) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::EnableFloatingMode()
+   */
+  void EnableFloatingMode(bool enable) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsFloatingModeEnabled()
+   */
+  bool IsFloatingModeEnabled() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IncludeInputRegion()
+   */
+  void IncludeInputRegion(const Rect<int>& inputRegion) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::ExcludeInputRegion()
+   */
+  void ExcludeInputRegion(const Rect<int>& inputRegion) override;
+
 private:
   /**
    * Second stage initialization
@@ -486,11 +545,14 @@ protected:
 
 private:
   typedef std::vector<std::pair<std::string, std::string> > AuxiliaryHints;
+  Dali::Vector<Ecore_Event_Handler*>                        mEcoreEventHandler;
+  Ecore_Wl2_Window*                                         mEcoreWindow;
 
-  Dali::Vector<Ecore_Event_Handler*> mEcoreEventHandler;
+  wl_surface*                 mWlSurface;
+  zwp_input_panel_v1*         mWlInputPanel;
+  wl_output*                  mWlOutput;
+  zwp_input_panel_surface_v1* mWlInputPanelSurface;
 
-  Ecore_Wl2_Window*     mEcoreWindow;
-  wl_surface*           mWlSurface;
   wl_egl_window*        mEglWindow;
   wl_display*           mDisplay;
   wl_event_queue*       mEventQueue;
@@ -499,31 +561,30 @@ private:
   xkb_keymap*           mKeyMap;
 
   std::vector<std::string> mSupportedAuxiliaryHints;
-  AuxiliaryHints           mAuxiliaryHints;
-
-  int      mNotificationLevel;
-  uint32_t mNotificationChangeState;
-  bool     mNotificationLevelChangeDone;
-
-  int      mScreenOffMode;
-  uint32_t mScreenOffModeChangeState;
-  bool     mScreenOffModeChangeDone;
-
-  int      mBrightness;
-  uint32_t mBrightnessChangeState;
-  bool     mBrightnessChangeDone;
 
-  bool               mVisible : 1;
   Dali::PositionSize mWindowPositionSize;
+  AuxiliaryHints     mAuxiliaryHints;
+
+  WindowType mType;
+  int        mNotificationLevel;
+  int        mScreenOffMode;
+  int        mBrightness;
+  int        mWindowRotationAngle;
+  int        mScreenRotationAngle;
+  int        mSupportedPreProtation;
+
+  uint32_t          mNotificationChangeState;
+  uint32_t          mScreenOffModeChangeState;
+  uint32_t          mBrightnessChangeState;
+  uint32_t          mLastSubmittedMoveResizeSerial;
+  volatile uint32_t mMoveResizeSerial;
 
+  bool mNotificationLevelChangeDone;
+  bool mScreenOffModeChangeDone;
+  bool mVisible : 1;
   bool mOwnSurface;
+  bool mBrightnessChangeDone;
 
-  volatile uint32_t mMoveResizeSerial;
-  uint32_t          mLastSubmittedMoveResizeSerial;
-
-  int mWindowRotationAngle;
-  int mScreenRotationAngle;
-  int mSupportedPreProtation;
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection* mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE