开发者

How do I get window number from CFTypeRef in cocoa?

开发者 https://www.devze.com 2023-02-05 22:00 出处:网络
CFTypeRef focusedWindow; AXUIElementCopyAttributeValue( frontMostApp, kAXFocusedWindowAttribute, (CFTypeRef *)&focusedWindow
CFTypeRef focusedWindow;
AXUIElementCopyAttributeValue(
        frontMostApp, kAXFocusedWindowAttribute, (CFTypeRef *)&focusedWindow
);

in this case, How do I get window number from focusedWindow?

Window number is l开发者_如何学运维ike [[NSApp mainWindow] windowNumber]


It's an AXUIElement, and unfortunately, you can't get its window number AFAIK.

0

精彩评论

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