views:

29

answers:

1

Basically, I am looking for something like Win32's EnumChildWindows on Mac and X11, which takes a handle to a window and returns a list of its child windows.

+1  A: 

For X11, look at the xwininfo source to see how xwininfo -children works.

alanc
Thanks, this is helpful and will lead me to creating the function I need. Also, as a note to anyone else reading this question, a solution for Mac can be found on the accepted answer on this question http://stackoverflow.com/questions/2869052/how-do-i-find-a-window-at-a-certain-point-on-the-screen-for-screenshot-screen-rec and the function itself looks like CGWindowListCopyWindowInfo. I haven't tested it but the documentation looks like it's roughly equivalent to a combination between EnumChildWindows, GetWindowRect, GetWindowText and more.
Jake Petroules