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

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

问题描述

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

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

推荐答案

必须 NSW Windows ,并且 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。请查看抓取之王示例代码,了解其完成情况。

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天全站免登陆