How does screen savers work on Mac OS X and Linux?(屏幕保护程序如何在 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 上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:屏幕保护程序如何在 Mac OS X 和 Linux 上工作?
基础教程推荐
- Moq It.Is<>不匹配 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
