[dali_2.3.29] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / window-devel.cpp
index 908a8ae..b41149a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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,11 @@ Window New(Any surface, PositionSize windowPosition, const std::string& name, co
 
   if(isNewWindowAllowed)
   {
-    Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(surface, windowPosition, name, className, WindowType::NORMAL, isTransparent);
+    WindowData windowData;
+    windowData.SetPositionSize(windowPosition);
+    windowData.SetTransparency(isTransparent);
+    windowData.SetWindowType(WindowType::NORMAL);
+    Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(surface, name, className, windowData);
 
     Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
     if(isAdaptorAvailable)
@@ -101,11 +105,46 @@ KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal(Win
   return GetImplementation(window).KeyboardRepeatSettingsChangedSignal();
 }
 
+AuxiliaryMessageSignalType& AuxiliaryMessageSignal(Window window)
+{
+  return GetImplementation(window).AuxiliaryMessageSignal();
+}
+
+AccessibilityHighlightSignalType& AccessibilityHighlightSignal(Window window)
+{
+  return GetImplementation(window).AccessibilityHighlightSignal();
+}
+
+MovedSignalType& MovedSignal(Window window)
+{
+  return GetImplementation(window).MovedSignal();
+}
+
+OrientationChangedSignalType& OrientationChangedSignal(Window window)
+{
+  return GetImplementation(window).OrientationChangedSignal();
+}
+
+MoveCompletedSignalType& MoveCompletedSignal(Window window)
+{
+  return GetImplementation(window).MoveCompletedSignal();
+}
+
+ResizeCompletedSignalType& ResizeCompletedSignal(Window window)
+{
+  return GetImplementation(window).ResizeCompletedSignal();
+}
+
 void SetParent(Window window, Window parent)
 {
   GetImplementation(window).SetParent(parent);
 }
 
+void SetParent(Window window, Window parent, bool belowParent)
+{
+  GetImplementation(window).SetParent(parent, belowParent);
+}
+
 void Unparent(Window window)
 {
   GetImplementation(window).Unparent();
@@ -116,11 +155,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();
@@ -171,6 +205,11 @@ void EnableFloatingMode(Window window, bool enable)
   GetImplementation(window).EnableFloatingMode(enable);
 }
 
+bool IsFloatingModeEnabled(Window window)
+{
+  return GetImplementation(window).IsFloatingModeEnabled();
+}
+
 void IncludeInputRegion(Window window, const Rect<int>& inputRegion)
 {
   GetImplementation(window).IncludeInputRegion(inputRegion);
@@ -181,6 +220,175 @@ void ExcludeInputRegion(Window window, const Rect<int>& inputRegion)
   GetImplementation(window).ExcludeInputRegion(inputRegion);
 }
 
+void SetNeedsRotationCompletedAcknowledgement(Window window, bool needAcknowledgement)
+{
+  GetImplementation(window).SetNeedsRotationCompletedAcknowledgement(needAcknowledgement);
+}
+
+void SendRotationCompletedAcknowledgement(Window window)
+{
+  GetImplementation(window).SendRotationCompletedAcknowledgement();
+}
+
+void FeedTouchPoint(Window window, const Dali::TouchPoint& point, int32_t timeStamp)
+{
+  Integration::Point convertedPoint(point);
+  GetImplementation(window).FeedTouchPoint(convertedPoint, timeStamp);
+}
+
+void FeedWheelEvent(Window window, const Dali::WheelEvent& wheelEvent)
+{
+  Integration::WheelEvent convertedEvent(static_cast<Integration::WheelEvent::Type>(wheelEvent.GetType()), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime());
+  GetImplementation(window).FeedWheelEvent(convertedEvent);
+}
+
+void FeedKeyEvent(Window window, const Dali::KeyEvent& keyEvent)
+{
+  Integration::KeyEvent convertedEvent(keyEvent.GetKeyName(), keyEvent.GetLogicalKey(), keyEvent.GetKeyString(), keyEvent.GetKeyCode(), keyEvent.GetKeyModifier(), keyEvent.GetTime(), static_cast<Integration::KeyEvent::State>(keyEvent.GetState()), keyEvent.GetCompose(), keyEvent.GetDeviceName(), keyEvent.GetDeviceClass(), keyEvent.GetDeviceSubclass());
+  GetImplementation(window).FeedKeyEvent(convertedEvent);
+}
+
+void FeedHoverEvent(Window window, const Dali::TouchPoint& point)
+{
+  Integration::Point convertedPoint(point);
+  GetImplementation(window).FeedHoverEvent(convertedPoint);
+}
+
+void Maximize(Window window, bool maximize)
+{
+  GetImplementation(window).Maximize(maximize);
+}
+
+bool IsMaximized(Window window)
+{
+  return GetImplementation(window).IsMaximized();
+}
+
+void SetMaximumSize(Window window, Dali::Window::WindowSize size)
+{
+  GetImplementation(window).SetMaximumSize(size);
+}
+
+void Minimize(Window window, bool miniimize)
+{
+  GetImplementation(window).Minimize(miniimize);
+}
+
+bool IsMinimized(Window window)
+{
+  return GetImplementation(window).IsMinimized();
+}
+
+void SetMimimumSize(Window window, Dali::Window::WindowSize size)
+{
+  GetImplementation(window).SetMimimumSize(size);
+}
+
+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();
+}
+
+const HoverEvent& GetLastHoverEvent(Window window)
+{
+  return GetImplementation(window).GetLastHoverEvent();
+}
+
+bool PointerConstraintsLock(Window window)
+{
+  return GetImplementation(window).PointerConstraintsLock();
+}
+
+bool PointerConstraintsUnlock(Window window)
+{
+  return GetImplementation(window).PointerConstraintsUnlock();
+}
+
+void LockedPointerRegionSet(Window window, int32_t x, int32_t y, int32_t width, int32_t height)
+{
+  GetImplementation(window).LockedPointerRegionSet(x, y, width, height);
+}
+
+void LockedPointerCursorPositionHintSet(Window window, int32_t x, int32_t y)
+{
+  GetImplementation(window).LockedPointerCursorPositionHintSet(x, y);
+}
+
+bool PointerWarp(Window window, int32_t x, int32_t y)
+{
+  return GetImplementation(window).PointerWarp(x, y);
+}
+
+void CursorVisibleSet(Window window, bool visible)
+{
+  GetImplementation(window).CursorVisibleSet(visible);
+}
+
+bool KeyboardGrab(Window window, Device::Subclass::Type deviceSubclass)
+{
+  return GetImplementation(window).KeyboardGrab(deviceSubclass);
+}
+
+bool KeyboardUnGrab(Window window)
+{
+  return GetImplementation(window).KeyboardUnGrab();
+}
+
+void SetFullScreen(Window window, bool fullscreen)
+{
+  GetImplementation(window).SetFullScreen(fullscreen);
+}
+
+bool GetFullScreen(Window window)
+{
+  return GetImplementation(window).GetFullScreen();
+}
+
+void SetFrontBufferRendering(Window window, bool enable)
+{
+  GetImplementation(window).SetFrontBufferRendering(enable);
+}
+
+bool GetFrontBufferRendering(Window window)
+{
+  return GetImplementation(window).GetFrontBufferRendering();
+}
+
+InterceptKeyEventSignalType& InterceptKeyEventSignal(Window window)
+{
+  return GetImplementation(window).InterceptKeyEventSignal();
+}
+
+MouseInOutEventSignalType& MouseInOutEventSignal(Window window)
+{
+  return GetImplementation(window).MouseInOutEventSignal();
+}
+
+InsetsChangedSignalType& InsetsChangedSignal(Window window)
+{
+  return GetImplementation(window).InsetsChangedSignal();
+}
+
+MouseRelativeEventSignalType& MouseRelativeEventSignal(Window window)
+{
+  return GetImplementation(window).MouseRelativeEventSignal();
+}
+
+PointerConstraintsSignalType& PointerConstraintsSignal(Window window)
+{
+  return GetImplementation(window).PointerConstraintsSignal();
+}
+
 } // namespace DevelWindow
 
 } // namespace Dali