如何从所有正在运行的应用程序中获取所有打开的 NSWindow 的列表? [英] How to get a list of all open NSWindow from all running application?

查看:19
本文介绍了如何从所有正在运行的应用程序中获取所有打开的 NSWindow 的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从 mac 桌面获取打开或可见的 NSWindow 列表?

Is there a way to get list of open or visible NSWindow from mac desktop?

推荐答案

注意并不是所有的窗口都必须是 NSWindows,而且 NSWindow 只提供了一个窗口的接口您自己的地址空间.

Note that not all windows are necessarily NSWindows, and that NSWindow only provides an interface to windows in your own address space.

支持访问每个窗口的方式是CGWindow API.查看Son of Grab 示例代码看看它是如何完成的.

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.

这篇关于如何从所有正在运行的应用程序中获取所有打开的 NSWindow 的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆