[Accessibility-ia2] getting relations

Alexander Surkov surkov.alexander at gmail.com
Fri Mar 2 07:58:14 UTC 2012


> If I understand correctly, that would require a separate call to fetch each
> relation, which might not be desirable in some cases and also defeats the
> point of IEnumVARIANT. (If we're going to do that, we may as well have the
> function take an additional parameter specifying the index of the relation
> to fetch and return NULL when there are no more.)

Nah you pass the desired amount of relations into
IA2_EnumVariant::Next(). If you want one relation then you pass 1, if
you want all then you pass int32_max or - 1 if you want. This could
look like

interface IA2EnumVariant : public IUknown
{
  HRESULT Next(
    [in] long nItemLimit,
    [out, size_is(nItems*)] IUnknown*** items,
    [out, long] long* nItems)
}

Alex.

On Fri, Mar 2, 2012 at 4:20 PM, James Teh <jamie at nvaccess.org> wrote:
> On 2/03/2012 3:42 PM, Alexander Surkov wrote:
>>
>> If we add relations count as out argument then we get rid the idea of
>> lazy relations calculation. Iirc that was a primary reason of
>> IEnumVariant usage but I missed the point that IEnumVariant requires
>> the AT client to allocate the memory. So I think we should introduce
>> interface similar to IEnumVariant where the server allocates the
>> memory. That'll be similar to IAccessibleTable2 approach.
>
> If I understand correctly, that would require a separate call to fetch each
> relation, which might not be desirable in some cases and also defeats the
> point of IEnumVARIANT. (If we're going to do that, we may as well have the
> function take an additional parameter specifying the index of the relation
> to fetch and return NULL when there are no more.)
>
> What about a boolean specifying whether the count is desired? Alternatively,
> the count could be an in, out parameter which doesn't return the count if
> it's NULL, though I'm not sure if that is particularly elegant.
>
>
> Jamie
>
> --
> James Teh
> Director, NV Access Limited
> Email: jamie at nvaccess.org
> Web site: http://www.nvaccess.org/
> Phone: +61 7 5667 8372
> _______________________________________________
> Accessibility-ia2 mailing list
> Accessibility-ia2 at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2


More information about the Accessibility-ia2 mailing list