Frysk logo Home  |  Use Cases  |  Work Flows  |  FAQ  |  Get Involved  |  Bugzilla  |  Build  |  Documentation  |  Developers



Here is how to set up standard widgets so that they can be seen by dogtail.

All Gtk widgets have associated accessibility objects. What dogtail needs is for these widgets to be given names so they can be more easily accessed.

In order to do this in Gtk C code do the following (assuming the widget you are looking at is called myWidget:

GtkWidget * widget = myWidget;
AtkObject *myAccessibility = gtk_widget_get_accessibility(widget);
atk_object_set_name(myAccessibility, _("My Name"));
atk_object_set_description(myAccessibility, _("My Description."));

_("") is for internationalization purposes if you so choose.

This is all dogtail needs to be able to access this widget by name.

In terms of java-gnome, the easiest thing to do is to open up the glade file and click on the accessibility tab (far right) and give a name and description.

In java-gnome, if you can't use the glade accessibility, the code is very similar:

AtkObject obj = widget.getAccessible();
obj.setName("My Name");
obj.setDescription("My Description");

This should give you accessibility for all standard widgets.