开发者

How to create an inaccessible window on Mac OS?

开发者 https://www.devze.com 2023-01-04 11:40 出处:网络
I mean a window which will not be accessible via Cocoa, Carbon or other CoreGraphics API for obtaining NSWindow *, WindowRef and others.

I mean a window which will not be accessible via Cocoa, Carbon or other CoreGraphics API for obtaining NSWindow *, WindowRef and others.

Like X11 application on Mac does.

Such a window that if you pass its window ID to [NSApp windowWithWindowID] or HIWindowFromCGWindowID() they both return NULL.

开发者_StackOverflow社区

Thanks!


There's CoreGraphics Private API. Its definition is available thanks to reverse engineering. If some window is created with such API it won't be accessible via [NSApp windowWithWindowNumber: (NSInteger)windowID] or HIWindowFromCGWindowID() functions.

Xquartz uses Xplugin library, which in turn uses CoreGraphics Private API.

0

精彩评论

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