开发者

How to set the order of window?

I am looking for API to set order of window on OSX. Something like system does when we click on different windows of same开发者_运维问答 application. API which system uses to set application's windows order or update the order.

Thank you


It depends what you're trying to do. If you're trying to make some windows appear over/below others permanently, use NSWindow's -setLevel:. If you're temporarily trying to bring a specific window to the front, use something like -makeKeyAndOrderFront:.


I don't think there's a public API to set the window order system-wide, but folks have reverse-engineered CoreGraphics' private calls. Look here for CGSPrivate.h and CGSOrderWindow might be what you need.

http://code.google.com/p/undocumented-goodness/source/browse/trunk/CoreGraphics/CGSPrivate.h

As folks insist that I mention lately, using private APIs means you can't participate in the App Store.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜