[comp.sys.amiga] Questions on windows/messages

lyles@tybalt.caltech.edu.UUCP (02/20/87)

Ok, a few questions on windowing.

First, how do you attach a console device to your window??  From what I see,
you can open the Console device, but there doesn't seem to be a spot to
specify which window to direct the output to.

Second, how do you get different tasks to use the same custom screen??  I
want to write a program that runs several tasks, each placing windows in the
same custom screen, how to I pass this pointer(message ports? If so, it seems
that I can only pass an address and a length through them, how do I convert
this back to data(I am using Modula-2)??)

Thank you for your assistance.

					Wonko the Sane
				      (you call this SANE??)

Disclaimer: I am totally irresponsible.  So shoot me then.

carolyn@cbmvax.UUCP (02/21/87)

In article <1828@cit-vax.Caltech.Edu> lyles@tybalt.caltech.edu (Lyle N. Scheer) writes:

>First, how do you attach a console device to your window??  From what I see,
>you can open the Console device, but there doesn't seem to be a spot to
>specify which window to direct the output to.
>
>Second, how do you get different tasks to use the same custom screen??  I
>want to write a program that runs several tasks, each placing windows in the
>same custom screen, how to I pass this pointer(message ports? If so, it seems
>that I can only pass an address and a length through them, how do I convert
>this back to data(I am using Modula-2)??)

  See the console.device example in the A/W Rom Kernel Libs&Devs manual.
On p. 316-317 you can see that the window pointer and its size (4)
are stored in the io_Data and io_Length fields of the ioRequest passed
to OpenDevice();

  As for how to "convert an address back to data" I don't know Modula-2
so I can't help you there.

  If you passed a screen pointer in the io_Data field of a Message:

  In C it would be  screen = (struct Screen *)ioReq->io_Data.
  In Basic, screen& = PEEKL(address of the io_Data).
  
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=