(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 df1d3a57dabc31f9c4450dcfbd109085824ac1c2..10a16421dd3182fd9f939bcf78bc6ee0aaba5c74 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 9b5647a9815cbd747d7d7a9d9c1bd20e63165079..81cc05c709c169bb23e512194994ed966d7508a2 100644 (file)
@@ -217,14 +217,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.
  *
@@ -548,7 +540,6 @@ DALI_ADAPTOR_API InterceptKeyEventSignalType& InterceptKeyEventSignal(Window win
  */
 DALI_ADAPTOR_API MovedSignalType& MovedSignal(Window window);
 
-
 } // namespace DevelWindow
 
 } // namespace Dali
index e1f2642420a1245d4f00f8f4136d8d1613d7e5a3..741b832ee3760a91714c45e3621aa9cb37f1e511 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 38b9a4bdf948f148a60fd1785650be0f440f3762..f646677b0217221821f5e98fa7ee3add8df93d1e 100644 (file)
@@ -156,6 +156,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.
    *