{
}
+ ~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.
*
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;
}
}
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)