Zugänglichkeitsinformationen einer Anwendung sammeln

A program that wishes to make use of ATK calls would likely need to do one (or more) of the following things:

  1. Create an event watcher, for example with the atk_add_focus_tracker() function:

    atk_add_focus_tracker (_my_focus_tracker);

    wobei _my_focus_tracker() eine Funktion folgenden Prototyps ist:

    void _my_focus_tracker (AtkObject *aobject);
  2. Richte einen globalen Ereignislistener ein, mit atk_add_global_event_listener():

    mouse_watcher_focus_id =   atk_add_global_event_listener(_my_global_listener,"Gtk:GtkWidget:enter_notify_event");
    

    where _my_global_listener has the prototype of a Glib GSignalEmissionHook. This example would cause the _my_global_listener() to be called whenever an enter_notify_even signal occurs on a GtkWidget object.

  3. Access the ATK top-level object with the following function call.

    AtkObject *root_obj = atk_get_root();

    This returns an AtkObject which contains all toplevel windows in the currently running program. The user could then navigate through the object hierarchy by accessing the root object's children, which corresponds to the toplevel windows.