Note that not all windows are necessarily NSWindows
, and that NSWindow
only provides an interface to windows in your own address space.
The supported way to access every window is the CGWindow
API. Take a look at the Son of Grab sample code to see how it's done.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…