home *** CD-ROM | disk | FTP | other *** search
- OVERVIEW:
-
- SWINDOWS is a program that allows you to use the title of a window to
- specify the screen on which the window will appear. This provides a
- method for opening CON: and RAW: windows on screens other than the
- workbench, for example, but can also be used with any other type of window.
-
-
- HOW TO USE SWINDOWS:
-
- You should place sWindows in your C: directory (or in your current path),
- and sWindows-Handler should be put in the L: directory (or in the current
- directory). To start sWindows, simply type SWINDOWS at the CLI prompt:
-
- 1> sWindows
-
- You do not need to RUN sWindows, since sWindows loads the handler code
- separately, sets up the handler, and then exits. To remove sWindows,
- simply issue the sWindows command a second time.
-
- Once sWindows is running, you can open a window on any screen simply by
- including the name of the screen in the title of the window. Separate the
- screen name from the window title by two colons (::). For example, if
- you want to open a CLI on a screen called "Test Screen", then you could
- do the following:
-
- 1> NEWCLI "NEWCON:0/0/300/50/Test Screen::CLI Window"
-
- sWindows will see the "Test Screen::" portion of the name, and will attempt
- to open a window with title "CLI Window" on the screen which is called
- "Test Screen".
-
- You need not specify the complete screen name, just enough for sWindows to
- find it (e.g, you could have used "Test::CLI Window" in the previous example).
- Upper and lower case are not distinguished (so "test::CLI Window" and
- "TEST:CLI Window" also would work). Spacing and special characters within
- the name ARE important, and need to be included if they exist in the screen
- title. You can use a utility like wList to view all the screen titles.
-
- If a screen with the name you supplied does not exist, sWindows opens the
- window on the workbench screen (or whatever screen was specified in the
- NewWindow strucutre used to open the window), and does not modify the
- title (i.e., the screen name and "::" appear in the window title).
-
- If you specify "::" without a screen name (e.g., "::MyWindow"), then
- sWindows will open the window on the active screen. For example, if you are
- using a program that opens it's own screen, and you are asked to specify an
- input file name, you could supply "NEWCON:0/0/300/75/::Input Window" as the
- file name, and sWindows would open an input window on the screen you are
- working on. You could type data directly into the program this way, rather
- than having to create a file containing the data (press CTRL-\ when you are
- done entering data). This is useful for small amounts of data, when you want
- a quick result from a program that does not have an interactive input mode.
-
- Another use would be to use the ^X! command of MEMACS to execute the
- following command:
-
- ^X! NEWSHELL NEWCON:0/0/640/100/::EmacsShell
-
- This would cause a new Shell window to open on the EMACS screen. That way
- you could give CLI commands on the same screen you are using for your
- editing, so that you don't have to keep changing screens.
-
- The "::" syntax can be useful if you write programs as well. For example,
- if you are writing a screen color-adjusting program, you could open a window
- titled "::Palette" and it would open on the active screen. If you wanted
- the user to be able to supply a screen name, you could simply concatinate
- "::Palette" to the name the user supplied. If the screen exists, sWindows
- will open the palette on that screen. If the user did not supply a name, it
- would open on the active screen.
-
- Or, if you wanted a calculator program that could open on any screen, you
- could simply call the calculator window "::Calculator". (NB: you can not
- get the calculator supplied on the Workbench disk to open in this way since
- it opens a window with NULL title, and then uses SetWindowTitles() to modify
- it. If you could find the NewWindow structure in the executable, you could
- change the NULL title).
-
-
- USAGE NOTES:
-
- Since windows use the same bitmaps as the screens on which they open, any
- window that you open using sWindows will have the same number of bit-planes
- and colors as the screen where it opens.
-
- Applications that use their own screens may not be expecting other windows
- to open on their screens, and hence may not include code to update their
- windows on refresh events. Thus opening windows on these screens may damage
- the information displayed on the screen. Or the application my write
- directly to the screen memory, bypassing window structures completely. In
- this case, the information in the windows that you open on that screen may
- be damaged by updates performed by the application. Be aware that these
- situations can occur.
-
- If you open a window on an application's screen, it may not be aware that
- your window exists, and may try to close the screen even while your window
- still is open. If the screen were to be closed at this point, and its
- memory and bitplanes freed, the results would most certainly include a
- system crash. For this reason, sWindows traps calls to the CloseScreen()
- function and does not allow it to complete until all the windows that
- sWindow opened on that screen are closed. This saves you from having to
- remember to close all the windows first. The screen will remain open until
- all the windows (opened by sWindows) are closed. In this case, the
- CloseScreen() call will not return until the last window is removed, so the
- task that called CloseScreen will Wait(), and will not complete until its
- screen can be closed.
-
- You can make it easy to open Shell windows on any screen by using a
- command procedure like the following: make a file called ScrShell that
- contains the lines:
-
- .keyword ScrName
- NewShell "NEWCON:0/0/320/100/<ScrName>::ScreenShell"
-
- and place the file in your command path. Use PROTECT SCRSHELL +S to set
- the Script bit in the protection field. Now if you type:
-
- 1> ScrShell "Test Screen"
-
- you should get a new Shell with its window on the screen called "Test Screen".
- Or you could just type SCRSHELL TEST, since you only need to supply a prefix
- for the screen title.
-
- To open a new shell on the active screen, just use the command SCRSHELL without
- supplying a screen name. This will open a shell window called
- "NEWCON:0/0/320/100/::ScreenShell", which sWindows will open on the active
- screen. For example, you can get a Shell on the EMACS screen by typing ^X!
- and then issuing the SCRSHELL command.
-
- To make sWindows a part of your regular Amiga environment, add the SWINDOWS
- command (or SWINDOWS >NIL:) to your startup-sequence in the S: directory
- on your boot disk).
-
-
- COMPILING SWINDOWS:
-
- sWindows was developed using the Lattice C compiler v4.0 on a 512K Amiga 1000.
- It probably will need to be modified to work with the Manx Aztec C compiler.
- To compile and link sWindows, use the following commands (these appear in
- sWindows.com, distributed with the source code):
-
- 1> lc -v -b0 swMain swHandler swMemory swSetup
- 1> asm swStubs
- 1> blink with sWindows.lnk
- 1> blink with swHandler.lnk
-
- The -v -b0 options are required. You can add -r if you like.
-
-
- AUTHOR:
-
- sWindows and sWindow-Handler
- Copyright 1989 by Davide P. Cervone, all rights reserved.
-
- Davide P. Cervone
- Department of Mathematics, Box 1917 ST402523@BROWNVM.BITNET
- Brown University st402523@brownvm.brown.edu
- Providence, Rhode Island 02912 dpvc@fermat.math.brown.edu
-