Querying an AtkObject's Interfaces
- GNOME Barrierefreiheitshandbuch für Entwickler
- Was ist Barrierefreiheit?
- Beispiele für die Nutzung der Barrierefreiheits-API
Having located the AtkObject associated with an object in the application (e.g. by using gtk_widget_get_accessible()), you can find out what interfaces it implements in various ways:
-
Use the supplied ATK_IS_... macros, for example:
- ATK_IS_ACTION(atkobj)
- ATK_IS_COMPONENT(atkobj)
- etc. (es gibt eins für jede Schnittstelle)
If the macro returns TRUE, the interface calls can safely be made on that ATK object.
-
Test the role of the AtkObject by calling atk_object_get_role(). Any given role implements a specific number of ATK APIs.