Re: How can I tell consistently if accessibility is enabled?
- From: Li Yuan <Li Yuan Sun COM>
- To: Timothy Renner <timothy renner gmail com>
- Cc: gnome-accessibility-list gnome org
- Subject: Re: How can I tell consistently if accessibility is enabled?
- Date: Tue, 23 Jun 2009 11:11:10 +0800
Hi Timothy,
If you can call functions in X library, getting the root window's
property will tell you if accessibility is enabled.
/*--------------example code-------------*/
Atom AT_SPI_IOR;
Atom actual_type;
int actual_format;
unsigned char *data = NULL;
unsigned long nitems;
unsigned long leftover;
AT_SPI_IOR = XInternAtom (display, "AT_SPI_IOR", False);
XGetWindowProperty(display,
XDefaultRootWindow (display),
AT_SPI_IOR, 0L,
(long)BUFSIZ, False,
(Atom) 31, &actual_type, &actual_format,
&nitems, &leftover, &data);
/*---------------end of example----------------*/
If data is not NULL, at-spi-registryd has been started, which means
accessibility is enabled.
Thanks,
Li
Timothy Renner wrote:
Hi,
I'm trying to find a reliable way of telling if accessibility is
enabled for the current X session without using the ATK or GTK
libraries built into a program. I need to be able to query the
system, say through a shell script, or something as equally limited.
I was hoping to use the output from: gconftool-2 -g
/desktop/gnome/interface/accessibility, which will give me a true if I
run as the user, but unfortunately will give me a false if I run the
app with sudo (Which makes sense, since it's then run as root). I
also can't modify the sudo call, so that's not an option.
Anyone have a better suggestion?
-Tim
_______________________________________________
gnome-accessibility-list mailing list
gnome-accessibility-list gnome org
http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]