“暴露"在 Mac 应用程序中的效果 [英] "Expose" effect in a Mac application

查看:22
本文介绍了“暴露"在 Mac 应用程序中的效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么方法或函数可以在Mac中获得点击按钮时的曝光效果?

Is there any way or function that can be used to obtain the expose effect in Mac, when a button is clicked?

我尝试搜索,但到目前为止我没有运气.

I tried searching, but I had no luck, so far.

推荐答案

没有用于此的 API.AFAIK 唯一的方法是使用 NSWorkspace 启动 Exposé 应用程序(Mac OS X 版本 <10.7)或 任务控制> 应用程序(Mac OS X 版本 >= 10.7).

There is no API for this. AFAIK the only way to do it is to use NSWorkspace to launch either the Exposé app (Mac OS X versions < 10.7) or the Mission Control app (Mac OS X versions >= 10.7).

此代码使用 com.apple.exposelauncher 捆绑 ID,对于随 Exposé 提供的所有 Mac OS X 版本都相同:

This code uses the com.apple.exposelauncher bundle ID which is the same for all versions of Mac OS X that ship with Exposé:

[[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:@"com.apple.exposelauncher" 
                                                     options:NSWorkspaceLaunchDefault 
                              additionalEventParamDescriptor:NULL 
                                            launchIdentifier:NULL];

这篇关于“暴露"在 Mac 应用程序中的效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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