Please let me know your preference.

1) Similar in style to other IA2 interfaces

HRESULT nRelationTargets  ([in] BSTR relationType, [out, retval] long
*nTargets)
     Returns the number of targets for the specified relation type.
HRESULT relationTarget ([in] BSTR relationType, [in] long index, [out,
retval] IUnknown **target)
     Returns one target for the specified relation type.
HRESULT relationTargets ([in] BSTR relationType, [out, size_is( ,
nTargets, )] IUnknown ***targets, [out, retval] long *nTargets)
     Returns multiple targets for the specified relation type.

2) Just the last method of #1, relations, if there is no advantage to
also having the other two.

3) Similar to the last method of #1 but using IEnumVARIANT.

HRESULT relationTargets ([in] BSTR relationType, [out, retval]
IEnumVARIANT **targetIterator)
     Returns an iterator to iterate through multiple targets for the
specified relation type.

Between #2 and #3,
#2 would provide a performance advantage for out of process because it
eliminates additional cross process calls when the full set of targets
is required.
#3 would provide a performance advantage for clients and servers if only
one target is needed because the server would only have to search for
each target on demand (via IEnumVARIANT::next). 

Is it a common scenario for an AT to only want the first target?

Pete
---
Alexander Surkov wrote:
> I think I'm fine with IEnumVariant, however IEnumVariant seems a bit
> unusual for IA2 interfaces.
>
> Alex.
>
>
> On Sat, Feb 20, 2010 at 12:19 PM, James Teh <[email protected]> wrote:
>   
>> On 20/02/2010 6:37 AM, Pete Brunet wrote:
>>     
>>> 1) Relations
>>> - add the following:
>>> - nRelationTargets // if only the first one is needed don't call this so
>>> the server doesn't have to calculate it
>>> - relationTarget([in] index, [out] IUnknown) // if the index is bad (or
>>> index==0 and there are no targets), out parameter is NULL
>>>       
>> As Rob pointed out, this needs ot have a type argument.
>>
>>     
>>> - relationTargets ([in] type, [out] array of IUnknowns) // don't use
>>> this if only the first one is needed.
>>>       
>> Mick made a good point the other day. Why not have just one relations
>> method which returns an IEnumVariant? That way, you can get only the
>> first or all of them, as you choose. We'd still need a property to get
>> the count of relations for a given type.
>>
>>     
>>> 3) Extended States
>>> There had been talk about removing extendedStates and
>>> localizedExtendedStates.
>>> Does anyone see a need for these?
>>>       
>> I think they will become useful sooner or later. However, no one seems
>> to know how to best implement it, so I think it'd be better left out for
>> now and integrated later (perhaps in another interface) once it's been
>> figured out, rather than polluting IAccessible2_2. It's easy to add
>> something (just subclass the interface or create a separate one), but
>> not so easy to remove it.
>>
>> Jamie
>>
>> --
>> James Teh
>> Email/MSN Messenger/Jabber: [email protected]
>> Web site: http://www.jantrid.net/
>>     

_______________________________________________
Accessibility-ia2 mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2

Reply via email to