How do screen savers work on Mac OS X and Linux?

On Windows, the splash screen is just an executable with a .scr extension dumped to system32, and it is controlled by three switches (/ p, / c and / s I think).

How do screen savers work on Mac OS X and Linux? Do they work similarly on Mac OS X and Linux (Gnome, KDE, Ubuntu or wherever the difference is), or is it completely different?

Also, can they be developed in C # / Mono?

+2


source to share


2 answers


The OSX splash screen system is that the splash screen is (usually, but not required) an Objective-C library that extends the base class to implement techniques such as drawing, preference bar, preview mode, etc.

There is a good writing tutorial here .

While Objective-C is the expected language, it is easy enough to combine the C / C ++ implementation over the Objective-C API.



There is an API (bridge) that allows other languages โ€‹โ€‹to interact with the Objective-C API. This is used, for example, here to enable OSX screen savers written in Python. I assume a similar approach is possible for Mono.

xscreensaver is now being developed primarily on OSX and uses the OSX screensaver API there and something else on X11.

+3


source


For X11, I'm sure you can set up xscreensaver and work in GNOME. Not sure about KDE. But xscreensaver has long been the dominant package in Linux.

IIRC, the programming model for xscreensaver is that you write it like any old application that draws an X window. Then it can be called with " -root

" and it has to draw on the root window. But this is probably not all.



The xscreensaver FAQ seems to suggest that both GNOME and KDE have their own screensaver frameworks. But the Wikipedia article for gnome-screensaver says it is a wrapper for xscreensaver.

+1


source







All Articles