Add Overlay Layer in window
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / window.cpp
index 6895bae..cbeddac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 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.
@@ -48,7 +48,7 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str
 
   if(isNewWindowAllowed)
   {
-    Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
+    Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, WindowType::NORMAL, isTransparent);
 
     Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
 
@@ -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);
@@ -108,6 +113,11 @@ Layer Window::GetRootLayer() const
   return GetImplementation(*this).GetRootLayer();
 }
 
+Layer Window::GetOverlayLayer()
+{
+  return GetImplementation(*this).GetOverlayLayer();
+}
+
 uint32_t Window::GetLayerCount() const
 {
   return GetImplementation(*this).GetLayerCount();
@@ -158,7 +168,7 @@ void Window::SetPreferredOrientation(WindowOrientation orientation)
   GetImplementation(*this).SetPreferredOrientation(orientation);
 }
 
-Dali::Window::WindowOrientation Window::GetPreferredOrientation()
+WindowOrientation Window::GetPreferredOrientation()
 {
   return GetImplementation(*this).GetPreferredOrientation();
 }
@@ -238,22 +248,22 @@ void Window::SetInputRegion(const Rect<int>& inputRegion)
   return GetImplementation(*this).SetInputRegion(inputRegion);
 }
 
-void Window::SetType(Window::Type type)
+void Window::SetType(WindowType type)
 {
   GetImplementation(*this).SetType(type);
 }
 
-Window::Type Window::GetType() const
+WindowType Window::GetType() const
 {
   return GetImplementation(*this).GetType();
 }
 
-bool Window::SetNotificationLevel(Window::NotificationLevel::Type level)
+WindowOperationResult Window::SetNotificationLevel(WindowNotificationLevel level)
 {
   return GetImplementation(*this).SetNotificationLevel(level);
 }
 
-Window::NotificationLevel::Type Window::GetNotificationLevel() const
+WindowNotificationLevel Window::GetNotificationLevel() const
 {
   return GetImplementation(*this).GetNotificationLevel();
 }
@@ -268,17 +278,17 @@ bool Window::IsOpaqueState() const
   return GetImplementation(*this).IsOpaqueState();
 }
 
-bool Window::SetScreenOffMode(Window::ScreenOffMode::Type screenMode)
+WindowOperationResult Window::SetScreenOffMode(WindowScreenOffMode screenMode)
 {
   return GetImplementation(*this).SetScreenOffMode(screenMode);
 }
 
-Window::ScreenOffMode::Type Window::GetScreenOffMode() const
+WindowScreenOffMode Window::GetScreenOffMode() const
 {
   return GetImplementation(*this).GetScreenOffMode();
 }
 
-bool Window::SetBrightness(int brightness)
+WindowOperationResult Window::SetBrightness(int brightness)
 {
   return GetImplementation(*this).SetBrightness(brightness);
 }
@@ -303,12 +313,12 @@ Window::WindowSize Window::GetSize() const
   return GetImplementation(*this).GetSize();
 }
 
-void Window::SetPosition(Window::WindowPosition position)
+void Window::SetPosition(Dali::Window::WindowPosition position)
 {
   GetImplementation(*this).SetPosition(position);
 }
 
-Window::WindowPosition Window::GetPosition() const
+Dali::Window::WindowPosition Window::GetPosition() const
 {
   return GetImplementation(*this).GetPosition();
 }