{
}
+ ~AdaptorAccessible() override
+ {
+ if(mRoot)
+ {
+ if(auto bridge = Accessibility::Bridge::GetCurrentBridge())
+ {
+ bridge->RemoveTopLevelWindow(this);
+ }
+ }
+ }
+
bool GrabFocus() override
{
return false;
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
}
}
-int Dali::AtspiAccessibility::SetForcefully(bool turnOn)
-{
- if(turnOn)
- {
- if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
- {
- bridge->Initialize();
- auto ret = bridge->ForceUp();
- return (int)ret;
- }
- }
- else
- {
- if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
- {
- bridge->ForceDown();
- return 0;
- }
- }
- return -1;
-}
-
-int Dali::AtspiAccessibility::GetStatus()
-{
- //0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF), 2 (ATSPI OFF, ScreenReader ON), 3(ATSPI ON, ScreenReader ON)
- if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
- {
- if(bridge->GetScreenReaderEnabled())
- {
- if(bridge->IsEnabled())
- {
- return 3;
- }
- else
- {
- return 2;
- }
- }
- else
- {
- if(bridge->IsEnabled())
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
- }
- return -1;
-}
-
bool Dali::AtspiAccessibility::IsEnabled()
{
return Dali::Accessibility::IsUp();
#ifndef DALI_DEVEL_ATSPI_ACCESSIBILITY_H
#define DALI_DEVEL_ATSPI_ACCESSIBILITY_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
*/
DALI_ADAPTOR_API bool SuppressScreenReader(bool suppress);
-/**
- * @brief Sets ATSPI to be turned On or Off forcibly.
- *
- * @param[in] turnOn true to turn on, false to turn off.
- * @return The status of ATSPI : 0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF),
- * 2 (ATSPI OFF, ScreenReader ON), 3(ATSPI ON, ScreenReader ON)
- */
-DALI_ADAPTOR_API int SetForcefully(bool turnOn);
-
-/**
- * @brief Gets ATSPI status.
- * @return Status of ATSPI : 0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF),
- * 2 (ATSPI OFF, ScreenReader ON), 3(ATSPI ON, ScreenReader ON)
- */
-DALI_ADAPTOR_API int GetStatus();
-
/**
* @brief Returns whether the state of Accessibility is enabled or not.
*
DALI_KEY_CONTROL_RIGHT = 105,
/**
- * @brief Control Return key.
+ * @brief Return key.
*/
- DALI_KEY_RETURN = 36
+ DALI_KEY_RETURN = 36,
+ /**
+ * @brief Keypad Enter key.
+ */
+ DALI_KEY_KP_ENTER = 104
};
/**
return GetImplementation(window).IsAlwaysOnTop();
}
+void SetBottom(Window window, bool enable)
+{
+ GetImplementation(window).SetBottom(enable);
+}
+
+bool IsBottom(Window window)
+{
+ return GetImplementation(window).IsBottom();
+}
+
Any GetNativeBuffer(Window window)
{
return GetImplementation(window).GetNativeBuffer();
/**
* @brief Enables or disables the window always is on top.
*
+ * This is valid between windows that have no notification level or a notification level of 'none'.
+ * If it has a notification level, this will not do anything.
+ *
* @param[in] window The window instance.
* @param[in] alwaysOnTop true to enable the window always is on top, false to disable.
*/
*/
DALI_ADAPTOR_API bool IsAlwaysOnTop(Window window);
+/**
+ * @brief Enables or disables the window's layer is changed to bottom.
+ *
+ * If the enable flag is true, this window will be placed below other windows.
+ * Otherwise, if it's called with a false value, it will be located above other windows.
+ *
+ * @param[in] window The window instance.
+ * @param[in] enable true to change the window layer to the bottom.
+ */
+DALI_ADAPTOR_API void SetBottom(Window window, bool enable);
+
+/**
+ * @brief Returns whether the window layer is the bottom or not.
+ *
+ * @param[in] window The window instance.
+ * @return True if the window layer is the bottom, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsBottom(Window window);
+
/**
* @brief Gets the native buffer of the window.
*
BridgeBase::~BridgeBase()
{
- mApplication.mChildren.clear();
}
void BridgeBase::AddCoalescableMessage(CoalescableMessages kind, Dali::Accessibility::Accessible* obj, float delay, std::function<void()> functor)
if(mApplication.mChildren[i] == windowAccessible)
{
mApplication.mChildren.erase(mApplication.mChildren.begin() + i);
+ Emit(windowAccessible, WindowEvent::DESTROY);
break;
}
}
if (aspectOfImageSize > aspectOfDesiredSize)
{
adjustedDesiredWidth = requestedWidth;
- adjustedDesiredHeight = static_cast<uint64_t>(bitmapHeight) * requestedWidth / bitmapWidth;
+ adjustedDesiredHeight = (static_cast<uint64_t>(bitmapHeight) * requestedWidth + bitmapWidth / 2) / bitmapWidth; ///< round up
}
else
{
- adjustedDesiredWidth = static_cast<uint64_t>(bitmapWidth) * requestedHeight / bitmapHeight;
+ adjustedDesiredWidth = (static_cast<uint64_t>(bitmapWidth) * requestedHeight + bitmapHeight / 2) / bitmapHeight; ///< round up
adjustedDesiredHeight = requestedHeight;
}
return false;
}
+void WindowBaseAndroid::SetBottom(bool enable)
+{
+}
+
+bool WindowBaseAndroid::IsBottom()
+{
+ return false;
+}
+
Any WindowBaseAndroid::GetNativeBuffer() const
{
return 0;
*/
bool IsAlwaysOnTop() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
+ */
+ void SetBottom(bool enable) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+ */
+ bool IsBottom() override;
+
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
*/
/**
* @brief Enables or disables the window always is on top.
*
+ * This is valid between windows that have no notification level or a notification level of 'none'.
+ * If it has a notification level, this will not do anything.
+ *
* @param[in] alwaysOnTop true to enable the window always is on top, false to disable.
*/
virtual void SetAlwaysOnTop(bool alwaysOnTop) = 0;
*/
virtual bool IsAlwaysOnTop() = 0;
+ /**
+ * @brief Enables or disables the window's layer is changed to bottom.
+ *
+ * If the enable flag is true, this window will be placed below other windows.
+ * Otherwise, if it's called with a false value, it will be located above other windows.
+ *
+ * @param[in] window The window instance.
+ * @param[in] enable true to change the window layer to the bottom.
+ */
+ virtual void SetBottom(bool enable) = 0;
+
+ /**
+ * @brief Returns whether the window layer is the bottom or not.
+ *
+ * @return True if the window layer is the bottom, false otherwise.
+ */
+ virtual bool IsBottom() = 0;
+
/**
* @brief Get native buffer of window.
* @return The native window buffer handle
Window::~Window()
{
- if(mScene)
- {
- auto bridge = Accessibility::Bridge::GetCurrentBridge();
- auto rootLayer = mScene.GetRootLayer();
- auto accessible = Accessibility::Accessible::Get(rootLayer);
- bridge->RemoveTopLevelWindow(accessible);
- // Related to multi-window case. This is called for default window and non-default window, but it is effective for non-default window.
- bridge->Emit(accessible, Accessibility::WindowEvent::DESTROY);
- }
-
if(mAdaptor)
{
mAdaptor->RemoveWindow(this);
void Window::OnAccessibilityDisabled()
{
- auto bridge = Accessibility::Bridge::GetCurrentBridge();
- auto rootLayer = mScene.GetRootLayer();
- auto accessible = Accessibility::Accessible::Get(rootLayer);
-
DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Accessibility is disabled\n", this, mNativeWindowId);
InterceptKeyEventSignal().Disconnect(this, &Window::OnAccessibilityInterceptKeyEvent);
- bridge->RemoveTopLevelWindow(accessible);
}
bool Window::OnAccessibilityInterceptKeyEvent(const Dali::KeyEvent& keyEvent)
return mWindowBase->IsAlwaysOnTop();
}
+void Window::SetBottom(bool enable)
+{
+ mWindowBase->SetBottom(enable);
+}
+
+bool Window::IsBottom()
+{
+ return mWindowBase->IsBottom();
+}
+
Dali::Any Window::GetNativeBuffer() const
{
return mWindowBase->GetNativeBuffer();
*/
bool IsAlwaysOnTop();
+ /**
+ * @copydoc Dali::DevelWindow::SetBottom()
+ */
+ void SetBottom(bool enable);
+
+ /**
+ * @copydoc Dali::DevelWindow::IsBottom()
+ */
+ bool IsBottom();
+
/**
* @copydoc Dali::DevelWindow::GetNativeBuffer()
*/
*/
bool IsAlwaysOnTop() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
+ */
+ void SetBottom(bool enable) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+ */
+ bool IsBottom() override;
+
/**
* @brief Sets front buffer rendering to the window.
* @param[in] enable True to enable front buffer rendering mode, False to otherwise.
return false;
}
+void WindowBaseCocoa::SetBottom(bool enable)
+{
+}
+
+bool WindowBaseCocoa::IsBottom()
+{
+ return false;
+}
+
Any WindowBaseCocoa::GetNativeBuffer() const
{
return 0;
mOwnSurface(false),
mBrightnessChangeDone(true),
mIsFrontBufferRendering(false),
- mIsIMEWindowInitialized(false)
+ mIsIMEWindowInitialized(false),
+ mBottom(false)
{
Initialize(positionSize, surface, isTransparent);
}
DALI_LOG_RELEASE_INFO("ecore_wl2_window_pin_mode_set, window: [%p], flag [%d]\n", mEcoreWindow, alwaysOnTop);
START_DURATION_CHECK();
ecore_wl2_window_pin_mode_set(mEcoreWindow, alwaysOnTop);
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
FINISH_DURATION_CHECK("ecore_wl2_window_pin_mode_set");
}
return ret;
}
+void WindowBaseEcoreWl2::SetBottom(bool enable)
+{
+ START_DURATION_CHECK();
+ mBottom = enable;
+ if(mBottom)
+ {
+ DALI_LOG_RELEASE_INFO("ecore_wl2_window_stack_mode_set, window: [%p], flag[%d] ECORE_WL2_WINDOW_STACK_BELOW\n", mEcoreWindow, mBottom);
+ ecore_wl2_window_stack_mode_set(mEcoreWindow, ECORE_WL2_WINDOW_STACK_BELOW);
+ }
+ else
+ {
+ DALI_LOG_RELEASE_INFO("ecore_wl2_window_stack_mode_set, window: [%p], flag[%d] ECORE_WL2_WINDOW_STACK_NONE\n", mEcoreWindow, mBottom);
+ ecore_wl2_window_stack_mode_set(mEcoreWindow, ECORE_WL2_WINDOW_STACK_NONE);
+ }
+ ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
+ FINISH_DURATION_CHECK("ecore_wl2_window_stack_mode_set");
+}
+
+bool WindowBaseEcoreWl2::IsBottom()
+{
+ return mBottom;
+}
+
Any WindowBaseEcoreWl2::GetNativeBuffer() const
{
DALI_LOG_RELEASE_INFO("Get wl_egl_window, ecore_window: [%p], wl_egl_window [%p]\n", mEcoreWindow, mEglWindow);
*/
bool IsAlwaysOnTop() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
+ */
+ void SetBottom(bool enable) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+ */
+ bool IsBottom() override;
+
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
*/
bool mBrightnessChangeDone;
bool mIsFrontBufferRendering;
bool mIsIMEWindowInitialized;
+ bool mBottom;
};
} // namespace Adaptor
return false;
}
+void WindowBaseEcoreX::SetBottom(bool enable)
+{
+}
+
+bool WindowBaseEcoreX::IsBottom()
+{
+ return false;
+}
+
Any WindowBaseEcoreX::GetNativeBuffer() const
{
return 0;
*/
bool IsAlwaysOnTop() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
+ */
+ void SetBottom(bool enable) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+ */
+ bool IsBottom() override;
+
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
*/
return false;
}
+void WindowBaseWin::SetBottom(bool enable)
+{
+}
+
+bool WindowBaseWin::IsBottom()
+{
+ return false;
+}
+
Any WindowBaseWin::GetNativeBuffer() const
{
return 0;
*/
bool IsAlwaysOnTop() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
+ */
+ void SetBottom(bool enable) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+ */
+ bool IsBottom() override;
+
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
*/
return false;
}
+void WindowBaseX::SetBottom(bool enable)
+{
+}
+
+bool WindowBaseX::IsBottom()
+{
+ return false;
+}
+
Any WindowBaseX::GetNativeBuffer()
{
return 0;
*/
bool IsAlwaysOnTop() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
+ */
+ void SetBottom(bool enable) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+ */
+ bool IsBottom() override;
+
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
*/