Igalia / acacia

Library for inspecting accessibility APIs
https://igalia.github.io/acacia
GNU Lesser General Public License v2.1
8 stars 1 forks source link

Linux: consider C++ objects instread of SWIG tuples for some data types #154

Open spectranaut opened 8 months ago

spectranaut commented 8 months ago

Per Joanie's comment here, tuples are weird in nodejs:

> component.get_size()
_exports_AtspiPairIntInt { second: 2098, first: 3840 }

On the otherhand, they work great in python, return a python tuple as expect.

On the third hand, the underlying API does return an AtspiPosition object with an x and y attribute: https://github.com/Igalia/AXAccess/blob/c93a2928aa20513e25f507bb012d01e2de175f3b/lib/atspi/atspi_component_interface.cc#L32

Alice has taken the approach of wrapping these kinds of object for AXAPI in a custom object, which is pretty nice. See the Point object here: https://github.com/Igalia/AXAccess/pull/139/files#diff-a0cddcd5866fbc93cafe36a4b8e67f580a47c0da4d6504dc999b4633785fd40a

spectranaut commented 8 months ago

Doing this is not a requirement for v.0, but it might be a nice direction to go in ultimately, I'd like your thoughts @joanmarie :)