[comp.sys.amiga.tech] Ptr to top screen

wfh58@leah.Albany.Edu (William F. Hammond) (04/08/90)

In article <706@mpirbn.UUCP> p554mve@mpirbn.UUCP (Michael van Elst) writes:
>In article <170009@hplsla.HP.COM> davidb@hplsla.HP.COM (David Bakeman) writes:
>>I hope this is a simple question!  Is there a "legal" way to get a pointer
>>to the current top screen?  In other words if I have a workbench screen and 
>>a couple of custom screens is there a way to get a pointer to one of the
>>custom screens when it is the top screen?
>
>There is a legal way, but there aren't many legal operations you could do
>with this screen (unless you have opened the screen yourself).
> . . .
  One of the things I might want to do on someone else's screen is open
a window for my application.  For example, I (the user) often run "VLT"
under its custom screen option.  Sometimes, I "need" to have a memory
monitor available there.  So I hacked one up that opens up a little "strip"
window (just high enough to have borders and one line of text and long
enough to have close, front/back, and drag gadgets plus ten or so characters
of text) *on the ACTIVE screen*.  I LockIBase long enough to grab the
pointer, determine basic screen parameters, and open my window; then I
release the lock.  I do wonder about the "legality" of this.  One obvious
problem is that the screen owner (usually at the behest of the user) may
close the screen while the "foreign" window is still open.  In the particular
instance I have just cited this fortunately does not lead to big fireworks
but only to a certain waste of memory and cpu since I did not attempt to
make provision in the code for that possibility.
  Turning the legality question around a little bit:  Why should the
programmer assume that the user always wants windows that are not intended
for a screen belonging to the program to go on the WorkBench Screen?
                      -- Bill
----------------------------------------------------------------------
William F. Hammond                   Dept. of Mathematics & Statistics
518-442-4625                         SUNYA, Albany, NY 12222
wfh58@leah.albany.edu                wfh58@albnyvms.bitnet
----------------------------------------------------------------------

riley@batcomputer.tn.cornell.edu (Daniel S. Riley) (04/08/90)

In article <2846@leah.Albany.Edu> wfh58@leah.albany.edu.UUCP (William F. Hammond) writes:
>  One of the things I might want to do on someone else's screen is open
>a window for my application.  For example, I (the user) often run "VLT"
>under its custom screen option.

In general, this is illegal.  There's no provision within Intuition for
sharing private screens--only the workbench screen is shared.  In the
particular case of "VLT", Willy Langeveld, author of VLT, has written
a library called screenshare.library which provides a simple means for
programs to make their screens publically available to other programs
which use screenshare.library.  Latest version is on Fish disk 308.

-Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley)
-Wilson Lab, Cornell University

papa@pollux.usc.edu (Marco Papa) (04/09/90)

In article <10068@batcomputer.tn.cornell.edu> riley@tcgould.tn.cornell.edu (Daniel S. Riley) writes:
|In article <2846@leah.Albany.Edu> wfh58@leah.albany.edu.UUCP (William F. Hammond) writes:
||  One of the things I might want to do on someone else's screen is open
||a window for my application.  For example, I (the user) often run "VLT"
||under its custom screen option.

|In general, this is illegal.  There's no provision within Intuition for
|sharing private screens--only the workbench screen is shared.  In the
|particular case of "VLT", Willy Langeveld, author of VLT, has written
|a library called screenshare.library which provides a simple means for
|programs to make their screens publically available to other programs
|which use screenshare.library.  Latest version is on Fish disk 308.

Until 1.4 becomes available, ANY way to share screens (including Willy's
screenshare.library) is a kludge and is unsupportable (that is, it probably 
won't work in a future release of the OS).  That's one reason we've refused to
support screenshare.library.  "kludgy" public screens might be OK for PD
or shareware, but not for commercials that are supposed to follow the rules.

-- Marco
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Xerox sues somebody for copying?" -- David Letterman
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

cmcmanis@stpeter.Sun.COM (Chuck McManis) (04/10/90)

In article <2846@leah.Albany.Edu> (William F. Hammond) writes:
>  One of the things I might want to do on someone else's screen is open
>a window for my application.

Currently not legal but, ...

>  For example, I (the user) often run "VLT" under its custom screen option.
> Sometimes, I "need" to have a memory monitor available there.  

VLT uses the screenshare.library to allow applications to open windows on
the VLT screen. You can use it to, if only I could find the docs I'd 
mail em to you. I believe that it is documented in the VLT manual.

Also there was some discussions about the whole concept of "public screens"
on BIX and Jimm got real excited and well I think we'll have to wait and
see...

--Chuck McManis						    Sun Microsystems
uucp: {anywhere}!sun!cmcmanis   BIX: <none>   Internet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"I tell you this parrot is bleeding deceased!"