We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
CGEventTap。
NSStatusItem。
任何 NSView 可以 执行此操作,但对于 OpenGL,您需要 NSOpenGLView。
除了通常的全屏方法之外,您可能更喜欢将视图放在 窗口位于屏幕保护级别。尝试两种方法,看看哪一种最适合您。
NSSound。
CGEventTap.
NSStatusItem.
Any NSView can do this, but for OpenGL, you'll want NSOpenGLView specifically.
Alternatively to the usual full-screen method, you might prefer to put the view in a window at the screen-saver level. Try both ways and see which works best for you.
NSSound.
如果您精通基于 C 的语言,那么 Cocoa 是一个很好的起点,并且对于您所描述的任务来说可能是最简单的。从这里开始可可: http://developer .apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html
Python 也有一些出色的支持,您可以在此处查找可能包含您需要的模块:http://docs.python.org/library/mac.html
如果您更喜欢 Java,这是我开始寻找您需要的功能的地方: http://developer.apple.com/mac/library/documentation/Java/Conceptual/Java14Development/05-CoreJavaAPIs/CoreJavaAPIs.html
老实说我不确定该推荐哪个,我可以只是说可可可能会为您可能需要的任何集成提供最好的支持。
If you are well versed in C based languages, Cocoa is an excellent place to start and would probably be the easiest for the tasks you describe. Start here for cocoa: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html
Python has some excellent support as well, you can look here for modules that may contain what you need: http://docs.python.org/library/mac.html
If you would prefer Java, here is where I would start looking for the functionality you need: http://developer.apple.com/mac/library/documentation/Java/Conceptual/Java14Development/05-CoreJavaAPIs/CoreJavaAPIs.html
I'm not sure honestly which to recommend, I can just say cocoa will probably have the best support for any integration you may need.
这最初是一条评论,但变得太大了。
我认为您可以使用 Java 来完成大部分操作 - 例如,菜单图标可以通过 SystemTray API 来完成,该 API 将它们放在 Windows 或 OS X 上的相关位置。之前对此的具体答案: 使用 Java 的 Mac OS 中的系统托盘(菜单附加)图标
关键问题是 Java 是否有 API 可以从操作系统获取“原始”事件,或者仅在焦点位于应用程序时才提供。例如,标准 KeyListener 链接到具有焦点的组件。
然而,考虑到应用程序的性质,我建议使用 Cocoa。这还允许您使用核心动画(Quartz / OpenGL 的更高级别的抽象)。
This started out as a comment but got too big.
I think you could do most of this with Java - menu icons, for instance, can be done through the SystemTray API which puts them in the relevant place on Windows or OS X. A previous specific answer on this : System Tray (Menu Extras) icon in Mac Os using Java
The key question is whether Java has APIs to grab 'raw' events from the OS, or only when focus is on the application. The standard KeyListener, for instance, is linked to a component with focus.
However, given the nature of the application, I'd suggest going with Cocoa. This would also allow you to use Core Animation (a higher level abstraction over Quartz / OpenGL).