且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何屏幕保护程序在Mac OS X和Linux工作?

更新时间:2023-11-14 12:06:10

在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.

有上写他们一个很好的教程这里。

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.