屏幕保护程序如何在 Mac OS X 和 Linux 上工作? [英] How does screen savers work on Mac OS X and Linux?

查看:22
本文介绍了屏幕保护程序如何在 Mac OS X 和 Linux 上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows 中,屏幕保护程序只是一个在 system32 中转储的带有 .scr 扩展名的可执行文件,它由三个开关(我认为是/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#/Mono 开发吗?

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.

这里有一个很好的编写教程.

There is a good tutorial on writing them here.

虽然 Objective-C 是预期的语言,但将 Objective-C API 后面的 C/C++ 实现耦合在一起非常简单.

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 互操作.例如,here 用于允许使用 Python 编写的 OSX 屏幕保护程序.我想类似的方法对 Mono 来说是可行的.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆