IMPORTANT: This article is being preserved for historical purposes. Current information and documentation about GNOME Accessibility can be found at: the GNOME Accessibility Project


Prev Next


The Accessibility API

Here are a few of the basic API calls you may need to use in your application to ensure it works well with assistive technologies. The full accessibility API is extensive, to allow you to write your own accessible custom widgets for example. The full documentation can be found at http://developer.gnome.org/doc/API/2.0/atk/book1.html.

Table 1. Commonly used ATK API calls

API

Description

AtkObject* gtk_widget_get_accessible (GtkWidget*)

Returns the accessible object that describes the specified GTK widget to an assistive technology.

void atk_object_set_name (AtkObject*, const gchar*)

Sets the name of the accessible object. For example, if the object is a graphical button that quits the application when pressed, the name might be "Quit".

void atk_object_set_description (AtkObject*, const gchar*)

Sets the textual description of the accessible object. For example, if the object is a graphical "Close" button, the description might be "Closes the window".

AtkRelation* atk_relation_new (AtkObject**, gint, AtkRelationType)

Creates a new relation between the specified key and the specified list of target objects. A relationship normally indcates to the assistive technology that one widget is somehow related to another. For example, that a particular GtkLabel widget is the caption for a GtkTreeView in the same window.

void atk_image_set_description (AtkImage*, const gchar*)

Sets the textual description of the accessible image object. For example, if the object is a thumbnail of a virtual desktop in a panel applet, the description might be "Image showing window arrangement on desktop 1".

This table should probably list the API calls that we use in the examples elsewhere in this document. (Or at least the ones not related to making your own custom widgets accessible).


Home Prev Next

Accessibility/Documentation/GNOME2/GNOME Accessibility for Developers/The Accessibility API (last edited 2011-07-21 17:58:01 by JoanmarieDiggs)