|
Introducing Screensavers
by Graeme Woods
What is a screensaver? A screensaver is a pop up simple program within operating
systems that appears whenever you leave the keyboard or mouse unattended for a
couple of minutes. To find out whether it can start the screensaver or not,
Windows sends a message to the foreground application. This command is asking
the application, "Can I start the screensaver?"
A non-Windows program will not understand the command, and therefore will not
answer it. A CBT application will understand it, but will respond with a command
that means "No, I'm providing training right now." All other applications should
respond positively to the command.
The screensavers were originally designed to protect the computer monitor from
phosphor burn-in. The phosphors, used to make the pixels in the display, would
glow at a constant rate for such a long period of time that they would actually
discolor the glass surface of the CRT. This discoloration would then be visible
as a faint image overlaying whatever else was displayed on the monitor.
Now you can use screensavers for:
- Entertainment - most people use screensavers for the fun of watching them.
There are several screensaver categories like: natural environments (e.g. animated
waterfalls, aquariums, fireplaces etc.), favorite actor/actress screensavers,
cars screensavers etc.
- Advertisement - many companies have developed their own themed screensavers
(e.g. a black background with the name of the company scrolling up and down).
- Security - this might be one of the most important uses .You can simply set a
password so when your computer exits the screensaver will actually require a
password to go back to its desktop. Many people use this option to prevent
others from invading their privacy.
Screensaver Development A screensaver is really just an executable file, with
the extension changed from .exe to .scr. By putting a screensaver file into the
Windows or System directory and giving it a .scr extension, Windows knows that
it should treat this file as a screensaver and makes it available as an option
in the Display properties window.
The bulk of the screen saver is written in C++ and uses OpenGL for rendering.
It is shared between both Windows and Macintosh versions. The Windows version also
is in C++ and talks directly to the Win32 API (no MSVC classes). The development
environment is Microsoft Visual C++ 2005 Express, but a VC++ 6.0 project is also
included. The Macintosh version is in a mix of C++ and ObjectiveC, and is built
with Xcode.
The screensaver interfaces indirectly with the operating system to cause the
physical display screen to be overlayed with one or more graphic 'scenes'. The
screensaver typically terminates after receiving a message from the operating
system that the mouse has been moved or a key has been pressed. The screensaver
file can be programmed in several different ways. It can:
- Simply present a black screen
- Load and display a particular image or group of images
- Display a particular line of text
- Display an animation or series of animations
- Display information from another program or a Web site
|