[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

2551.0. "Benchmark Modula-2 - Window ?" by ADOVS1::MCGHIE () Tue May 09 1989 22:18

    Hi,
    
    This is really targeted at any Benchmark Modula-2 users out there, but
    feel free to make suggestions.
    
    I recently got BenchMark Modula-2 and have been enjoying hacking
    around. Initially I've been keeping to character based functions etc.
    Now I'd like to start putting menus in the window title bar and all of
    those other nice Amigish things.
    
    When a BM Mod-2 program is run from the WorkBench the run-time
    initialisation routines create a default window for you.
    
    I was wondering how I could get access to the window structure so that
    I could add gadgets, menus and so on.
    
    I've looked in the more obvious places in the documentation but found
    nothing to suggest the window structure (or pointer to it) is readily
    available.
    
    Anyone have suggestions ? Hints etc.
    
    The obvious solution would be to ingore the initial window and create a
    new one.
    
    thanks
    	Mike
T.RTitleUserPersonal
Name
DateLines
2551.1Make your own windowCRLVMS::TREESEWin Treese, Cambridge Research LabFri May 12 1989 19:019
    You probably should create your own window for display if you're planning
    to really use Intuition.  The text window it creates is really just for
    simply terminal-oriented Modula-2 programs.
    
    Working with Intuition in Benchmark is almost just like in C -- and easier
    if you purchased the simplified Intuition interface kit.
    
    	- Win
    
2551.2ADOMV1::MCGHIESun May 14 1989 22:5311
    Thanks Win,
    
    yes, I did by the simplfied Amiga library.
    
    I think I came across something in the Amiga_tech notesfile the
    other day though which indicated you could message the console driver
    or something to get a window pointer back - somebody wanted to write
    a change font program.
    
    thanks again
    	Mike
2551.3Fancy CodingTLE::RMEYERSRandy MeyersMon May 15 1989 21:0919
Re: .0

What you want to do falls into "advanced" Amiga programming.

Unfortunately, the Amiga folks made it a bit too hard in my opinion
to do what you want here, but there is support for it in the system.

Get the AmigaDOS manual published by Bantam.  In the back, there is
a section on sending packets to AmigaDOS devices.  Packets are Exec
messages that AmigaDOS uses internally to do I/O.  For example, the
Read() AmigaDOS function send a packet to the device asking it to
read the data into the supplied buffer, and then waits for the device
to reply.  "Device" in this context means an AmigaDOS device driver.
There are some packet types that do not correspond to a nice AmigaDOS
function.  There is a report the name of your disk volume packet that
if you send it to a CON: window handler will return a pointer to
the console.device window used for the window in question.

I've written C code to do this stuff.  It takes about 2 pages of code.
2551.4Get Amiga TransactorWJG::GUINEAUWed May 17 1989 14:287
Better yet, get this months Amiga Transactor. John Toebes and another guy wrote
a very extensive list of ALL known DOS packets and some good examples
on thier use. They plan on actually implementing a file system in next
months installment - lending to device driver writers knowledge!

John
2551.5ADOMV1::MCGHIEThu May 18 1989 02:4019
    re: .3
    
    Thanks Randy,
    
     I'd found an example of getting the CON: packet in
    a C program from one of the Fish Disks (thanks to whoever was
    responsible for putting all of the FF disks on-line!). I haven't
    tried it yet, but when I get some free time (this weekend I hope)..
    
    re:	.4
    
    I have one copy of Transactor (it's not recent). I looked for it
    in a few places in Mass. when I was visiting the other month, but
    couldn't see any recent editions, so I thought maybe it'd gone
    belly-up. Is there an address for subscriptions etc for Tansactor?
    
    thanks
    	Mike