**/
virtual void EmitMovedOutOfScreen(Accessible* obj, ScreenRelativeMoveType type) = 0;
- /**
- * @brief Emits "org.a11y.atspi.Socket.Available" event on AT-SPI bus.
- *
- * @param obj Accessible object
- */
- virtual void EmitSocketAvailable(Accessible* obj) = 0;
-
/**
* @brief Emits ScrollStarted event on at-spi bus.
*
void OnPostRender()
{
- Accessibility::Bridge::GetCurrentBridge()->EmitPostRender(shared_from_this());
+ try
+ {
+ Accessibility::Bridge::GetCurrentBridge()->EmitPostRender(shared_from_this());
+ }
+ catch(const std::bad_weak_ptr& e)
+ {
+ DALI_LOG_ERROR("bad_weak_ptr exception caught: %s", e.what());
+ }
}
}; // AdaptorAccessible
// EXTERNAL INCLUDES
#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/window-devel.h>
+using namespace Dali::Accessibility;
+
+namespace
+{
+bool UpdateLastEmitted(std::map<State, int>& lastEmitted, State state, int newValue)
+{
+ bool updated = false;
+ const auto [iter, inserted] = lastEmitted.emplace(state, newValue);
+ if(!inserted && iter->second != newValue)
+ {
+ iter->second = newValue;
+ updated = true;
+ }
+
+ return inserted || updated;
+}
+
+bool IsModalRole(Role role)
+{
+ return role == Role::POPUP_MENU || role == Role::PANEL || role == Role::DIALOG || role == Role::PAGE_TAB;
+}
+
+bool IsWindowRole(Role role)
+{
+ return role == Role::WINDOW || role == Role::FRAME || role == Role::INPUT_METHOD_WINDOW;
+}
+
+bool ShouldEmitVisible(Accessible* accessible)
+{
+ Role role = accessible->GetRole();
+ return IsWindowRole(role);
+}
+
+bool ShouldEmitShowing(Accessible* accessible, bool showing)
+{
+ Role role = accessible->GetRole();
+ return IsWindowRole(role) || IsModalRole(role) || (showing && role == Role::NOTIFICATION) ||
+ (!showing && accessible->IsHighlighted()) || accessible->GetStates()[State::MODAL];
+}
+
+} // namespace
+
namespace Dali::Accessibility
{
ActorAccessible::ActorAccessible(Actor actor)
// Erase-remove idiom
// TODO (C++20): Replace with std::erase_if
- auto it = std::remove_if(mChildren.begin(), mChildren.end(), [shouldIncludeHidden](const Accessible* child) {
- return !child || (!shouldIncludeHidden && child->IsHidden());
- });
+ auto it = std::remove_if(mChildren.begin(), mChildren.end(), [shouldIncludeHidden](const Accessible* child) { return !child || (!shouldIncludeHidden && child->IsHidden()); });
mChildren.erase(it, mChildren.end());
mChildren.shrink_to_fit();
}
+void ActorAccessible::EmitActiveDescendantChanged(Accessible* child)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->EmitActiveDescendantChanged(this, child);
+ }
+}
+
+void ActorAccessible::EmitStateChanged(State state, int newValue, int reserved)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bool shouldEmit{false};
+
+ switch(state)
+ {
+ case State::SHOWING:
+ {
+ shouldEmit = ShouldEmitShowing(this, static_cast<bool>(newValue));
+ break;
+ }
+ case State::VISIBLE:
+ {
+ shouldEmit = ShouldEmitVisible(this);
+ break;
+ }
+ default:
+ {
+ shouldEmit = UpdateLastEmitted(mLastEmittedState, state, newValue);
+ break;
+ }
+ }
+
+ if(shouldEmit)
+ {
+ try
+ {
+ bridgeData->mBridge->EmitStateChanged(shared_from_this(), state, newValue, reserved);
+ }
+ catch(const std::bad_weak_ptr& e)
+ {
+ DALI_LOG_ERROR("bad_weak_ptr exception caught: %s", e.what());
+ }
+ }
+ }
+}
+
+void ActorAccessible::EmitShowing(bool isShowing)
+{
+ EmitStateChanged(State::SHOWING, isShowing ? 1 : 0);
+}
+
+void ActorAccessible::EmitVisible(bool isVisible)
+{
+ EmitStateChanged(State::VISIBLE, isVisible ? 1 : 0);
+}
+
+void ActorAccessible::EmitHighlighted(bool isHighlighted)
+{
+ EmitStateChanged(State::HIGHLIGHTED, isHighlighted ? 1 : 0);
+}
+
+void ActorAccessible::EmitFocused(bool isFocused)
+{
+ EmitStateChanged(State::FOCUSED, isFocused ? 1 : 0);
+}
+
+void ActorAccessible::EmitTextInserted(unsigned int position, unsigned int length, const std::string& content)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->EmitTextChanged(this, TextChangedState::INSERTED, position, length, content);
+ }
+}
+void ActorAccessible::EmitTextDeleted(unsigned int position, unsigned int length, const std::string& content)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->EmitTextChanged(this, TextChangedState::DELETED, position, length, content);
+ }
+}
+void ActorAccessible::EmitTextCursorMoved(unsigned int cursorPosition)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->EmitCursorMoved(this, cursorPosition);
+ }
+}
+
+void ActorAccessible::EmitMovedOutOfScreen(ScreenRelativeMoveType type)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->EmitMovedOutOfScreen(this, type);
+ }
+}
+
+void ActorAccessible::EmitScrollStarted()
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->EmitScrollStarted(this);
+ }
+}
+
+void ActorAccessible::EmitScrollFinished()
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->EmitScrollFinished(this);
+ }
+}
+
+void ActorAccessible::Emit(WindowEvent event, unsigned int detail)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ bridgeData->mBridge->Emit(this, event, detail);
+ }
+}
+void ActorAccessible::Emit(ObjectPropertyChangeEvent event)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ try
+ {
+ bridgeData->mBridge->Emit(shared_from_this(), event);
+ }
+ catch(const std::bad_weak_ptr& e)
+ {
+ DALI_LOG_ERROR("bad_weak_ptr exception caught: %s", e.what());
+ }
+ }
+}
+
+void ActorAccessible::EmitBoundsChanged(Rect<> rect)
+{
+ if(auto bridgeData = GetBridgeData())
+ {
+ try
+ {
+ bridgeData->mBridge->EmitBoundsChanged(shared_from_this(), rect);
+ }
+ catch(const std::bad_weak_ptr& e)
+ {
+ DALI_LOG_ERROR("bad_weak_ptr exception caught: %s", e.what());
+ }
+ }
+}
+
+void ActorAccessible::NotifyAccessibilityStateChange(Dali::Accessibility::States states, bool isRecursive)
+{
+ if(Accessibility::IsUp())
+ {
+ const auto newStates = GetStates();
+ for(auto i = 0u; i < static_cast<unsigned int>(Dali::Accessibility::State::MAX_COUNT); i++)
+ {
+ const auto index = static_cast<Dali::Accessibility::State>(i);
+ if(states[index])
+ {
+ EmitStateChanged(index, newStates[index]);
+ }
+ }
+
+ if(isRecursive)
+ {
+ auto children = GetChildren();
+ for(auto child : children)
+ {
+ if(auto accessible = dynamic_cast<ActorAccessible*>(child))
+ {
+ accessible->NotifyAccessibilityStateChange(states, isRecursive);
+ }
+ }
+ }
+ }
+}
+
} // namespace Dali::Accessibility
public virtual Collection,
public virtual Component,
public Dali::ConnectionTracker,
- public Dali::BaseObjectObserver
+ public Dali::BaseObjectObserver,
+ public std::enable_shared_from_this<ActorAccessible>
{
public:
ActorAccessible() = delete;
*/
void OnChildrenChanged();
+ /**
+ * @brief Helper function for emiting active-descendant-changed event.
+ *
+ * @param[in] child The child of the object
+ */
+ void EmitActiveDescendantChanged(Accessible* child);
+
+ /**
+ * @brief Helper function for emiting state-changed event.
+ *
+ * @param[in] state The accessibility state (SHOWING, HIGHLIGHTED, etc)
+ * @param[in] newValue Whether the state value is changed to new value or not.
+ * @param[in] reserved Reserved. (TODO : Currently, this argument is not implemented in dali)
+ *
+ * @note The second argument determines which value is depending on State.
+ * For instance, if the state is PRESSED, newValue means isPressed or isSelected.
+ * If the state is SHOWING, newValue means isShowing.
+ */
+ void EmitStateChanged(State state, int newValue, int reserved = 0);
+
+ /**
+ * @brief Helper function for emiting bounds-changed event.
+ *
+ * @param rect The rectangle for changed bounds
+ */
+ void EmitBoundsChanged(Rect<> rect);
+
+ /**
+ * @brief Emits "showing" event.
+ * The method informs accessibility clients about "showing" state.
+ *
+ * @param[in] isShowing The flag pointing if object is showing
+ */
+ void EmitShowing(bool isShowing);
+
+ /**
+ * @brief Emits "visible" event.
+ * The method informs accessibility clients about "visible" state.
+ *
+ * @param[in] isVisible The flag pointing if object is visible
+ */
+ void EmitVisible(bool isVisible);
+
+ /**
+ * @brief Emits "highlighted" event.
+ * The method informs accessibility clients about "highlighted" state.
+ *
+ * @param[in] isHighlighted The flag pointing if object is highlighted
+ */
+ void EmitHighlighted(bool isHighlighted);
+
+ /**
+ * @brief Emits "focused" event.
+ * The method informs accessibility clients about "focused" state.
+ *
+ * @param[in] isFocused The flag pointing if object is focused
+ */
+ void EmitFocused(bool isFocused);
+
+ /**
+ * @brief Emits "text inserted" event.
+ *
+ * @param[in] position The cursor position
+ * @param[in] length The text length
+ * @param[in] content The inserted text
+ */
+ void EmitTextInserted(unsigned int position, unsigned int length, const std::string& content);
+
+ /**
+ * @brief Emits "text deleted" event.
+ *
+ * @param[in] position The cursor position
+ * @param[in] length The text length
+ * @param[in] content The deleted text
+ */
+ void EmitTextDeleted(unsigned int position, unsigned int length, const std::string& content);
+
+ /**
+ * @brief Emits "cursor moved" event.
+ *
+ * @param[in] cursorPosition The new cursor position
+ */
+ void EmitTextCursorMoved(unsigned int cursorPosition);
+
+ /**
+ * @brief Emits "MoveOuted" event.
+ *
+ * @param[in] type moved out of screen type
+ */
+ void EmitMovedOutOfScreen(ScreenRelativeMoveType type);
+
+ /**
+ * @brief Emits "ScrollStarted" event.
+ *
+ */
+ void EmitScrollStarted();
+
+ /**
+ * @brief Emits "ScrollFinished" event.
+ *
+ */
+ void EmitScrollFinished();
+
+ /**
+ * @brief Emits "highlighted" event.
+ *
+ * @param[in] event The enumerated window event
+ * @param[in] detail The additional parameter which interpretation depends on chosen event
+ */
+ void Emit(WindowEvent event, unsigned int detail = 0);
+
+ /**
+ * @brief Emits property-changed event.
+ *
+ * @param[in] event Property changed event
+ **/
+ void Emit(ObjectPropertyChangeEvent event);
+
+ /**
+ * @brief Re-emits selected states of an Accessibility Object.
+ *
+ * @param[in] states The chosen states to re-emit
+ * @param[in] isRecursive If true, all children of the Accessibility object will also re-emit the states
+ */
+ void NotifyAccessibilityStateChange(Dali::Accessibility::States states, bool isRecursive);
+
protected:
Dali::Actor Self() const
{
std::vector<Accessible*> mChildren;
bool mChildrenDirty;
const uint32_t mActorId;
+ std::map<State, int> mLastEmittedState;
};
} // namespace Dali::Accessibility
/**
* @brief Basic interface implemented by all accessibility objects.
*/
-class DALI_ADAPTOR_API Accessible : public std::enable_shared_from_this<Accessible>
+class DALI_ADAPTOR_API Accessible
{
public:
virtual ~Accessible() noexcept;
- /**
- * @brief Helper function for emiting active-descendant-changed event.
- *
- * @param[in] child The child of the object
- */
- void EmitActiveDescendantChanged(Accessible* child);
-
- /**
- * @brief Helper function for emiting state-changed event.
- *
- * @param[in] state The accessibility state (SHOWING, HIGHLIGHTED, etc)
- * @param[in] newValue Whether the state value is changed to new value or not.
- * @param[in] reserved Reserved. (TODO : Currently, this argument is not implemented in dali)
- *
- * @note The second argument determines which value is depending on State.
- * For instance, if the state is PRESSED, newValue means isPressed or isSelected.
- * If the state is SHOWING, newValue means isShowing.
- */
- void EmitStateChanged(State state, int newValue, int reserved = 0);
-
- /**
- * @brief Helper function for emiting bounds-changed event.
- *
- * @param rect The rectangle for changed bounds
- */
- void EmitBoundsChanged(Rect<> rect);
-
- /**
- * @brief Emits "showing" event.
- * The method informs accessibility clients about "showing" state.
- *
- * @param[in] isShowing The flag pointing if object is showing
- */
- void EmitShowing(bool isShowing);
-
- /**
- * @brief Emits "visible" event.
- * The method informs accessibility clients about "visible" state.
- *
- * @param[in] isVisible The flag pointing if object is visible
- */
- void EmitVisible(bool isVisible);
-
- /**
- * @brief Emits "highlighted" event.
- * The method informs accessibility clients about "highlighted" state.
- *
- * @param[in] isHighlighted The flag pointing if object is highlighted
- */
- void EmitHighlighted(bool isHighlighted);
-
- /**
- * @brief Emits "focused" event.
- * The method informs accessibility clients about "focused" state.
- *
- * @param[in] isFocused The flag pointing if object is focused
- */
- void EmitFocused(bool isFocused);
-
- /**
- * @brief Emits "text inserted" event.
- *
- * @param[in] position The cursor position
- * @param[in] length The text length
- * @param[in] content The inserted text
- */
- void EmitTextInserted(unsigned int position, unsigned int length, const std::string& content);
-
- /**
- * @brief Emits "text deleted" event.
- *
- * @param[in] position The cursor position
- * @param[in] length The text length
- * @param[in] content The deleted text
- */
- void EmitTextDeleted(unsigned int position, unsigned int length, const std::string& content);
-
- /**
- * @brief Emits "cursor moved" event.
- *
- * @param[in] cursorPosition The new cursor position
- */
- void EmitTextCursorMoved(unsigned int cursorPosition);
-
- /**
- * @brief Emits "MoveOuted" event.
- *
- * @param[in] type moved out of screen type
- */
- void EmitMovedOutOfScreen(ScreenRelativeMoveType type);
-
- /**
- * @brief Emits "org.a11y.atspi.Socket.Available" signal.
- */
- // This belongs to Dali::Accessibility::Socket. However, all Emit*() helpers
- // are here in Accessible, regardless of what interface they belong to (perhaps
- // to spare a dynamic_cast if used like this: Accessible::Get()->Emit*(...)).
- void EmitSocketAvailable();
-
- /**
- * @brief Emits "ScrollStarted" event.
- *
- */
- void EmitScrollStarted();
-
- /**
- * @brief Emits "ScrollFinished" event.
- *
- */
- void EmitScrollFinished();
-
- /**
- * @brief Emits "highlighted" event.
- *
- * @param[in] event The enumerated window event
- * @param[in] detail The additional parameter which interpretation depends on chosen event
- */
- void Emit(WindowEvent event, unsigned int detail = 0);
-
- /**
- * @brief Emits property-changed event.
- *
- * @param[in] event Property changed event
- **/
- void Emit(ObjectPropertyChangeEvent event);
-
/**
* @brief Gets accessibility name.
*
*/
virtual bool DoGesture(const GestureInfo& gestureInfo) = 0;
- /**
- * @brief Re-emits selected states of an Accessibility Object.
- *
- * @param[in] states The chosen states to re-emit
- * @param[in] isRecursive If true, all children of the Accessibility object will also re-emit the states
- */
- void NotifyAccessibilityStateChange(Dali::Accessibility::States states, bool isRecursive);
-
/**
* @brief Gets information about current object and all relations that connects
* it with other accessibility objects.
mutable AtspiInterfaces mInterfaces;
AtspiEvents mSuppressedEvents;
bool mIsOnRootLevel = false;
- std::map<State, int> mLastEmittedState;
}; // Accessible class
using namespace Dali::Accessibility;
-namespace
-{
-bool UpdateLastEmitted(std::map<State, int>& lastEmitted, State state, int newValue)
-{
- bool updated = false;
- const auto [iter, inserted] = lastEmitted.emplace(state, newValue);
- if(!inserted && iter->second != newValue)
- {
- iter->second = newValue;
- updated = true;
- }
-
- return inserted || updated;
-}
-
-bool IsModalRole(Role role)
-{
- return role == Role::POPUP_MENU || role == Role::PANEL || role == Role::DIALOG || role == Role::PAGE_TAB;
-}
-
-bool IsWindowRole(Role role)
-{
- return role == Role::WINDOW || role == Role::FRAME || role == Role::INPUT_METHOD_WINDOW;
-}
-
-bool ShouldEmitVisible(Accessible* accessible)
-{
- Role role = accessible->GetRole();
- return IsWindowRole(role);
-}
-
-bool ShouldEmitShowing(Accessible* accessible, bool showing)
-{
- Role role = accessible->GetRole();
- return IsWindowRole(role) || IsModalRole(role) || (showing && role == Role::NOTIFICATION) ||
- (!showing && accessible->IsHighlighted()) || accessible->GetStates()[State::MODAL];
-}
-
-} // namespace
-
Accessible::Accessible()
{
}
}
}
-void Accessible::EmitActiveDescendantChanged(Accessible* child)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitActiveDescendantChanged(this, child);
- }
-}
-
-void Accessible::EmitStateChanged(State state, int newValue, int reserved)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bool shouldEmit{false};
-
- switch(state)
- {
- case State::SHOWING:
- {
- shouldEmit = ShouldEmitShowing(this, static_cast<bool>(newValue));
- break;
- }
- case State::VISIBLE:
- {
- shouldEmit = ShouldEmitVisible(this);
- break;
- }
- default:
- {
- shouldEmit = UpdateLastEmitted(mLastEmittedState, state, newValue);
- break;
- }
- }
-
- if(shouldEmit)
- {
- bridgeData->mBridge->EmitStateChanged(shared_from_this(), state, newValue, reserved);
- }
- }
-}
-
-void Accessible::EmitShowing(bool isShowing)
-{
- EmitStateChanged(State::SHOWING, isShowing ? 1 : 0);
-}
-
-void Accessible::EmitVisible(bool isVisible)
-{
- EmitStateChanged(State::VISIBLE, isVisible ? 1 : 0);
-}
-
-void Accessible::EmitHighlighted(bool isHighlighted)
-{
- EmitStateChanged(State::HIGHLIGHTED, isHighlighted ? 1 : 0);
-}
-
-void Accessible::EmitFocused(bool isFocused)
-{
- EmitStateChanged(State::FOCUSED, isFocused ? 1 : 0);
-}
-
-void Accessible::EmitTextInserted(unsigned int position, unsigned int length, const std::string& content)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitTextChanged(this, TextChangedState::INSERTED, position, length, content);
- }
-}
-void Accessible::EmitTextDeleted(unsigned int position, unsigned int length, const std::string& content)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitTextChanged(this, TextChangedState::DELETED, position, length, content);
- }
-}
-void Accessible::EmitTextCursorMoved(unsigned int cursorPosition)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitCursorMoved(this, cursorPosition);
- }
-}
-
-void Accessible::EmitMovedOutOfScreen(ScreenRelativeMoveType type)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitMovedOutOfScreen(this, type);
- }
-}
-
-void Accessible::EmitSocketAvailable()
-{
- DALI_ASSERT_DEBUG(Socket::DownCast(this));
-
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitSocketAvailable(this);
- }
-}
-
-void Accessible::EmitScrollStarted()
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitScrollStarted(this);
- }
-}
-
-void Accessible::EmitScrollFinished()
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitScrollFinished(this);
- }
-}
-
-void Accessible::Emit(WindowEvent event, unsigned int detail)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->Emit(this, event, detail);
- }
-}
-void Accessible::Emit(ObjectPropertyChangeEvent event)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->Emit(shared_from_this(), event);
- }
-}
-
-void Accessible::EmitBoundsChanged(Rect<> rect)
-{
- if(auto bridgeData = GetBridgeData())
- {
- bridgeData->mBridge->EmitBoundsChanged(shared_from_this(), rect);
- }
-}
-
std::shared_ptr<Bridge::Data> Accessible::GetBridgeData() const
{
auto handle = mBridgeData.lock();
{
return false;
}
-
-void Accessible::NotifyAccessibilityStateChange(Dali::Accessibility::States states, bool isRecursive)
-{
- if(Accessibility::IsUp())
- {
- const auto newStates = GetStates();
- for(auto i = 0u; i < static_cast<unsigned int>(Dali::Accessibility::State::MAX_COUNT); i++)
- {
- const auto index = static_cast<Dali::Accessibility::State>(i);
- if(states[index])
- {
- EmitStateChanged(index, newStates[index]);
- }
- }
-
- if(isRecursive)
- {
- auto children = GetChildren();
- for(auto iter : children)
- {
- iter->NotifyAccessibilityStateChange(states, isRecursive);
- }
- }
- }
-}
#include <tuple>
// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/actor-accessible.h>
#include <dali/devel-api/adaptor-framework/proxy-accessible.h>
#include <dali/devel-api/adaptor-framework/window-devel.h>
#include <dali/devel-api/atspi-interfaces/accessible.h>
* @return Null if mChildren is empty, otherwise the Accessible object
* @note Currently, the default window would be returned when mChildren is not empty.
*/
- Dali::Accessibility::Accessible* GetWindowAccessible(Dali::Window window)
+ Dali::Accessibility::ActorAccessible* GetWindowAccessible(Dali::Window window)
{
if(mChildren.empty())
{
{
if(rootLayer == mChildren[i]->GetInternalActor())
{
- return mChildren[i];
+ return dynamic_cast<Dali::Accessibility::ActorAccessible*>(mChildren[i]);
}
}
// If can't find its children, return the default window.
- return mChildren[0];
+ return dynamic_cast<Dali::Accessibility::ActorAccessible*>(mChildren[0]);
}
bool DoGesture(const Dali::Accessibility::GestureInfo& gestureInfo) override
{"", "root"});
}
-void BridgeObject::EmitSocketAvailable(Accessible* obj)
-{
- if(!IsUp() || obj->IsHidden()) //TODO Suppress SocketAvailable event
- {
- return;
- }
-
- mDbusServer.emit2<Address, Address>(
- GetAccessiblePath(obj),
- Accessible::GetInterfaceName(AtspiInterface::SOCKET),
- "Available",
- obj->GetAddress(),
- {"", "root"});
-}
-
void BridgeObject::EmitScrollStarted(Accessible* obj)
{
if(!IsUp() || obj->IsHidden() || obj->GetSuppressedEvents()[AtspiEvent::SCROLL_STARTED])
*/
void EmitMovedOutOfScreen(Dali::Accessibility::Accessible* obj, Dali::Accessibility::ScreenRelativeMoveType type) override;
- /**
- * @copydoc Dali::Accessibility::Bridge::EmitSocketAvailable()
- */
- void EmitSocketAvailable(Dali::Accessibility::Accessible* obj) override;
-
/**
* @copydoc Dali::Accessibility::Bridge::EmitScrollStarted()
*/
/*
- * Copyright (c) 2023 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.
return std::string{widgetInstanceId};
}
-void Accessibility::Accessible::EmitStateChanged(Accessibility::State state, int newValue, int reserved)
-{
-}
-
-void Accessibility::Accessible::Emit(Accessibility::ObjectPropertyChangeEvent event)
-{
-}
-
-void Accessibility::Accessible::EmitHighlighted(bool set)
-{
-}
-
-void Accessibility::Accessible::EmitBoundsChanged(Rect<> rect)
-{
-}
-
-void Accessibility::Accessible::EmitShowing(bool showing)
-{
-}
-
-void Accessibility::Accessible::EmitFocused(bool set)
-{
-}
-
-void Accessibility::Accessible::EmitVisible(bool visible)
-{
-}
-
-void Accessibility::Accessible::EmitTextInserted(unsigned int position, unsigned int length, const std::string& content)
-{
-}
-
-void Accessibility::Accessible::EmitTextDeleted(unsigned int position, unsigned int length, const std::string& content)
-{
-}
-
-void Accessibility::Accessible::EmitTextCursorMoved(unsigned int cursorPosition)
-{
-}
-
-void Accessibility::Accessible::EmitActiveDescendantChanged(Accessibility::Accessible* child)
-{
-}
-
-void Accessibility::Accessible::EmitMovedOutOfScreen(Accessibility::ScreenRelativeMoveType type)
-{
-}
-
-void Accessibility::Accessible::EmitSocketAvailable()
-{
-}
-
-void Accessibility::Accessible::EmitScrollStarted()
-{
-}
-
-void Accessibility::Accessible::EmitScrollFinished()
-{
-}
-
-void Accessibility::Accessible::NotifyAccessibilityStateChange(Accessibility::States states, bool isRecursive)
-{
-}
-
} // namespace Dali
{
}
- void EmitSocketAvailable(Accessibility::Accessible* obj) override
- {
- }
-
void EmitScrollStarted(Accessibility::Accessible* obj) override
{
}
// INTERNAL HEADERS
#include <dali/devel-api/adaptor-framework/accessibility-bridge.h>
-#include <dali/devel-api/atspi-interfaces/accessible.h>
+#include <dali/devel-api/adaptor-framework/actor-accessible.h>
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/internal/window-system/common/event-handler.h>
#include <dali/internal/window-system/common/orientation-impl.h>
if(Dali::Accessibility::IsUp())
{
- if(auto accessible = Dali::Accessibility::Accessible::Get(mScene.GetRootLayer()))
+ if(auto accessible = dynamic_cast<Accessibility::ActorAccessible*>(Accessibility::Accessible::Get(mScene.GetRootLayer())))
{
accessible->EmitBoundsChanged(Dali::Rect<>(oldRect.x, oldRect.y, size.GetWidth(), size.GetHeight()));
}
if(Dali::Accessibility::IsUp())
{
- if(auto accessible = Dali::Accessibility::Accessible::Get(mScene.GetRootLayer()))
+ if(auto accessible = dynamic_cast<Accessibility::ActorAccessible*>(Accessibility::Accessible::Get(mScene.GetRootLayer())))
{
accessible->EmitBoundsChanged(Dali::Rect<>(position.GetX(), position.GetY(), oldRect.width, oldRect.height));
}
if((moved || resize) && Dali::Accessibility::IsUp())
{
- if(auto accessible = Dali::Accessibility::Accessible::Get(mScene.GetRootLayer()))
+ if(auto accessible = dynamic_cast<Accessibility::ActorAccessible*>(Accessibility::Accessible::Get(mScene.GetRootLayer())))
{
accessible->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height));
}
if((moved || resize) && Dali::Accessibility::IsUp())
{
- if(auto accessible = Dali::Accessibility::Accessible::Get(mScene.GetRootLayer()))
+ if(auto accessible = dynamic_cast<Accessibility::ActorAccessible*>(Accessibility::Accessible::Get(mScene.GetRootLayer())))
{
accessible->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height));
}