summaryrefslogtreecommitdiff
path: root/dali/internal/accessibility/bridge/bridge-selection.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-04-12[WIP] refactor Bridgeyoungsus/refactor-a11y-bridgeYoungsun Suh1-3/+7
Change-Id: I308b583576ea61a1f24457679216ae7da39a900e
2022-02-24[AT-SPI] Rework Accessible::GetInterfaces()Artur Świgoń1-9/+2
This patch: * Introduces an AtspiInterface enumeration with all possible AT-SPI interfaces and an AtspiInterfaces collection (using EnumBitSet), and changes the return type of Accessible::GetInterfaces() to AtspiInterfaces. The new, compact storage format allows the collection of interfaces to be cached. Interfaces will be queried even more often with the upcoming polymorphic NUIViewAccessible. Thus, it makes sense to introduce such an optimization, and checking whether a bit is set in a 4-byte bitmask is significantly cheaper than performing a series of dynamic_cast's every time GetInterfaces() is called. Such calculation is only performed once by a new virtual method, DoGetInterfaces(). * Adds a new static method Accessible::GetInterfaceName() which converts an AtspiInterface value to a string identifier used in DBus communication, which allows to remove most of the macro definitions in accessibility-common.h. * Adds some missing operators to Accessibility::BitSet and EnumBitSet. * Introduces a template type resolver AtspiInterfaceType which converts an AtspiInterface value to a native C++ type, and adds Accessible::DownCast() which uses this helper to check both the return value of GetInterfaces() and the result of dynamic_cast. This double checking is required by the upcoming NUIViewAccessible. As a possible optimization, dynamic_cast could be changed to static_cast for release builds in the future (which should be safe as long as DoGetInterfaces() is implemented correctly). * Adds a new template method FindCurrentObjectWithInterface() to BridgeBase in order to centralize previously duplicated error return logic in implementations of FindSelf() in various Bridge classes, which differed only in the target type and interface name to be reported in the error DBus reply. * Adds a new virtual method Accessible::DoGetInterfaces() which allows any derived classes to customize (specifically, narrow down) the set of interfaces visible to DBus callers (and FindCurrentObjectWithInterface() respects that). This is the first step towards allowing NUI controls to freely implement AT-SPI interfaces (currently they have to choose from a small predefined set of NUIViewAccessible-derived classes due to the use of dynamic_cast). Change-Id: I14428ec20693a9b121d40ac1b12b6e30c709d313
2021-09-28[ATSPI] Add some descriptions to Bridge objectsSeoyeon Kim1-7/+9
- Added some descriptions for BridgeAccessible and BridgeBase. I'm going to modify other header files, like BridgeAction, to another patch. Otherwise, this patch would become too heavy. - Updated some bridge codes according to dali coding style. Change-Id: I2cc9e7d222c4082af1cc423fd80e0c3eafbf083e Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
2021-06-08[AT-SPI] Add Selection interfaceArtur Świgoń1-0/+85
Change-Id: I893f79a9ccfb7e39fb257a798c297dc22f107cea