(Window) Moved DownCast from devel-api to public-api 87/283387/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 25 Oct 2022 15:06:43 +0000 (16:06 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 25 Oct 2022 15:06:46 +0000 (16:06 +0100)
This should now allow window to be used in WeakHandle

Change-Id: Ib9fe53ee65ff0e5508a6f37bc68c9ccc626d8bc7

dali/devel-api/adaptor-framework/window-devel.cpp
dali/devel-api/adaptor-framework/window-devel.h
dali/public-api/adaptor-framework/window.cpp
dali/public-api/adaptor-framework/window.h

index df1d3a5..10a1642 100644 (file)
@@ -136,11 +136,6 @@ Window GetParent(Window window)
   return GetImplementation(window).GetParent();
 }
 
-Window DownCast(BaseHandle handle)
-{
-  return Window(dynamic_cast<Dali::Internal::Adaptor::Window*>(handle.GetObjectPtr()));
-}
-
 WindowOrientation GetCurrentOrientation(Window window)
 {
   return GetImplementation(window).GetCurrentOrientation();
index 9b5647a..81cc05c 100644 (file)
@@ -218,14 +218,6 @@ DALI_ADAPTOR_API void Unparent(Window window);
 DALI_ADAPTOR_API Window GetParent(Window window);
 
 /**
- * @brief Downcast sceneHolder to window
- *
- * @param[in] handle The handle need to downcast
- * @return The window cast from SceneHolder
- */
-DALI_ADAPTOR_API Window DownCast(BaseHandle handle);
-
-/**
  * @brief Gets current orientation of the window.
  *
  * @param[in] window The window instance
@@ -548,7 +540,6 @@ DALI_ADAPTOR_API InterceptKeyEventSignalType& InterceptKeyEventSignal(Window win
  */
 DALI_ADAPTOR_API MovedSignalType& MovedSignal(Window window);
 
-
 } // namespace DevelWindow
 
 } // namespace Dali
index e1f2642..741b832 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -83,6 +83,11 @@ Window::Window(Window&& rhs) = default;
 
 Window& Window::operator=(Window&& rhs) = default;
 
+Window Window::DownCast(BaseHandle handle)
+{
+  return Window(dynamic_cast<Dali::Internal::Adaptor::Window*>(handle.GetObjectPtr()));
+}
+
 void Window::Add(Dali::Actor actor)
 {
   GetImplementation(*this).Add(actor);
index 38b9a4b..f646677 100644 (file)
@@ -157,6 +157,15 @@ public:
   Window& operator=(Window&& rhs);
 
   /**
+   * @brief Downcast sceneHolder to window
+   *
+   * @SINCE_2_1.46
+   * @param[in] handle The handle need to downcast
+   * @return Whether it's a valid window or not
+   */
+  static Window DownCast(BaseHandle handle);
+
+  /**
    * @brief Adds a child Actor to the Window.
    *
    * The child will be referenced.