home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
util
/
procurepens-1.14.lha
/
ProcurePens
/
ProcurePens.DOC
< prev
next >
Wrap
Text File
|
1994-03-16
|
7KB
|
175 lines
PROCUREPENS and SETPENS
~~~~~~~~~~~~~~~~~~~~~~~
Color setting software for AGA and Workbench release 3.0 (V39) or higher.
Copyright ©1993 by Joseph Luk. All rights reserved.
----------------------------------------------------------- MAIN DOCUMENTATION
Note: please see Readme file for release history and important announcements.
Introduction
~~~~~~~~~~~~
With the release of the AGA systems, Commodore included a wonderful new
version of the operating system which took advantage of the new chips'
extended color selection. Workbench 3.0 is able to open the screen in
any number of colors from 2 to 256, but it only allows eight of them
to be defined for its use (for icons, etc). Workbench 2.0 to 2.1 allowed
you to define sixteen. Go figure.
Anyway, the only thing really preventing you from using more than eight
colors is the fact that the Palette Preferences only defines that number.
The rest are left over for other programs to use in Workbench 3.0's palette
sharing scheme. This is where ProcurePens and the related SetPens comes in.
What ProcurePens does
~~~~~~~~~~~~~~~~~~~~~
ProcurePens uses the V39 graphics.library function ObtainPen() to lock, or
procure, a pen. The idea here is that you call this program from your
user-startup, so that it gets run every time you boot. This way, you can
have a standard setup for colors beyond the eight that Palette Preferences
allows. You can lock all available pens for exclusive use, if you wanted to.
With the pens locked and set on startup, you can use those extra colors
in Workbench icons (though you may have to use IconEdit 2.x to get them
to work in 16 colors), Dock icons, console escape colors (multicolor CLI
prompts), and other cool stuff.
What SetPens does
~~~~~~~~~~~~~~~~~
SetPens is a somewhat stripped-down version of ProcurePens which does not
lock pens. Instead, it uses SetRGB32() which simply sets the pen colors.
It reads the same config file as ProcurePens, but, as stated above, merely
sets the colors and does not lock them in any way. It also doesn't observe
locking rules when it sets the pens; it can redefine colors that are in
use by some other program, so use cautiously.
Quick Start
~~~~~~~~~~~
Okay, enough talk for now. Open your Workbench in 16 or more colors, pop
a CLI, go to the directory which you extracted this archive in, and type:
ProcurePens SampleConfig
If pens 4, 5, 6, or 7 are available (not locked by another program),
ProcurePens should tell you that it has set all the pens to the colors
specified in the config file. Hit [CTRL-C] to remove the program and
its locks.
Usage
~~~~~
Typing ProcurePens ? will give you its template:
CONFIGFILE/A,HEX/S,EXCLUSIVE/S,PUBSCREEN/K,VERBOSE/S,NOTIFYNAMES/M:
(Note: for version 1.14, a QUIET option also appears. This is meant for
the next version and does nothing here. Sorry! )
Items are as follows:
CONFIGFILE - filename of the required configuration file. The format is
as follows:
Header Line: "ProcurePens Config File"
Line 1: pen number to lock
Line 2: 8-bit red value (defaults to decimal)
Line 3: 8-bit green value
Line 4: 8-bit blue value
Line 5: delimeter (---)
Lines 1-5 define a specifier that ProcurePens will use to lock and
set the pen. These repeat until you place "END" as the final
delimeter. (see the SampleConfig for an example)
HEX/S - Specify this keyword to indicate that the 8-bit color values
in the config file are hexadecimal numbers.
EXCLUSIVE/S - Specify this to lock the pens in "exclusive" mode. Not really
useful, since all this means is that another program requesting the
same or a close color won't be able to use the pen.
PUBSCREEN/K - Name of the public screen to perform the operation on.
Defaults to "Workbench".
Example: PUBSCREEN=SomebodysScreen1
VERBOSE/S - Old versions of ProcurePens displayed the colors that
was allocating, and the status of each allocation (whether it worked
or failed). Specify this option to show that information.
NOTIFYNAMES/M - Specify additional DOS names of files which when modified,
may cause the Workbench screen (and its palette) to be reset. Normally
you won't have to use this option, because ProcurePens already watches
the default IPrefs files which cause the screen to be reset:
ENV:Sys/ScreenMode.prefs
ENV:Sys/Font.prefs
ENV:Sys/Palette.prefs
When one of these files is modified by another program (the ScreenMode
Preferences editor, for example), ProcurePens temporarily releases
all locks it has put on the screen (including pens), then waits for
a chance to reinstate them after the screen has been reopened. This
prevents your pen settings from being wiped away if the screen is
reopened. (thanks Martin "XEN" for reporting this bug!)
If you find any other system files which can cause a Workbench
reset, please let me know!
More often than not, you will want to call ProcurePens from your user-startup
or at the end of your startup-sequence. In this case, simply launch the
program as a seperate task:
run >NIL: ProcurePens <config-file> <options>
Note that all console output from the program is supressed in this form,
so errors won't be reported. Best advice is to try it out before dropping
it in your user-startup.
To remove it (normally you'd leave ProcurePens alone since removing it can
subject your onscreen colors to change), simply find its process number
(use Status), and Break it.
Example: Break 3
(if ProcurePens is process 3)
--
SetPens works similarly, except it doesn't stay resident because it doesn't
retain locks on the colors. As such, you won't need the NOTIFYNAMES feature.
Furthermore, it doesn't lock pens, so there's no EXCLUSIVE switch either.
It was also written later, so DEBUG and VERBOSE have been pruned too. :>
Note that SetPens uses the same config file as ProcurePens, and this
file must begin with "ProcurePens Config File".
Et Al
~~~~~
I hope you find these programs useful. They're all set to localize, so if
anyone wants to see them use locale.library, I'd be happy to do it. Bug
reports, suggestions, fan mail, secrets of the Universe, etc should be
sent to:
Joseph Luk
Internet: jluk@ctp.org
GEnie: J.LUK
S-mail: P.O. Box 884401, San Francisco, CA 94188-4401 U.S.A.
BTW, in case you're wondering, this is my gift to you. If you use these
programs regularly, I'd *LOVE* to get a postcard from you though! :>
--