#!/usr/bin/python3

import pyatspi

def draw_access(access):
    component = access.queryComponent()
    (x, y, width, height) = component.getExtents(0)
    print("  frame %dx%d+%d+%d" % (width, height, x, y))

desktop = pyatspi.Registry.getDesktop(0)
for app in desktop:
    print(app.name)
    for frame in app:
        print(frame)
        draw_access(frame)

