Re: Adventures in calling Atspi from JavaScript

Piñeiro <[email protected]>
Newsgroups gmane.comp.gnome.accessibility.general
Message-ID <[email protected]>
On 07/17/2012 11:00 PM, Joseph Scheuhammer wrote:
> All,
>
> I've been implementing a JavaScript object for use within GNOME Shell
> that tracks the keyboard focus and the caret. I am using
> GObjectIntrospection to communicate between JavaScript and AT-SPI.
> Some things are working, but others aren't. Descriptions of the
> problems are given below. If you see anything that sheds light on
> things, let me know.
>
> 1. Registering 'object:text-caret-moved' always results in an error.

Hmm, this is odd (1)

>
> The actual error is garbled, containing non-printable characters. Here
> is what I get:
>
> > Window manager warning: Log level 16: Atspi: Adding match: Interface
> name
> > 'org.a11y.atspi.Event.object' is invalid.
>
> How it's registered. Note that 'this._atspiEventListener' is an
> Atspi.EventListener, or, in C, an AtspiEventListener:
>
> registered = this._atspiEventListener.register_from_callback(
> _atspiCaretCB, 'object:text-caret-moved'
> );
>
> - the returned value, 'registered', is 'true'.
> - the callback, '_atspiCaretCB', is never called.
> - I do the same thing for 'object:state-changed:focused' and
> 'object:state-changed:selected', and that works fine.
>
> 2. Focus tracking doesn't work with St widgets.
>
> Registering for 'object:state-changed:focused' and
> 'object:state-changed:selected' works great with GTK widgets, and even
> within web pages with ARIA widgets. But, whenever a GNOME Shell widget
> is invoked, the system freezes for about 5 - 10 seconds. When the UI
> is responsive again, the event passed back, has no accessible
> component within it.

This is odd (2).

Because AFAIK, python based tools, like accerciser can do (1) and (2)
without problems. Joanmarie, Javier H. could you confirm that?

>
> > Window manager warning: Log level 16: AT-SPI: Error in GetItems,
> > sender=(null), error=Did not receive a reply. Possible causes
> include: the
> > remote application did not send a reply, the message bus security
> policy
> > blocked the reply, the reply timeout expired, or the network
> connection was
> > broken.

I already saw those warning, but as stuff were working I didn't take too
much attention. It seems that was an error ...
>
> 3. Deregistering callbacks doesn't actually deregister.
>
> Or, I don't understand what "deregister" means :-).
>
> When deregister_from_callback() is called, the return value is 'true',
> suggesting that the event has been deregistered. However, the callback
> that was supplied during the prior register_from_callback() is still
> invoked. It's as if the system is saying, "Okay, you've been
> disconnected as requested", but nonetheless keeps calling back when
> the event occurs.
>
> The way it's deregistered:
> deregistered = this._atspiEventListener.deregister_from_callback(
> _atspiFocusCB, 'object:state-changed:focused'
> );
>
> - the returned value, deregistered, is 'true'
> - the callback, _atspiFocusCB, continues to be called.
>
>

Is Alejandro Leiva using 1) 2) and 3) and working? In the same way, I
think that your work started with a python prototype written by
Joanmarie. Were that prototype using 1) 2) and 3)?

Askingh all this but in a different way, is all this stuff working fine
on C and python but failing on Javascript?

BR

-- 
Alejandro Piñeiro Iglesias

_______________________________________________
gnome-accessibility-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-accessibility-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.