AT-SPI is an abbreviation for Assistive Technology Service Provider Interface. It's an inter-process communication API based on CORBA technologies for assistive issues.
The AT-SPI binding library pyatspi enables developers to track different window or widgets events. The following example describes how to use this library as a daemon and listen to window activate, window deactivate and widget focus events.import pyatspi # get the Registry singleton reg = pyatspi.Registry() # get desktop desktop = reg.getDesktop(0) # count of desktops print "count of desktops: \n", reg.getDesktopCount() # print all app names apps = [app.name for app in desktop if app is not None] print "running apps: \n", apps # track focus and window events def eventCallback(event): print event event_identifiers = ['focus', 'window:activate', 'window:deactivate'] # 'monitoring of ' reg.registerEventListener(eventCallback, *event_identifiers) try: pyatspi.Registry.start() except KeyboardInterrupt: pass # cleanup and derigister eventlisteners pyatspi.Registry.stop() reg.deregisterEventListener(eventCallback, *what) print 'Done'
Regards
Rafael Sobek
Technorati Tags: AT-SPI example Track Gnome Window and WIdget Events

Hi,
How can I use groovy language (instead of Python) to utilize AT-SPI library?
With Regards, NV