在 OS X 中访问字典弹出窗口的 API?

发布于 2024-11-26 06:15:29 字数 196 浏览 5 评论 0原文

我一直在尝试在开发人员文档中找到这个问题,但是遇到了麻烦,所以希望有人能够回答它或为我指出正确的方向。

在使用(我认为)Core Text 的 OS X 应用程序中,您可以将鼠标悬停在单词上并输入 ctrl + cmd + d (或在 Lion 三指点击作为手势)通过弹出窗口查找字典定义。

是否有公共 API 可以将附加信息插入到该弹出窗口中?

I've been trying to find this in the developer documentation, but having trouble so hoping somebody could answer it or point me in the right direction.

In OS X apps using (I think) Core Text, you can hover over a word and type ctrl + cmd + d (or in Lion triple-finger tap as a gesture) to look up a dictionary definition via popover.

Is there a public API to insert additional information into that popover?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

套路撩心 2024-12-03 06:15:29

Apple 词典服务参考 提供 HIDictionaryWindowShow (_:_:_:_:_:_:_:)。此功能会打开一个包含短语定义的窗口。

Apples Dictionary Services Reference offers HIDictionaryWindowShow(_:_:_:_:_:_:_:). This function opens a window containing the definition of your phrase.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文