Re: GTK+ at the UX Hackfest



From: Bastien Nocera <hadess hadess net>

CCing gnome-accessibility list, as probably I will forgot several
things.

> - a11y instant-on (if not instant-off)
> a11y is enabled in applications when the XSettings mention that the GTK+
> modules should be loaded. We could make GTK+ programs instant-apply the
> XSettings (what applications would be breaking? Could we whitelist a11y
> to be the only one auto-loaded? Can we make the change for GTK+ 3.0?)
> 
> The other problem is that application need to initialise themselves, and
> register with the at-spi bus to appear in things like screen readers.
> 
> Could somebody with more knowledge on the subject tell me what changes
> would be necessary for a11y to become instant-apply?

The initalization can be done at any moment (and as you said, made by
the application themselves). Right now gtk apps require to load gail
and atk-bridge modules, so they just need to load this modules using
gmodule, and then call the method gtk_module_init (although the method
gnome_accessibility_module_init is also provided).

At this moment, to made that more easy, this is done during the
gtk_init, as it load the gtk modules reading the envar GTK_MODULES (as
far as I undertand, the idea now is avoid that and start to use
XSettings).

About the unload, there are also a method
gnome_accessibility_module_shutdown (but not gtk_module_shutdown one),
so it would be just call this method and unload the modules.

So in theory, no changes should be required from the a11y modules,
except, perhaps, add a gtk_module_shutdown method, in order to be more
general.

In the gtk side, I don't know much about the XSettings, but I suppose
that you are talking more general, and XSetting will manage all the
gtk modules to be loaded (engines, and so on). So XSettings would have
the lists of modules instead of the envvar, and inform to the
applications that this setting has changed. In this case is just
load/unload the a11y modules as any other gtk modules.

Anyway, there are some applications that made that in a custom way.
The main example is firefox. As they have some custom a11y thingies,
they override this procedure (ie loading by hand the atk bridge). So
if firefox wants to use the XSettings solution he would require to
rewrite that part, and from the gtk side, it should allow a process to
be overriden. Firefox created a log of headaches in this aspect. More
information and several cross-bugs here [1]

Other issue is that the at-spi daemon (corba or dbus) must be running
before the application load the modules (one part of this a11y
initialization from the application side is register on at-spi).

This can be tricky on the first application that want to instant-on
the a11y, and it would require to check if the daemon is running, and
if not, execute that. The other module part are general (just load gtk
modules when required) but this step requires specific code.

BR

[1] http://mail.gnome.org/archives/gnome-accessibility-list/2009-January/msg00030.html

===
API (apinheiro igalia com)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]