|
A Screen Saver is a module that displays entertaining animations whenever your computer has been idle for too long, thus preventing the dreaded "pixel rot" that afflicts so many monitors. The Screen Saver system is made up of these parts:
Part What is it? screen_blanker The application that takes over the screen and runs screen saver modules when it's time to save the screen. It also handles asking for and verifying passwords. screen_blanker lives in /bin. screen_saver An input server add-on that monitors user activity and starts (or stops) screen_blanker. ScreenSaver preferences The Screen Saver system's preference panel. It loads screen saver modules so the user can configure and preview them. BScreenSaver class BScreenSaver provides an interface for developers creating their own screen saver modules. Classes derived from BScreenSaver implement the functions that draw on the screen while it's being saved. Screen saver add-ons A screen saver add-on embodies a single screen saver module. It contains the (compiled) BScreenSaver code that you write, and provides a hook function, instantiate_screen_saver(), that lets the screen saver engine create an instance of your BScreenSaver class. The add-ons are stored in the expected places: the Screen Savers directory in B_BEOS_ADDONS_DIRECTORY for screen savers that come with BeOS, or Screen Savers in B_USER_ADDONS_DIRECTORY for ones you've added. As a screen saver module developer, you have to provide two things: a BScreenSaver subclass, and an implementation of the instantiate_screen_saver() function. These responsibilities are discussed in the next two sections ("BScreenSaver" and "Screen Saver Add-ons").
The final two sections take a brief look at the ScreenSaver preference application ("Talking to ScreenSaver"), and provide an example of a BScreenSaver class ("An Example Screen Saver").
|
Copyright © 2000 Be, Inc. All rights reserved..