X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Fwindow-devel.cpp;h=b41149acb1e697ec93c7825ce44071b447a1481c;hb=HEAD;hp=9f87ce73f2db7d2be9b1b3e6e77521d524b9b21a;hpb=771a123ed33e00284acbcd64d0cf497789af0272;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index 9f87ce7..cb0644e 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -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,6 +105,36 @@ 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); @@ -121,11 +155,6 @@ Window GetParent(Window window) return GetImplementation(window).GetParent(); } -Window DownCast(BaseHandle handle) -{ - return Window(dynamic_cast(handle.GetObjectPtr())); -} - WindowOrientation GetCurrentOrientation(Window window) { return GetImplementation(window).GetCurrentOrientation(); @@ -176,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& inputRegion) { GetImplementation(window).IncludeInputRegion(inputRegion); @@ -186,6 +220,195 @@ void ExcludeInputRegion(Window window, const Rect& 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(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(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(); +} + +void SetModal(Window window, bool modal) +{ + GetImplementation(window).SetModal(modal); +} + +bool IsModal(Window window) +{ + return GetImplementation(window).IsModal(); +} + +void SetAlwaysOnTop(Window window, bool alwaysOnTop) +{ + GetImplementation(window).SetAlwaysOnTop(alwaysOnTop); +} + +bool IsAlwaysOnTop(Window window) +{ + return GetImplementation(window).IsAlwaysOnTop(); +} + +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