[comp.sys.amiga.tech] Getting Windows of WBench

johnm@trsvax.UUCP (04/16/89)

How is it possible to get access to the windows that are on a given screen?

I have gotten the WorkBench screen via the GetScreenData() call and I can draw
into its bit-planes but it doesn't do me a lot of good (basically folks, it
trashes the screen).  After watching the mess that this produces I suddenly
realized that I don't want to write directly into the screen...  I want to
write into the backdrop window that the WorkBench puts back there.  Then a
call to RemakeDisplay() should end up with everything looking hunky-dory and
I'll be a happy camper.

So, what I need to know is how to find this backdrop windows bit-planes.  Help,
if you can and maybe we'll have another nifty screen hack before long.

John Munsch

jimm@amiga.UUCP (Jim Mackraz) (04/21/89)

In article <261600002@trsvax> johnm@trsvax.UUCP writes:
)
)How is it possible to get access to the windows that are on a given screen?
)
)I have gotten the WorkBench screen via the GetScreenData() call and I can draw
)into its bit-planes but it doesn't do me a lot of good (basically folks, it
)trashes the screen).  After watching the mess that this produces I suddenly
)realized that I don't want to write directly into the screen...  I want to
)write into the backdrop window that the WorkBench puts back there.  Then a
)call to RemakeDisplay() should end up with everything looking hunky-dory and
)I'll be a happy camper.
)
)So, what I need to know is how to find this backdrop windows bit-planes.  Help,
)if you can and maybe we'll have another nifty screen hack before long.
)
)John Munsch

Heck, John, the way I look at it:
    If you can't to hack it, you shouldn't hack it.  ;^)

Anyway, just this once .. walk NextWindow starting with screen->FirstWindow,
looking for (Window.Flags & BACKDROP) and (Window.Flags & WBENCHWINDOW).

But I warn you: this window can be closed at any time, so unless you have
another window open on the Workbench (which will keep it from closing), you
can crash the machine real easy.  Also, that window is not your property, so
don't be bummed when your hack stops working with next release, and be
sure not to give your phone number out in case it causes somebody a big
crash and they want to tell you all about it.

By the way, once you have a window on the WB, you can use
window->WScreen->FirstWindow instead of GetScreenData().

	jimm
-- 
Jim Mackraz, I and I Computing	   	"He's hidden now, but you can see
{cbmvax,well,oliveb}!amiga!jimm          The bubbles where he breathes."
							- Shriekback
Opinions are my own.  Comments are not to be taken as Commodore official policy.