检测Mac OS X上是否隐藏光标 [英] Detect if cursor is hidden on Mac OS X
本文介绍了检测Mac OS X上是否隐藏光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有程序化,非私人API的方式来检测鼠标光标是否隐藏在Mac OS X? (例如,当输入文本字段时)。
NSCursor
有隐藏
和 unhide
,但没有 isHidden
。我想知道是否有一些其他的API,可以做我想要的。 c> c> c> 返回 BOOL
)。
Is there a programmatic, non-private-API way to detect whether the mouse cursor is hidden on Mac OS X? (As occurs, for example, when typing into a text field.)
NSCursor
has hide
and unhide
but no isHidden
. I'm wondering if there is some other API which might do what I want. C-based APIs are fine.
解决方案
Try CGCursorIsVisible()
(returns a BOOL
).
这篇关于检测Mac OS X上是否隐藏光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文