From 154e01906dd4b9d586e2e53e37e405810a9421e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Artur=20=C5=9Awigo=C5=84?= Date: Fri, 15 Apr 2022 14:53:32 +0200 Subject: [PATCH] [AT-SPI] Implement Component for ProxyAccessible The Component interface is required for the object not to be immediately filtered out by bridge-side navigation code. When a ProxyAccessible is serialized to an object address as a return value on D-Bus, its address is replaced by the remote address (stored in `mAddress`), so any further interaction by AT clients (D-Bus method calls) will be directed to the actual remote object. Change-Id: I268e219eb30ecd016ab2ab78dcd0846b551a9e42 --- .../devel-api/adaptor-framework/proxy-accessible.h | 45 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/dali/devel-api/adaptor-framework/proxy-accessible.h b/dali/devel-api/adaptor-framework/proxy-accessible.h index a5985e1..33e6b1b 100644 --- a/dali/devel-api/adaptor-framework/proxy-accessible.h +++ b/dali/devel-api/adaptor-framework/proxy-accessible.h @@ -24,6 +24,7 @@ // INTERNAL INCLUDES #include #include +#include namespace Dali::Accessibility { @@ -34,7 +35,7 @@ namespace Dali::Accessibility * a different bridge (embedding for example), but the object itself isn't planned to be used * otherwise. This object has a settable parent, no children, an empty name and so on. */ -class DALI_ADAPTOR_API ProxyAccessible : public virtual Accessible +class DALI_ADAPTOR_API ProxyAccessible : public virtual Accessible, public virtual Component { public: ProxyAccessible() @@ -133,6 +134,48 @@ public: return Dali::Actor{}; } + Rect<> GetExtents(CoordinateType type) const override + { + auto* parent = Component::DownCast(mParent); + + return parent ? parent->GetExtents(type) : Rect<>{}; + } + + ComponentLayer GetLayer() const override + { + return ComponentLayer::WINDOW; + } + + int16_t GetMdiZOrder() const override + { + return false; + } + + bool GrabFocus() override + { + return false; + } + + double GetAlpha() const override + { + return 0.0; + } + + bool GrabHighlight() override + { + return false; + } + + bool ClearHighlight() override + { + return false; + } + + bool IsScrollable() const override + { + return false; + } + private: Address mAddress; Accessible* mParent; -- 2.7.4