home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
back2roots/padua
/
padua.7z
/
padua
/
system
/
sm_1_13a.lzh
/
SM
/
SM.doc
< prev
next >
Wrap
Text File
|
1992-07-25
|
26KB
|
672 lines
ScreenManager by Bernhard M÷llemann
all rights reserved
English .doc-file written by Frank 'Franky' Neumann
An utility to deal with public screens under AmigaOS2.0
Version V1.13a
A note at the beginning: The program as well as this document require a
certain knowledge of the Amiga's operating system, especially AmigaOS2.0.
It might not be suitable for beginners. - the translator
ScreenManager (SM) is a small CLI utility used to open, close or modify
public screens and retrieve information about them. Screens can be opened
with user-selectable colors and DrawInfo's (they determine which color is
used for highlighting). The resolution is also selectable on a wide range.
On the other hand SM can also be used to make a certain screen the system's
default screen, or to change the screen modes of other public screens.
Finally, it is possible to view a list of all currently open screens in the
system and to get informed about resolution and other properties of screens.
This document is split into the following six sections:
Disclaimer
CLI
Examples
Workbench
HotKeys
At the end
Everybody is obligated to read the disclaimer! Afterwards, the "Examples"
section may be the most interesting part for those impatient
wanna-see-something people. But you will have to read the entire document
to fully understand the power of ScreenManager.
Disclaimer
----------
The program ScreenManager is Copyright 1992 by Bernhard M÷llemann.
This program is freely distributable as long as the following conditions
and terms are fulfilled:
- All files of this package must be copied. This includes:
ScreenManager
ScreenManager.info
SM.doc
SM.anl
SM.ver
SM.doc.info
SM.anl.info
SM.ver.info
- All above mentioned files must reside in one directory. There must not
be any other files in this directory.
- All files must remain unmodified. You may archive them if they can
be de-archived with a freely distributable Amiga-version of one of the
following programs:
Zoo
Arc
LhArc
LhA
Zip
ARJ
uudecode
compress
tar
- It is strictly forbidden to make any kind of profit by selling,
distributing or copying this package.
- It may exclusively be put on one of the following PD disk series:
AmigaLibDisks of Fred Fish
AUGS (Amiga User Group Switzerland)
AmigaJUICE
SAUG (Saarbrueckener Amiga User Group)
Time
- It may not be put on a CD-ROM disk without my written permission.
This includes CD-ROMs of AmigaLibDisks!
If you want to distribute the package in any way that violates any of
the above conditions, you have to get a written permission from the author.
You might get this from:
Bernhard M÷llemann
Luisenstra▀e 17
D-7500 Karlsruhe 1
Germany
You use the program at your own risk. The author can not be made
responsible for any damage which is caused by this program.
CLI
---
ScreenManager was written to control the Public Screen feature of the
Amiga. It is not (YET!) possible to achieve this by using the mouse.
However, this stuff might be implemented later if enough people are
interested in such features. (The author does _NOT_ need it, being
YASE (yet another shell enthusiast ;-) (The translator is, too ;-))
As Public Screens are only available in version 2.0 (and above) of AmigaOS,
you need at least that version to run ScreenManager.
There are some different tasks which ScreenManager can perform:
open a screen (really great, eh?)
close a screen
print informations about a screen or resolution
print a list of all resolutions
change a screen
change global settings
This is accomplished by a call to ScreenManager with one or more of the
following options: (don't be scared by their size, it looks worse than it
actually is !)
NAME: sets name of a screen
OPEN: opens a new screen
CLOSE: closes a certain screen
INFO: provides some information about a screen
LIST: provides a listing of all screens
EXPERT/FORCE: provides extended information and disables some checks
TITLE: supplies the screen's title used with OPEN
PLANES: sets the number of bitplanes used with the OPEN command
MODE: sets the resolution used with OPEN. Consists of some letters
DISPID: sets the DisplayID of a to be opened screen, alike MODE
SIZE/POS: sets the size of a screen used with OPEN and the position
when moving a screen
DISPCLIP: sets the size of the visible portion of a screen, used with
OPEN
COLORS: sets colors, used with OPEN. Consists of 3 digit hexadecimal
numbers, separated by commas
PENS: sets color numbers for DrawInfo
FONT: sets the font that is to be used when opening a screen
FONTSIZE: sets the size of the font mentioned above
SHANGHAI: turns on Shanghai mode
NOSHANGHAI: turns off Shanghai mode
POPPUB: turns on Poppub mode
NOPOPPUB: turns off Poppub mode
TOFRONT: bring a screen to the front
TOBACK: bring a screen to the back
CLOSEGAD: provides a screen with a CLOSE gadget
AUTOCLOSE: closes a screen when its last window is closed
CX_TOFRONT: sets the HotKey that brings a screen to the front
CX_DEFAULT: sets the HotKey that makes a screen the system's default
screen
CX_PRIORITY: sets the priority under which HotKeys are installed
DEFAULT: makes a screen the system's default screen
Looks like quite a bunch of choices, and even mighty complicated, eh ?
But don't surrender too early, basically there are just 6 main operations,
everything else is just arguments for these operations.
1.1) OPEN
Opens a new screen. If the screen already exists under the given name,
an error message is printed out. These arguments can be given with OPEN:
1.1.1) NAME: Name of the screen.
This is the name by which the screen is introduced to the system
as a public screen. It is also used as the screen's title if no
title is given. This argument is essential for OPEN.
1.1.2) TITLE: The title of a new screen.
The text which appears in the titlebar of the screen (unless the
active window sets its own title).
1.1.3) PLANES: Number of bitplanes.
With this value you set the maximum number of colors that can be
simultaneously displayed, in this way: # of colors = 2^# of planes.
For different graphic modes, there are different limitations on the
value of PLANES. If these limits are exceeded, you will get a
corresponding error message.
Default value is 2 (4 colors).
1.1.4) MODE: Determines the graphics mode (and thus the resolution).
You just provide a ScreenMode name, like those found in the ScreenMode
preferences tool. However, upper/lower case does not matter.
If you don't want to use these sometimes longish mode names, you can
also select the screen mode with a letter combination where each
letter represents a certain property. It depends on your graphics
hardware (ECS) and monitor (Multiscan,...) which modes are available
and how you may combine these.
If a certain mode is not available, you will be told so in an error
message.
These are the letters you can use:
H: HiRes (Default value: LoRes)
L: Lace (Default value: no interlace)
S: SuperHiRes
E: ExtraHalfBright
V: VGA
P: Productivity
A: A2024 at 10 Hz
F: A2024 at 15 Hz
X: HAM
The desired mode is simply selected by concatenating the letters
defining it - like in MODE=SL for SuperHiRes-Lace.
Unfortunately the default mode may not be copied from the Workbench
screen, as this might result in an unwanted opening of the Workbench
screen.
1.1.5) DISPID: DisplayID of the screen that is to be opened.
Can be used as an alternative to MODE. However, only one of these two
options may be used at a time, not both.
Legal values for DisplayID can be found in the C include file
graphics/displayinfo.h, always assuming the desired monitor is
available. (This list can also be found from the output of typing
'ScreenManager LIST DISPID'.)
ScreenManager does not support the DualPlayfield-mode. So DisplayID's
with this property are rejected.
The value of DISPID must be given as a hexadecimal value. It may be
preceeded by a '$' or the C style '0x'.
1.1.6) SIZE: Determines the size of a screen in pixels.
The default is using text-overscan. The size is written in the format
LEFT,TOP,WIDTH,HEIGHT.
As WIDTH and HEIGHT are probably used more often than LEFT and TOP,
they (WIDTH, HEIGHT) are used when only 2 values are given. To help
readability, they may also be written as WIDTHxHEIGHT instead of
WIDTH,HEIGHT.
To cope with overscan sizes more comfortably, you may also directly
use the names of the Overscan areas that the system offers.
Legal Overscan names are:
OSCAN_NORM Hardware default. This is the 'official' resolution as
stated by Commodore.
OSCAN_TXT Text overscan. This is set in the Preferences program
'Overscan'. Text must be readable in the edges of the
monitor. You can also use OSCAN_TEXT here.
OSCAN_STD Standard overscan, it is also set in the preferences.
The picture just fills up the entire monitor area.
OSCAN_STANDARD may also be used.
OSCAN_MAX Maximum Overscan, as fixed by the hardware.
Lazytypers may leave out the _ or the OSCAN.
To select sizes different from these values, you may append a size
string to the Overscan, delimited by a colon ':'. In this case the
corresponding Overscan size is used and the appended size values are
_ADDED_ to the Overscan size.
So, this is what a complete SIZE definition might look like:
SIZE=OSCAN_STD:-10,-10,+20,+20
This results in a screen whose size exceeds the size of a standard
overscan by 10 pixels in each direction.
1.1.7) DISPCLIP: Size of the visible area of the screen.
The same rules for formatting as in SIZE apply here.
1.1.8) COLORS: This sets the color palette as RGB values.
They are entered as 3 digit hexadecimal values, separated by commas.
A leading '$' or '0x' must NOT appear here.
1.1.9) PENS: Sets the pens used for rendering 3D effects.
Every pen is responsible for certain effects (Programmers should look
into the DrawInfo.Pens section of intuition/screens.h).
Every character is interpreted as a hexadecimal index into the color
table that was set with the COLORS command. From this results that only
the first 16 color registers are usable.
If you REALLY, REALLY need to access the remaining color registers, too,
leave the author a message. You don't have to specify ALL pens, but you
have to specify all pens up to the last one you want to specify.
Ehh..got it ? :}
These are the definitions:
Pen Name is used for...
1 DETAILPEN ordinary text (compatible with 1.3)
2 BLOCKPEN ordinary fill operations (compatible with 1.3)
3 TEXTPEN ordinary labels
4 SHINEPEN shiny edges on 3D objects
5 SHADOWPEN dark edges on 3D objects
6 FILLPEN background of highlighted elements \ e.g. active
7 FILLTEXTPEN text in highlighted elements / window border
8 BACKGROUNDPEN background - must be set to 0
9 HIGHLIGHTTEXTPEN emphasized text
All this stuff might sound very difficult, and the result isn't always
easily predictable. I recommend you look at some of the examples below,
and this way you might soon get an idea for all this mess.
1.1.10) FONT: Sets the font that will become the screen's default font.
This may be a non-proportional font as well as a proportional font.
If the font cannot be found, the screen is still opened with the
system's default font (this is set with the 'Font' preferences
tool).
The fontname extension '.font' is optional. Furthermore,
you may append the font pixel size to the name with .<size>, like in
diamond.12
1.1.11) FONTSIZE: Size of the font mentioned above.
Almost any value is possible here, since the new diskfont.library
will automatically scale the font if the desired size could not be
found.
This option may give quite funny results with dumb programs!
1.1.12) CLOSEGAD: Attaches a close gadget to the screen.
This puts a Close gadget into the upper left corner of the screen.
This way you can simply close a screen with a mouse click just the
way you would close a window.
1.1.13) AUTOCLOSE: Automatically closes a screen after usage.
If this option is given, the screen will automatically be closed as
soon as the last window on it was closed.
1.1.14) CX_TOFRONT: HotKey used to bring a screen to the front.
This defines a HotKey (we're talking about a shortcut here, not
about boiled or baked keyboards) by which the screen is put to front.
The definition of the key name conforms to the commodities.library
standard. How such a key name is put together is described further
below in this document.
1.1.15) CX_DEFAULT: HotKey to make a screen the system's default screen.
This defines a HotKey by which the screen is made the system's default
screen. As well as with 1.1.14), the definitions of commodities.library
are used here, too. They are listed further below.
1.1.16) CX_PRIORITY: priority for above mentioned HotKeys.
If no value is given, a default value of 0 is used.
1.1.17) Other options.
Further options are
SHANGHAI, NOSHANGHAI, POPPUB, NOPOPPUB, DEFAULT, TOFRONT and TOBACK.
An explanation for these follows in a minute as they may also be used
without opening a screen.
1.1.18) FORCE: Switch off some security checks.
By activating this mode, you disable the internal checks if the hardware
of your machine can deal with the values for SIZE, DISPCLIP and PLANES
at all. If the computer displays some crap or even crashes, do NOT
send a bug report to C= or me - it was your fault !
1.2) CLOSE
Closes a previously opened screen
1.2.1) NAME: Name of the screen.
Upper/lowercase spelling of the name need not be exactly as in the
real name, but if there is more than one screen with a fitting name,
the first one that is found will be used. If the NAME matches exactly
with an existing name, that screen is certainly always used for
closing.
If Angela Schmidt's 'pattern.library' is installed (to be found on
Fish disk 625), you may even use a pattern - especially such
patterns as 'wo*', which matches e.g. 'Workbench' !
At the moment, there are two special names:
* selects the screen on which this process's console is situated
. selects the system's default screen
These names are valid with all other commands, except of course for the
OPEN command.
1.2.2) FORCE: Will also close 'alien' screens
By enabling this mode, you are able to close screens that have NOT
been opened by ScreenManager or the Workbench.
However, the program that opened the screen will probably not be
informed about that. If some time later it tries to open a window
on that screen, a crash is imminent. It is also possible that resources
belonging to the screen (like fonts) are not freed.
1.3) LIST
Prints out a list of screens or resolutions.
1.3.1) <without parameters>: prints out a list of screens.
The screens' name, title, resolution and # of colors are printed.
Behind these values you will see a <SM> if the screen was opened by
ScreenManager. You might also find a DEFAULT here if it's the system's
default screen, or PRIVATE if a screen is not public at the moment.
1.3.2) DISPID: shows ALL possible resolutions
This shows all resolutions that are known to the system at the
moment.
Also, the name and availability of each mode is given if they are
available.
1.3.3) MODE: shows resolutions
Shows a list of those modes that are known to the system by name.
1.4) INFO
Provides information about a screen or a screen mode
1.4.1) <without parameters>: lists the currently valid public
screen modes.
1.4.2) NAME: shows properties of a screen.
If a name is supplied, some infos about this screen, its resolution
and depth are listed. The special characters mentioned in the
CLOSE section are valid here, too.
1.4.3) DISPID/MODE: provides information about screen modes.
If this option is supplied, the corresponding information is
given - what this means exactly is left to the reader as an exercise ;-)
1.4.4) EXPERT: Provide some more info.
This option may be added to all parameters of INFO. In that case
the structures NameInfo, DisplayInfo, DimensionInfo and MonitorInfo
will additionally be displayed.
1.5) Modify previously opened screens
The following options are used to modify the modes of an already opened
public screen. The screen's name has to be given. Once again, the same
special characters as in CLOSE are valid here, too.
Certainly all these options may also be used for opening a new screen.
1.5.1) COLORS: supplementary modification of the color table.
This allows to change the colors of a screen after it has already
been opened. The values are given as 3 digit hexadecimal numbers,
separated by comma.
WATCH OUT ! If the colors of the Workbench screen are modified, the
IPrefs demon does not notice that - just as Intuition does not, either.
This may result in strange effects when using Prefs/Palette.
1.5.2) POS: repositions the screen.
This is used to change the position of a screen. The format string
is POS=x,y.
1.5.3) PLANES: changes the number of bitplanes of a screen.
This option permits to increase or reduce the number of
bitplanes a screen is using. This option is only valid if the
keyword FORCE is also given - otherwise only a warning is issued.
Due to the fact that you do not know if the size of the corresponding
BitMap structure (which contains a pointer for every bitplane) is
sufficient for the requested number of planes, it MIGHT
happen that by increasing the number of planes unallocated memory is
overwritten, which may lead to a system crash. So be _VERY_ cautious
when using this option.
1.5.4) DEFAULT: Makes a screen the system's default screen
1.5.5) TOFRONT: Brings a screen to the front
1.5.6) TOBACK: Brings a screen to the back
1.5.7) CX_TOFRONT: changes the HotKey used to put a screen to the front.
By using the empty string (CX_TOFRONT="") this HotKey is disabled.
1.5.8) CX_DEFAULT: changes the HotKey that is used to make a screen the
system's default screen. This HotKey may also be switched off by giving
an empty string "" as parameter.
1.6) Modification of global settings
The following options affect global settings and may also be used without
dealing with a screen:
1.6.1) SHANGHAI: Turns on Shanghai mode.
This way, even those windows that would usually be opened on the
Workbench screen will open on the system's default screen.
This helps to prevent old-style programs (those that don't know about
the concept of public screens) from plastering the Workbench screen
with their windows.
1.6.2) NOSHANGHAI: Turns off Shanghai mode.
1.6.3) POPPUB: Enables PopPub mode.
Now the screen comes to front as soon as a window is opened on it.
1.6.4) NOPOPPUB: Turns off PopPub mode.
Examples
--------
Here are some examples to make all the above information a little clearer
for you:
ScreenManager OPEN NobelScreen MODE=H PLANES=3 PENS=121657404
COLORS=960,DDF,03C,FF1,DC0,730,F83,C30 DEFAULT SHANGHAI POPPUB CLOSEGAD
CX_PRI=10 CX_TOFRONT="LCOMMAND s" CX_DEFAULT="LCOMMAND SHIFT s"
ScreenManager OPEN BlueScreen DISPID=$00029004 PLANES=3 PENS=171657404
SIZE=OSCAN_TEXT:+100,+100 DISPCLIP=OSCAN_TEXT
COLORS=13B,AAC,D30,FFF,CC2,015,7AF,13F FONT=courier.13 DEFAULT TOBACK
ScreenManager OPEN NessyScreen MODE=PAL:Hires PLANES=2 SIZE=640╫256
PENS=021123103 COLORS=69A,FEE,002,F7C DEFAULT AUTOCLOSE CLOSEGAD POPUP
ScreenManager OPEN SimpleWB MODE=H DEFAULT SHANGHAI POPPUB
ScreenManager LIST
ScreenManager LIST DISPID
ScreenManager INFO DISPID=$00031004 EXPERT
ScreenManager CLOSE BlueScreen
These commands have to be entered in _one_ input line, some of them were
just split up here to make this document good readable.
To be able to open a window on such a screen, you certainly first have to
find a program that makes use of the feature of public screens. This is at
least true for the preferences programs 'Time' and 'Font' and for the
console handler "CON:" (and, unfortunately incorrect, for IconEdit :-( ).
However, a console window may also be opened on a screen that is NOT the
default screen:
CON:0/15/640/185/MyWindow/CLOSE/SCREEN#NobelScreen.
This is certainly also correct for the display handler of WShell.
Workbench
---------
To show some kind of mercy with those rare Workbench users ;-), ScreenManager
is also able to accept ToolTypes as arguments.
These are treated almost exactly as command line parameters, but there
are a few differences:
NOSHANGHAI and NOPOPPUB
do not exist any more. They have to be replaced by SHANGHAI=FALSE resp.
POPPUB=0.
Also, there is one additional ToolType WINDOW. Its argument should be a
filename into which output messages e.g. from the LIST command go. A
valid file name would certainly also be the description of a window, like:
CON:////ScreenManager-Output/CLOSE
If WINDOW is not given, no window will be opened and all error-messages
will be sent to the user by requesters.
The ToolType arguments have to be entered WITHOUT enclosing parentheses
because (contrary to command line parameters) it is directly visible where
an argument ends.
If you click on a project icon which has ScreenManager as its default tool,
the ToolTypes from ScreenManager will be taken as default values and may
then be overridden by the ToolTypes from the project.
This way, you may create a project icon with a ToolType NAME=<ScreenName>
for every screen that you make heavy use of (in my case this is a
ShellScreen and the Workbench), and a ScreenManager icon with a DEFAULT
tooltype.
If you now single-click on the project icon, and then double-click the
ScreenManager's icon (while holding down the Shift key), the screen
<ScreenName> will become the system's default screen.
So, depending on which pair of icons you double-click, either the ShellScreen
or the Workbench screen will become the default screen. The same goes for
POS, and voila - you've got a WBclick construction kit. :)
HotKeys
-------
For those who haven't got their 2.0 manuals handy, here are the special
settings of commodities from V37 (does not claim to be complete 8-):
Events:
RawKey, RawMouse, Event, PointerPos,
Timer, NewPrefs, DiskRemoved, DiskInserted
Most of these are not very useful, still they may show up as funny
experiments when e.g. a shell comes to the front as soon as you insert
a disk. Also, the Timer event is quite interesting due to the fact that
no other qualifier may be used alone. Still, I do not want to recommend
it. However, my opinion is that everyone should judge for himself
in how far he wants to configure his system to death - but he shouldn't
complain later then.
Qualifiers:
LShift, RShift, CapsLock, Control, LAlt, RAlt, LCommand, RCommand,
NumericPad, Repeat, RelativeMouse, Shift, Caps, Alt, UpStroke
Keys:
(MidButton, RButton, LeftButton)
Comma, Space, BackSpace, Tab, Enter, Return, Esc, Del
Up,áDown, Right, Left
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10
Help
as well as all usual printable characters which then represent themselves.
A HotKey definition from these items looks like this:
[<Qualifier> <Qualifier> ... ] <Event>|<Key>
As in the CLI the <Space> character is also the separator between keywords,
the expression has to be enclosed in double quotes like this:
CX_TOFRONT="LCommand s"
CX_DEFAULT="LCommand Shift s" or CX_DEFAULT="LCommand S"
All names may be given in upper or lower case. Of course, the Shift key has
to be pressed then for uppercase letters if the qualifier Shift is not
given (as in the second example above).
At the end
----------
Thanks go to: Hmmm..the translator...who feels funny translating this :)
More thanks to Angela Schmidt for bug reports and suggestions.
I also say thanks to:
Holger Gzella
Michael (Mick) Hohmann
Martin Horneffer
Georg (Gio) Magschok
and certainly to Ralph Babel for his Guru book.
Any kind of bug reports, suggestions for improvement, congratulations,
chocolate rum almonds, flames, GUIs etc. (NO letter bombs or pirate
programs) should be sent to:
zza@rz.uni-karlsruhe.de
or, by SnailMail:
Bernhard Moellemann
Luisenstra▀e 17
D-7500 Karlsruhe 1