Calling App Expose In Lion

冷暖自知 提交于 2019-12-06 05:05:32

问题


Is there any way to call App Expose in Lion programmatically, for example on an event tap, etc?


回答1:


If you don't mind using a TOTALLY UNDOCUMENTED API, which might change at any point without notice:

void CoreDockSendNotification(CFStringRef, void *);
(...)
CoreDockSendNotification(@"com.apple.expose.front.awake", NULL);

Other known arguments are @"com.apple.expose.awake" and @"com.apple.dashboard.awake", which activate Mission Control and Dashboard, respectively. @"com.apple.showdesktop.awake" used to activate Show Desktop, but no longer works on current versions of macOS.

Note that most applications should not use these calls -- these actions are intended to be invoked directly by the user.




回答2:


Expose does not exist in Lion, it has been merged with Spaces into the Mission Control application. You can launch Mission Control:

[[NSWorkspace sharedWorkspace] launchApplication:@"Mission Control"];


来源:https://stackoverflow.com/questions/7351787/calling-app-expose-in-lion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!