问题
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.
回答1:
Try CGCursorIsVisible()
(returns a BOOL
).
来源:https://stackoverflow.com/questions/5026660/detect-if-cursor-is-hidden-on-mac-os-x