home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 1994 October
/
SOFM_Oct1994.bin
/
pc
/
os2
/
ssvr13
/
ssdll.hlp
(
.txt
)
< prev
Wrap
OS/2 Help File
|
1994-06-23
|
20KB
|
455 lines
ΓòÉΓòÉΓòÉ 1. About ScreenSaver ΓòÉΓòÉΓòÉ
Version 1.3
Copyright (C) 1993-94 Siegfried Hanisch
This program is dedicated to Michaela.
Permission to use, copy and distribute this software and its documentation for
any purpose and without charging more than a nominal fee for copying is hereby
granted, provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in supporting
documentation. This software is provided "as is" without express or implied
warranty.
Please note that from version 1.3 on ScreenSaver is Shareware not Freeware.
ScreenSaver is an easy-to-use 32-bit screen saver for OS/2 2.x.
When ScreenSaver is started, it monitors your keyboard and mouse activity in
the backgound. If there has not been any activity for some time, the saver
becomes active. It stays active until the mouse is moved or clicked or a key is
pressed. You can set various options by double clicking ScreenSaver in the
window list (press Ctrl+Esc to show the window list). If you want to quit
ScreenSaver, press the "Exit ScreenSaver" button in the configuration panel.
ScreenSaver has the advantage of low memory consumption and very low CPU usage
- this means virtually no performance impact on your normal work.
ScreenSaver has a very modular structure: It searches its directory for saver
modules and selects a module randomly when the saver becomes active. Therefore
it is very easy to extend ScreenSaver by just copying new saver modules to its
directory.
Version 1.3 has now password protection similar to the OS/2 lockup feature.
It is now possible to use Deskpic modules with ScreenSaver. Just copy them to
the ScreenSaver directory.
Sample source code for do-it-yourself saver modules is included in the archive;
see Creating new saver modules for information on how to create your own
modules.
Even for people who don't know anything about programming it is possible to
create their own saver modules; see Creating bitmap saver modules for more
information.
Related information:
Options dialog controls
Note for users of OS/2 2.1
Contacting the author, Registration
ΓòÉΓòÉΓòÉ 2. Options dialog controls ΓòÉΓòÉΓòÉ
The options dialog allows you to select various ScreenSaver options. The
settings take effect immediately.
It contains the following controls:
Close button
Exit ScreenSaver button
Timeout slider
Saver now corner
Saver now corner enabled
Saver never corner
Saver never corner enabled
Configure module button
Test module button
Saver enabled check box
Mouse sensing check box
Available saver modules list box
Low priority check box
Monitor fullscreen sessions check box
Password push button
Related information:
About ScreenSaver
Note for users of OS/2 2.1
ΓòÉΓòÉΓòÉ 2.1. Close button ΓòÉΓòÉΓòÉ
The "Close" button closes the Options dialog. You can also press the Hide
button in the top right corner of the dialog window.
Related information:
Options dialog controls
Note for users of OS/2 2.1
About ScreenSaver
ΓòÉΓòÉΓòÉ 2.2. Exit ScreenSaver button ΓòÉΓòÉΓòÉ
Use the "Exit ScreenSaver" button to end ScreenSaver. You can also double click
the system menu or select Close from the system menu in the top left corner of
the dialog window.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.3. Timeout slider ΓòÉΓòÉΓòÉ
With the "Timeout" slider you can adjust the time after which the saver becomes
active.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.4. Saver now corner ΓòÉΓòÉΓòÉ
Use these radio buttons to select the corner of the screen into which you have
to move the mouse pointer to activate the saver immediately.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.5. Saver now corner enabled ΓòÉΓòÉΓòÉ
With this check box you can enable and disable the "saver now" feature.
Related information:
Saver now corner
Options dialog controls
ΓòÉΓòÉΓòÉ 2.6. Saver never corner ΓòÉΓòÉΓòÉ
With these radio buttons you can select the corner of the screen into which you
have to move the mouse pointer to temporarily disable monitoring mouse and
keyboard activity.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.7. Saver never corner enabled ΓòÉΓòÉΓòÉ
With this check box you can enable and disable the "saver never" feature.
Related information:
Saver never corner
Options dialog controls
ΓòÉΓòÉΓòÉ 2.8. Configure module button ΓòÉΓòÉΓòÉ
This button displays the configuration dialog of the saver module which is
selected in the list box. You can also double click on the list box item to
display the corresponding configuration dialog, too. Press the '+' or '-' keys
to directly enable or disable a saver module (this does not work for Deskpic
modules ).
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.9. Test module button ΓòÉΓòÉΓòÉ
This button activates the saver module that is selected in the list box. To
stop the test, either move the mouse or click a mouse button or press a key.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.10. Saver enabled check box ΓòÉΓòÉΓòÉ
Use the "Saver enabled" check box to enable or disable screen saving.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.11. Mouse sensing check box ΓòÉΓòÉΓòÉ
The "Mouse sensing" check box enables or disables monitoring of mouse movement
while the saver is active. This means, if mouse sensing is disabled and the
saver is active, the saver can only be stopped by pressing a key or clicking a
mouse button, but not by moving the mouse; this may be useful if you do not
want the saver to stop if you accidentially touch the mouse.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.12. Available saver modules list box ΓòÉΓòÉΓòÉ
The "Available saver modules" list box shows all available saver modules.
Double clicking on a list box item displays the corresponding configuration
dialog. A plus sign in front of a module name means the module is enabled, a
minus sign means it is disabled. You can enable or disable a module in its
configuration dialog or by highlighting it and pressing '+' or '-' (this does
not work for Deskpic modules ). When the timeout interval expires, ScreenSaver
chooses one of the enabled saver modules randomly. If all modules are disabled,
the built-in "Eternal Blackness" module is used for screen saving.
If you want another font in the list box, choose one from the font palette and
drag it into the list box.
Related information:
Options dialog controls
Note for users of OS/2 2.1
About ScreenSaver
ΓòÉΓòÉΓòÉ 2.13. Low priority check box ΓòÉΓòÉΓòÉ
Use the "Low priority" check box to decide wether the saver, when activated,
should run with low priority or normal priority. On low priority the saver gets
CPU time only when no other application requests CPU time. Normal priority
means the saver shares CPU usage with all other tasks; this means the animation
is smoother, but other applications may run slightly slower. Some saver module
animations may work considerably slower when low priority is disabled.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.14. Monitor fullscreen sessions check box ΓòÉΓòÉΓòÉ
If monitoring of fullscreen sessions is enabled, ScreenSaver will switch from
an active fullscreen session to the Presentation Manager when the timeout
interval expires to do its saver action. When a key is pressed or the mouse is
moved, ScreenSaver switches back to the fullscreen session.
In this version only OS/2 fullscreen sessions are monitored. DOS fullscreen
sessions and Win-OS/2 fullscreen sessions are not monitored.
This option is not available on OS/2 2.0.
Related information:
Options dialog controls
ΓòÉΓòÉΓòÉ 2.15. Password push button ΓòÉΓòÉΓòÉ
This button displays the password protection dialog.
Related information:
Options dialog controls
Password protection dialog
ΓòÉΓòÉΓòÉ 3. Password protection dialog ΓòÉΓòÉΓòÉ
This dialog lets you change your password and enabled/disable password
protection and startup locking.
In order to enable or disable password protection, you must enter the old
password.
In order to enable or disable the "Lock on startup" feature, you must enter the
old password.
In order to change your password, you must enter the old password and the new
password (enter the new password twice for verification).
When you install ScreenSaver, the predefined password is
I will send money
to remind you to register ScreenSaver :-)
See also Contacting the author, Registration
ΓòÉΓòÉΓòÉ 4. Creating your own saver modules ΓòÉΓòÉΓòÉ
The following two sections describe how to create saver modules:
Creating bitmap saver modules
Creating new saver modules
ΓòÉΓòÉΓòÉ 4.1. Creating bitmap saver modules ΓòÉΓòÉΓòÉ
Even for a non-programmer, it is VERY easy to create new bitmap saver modules.
There are six steps involved in doing so:
1. Open an OS/2 command session, change your working directory to the
ScreenSaver directory, and make sure the files BITMAPS.RES, BITMAPS.SSM,
BMPSAMP.RC and MAKEMOD.EXE are there. If they are not, unzip them from the
file CUSTBMP.ZIP (CUSTBMP.ZIP can be found in the ScreenSaver distribution
file).
2. Get some pictures in bitmap format (*.BMP).
You can create bitmaps by scanning photographs, you can convert existing
pictures from other formats (*.GIF, *.TIF etc.) to bitmap format with
appropriate software, or you can draw them yourself (with the OS/2 Icon
Editor or Paintbrush or any other program that can handle bitmap files).
Copy all the bitmaps you want to use to the ScreenSaver directory.
3. Choose a name for the new saver module and a name for the file in which
your saver is stored. The name for the file must be exactly 8 characters
long; the name of the saver module should have a maximum length of 32
characters. Now type "COPY BMPSAMP.RC FILENAME.RC" and press Enter (replace
FILENAME with the file name you chose). Load the new file into an editor.
You can use the OS/2 system editor E.EXE to edit the file.
4. Replace the string "Custom Bitmaps" with the name you chose for your saver
module. Do not change the number in front of the string.
5. Insert lines with the name of your bitmap files. The lines must have the
following format:
BITMAP number bitmap-file-name
The numbers must be consecutive and in ascending order (in the first line
inserted number must be 1, in the second 2 and so on).
There is no limit on the number of bitmaps in your saver module. Now save
the file and quit the editor.
6. Type "MAKEMOD FILENAME" (again, replace FILENAME with the file name you
chose) and press Enter. If everything is ok, MAKEMOD tells you that it
created the new module. In case of an error, MAKEMOD prints an error
message and some hints what you should do; it is most likely that you
mistyped the name of a bitmap file.
If module creation was successful you have to restart ScreenSaver. The name
of the new module should be listed in the "Available saver modules" list
box then.
The following tutorial shows how to build a new bitmap module.
Assume that you want to use the three bitmaps ME.BMP, YOU.BMP and DOG_BOO.BMP;
you chose the name of the saver module to be "My Family" and the name of the
saver module file to be "MYFAMILY".
You enter
COPY BMPSAMP.RC MYFAMILY.RC
at the command prompt. Then edit the new file (in this example we use the OS/2
system editor E.EXE)
E MYFAMILY.RC
and change the file contents to look like this.
The part of the file that is marked green (the text between "/*" and "*/") is
a comment. You can include your own comments if you like.
The red text is the module name you insert and the cyan text are the lines
enumerating the bitmap files. The rest of the text has to be there; don't alter
it. Note that the name of the module and the names of the bitmap files have to
be enclosed in double quotation marks.
/*
MYFAMILY.RC
resource file for custom bitmaps saver module
*/
STRINGTABLE
{
1 "My Family"
}
BITMAP 1 "ME.BMP"
BITMAP 2 "YOU.BMP"
BITMAP 3 "DOG_BOO.BMP"
Now save the file, quit the editor and type
MAKEMOD MYFAMILY
at the command prompt. MAKEMOD prints a few messages as it works, and finally a
success message or a self-explanatory error message.
Now you restart ScreenSaver. The item "My Family" should appear in the list
box.
Related information:
Creating new saver modules
ΓòÉΓòÉΓòÉ 4.2. Creating new saver modules ΓòÉΓòÉΓòÉ
You should have some experience with Presentation Manager programming and
knowledge of the C programming language to create your own saver modules.
The ScreenSaver archive comprises sample source code that shows you how to do
it. Unzip the files sample.c, sample.h, sample.rc, sample.dlg, sample.def and
sample.mak from the file SAMPLE.ZIP (SAMPLE.ZIP can be found in the ScreenSaver
distribution file) and copy these files to some other name of your choice (keep
the original extensions). If you compile and link in another directory than the
ScreenSaver directory, also copy the file SSAVER.ICO to your working directory.
Now take a look at these files. They are are commented and contain something
like
/*
$$$$$ insert code here $$$$$
... comment ...
$$$$$ for example $$$$$
... example code ...
*/
at those places where you should fill in your code. You can't miss it. Be sure
to read the comments before inserting your code.
In the "for example" sections of the comments you will find the source code of
the "Pyramids" saver module that comes with the ScreenSaver distribution. You
can use it as a template for creating your own saver modules.
After having successfully compiled your new module the first time, you can use
the Dialog Editor to edit the *.RES file and change the configure dialog if
required.
You should be able to use EMX0.8g (or higher) or the IBM compiler to build new
modules. Maybe other compilers work too, but I have not tested that.
Now some explanations how a saver module works:
After the timeout occurred, the ScreenSaver program loads a saver module into
memory and makes it start screen saving. The saver module creates a window that
has the size of the whole screen. It then starts another thread (the one you
will have to write the code for) that draws anything it wants in this window;
see the sample code for more information. When the ScreenSaver program stops
the saver module, this thread ends, the window is destroyed and the saver
module is unloaded from memory. The idea is, that this independent thread can
run with idle time priority without considering any processing of PM messages.
Related information:
Creating bitmap saver modules
ΓòÉΓòÉΓòÉ 5. Note for users of OS/2 2.1 ΓòÉΓòÉΓòÉ
There is a known bug in OS/2 2.1 which sometimes prevents applications from
saving their data to the OS/2 INI-files. Therefore, if you experience that the
ScreenSaver options are not saved correctly, please try the following solution:
Add the line
attrib -r x:\os2\os2*.ini
to the file x:\startup.cmd (x is the drive letter of your boot drive; if the
file x:\startup.cmd does not exist, create it) and reboot.
ΓòÉΓòÉΓòÉ 6. Using Deskpic modules ΓòÉΓòÉΓòÉ
It is now possible to use Deskpic modules with ScreenSaver.
Deskpic is a public domain OS/2 screen saver written by John Ridges. A lot of
saver modules exist for this program. They can be found at the usual locations
such as Internet FTP sites and BBSs.
The saver module files have the extension *.DSS. In order to use them with
ScreenSaver, just copy them into the ScreenSaver directory.
Deskpic modules are marked with "[Deskpic]" in the list box. The only
restriction is that you can not enable or disable them by pressing '+' or '-';
you have to use the module configuration dialog to do so.
ΓòÉΓòÉΓòÉ 7. Contacting the author, Registration ΓòÉΓòÉΓòÉ
My mail address is
Dipl.-Ing. Siegfried Hanisch
Einsiedlergasse 6/16
A - 1050 Vienna
AUSTRIA / EUROPE
My Internet address is
hanisch@swwwnext.tuwien.ac.at
Please send any suggestions, comments or bug reports to one of the above
addresses.
If you have questions concerning the programming of new saver modules, please
contact me via e-mail.
To register ScreenSaver, please send 20 US$ / 30 DM / 200 ATS (cheque or cash)
to the mail address above.