{
}
+ ~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.
*
return GetImplementation(window).IsAlwaysOnTop();
}
-void SetToBottom(Window window, bool toBottom)
+void SetBottom(Window window, bool enable)
{
- GetImplementation(window).SetToBottom(toBottom);
+ GetImplementation(window).SetBottom(enable);
}
bool IsBottom(Window window)
/**
* @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.
/**
* @brief Returns whether 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.
* @return True if the window always is on top, false otherwise.
*/
DALI_ADAPTOR_API bool IsAlwaysOnTop(Window window);
/**
- * @brief Enables or disables the window's layer is changed to the bottom.
+ * @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] toBottom true to change the window layer to the bottom.
+ * @param[in] enable true to change the window layer to the bottom.
*/
-DALI_ADAPTOR_API void SetToBottom(Window window, bool toBottom);
+DALI_ADAPTOR_API void SetBottom(Window window, bool enable);
/**
* @brief Returns whether the window layer is the bottom or not.
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;
}
}
return false;
}
-void WindowBaseAndroid::SetToBottom(bool toBottom)
+void WindowBaseAndroid::SetBottom(bool enable)
{
}
bool IsAlwaysOnTop() override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
*/
- void SetToBottom(bool toBottom) override;
+ void SetBottom(bool enable) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
virtual bool IsAlwaysOnTop() = 0;
/**
- * @brief Enables or disables the window's layer is changed to the bottom.
+ * @brief Enables or disables the window's layer is changed to bottom.
*
- * @param[in] toBottom true to change the window layer to the 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 SetToBottom(bool toBottom) = 0;
+ virtual void SetBottom(bool enable) = 0;
/**
* @brief Returns whether the window layer is the bottom or not.
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::SetToBottom(bool toBottom)
+void Window::SetBottom(bool enable)
{
- mWindowBase->SetToBottom(toBottom);
+ mWindowBase->SetBottom(enable);
}
bool Window::IsBottom()
bool IsAlwaysOnTop();
/**
- * @copydoc Dali::DevelWindow::SetToBottom()
+ * @copydoc Dali::DevelWindow::SetBottom()
*/
- void SetToBottom(bool toBottom);
+ void SetBottom(bool enable);
/**
* @copydoc Dali::DevelWindow::IsBottom()
bool IsAlwaysOnTop() override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
*/
- void SetToBottom(bool toBottom) override;
+ void SetBottom(bool enable) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
return false;
}
-void WindowBaseCocoa::SetToBottom(bool toBottom)
+void WindowBaseCocoa::SetBottom(bool enable)
{
}
mBrightnessChangeDone(true),
mIsFrontBufferRendering(false),
mIsIMEWindowInitialized(false),
- mToBottom(false)
+ mBottom(false)
{
Initialize(positionSize, surface, isTransparent);
}
return ret;
}
-void WindowBaseEcoreWl2::SetToBottom(bool toBottom)
+void WindowBaseEcoreWl2::SetBottom(bool enable)
{
START_DURATION_CHECK();
- mToBottom = toBottom;
- if(toBottom)
+ 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, toBottom);
+ 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, toBottom);
+ 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_pin_mode_set");
+ FINISH_DURATION_CHECK("ecore_wl2_window_stack_mode_set");
}
bool WindowBaseEcoreWl2::IsBottom()
{
- return mToBottom;
+ return mBottom;
}
Any WindowBaseEcoreWl2::GetNativeBuffer() const
bool IsAlwaysOnTop() override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
*/
- void SetToBottom(bool toBottom) override;
+ void SetBottom(bool enable) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
bool mBrightnessChangeDone;
bool mIsFrontBufferRendering;
bool mIsIMEWindowInitialized;
- bool mToBottom;
+ bool mBottom;
};
} // namespace Adaptor
return false;
}
-void WindowBaseEcoreX::SetToBottom(bool toBottom)
+void WindowBaseEcoreX::SetBottom(bool enable)
{
}
bool IsAlwaysOnTop() override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
*/
- void SetToBottom(bool toBottom) override;
+ void SetBottom(bool enable) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
return false;
}
-void WindowBaseWin::SetToBottom(bool toBottom)
+void WindowBaseWin::SetBottom(bool enable)
{
}
bool IsAlwaysOnTop() override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
*/
- void SetToBottom(bool toBottom) override;
+ void SetBottom(bool enable) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
return false;
}
-void WindowBaseX::SetToBottom(bool toBottom)
+void WindowBaseX::SetBottom(bool enable)
{
}
bool IsAlwaysOnTop() override;
/**
- * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetBottom()
*/
- void SetToBottom(bool toBottom) override;
+ void SetBottom(bool enable) override;
/**
* @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()