[AT-SPI] Support multiple AT-SPI interfaces for View 72/270872/4
authorArtur Świgoń <a.swigon@samsung.com>
Thu, 10 Feb 2022 08:53:29 +0000 (09:53 +0100)
committerArtur Świgoń <a.swigon@samsung.com>
Fri, 18 Feb 2022 14:27:06 +0000 (15:27 +0100)
commit6fc8c1dab423304d2f2e3e940847b1e01a351deb
tree401c50f7b6ac8c05b980d026c62247141392c5a8
parent572eebecbb9fcfb383f5d9d27bfa7d0e4921f2b2
[AT-SPI] Support multiple AT-SPI interfaces for View

This patch leaves only one version of NUIViewAccessible that contains
the necessary glue code for all interfaces that are of interest to NUI
and adds bindings for a new virtual method (Accessible::DoGetInterfaces)
to AccessibilityDelegate so that the set of implemented interfaces can
be entirely determined on the C# side (we cannot use dynamic_cast to
inspect C# objects, so we have to rely on C# self-declaring what
interfaces a given object implements).

A new template helper method (NUIViewAccessible::CallMethod) is
introduced, to ensure that it is legal to call a given method (declared
interfaces are checked) and to significantly reduce code duplication,
including null-checking the function pointer and passing the first
argument ('self') which is identical for all methods.

Note that with the singleton AccessibilityDelegate, we no longer allow
null pointers in it, and no longer silently ignore them. It is a bug if
any of the pointers are null (or a version mismatch between DALi and
NUI, although that would probably cause an assertion on structure size
mismatch in SetAccessibilityDelegate).

Change-Id: If706d4d50985ec9694190b7e99c17cedfd44da57
dali-csharp-binder/src/accessible-impl-nui.cpp