Hello Alex, Jamie and all: a couple of thoughts for consideration.

-          The nodes in the IA@_Range structure may be generic IAccessibles and 
not necessarily IAccessibleText. That would cover the case of a composite image 
with an array of image children that can be selected individually.

-          In some cases it would be good to specify which limit of the range 
is the anchor and which the active end. We could add that to the structure as 
an additional member, or simply document the convention that start = anchor and 
end = active. If we go with the latter, then start does not have to be <= end 
in the Accessible order.

Best regards,

--Andres.

From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Alexander Surkov
Sent: Thursday, October 29, 2015 9:02 AM
To: [email protected]; James Teh
Subject: [Accessibility-ia2] a new method to retrieve the selection

Here's outcome email from Mozilla bug [1] discussion, where Jamie (NVDA) and me 
concluded that IAccessible2 environment would benefit from having a new method 
to retrieve text/content selection in perfromant way. The idea is to supplement 
IAccesible2_2::accessibleWithCaret method, introduced for caret, by similar 
method for selection getting.
The proposed method may look like
typedef struct IA2Range {
  AccessibleText* start;
  long startOffset;
  AccessibleText* end;
  long endOffset;
} IA2Range;
selectionRanges([out, size_is(,*nRanges) IA2Range **ranges,
                            [out, retval] long *nRanges);
which returns an array of all continues selection ranges within the given 
accessible, and hosted by new IAccessible2_3 inherited from IAccessible2_2.
Another idea from that thread was to keep newly added interfaces unfrozen, 
until we are confident the interface will need no change in the nearest future. 
So we'll be adding new methods into the end of the interface, to keep binary 
compatibility.
Please let me know your thinking.
Thank you.
Alexander.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1052866
_______________________________________________
Accessibility-ia2 mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2

Reply via email to