home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
287.lha
/
WSM.doc
< prev
next >
Wrap
Text File
|
1989-09-08
|
7KB
|
153 lines
WSM (Workbench Screen Manager) Document
8/2/89 Sterling L. Brown
----------------------------------------------------------------
WSM is a useful utility that adds a third dimension to the
Workbench work area by letting you open and manage alternate Workbench
screens. This utility evolved from my attempts at putting a CLI or Shell
on a new screen. After lots of work and half way into a new console
device, I mistakenly stumbled across a way to do this that the Amiga
already supports.
I turns out that any screen that has its Type member set to WBENCHSCREEN
can be used as an alternate workbench screen. HOW? By bringing the
secondary screen to the top, any program that opens its window to the
Workbench screen will open its window to the new screen. This includes
Shells, CLIs, Workbench programs and utilities, and Even Workbench
itself. Just think of the possibilities of having workbench distribute
its windows across 2 screens, or 3 screens, or 4 screens,...
This very simple 'c' code will do nothing more than open a screen
and put a SHELL on it. After you run it, you can experiment with
the workbench windows. Remember, Only programs that open their
windows to the Workbench screen can share the alternate screens.
---------------------- C U T H E R E -------------------------
/* alternate WbenchScreen program written by Sterling Brown */
/* you can have as many screens as you have CHIP ram */
#include <intuition/intuition.h>
struct GfxBase *GfxBase;
struct IntuitionBase *IntuitionBase; /* Base of Intuition library */
struct Screen *Screen;
struct NewScreen NewScreen =
{
0,0,640,200,2,
0,1,
HIRES,
WBENCHSCREEN,
NULL,
NULL, /* Title */
NULL,
NULL
};
void main()
{ /* Open Libraries */
GfxBase = (struct GfxBase*) OpenLibrary("graphics.library",0);
if(GfxBase==NULL)
exit(10);Üj
if(IntuitionBase == NULL)
{
CloseLibrary(GfxBase);
exit(20);
}
if((Screen=(struct Screen *)OpenScreen(&NewScreen))==NULL)
{
CloseLibrary(GfxBase);
CloseLibrary(IntuitionBase);
exit(30);
}
Execute("Newshell",0,0);
exit(0); /* leave the screen open and exit */
} /* And that's all!! */
---------------------- C U T H E R E -------------------------
This program gives us a screen that we could use for any program that
opens its window to the Workbench screen. The only draw back is that
it gives us no way to close the screen when we are finished with it.
This is where WSM comes in. With it you can open as many screen as
you have the CHIP RAM for. The extra RAM of the new Agnus chip really
comes in handy now. To open a screen simply press the 'OPEN SCREEN'
button. The screen will open with the settings shown in the WSM window.
The default settings are Hi-Res with 2 bitplanes. You can also close
any Workbench screen previously opened provided it does not have any
windows on it. To do so, bring the screen you want to close to the
top of the screen stack and press the 'CLOSE SCREEN' button.
WSM has a few other helpful features worth mentioning. It keeps a
count of all Workbench screens and displays the number at the top of its
window. It lets you change the number of bit planes of the new screens
you open. I added an iconifying feature so it wont clutter up the
screen when your not using it. To toggle Iconification press the
right mouse button. WSM also lets you select the resolution of the
new screen. You have a choice of Hi-Res, Low-Res, Hi-Res-Interlaced,
and Low-Res-Interlaced.
HINTS:
* I use the Workbench Palette program to change a new screens color.
Did you know that the Palette program takes advantage of more than
two bit planes if present?
* Since WSM opens Iconified window to a Workbench screen, this makes
it easy to change the screen its on after you run it. Put a new
screen in front of the one WSM is on, press the right mouse button
and let WSM Iconify itself to that screen. I also do this with
my favorite editor DME, by Matt Dillon.
* I recommend that you only 'loadwb' once. There is no need to have
more than one WorkBench running since one Workbench can access
all of the screens. If you must load more than one Workbench,
then put a clean screen in front for the new workbench to attach
itself to. If you do not do this, you will never be able to access
the new WorkBench. This is because WorkBench opens a BACKDROP window
which will open behind the old Workbench BACKDROP window and will be
lost forever.
* I imagine that we all have used the <L-AMIGA/N> and <L-AMIGA/M> keys
to toggle the WorkBench screen to the top and bottom of the screen
stack respectively. Now that we have more than one WorkBench
screen, these keys now take on different functions. The <L-AMIGA/M>
key combination takes the first Workbench screen in the screen stack
and swaps it to the bottom of all the screens. The <L-AMIGA/N> key
combination takes the first Workbench screen in the screen stack and
swaps it to the top of all the screens. These keys have always done
just that, but with only one Workbench screen we could never tell
just how it was working.
FEEDBACK:
If anyone has any comments they wish to make please contact me at one
of the Email addresses below.
/**************************************************************************/
WSM and this document are Public Domain and are freely redistributable.
But Hey, If any one wants to send me a token of their appreciation, I
wont turn it down. ;^)
Enjoy....
\===========================\ The Human /===========================/
\ Sterling L. Brown........ \ Operating / "Don't blame me for my /
\ \ System / spelling!.... Blame /
\ AmigaDos, UNIX, MSDOS \=============/ my Spellchecker!"-me /
\=================\ /=================/
// A Serious \ CIS: 71101,616 / "O give me a home
_ // Amiga \ USENET: sterling@dasys1 / where the serial
\X/ Programmer \=========================/ ports rome!"