Hi Paul,

maybe you could give more information about the API you "normally" use
exactly in this situation.

I have the feeling you are NOT interested in the information which
paragraph has the cursor, but really only on absolute screen positions.

The cursor in OOo is handled/drawn via VCL, Windows doesn't know it.

IMHO it might be possible to give you this information via the systems
standard way then, we would have to evaluate this.

Malte.

Oliver Braun wrote, On 11/28/07 09:09:
> Hi Paul,
> 
> Paul Blenkhorn wrote:
>> It may be easier if I describe one of the scenarios.
>>
>> For my screen magnifier I need to know the absolute screen position of the
>> caret to magnify the correct part of the screen, and I also need to know
>> when the position has changed.  To do this with other AT support systems I
>> typically get a callback from the system when the caret moves which tells me
>> there is a new focus position and it also lets me know the absolute location
>> of the caret on the screen.
>>
>  > [..]
> 
> in theory you could use the UNO accessility API for this, but it is not very 
> convenient as it lacks the collection interface which e.g. the GNOME 
> Accessibility API has.
> 
> Starting with the active XTopWindow's XAccessible interface, you would have 
> to 
> traverse the full a11y hierarchy to find the paragraph object that exposes 
> AccessibleStateType::FOCUSED in its XAccessibleStateSet. You would also have 
> to 
> register as a listener to all these objects to be able to get notifications 
> about caret (AccessibilityEventId::CARET_CHANGED) or focus changes 
> (AccessibilityEventId::STATE_CHANGED with AccessibleStateType::FOCUSED as 
> NewValue).
> 
> In an ideal world XExtendendToolkit::addFocusListener() would give you the 
> latter part of the event tracking at a global place, but I don't think it is 
> properly fed yet.
> 
> Does anyone know an easier way to achieve the above using the writer API 
> directly ?
> 
> Oliver
> 
> --
> Sun Microsystems GmbH           Oliver Braun
> Nagelsweg 55                    Software Engineer
> 20097 Hamburg                   StarOffice / OpenOffice.org Development
> 
> Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551
> Kirchheim-Heimstetten
> Amtsgericht Muenchen: HRB 161028
> Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
> Vorsitzender des Aufsichtsrates: Martin Haering
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to