macos - Mac OS X Carbon : What is the difference between SelectWindow vs. ActivateWindow 以及 Cocoa 的等效项是什么

标签 macos cocoa macos-carbon

标题基本上总结了我的问题。我想知道 Mac Carbon SelectWindow 和 ActivateWindow(..., TRUE) 之间的区别是什么。我在旧源中找到了这些,想知道它们是否可以互换(或者它们的 Cocoa 等价物可能是什么)。

最佳答案

凭内存...

SelectWindow 是对单击窗口的响应。它将窗口带到前面,激活它,并(通常)使其成为第一响应者。 (我在这里使用 Cocoa 术语。)它有点像 OrderFront

The SelectWindow function removes highlighting from the previously active window, brings the specified window to the front, highlights it, and generates the activate events to deactivate the previously active window and activate the specified window. If the specified window is already active, SelectWindow has no effect. Call SelectWindow when the user presses the mouse button while the cursor is in the content region of an inactive window.

激活窗口更新了窗口框架以指示该窗口是第一响应者。

关于macos - Mac OS X Carbon : What is the difference between SelectWindow vs. ActivateWindow 以及 Cocoa 的等效项是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15570046/

相关文章:

c++ - 如何使用 C++ 在 Mac OSX 中显示输入框

objective-c - 制作 .webloc 文件

macos - FMOD Ex 掉落声音,最终变得无声

objective-c - 了解 native Mac 应用程序应如何组织

java - 在 Mac 上以 Octave 更改 JDK 版本

macos - 如何获取 NSEvent 时间戳(以毫秒为单位)?

objective-c - 框架和动态库的主要区别是什么

OSX 的 Python evdev 等价物

macos - Apple TextEdit,它的工具栏从何而来?

cocoa - dylib 中 Nib 的窗口