如何屏幕保护程序在Mac OS X和Linux工作? [英] How does screen savers work on Mac OS X and Linux?
问题描述
在Windows中的屏幕保护程序仅仅是一个带有的 .scr等的扩展在system32倾倒可执行文件,并且它有三个开关控制(/ P,/ c和/ S,我认为)。
In Windows a screen saver is just an executable with a .scr extension dumped in the system32, and it is controlled with three switches (/p, /c and /s, I think).
如何屏幕保护程序在Mac OS X和Linux工作?难道他们在Mac OS X和Linux的工作同样(GNOME,KDE,Ubuntu的,或是其他地方不同的是),或者是完全不同的?
How does screen savers work on Mac OS X and Linux? Do they work similarly in Mac OS X and Linux (Gnome, KDE, Ubuntu, or wherever the difference is) or is it completely different?
此外,他们能开发在C#/单声道?
Also, can they be developed in C#/Mono?
推荐答案
在OSX屏幕保护系统是一个屏幕保护程序(通常是,但不一定)是一个Objective- C库,扩展一个基类来实现的方法,如绘画,偏好窗格,预览模式等。
The screensaver system in OSX is that a screensaver (typically, but not necessarily) is an Objective-C library, extending a base class to implement methods such as drawing, a preference pane, a preview mode and so on.
有上写他们一个很好的教程<一个HREF =http://cocoadevcentral.com/articles/000088.php相对=nofollow>这里。
There is a good tutorial on writing them here.
虽然Objective-C的是预期的语言,它是足够简单耦合在一起的C / C ++中的Objective-C API背后的实现。
While Objective-C is the language expected, it is straightforward enough to couple together a C/C++ implementation behind the Objective-C API.
有一个API(一桥),以允许其他语言用Objective-C的API的互操作。这是用来,在这里例如, ,以允许用Python编写的OSX屏幕保护程序。我想类似的方法是可行的单
There is an API (a bridge) to allow other languages to inter-operate with Objective-C APIs. This is used, for example, here to allow OSX screen savers written in Python. I imagine a similar approach is feasible for Mono.
的xscreensaver 现发展主要在OSX,并使用OSX屏保API有和X11别的东西。
xscreensaver is now developed mostly on OSX, and uses the OSX screensaver API there and something else on X11.
这篇关于如何屏幕保护程序在Mac OS X和Linux工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!