Thanks Alex, I still prefer 1 rather than 1.1 and 2, but let's see what others say. -Pete
On 3/6/12 12:26 AM, Alexander Surkov wrote: > 2nd is more flexible than 1, 1.1 is a nice shortcut for 2 in case of > one target so probably I would go with 1.1 and 2. > Alex. > > On Tue, Mar 6, 2012 at 2:35 PM, Pete Brunet <p...@a11ysoft.com> wrote: >> Thanks Alex (and Jamie), I offer two choices, and in both cases using IDL >> like our recently added IATable2::selectedRows/Columns/Cells. I like the >> first choice better because it offers a very simple method for the case that >> will be used 99% of the time. The second choice is the one Jamie proposed. >> >> 1) >> // Fetch one target, even if there is more than one. >> HRESULT IAccessible2_2::relationTargetOfType ( >> [in] BSTR type, >> [out, retvalue] IUnknown **target ) >> >> and >> >> // Fetch all targets >> HRESULT IAccessible2_2::relationTargetsOfType ( >> [in] BSTR type, >> [out, size_is(,*nTargets)] IUnknown ***targets, >> >> [out, retval] long *nTargets ) >> >> 2) >> // Fetch either one or all targets depending on the maxTargets parameter. >> // Typically maxTargets will be 1 but if maxTargets is 0 the server will >> return all available targets, using nTargets to indicate how many were >> returned. >> HRESULT IAccessible2_2::relationTargetsOfType ( >> [in] BSTR type, >> [in] long maxTargets, >> [out, size_is(,*nTargets)] IUnknown ***targets, >> >> [out, retval] long *nTargets ) >> >> That maxTargets parameter could be a boolean but as a long it provides the >> option of asking for the first n targets. >> >> In both cases the server would allocate the array, using CoTaskMemAlloc. The >> client would use CoTaskMemFree to free the array. >> >> Pete >> >> >> On 3/5/12 10:25 PM, Alexander Surkov wrote: >> >> Basically that's what Jamie said. We need to make sure the server >> doesn't do extra work when nobody needs it. So I'm fine with Jamie >> proposal to pass the desired targets amount. >> Alex. >> >> On Tue, Mar 6, 2012 at 1:19 PM, Alexander Surkov >> <surkov.alexan...@gmail.com> wrote: >> >> ARIA tends to expose multiple targets especially stuffs like >> aria-labelledby. I don't have statistics though. But the point is if >> AT needs only one targets then the server shouldn't spend a time to >> check whether there are other targets. In other words we can end up >> with single target but the server can do a lot of computation to >> figure out this. >> >> Thank you. >> Alex. >> >> >> On Tue, Mar 6, 2012 at 6:31 AM, James Teh <ja...@nvaccess.org> wrote: >> >> On 6/03/2012 7:20 AM, Pete Brunet wrote: >> >> Jamie, Since the server allocates the array, are there any issues for AT >> regarding the method I proposed? >> >> Not directly for ATs. However, fetching multiple targets might be expensive >> and slow on the server side; if I recall correctly, Alex has concurred with >> this. Obviously, if the server is slow, the client slows down too. The idea >> was to allow clients who only want one target to just fetch one target >> without incurring a performance penalty on the server side. >> >> Alex, how often are there actually multiple targets for a single relation in >> Mozilla itself? >> >> >> Jamie >> >> -- >> James Teh >> Director, NV Access Limited >> Email: ja...@nvaccess.org >> Web site: http://www.nvaccess.org/ >> Phone: +61 7 5667 8372 >> _______________________________________________ >> Accessibility-ia2 mailing list >> Accessibility-ia2@lists.linuxfoundation.org >> https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2 >> >> _______________________________________________ >> Accessibility-ia2 mailing list >> Accessibility-ia2@lists.linuxfoundation.org >> https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2 >> >> >> -- >> Pete Brunet >> >> a11ysoft - Accessibility Architecture and Development >> (512) 467-4706 (work), (512) 689-4155 (cell) >> Skype: pete.brunet >> IM: ptbrunet (AOL, Google), ptbru...@live.com (MSN) >> http://www.a11ysoft.com/about/ >> Ionosphere: WS4G >> >> _______________________________________________ >> Accessibility-ia2 mailing list >> Accessibility-ia2@lists.linuxfoundation.org >> https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2 >> -- *Pete Brunet* a11ysoft - Accessibility Architecture and Development (512) 467-4706 (work), (512) 689-4155 (cell) Skype: pete.brunet IM: ptbrunet (AOL, Google), ptbru...@live.com (MSN) http://www.a11ysoft.com/about/ Ionosphere: WS4G
_______________________________________________ Accessibility-ia2 mailing list Accessibility-ia2@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2