[Tizen] Revert "Moved some signals such as KeyEventGenerated to SceneHolder from... 99/214399/1
authordongsug.song <dongsug.song@samsung.com>
Sat, 21 Sep 2019 08:17:17 +0000 (17:17 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Sat, 21 Sep 2019 09:02:34 +0000 (18:02 +0900)
- TV CSFS crash issue, revert to resolve release blocking issue.

This reverts commit 39a7a59f0c7b12bf15cd11d093a392ce700dadca.

Change-Id: I70c7c7869d391b562a51b60942b9575fa983ca6e

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

index 9d93348..238aee5 100644 (file)
@@ -55,6 +55,11 @@ KeyEventSignalType& KeyEventSignal( Window window )
   return GetImplementation( window ).KeyEventSignal();
 }
 
+KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window )
+{
+  return GetImplementation( window ).KeyEventGeneratedSignal();
+}
+
 TouchSignalType& TouchSignal( Window window )
 {
   return GetImplementation( window ).TouchSignal();
index ca90c51..07756ad 100644 (file)
@@ -35,6 +35,8 @@ typedef Signal< void () > EventProcessingFinishedSignalType;       ///< Event Pr
 
 typedef Signal< void (const KeyEvent&) > KeyEventSignalType;       ///< Key event signal type
 
+typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType;       ///< Key event generated signal type
+
 typedef Signal< void (const TouchData&) > TouchSignalType;         ///< Touch signal type
 
 typedef Signal< void (const WheelEvent&) > WheelEventSignalType;   ///< Touched signal type
@@ -84,6 +86,18 @@ DALI_ADAPTOR_API EventProcessingFinishedSignalType& EventProcessingFinishedSigna
 DALI_ADAPTOR_API KeyEventSignalType& KeyEventSignal( Window window );
 
 /**
+ * @brief This signal is emitted when key event is received.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ *   bool YourCallbackName(const KeyEvent& event);
+ * @endcode
+ * @param[in] window The window instance
+ * @return The signal to connect to
+ */
+DALI_ADAPTOR_API KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window );
+
+/**
  * @brief This signal is emitted when the screen is touched and when the touch ends
  * (i.e. the down & up touch events only).
  *
index eb0f6f0..cb19fa0 100755 (executable)
@@ -52,8 +52,6 @@ namespace Integration
 class SceneHolder;
 }
 
-using SceneHolderList = std::vector<Dali::Integration::SceneHolder>;
-
 
 namespace Internal
 {
@@ -127,7 +125,7 @@ class DALI_ADAPTOR_API Adaptor
 public:
 
   typedef Signal< void (Adaptor&) > AdaptorSignalType; ///< Generic Type for adaptor signals
-  typedef Signal< void (Dali::Integration::SceneHolder&) > WindowCreatedSignalType;  ///< SceneHolder created signal type
+  typedef Signal< void (Window&) > WindowCreatedSignalType;  ///< Window created signal type
 
   using SurfaceSize = Uint16Pair; ///< Surface size type
 
@@ -471,12 +469,6 @@ public:
   Dali::WindowContainer GetWindows() const;
 
   /**
-   * @brief Get the list of scene holders.
-   * @return The list of scene holers
-   */
-  SceneHolderList GetSceneHolders() const;
-
-  /**
    * @brief Called when the window becomes fully or partially visible.
    */
   void OnWindowShown();
@@ -504,7 +496,7 @@ public:  // Signals
   AdaptorSignalType& LanguageChangedSignal();
 
   /**
-   * @brief This signal is emitted when a new window (scene holder) is created
+   * @brief This signal is emitted when a new window is created
    *
    * @return The signal to connect to
    */
index 2e44aa2..c08c11d 100644 (file)
@@ -172,26 +172,6 @@ public:
    */
   static Dali::Integration::SceneHolder Get( Dali::Actor actor );
 
-  /**
-   * @copydoc Dali::Integration::SceneHolder::KeyEventSignal()
-   */
-  Dali::Integration::SceneHolder::KeyEventSignalType& KeyEventSignal() { return mScene.KeyEventSignal(); }
-
-  /**
-   * @copydoc Dali::Integration::SceneHolder::KeyEventGeneratedSignal()
-   */
-  Dali::Integration::SceneHolder::KeyEventGeneratedSignalType& KeyEventGeneratedSignal() { return mScene.KeyEventGeneratedSignal(); }
-
-  /**
-   * @copydoc Dali::Integration::SceneHolder::TouchSignal()
-   */
-  Dali::Integration::SceneHolder::TouchSignalType& TouchSignal() { return mScene.TouchSignal(); }
-
-  /**
-   * @copydoc Dali::Integration::SceneHolder::WheelEventSignal()
-   */
-  Dali::Integration::SceneHolder::WheelEventSignalType& WheelEventSignal() { return mScene.WheelEventSignal(); }
-
 public: // The following methods can be overridden if required
 
   /**
index 7a232b9..8f456d9 100644 (file)
@@ -111,26 +111,6 @@ SceneHolder SceneHolder::Get( Actor actor )
   return Internal::Adaptor::SceneHolder::Get( actor );
 }
 
-SceneHolder::KeyEventSignalType& SceneHolder::KeyEventSignal()
-{
-  return GetImplementation(*this).KeyEventSignal();
-}
-
-SceneHolder::KeyEventGeneratedSignalType& SceneHolder::KeyEventGeneratedSignal()
-{
-  return GetImplementation(*this).KeyEventGeneratedSignal();
-}
-
-SceneHolder::TouchSignalType& SceneHolder::TouchSignal()
-{
-  return GetImplementation(*this).TouchSignal();
-}
-
-SceneHolder::WheelEventSignalType& SceneHolder::WheelEventSignal()
-{
-  return GetImplementation(*this).WheelEventSignal();
-}
-
 }// Integration
 
 } // Dali
index 905ed6b..4881d22 100644 (file)
@@ -22,7 +22,6 @@
 #include <dali/public-api/dali-adaptor-common.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/math/vector4.h>
-#include <dali/public-api/signals/dali-signal.h>
 
 namespace Dali
 {
@@ -30,7 +29,6 @@ namespace Dali
 class Actor;
 class Layer;
 class Any;
-class TouchData;
 struct TouchPoint;
 struct WheelEvent;
 struct KeyEvent;
@@ -57,14 +55,6 @@ class DALI_ADAPTOR_API SceneHolder : public BaseHandle
 {
 public:
 
-  typedef Signal< void (const Dali::KeyEvent&) > KeyEventSignalType;          ///< Key event signal type
-
-  typedef Signal< bool (const Dali::KeyEvent&) > KeyEventGeneratedSignalType; ///< Key event generated signal type
-
-  typedef Signal< void (const Dali::TouchData&) > TouchSignalType;            ///< Touch signal type
-
-  typedef Signal< void (const Dali::WheelEvent&) > WheelEventSignalType;      ///< Touched signal type
-
   /**
    * @brief Create an uninitialized SceneHolder handle.
    */
@@ -168,55 +158,6 @@ public:
    */
   static SceneHolder Get( Actor actor );
 
-  /**
-   * @brief This signal is emitted when key event is received.
-   *
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallbackName(const KeyEvent& event);
-   * @endcode
-   * @return The signal to connect to
-   */
-  KeyEventSignalType& KeyEventSignal();
-
-  /**
-   * @brief This signal is emitted when key event is received.
-   *
-   * A callback of the following type may be connected:
-   * @code
-   *   bool YourCallbackName(const KeyEvent& event);
-   * @endcode
-   * @return The signal to connect to
-   */
-  KeyEventGeneratedSignalType& KeyEventGeneratedSignal();
-
-  /**
-   * @brief This signal is emitted when the screen is touched and when the touch ends
-   * (i.e. the down & up touch events only).
-   *
-   * If there are multiple touch points, then this will be emitted when the first touch occurs and
-   * then when the last finger is lifted.
-   * An interrupted event will also be emitted (if it occurs).
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallbackName( TouchData event );
-   * @endcode
-   * @return The touch signal to connect to
-   * @note Motion events are not emitted.
-   */
-  TouchSignalType& TouchSignal();
-
-  /**
-   * @brief This signal is emitted when wheel event is received.
-   *
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallbackName(const WheelEvent& event);
-   * @endcode
-   * @return The signal to connect to
-   */
-  WheelEventSignalType& WheelEventSignal();
-
 public: // Not intended for application developers
 
   /**
index c9eeb03..addc893 100755 (executable)
@@ -189,9 +189,11 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration:
 
   defaultWindow->SetAdaptor( Get() );
 
-  Dali::Integration::SceneHolder defaultSceneHolder( defaultWindow );
-
-  mWindowCreatedSignal.Emit( defaultSceneHolder );
+  Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( defaultWindow ) );
+  if ( window )
+  {
+    mWindowCreatedSignal.Emit( window );
+  }
 
   const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval();
   if( 0u < timeInterval )
@@ -670,7 +672,11 @@ bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::
   // Add the new Window to the container - the order is not important
   mWindows.push_back( &windowImpl );
 
-  mWindowCreatedSignal.Emit( childWindow );
+  Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( &windowImpl ) );
+  if ( window )
+  {
+    mWindowCreatedSignal.Emit( window );
+  }
 
   return true;
 }
@@ -1141,18 +1147,6 @@ Dali::WindowContainer Adaptor::GetWindows() const
   return windows;
 }
 
-Dali::SceneHolderList Adaptor::GetSceneHolders() const
-{
-  Dali::SceneHolderList sceneHolderList;
-
-  for( auto iter = mWindows.begin(); iter != mWindows.end(); ++iter )
-  {
-    sceneHolderList.push_back( Dali::Integration::SceneHolder( *iter ) );
-  }
-
-  return sceneHolderList;
-}
-
 Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions)
 : mResizedSignal(),
   mLanguageChangedSignal(),
index 1f65fb1..b6f41af 100755 (executable)
@@ -320,11 +320,6 @@ public: // AdaptorInternalServices implementation
    */
   Dali::WindowContainer GetWindows() const;
 
-  /**
-   * @copydoc Dali::Adaptor::GetSceneHolders()
-   */
-  Dali::SceneHolderList GetSceneHolders() const;
-
 public:
 
   /**
@@ -662,7 +657,7 @@ private: // Data
 
   AdaptorSignalType                     mResizedSignal;               ///< Resized signal.
   AdaptorSignalType                     mLanguageChangedSignal;       ///< Language changed signal.
-  WindowCreatedSignalType               mWindowCreatedSignal;    ///< Window created signal.
+  WindowCreatedSignalType               mWindowCreatedSignal;         ///< Window created signal.
 
   Dali::Adaptor&                        mAdaptor;                     ///< Reference to public adaptor instance.
   State                                 mState;                       ///< Current state of the adaptor
index 59230bc..bde2864 100755 (executable)
@@ -260,11 +260,6 @@ Dali::WindowContainer Adaptor::GetWindows() const
   return mImpl->GetWindows();
 }
 
-SceneHolderList Adaptor::GetSceneHolders() const
-{
-  return mImpl->GetSceneHolders();
-}
-
 void Adaptor::OnWindowShown()
 {
   mImpl->OnWindowShown();
index bebb11b..3418a7c 100644 (file)
@@ -484,6 +484,26 @@ public: // Signals
    */
   Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal() { return mScene.EventProcessingFinishedSignal(); }
 
+  /**
+   * @copydoc Dali::Window::KeyEventSignal()
+   */
+  Dali::DevelWindow::KeyEventSignalType& KeyEventSignal() { return mScene.KeyEventSignal(); }
+
+  /**
+   * @copydoc Dali::Window::KeyEventGeneratedSignal()
+   */
+  Dali::DevelWindow::KeyEventGeneratedSignalType& KeyEventGeneratedSignal() { return mScene.KeyEventGeneratedSignal(); }
+
+  /**
+    * @copydoc Dali::Window::TouchSignal()
+    */
+  Dali::DevelWindow::TouchSignalType& TouchSignal() { return mScene.TouchSignal(); }
+
+  /**
+   * @copydoc Dali::Window::WheelEventSignal()
+   */
+  Dali::DevelWindow::WheelEventSignalType& WheelEventSignal() { return mScene.WheelEventSignal(); }
+
 private:
 
   WindowRenderSurface*                  mWindowSurface;      ///< The window rendering surface