Revert "[Tizen] Add methods to Window"
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 2 Jun 2022 07:27:43 +0000 (16:27 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 2 Jun 2022 07:27:49 +0000 (16:27 +0900)
This reverts commit 995e80751daf6095cd402f2919bf5916fc0c5c54.

dali/devel-api/adaptor-framework/window-devel.cpp
dali/devel-api/adaptor-framework/window-devel.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h

index ff7c519..0713159 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -249,16 +249,6 @@ bool IsWindowRotating(Window window)
   return GetImplementation(window).IsWindowRotating();
 }
 
-const KeyEvent& GetLastKeyEvent(Window window)
-{
-  return GetImplementation(window).GetLastKeyEvent();
-}
-
-const TouchEvent& GetLastTouchEvent(Window window)
-{
-  return GetImplementation(window).GetLastTouchEvent();
-}
-
 } // namespace DevelWindow
 
 } // namespace Dali
index 5908132..459c289 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_WINDOW_DEVEL_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -36,6 +36,7 @@ struct TouchPoint;
 
 namespace DevelWindow
 {
+
 typedef Signal<void()> EventProcessingFinishedSignalType; ///< Event Processing finished signal type
 
 typedef Signal<void(const KeyEvent&)> KeyEventSignalType; ///< Key event signal type
@@ -487,22 +488,6 @@ DALI_ADAPTOR_API bool IsMinimized(Window window);
  */
 DALI_ADAPTOR_API bool IsWindowRotating(Window window);
 
-/**
- * @brief Gets the last key event the window gets.
- *
- * @param[in] window The window instance.
- * @return The last key event the window gets.
- */
-DALI_ADAPTOR_API const KeyEvent& GetLastKeyEvent(Window window);
-
-/**
- * @brief Gets the last touch event the window gets.
- *
- * @param[in] window The window instance.
- * @return The last touch event the window gets.
- */
-DALI_ADAPTOR_API const TouchEvent& GetLastTouchEvent(Window window);
-
 } // namespace DevelWindow
 
 } // namespace Dali
index 9cf83c9..2f1bd12 100644 (file)
 
 // EXTERNAL HEADERS
 #include <dali/devel-api/adaptor-framework/orientation.h>
-#include <dali/devel-api/events/key-event-devel.h>
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/actors/layer.h>
@@ -78,28 +76,26 @@ Window* Window::New(Any surface, const PositionSize& positionSize, const std::st
 Window::Window()
 : mWindowSurface(nullptr),
   mWindowBase(),
+  mIsTransparent(false),
+  mIsFocusAcceptable(true),
+  mIconified(false),
+  mOpaqueState(false),
+  mWindowRotationAcknowledgement(false),
+  mFocused(false),
   mParentWindow(NULL),
   mPreferredAngle(static_cast<int>(WindowOrientation::NO_ORIENTATION_PREFERENCE)),
   mRotationAngle(0),
   mWindowWidth(0),
   mWindowHeight(0),
-  mNativeWindowId(-1),
   mOrientationMode(Internal::Adaptor::Window::OrientationMode::PORTRAIT),
+  mNativeWindowId(-1),
   mDeleteRequestSignal(),
   mFocusChangeSignal(),
   mResizeSignal(),
   mVisibilityChangedSignal(),
   mTransitionEffectEventSignal(),
   mKeyboardRepeatSettingsChangedSignal(),
-  mAuxiliaryMessageSignal(),
-  mLastKeyEevent(),
-  mLastTouchEevent(),
-  mIsTransparent(false),
-  mIsFocusAcceptable(true),
-  mIconified(false),
-  mOpaqueState(false),
-  mWindowRotationAcknowledgement(false),
-  mFocused(false)
+  mAuxiliaryMessageSignal()
 {
 }
 
@@ -891,7 +887,6 @@ void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize)
 
 void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp)
 {
-  mLastTouchEevent = Dali::Integration::NewTouchEvent(timeStamp, point);
   FeedTouchPoint(point, timeStamp);
 }
 
@@ -902,7 +897,6 @@ void Window::OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent)
 
 void Window::OnKeyEvent(Dali::Integration::KeyEvent& keyEvent)
 {
-  mLastKeyEevent = Dali::DevelKeyEvent::New(keyEvent.keyName, keyEvent.logicalKey, keyEvent.keyString, keyEvent.keyCode, keyEvent.keyModifier, keyEvent.time, static_cast<Dali::KeyEvent::State>(keyEvent.state), keyEvent.compose, keyEvent.deviceName, keyEvent.deviceClass, keyEvent.deviceSubclass);
   FeedKeyEvent(keyEvent);
 }
 
@@ -1208,16 +1202,6 @@ bool Window::IsWindowRotating() const
   return mWindowSurface->IsWindowRotating();
 }
 
-const Dali::KeyEvent& Window::GetLastKeyEvent() const
-{
-  return mLastKeyEevent;
-}
-
-const Dali::TouchEvent& Window::GetLastTouchEvent() const
-{
-  return mLastTouchEevent;
-}
-
 } // namespace Adaptor
 
 } // namespace Internal
index d2a9b77..12d1c7f 100644 (file)
@@ -21,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/adaptor-framework/window-enumerations.h>
-#include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/public-api/object/ref-object.h>
@@ -90,7 +89,7 @@ public:
    * @param[in] isTransparent Whether window is transparent
    * @return A newly allocated Window
    */
-  static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
+  static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className,  Dali::WindowType type, bool isTransparent = false);
 
   /**
    * @copydoc Dali::Window::SetClass()
@@ -460,16 +459,6 @@ public: // Dali::Internal::Adaptor::SceneHolder
    */
   bool IsWindowRotating() const;
 
-  /**
-   * @copydoc Dali::DevelWindow::GetLastKeyEvent()
-   */
-  const Dali::KeyEvent& GetLastKeyEvent() const;
-
-  /**
-   * @copydoc Dali::DevelWindow::GetLastTouchEvent()
-   */
-  const Dali::TouchEvent& GetLastTouchEvent() const;
-
 private:
   /**
    * @brief Enumeration for orietation mode.
@@ -723,19 +712,27 @@ private:
   WindowBase*          mWindowBase;
   std::string          mName;
   std::string          mClassName;
+  bool                 mIsTransparent : 1;
+  bool                 mIsFocusAcceptable : 1;
+  bool                 mIconified : 1;
+  bool                 mOpaqueState : 1;
+  bool                 mWindowRotationAcknowledgement : 1;
+  bool                 mFocused : 1;
   Dali::Window         mParentWindow;
 
   OrientationPtr   mOrientation;
   std::vector<int> mAvailableAngles;
   int              mPreferredAngle;
 
-  int mRotationAngle;  ///< The angle of the rotation
-  int mWindowWidth;    ///< The width of the window
-  int mWindowHeight;   ///< The height of the window
-  int mNativeWindowId; ///< The Native Window Id
+  int mRotationAngle;                    ///< The angle of the rotation
+  int mWindowWidth;                      ///< The width of the window
+  int mWindowHeight;                     ///< The height of the window
+
+  EventHandlerPtr mEventHandler;         ///< The window events handler
+
+  OrientationMode mOrientationMode;      ///< The physical screen mode is portrait or landscape
 
-  EventHandlerPtr mEventHandler;    ///< The window events handler
-  OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
+  int mNativeWindowId;                   ///< The Native Window Id
 
   // Signals
   SignalType                              mDeleteRequestSignal;
@@ -746,16 +743,6 @@ private:
   KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
   AuxiliaryMessageSignalType              mAuxiliaryMessageSignal;
   AccessibilityHighlightSignalType        mAccessibilityHighlightSignal;
-
-  Dali::KeyEvent   mLastKeyEevent;
-  Dali::TouchEvent mLastTouchEevent;
-
-  bool mIsTransparent : 1;
-  bool mIsFocusAcceptable : 1;
-  bool mIconified : 1;
-  bool mOpaqueState : 1;
-  bool mWindowRotationAcknowledgement : 1;
-  bool mFocused : 1;
 };
 
 } // namespace Adaptor