🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4656

Re: A Few Questions

#4656
From: Chuck McManis
Date: Wed, 01 Aug 1990 18:28
36 lines
2427 bytes
In article <1139@xroads.UUCP> aman@xroads.UUCP (Chris Minshall) writes:
>1.  What would be the easiest (quick and dirty if necessary) way to get mouse
>    button and movement events without using Intuition?  A code example would
>    be of great help as well!

Don't know why you wouldn't use intution since it is pretty easy to use but
the answer is "replace intuition". (Don't worry, it's easier than it sounds)
Intuition is just an Input Handler on the input food chain. All input to the
Amiga (Mouse, Joystick, Keyboard, timer ticks, etc) come down this food 
chain. You install an input handler "in front" (which means with a higher
priority than intuition) of intuition and the handler then sends you the
events. I caution you that this is _not_ as easy as opening a borderless
backdrop window (uses no memory) to get events from.

>2.  How do you create tasks that will share common data structures within a  
>    program (written in C).  Again, a code examples would be appreciated!

You want to create two tasks that share a common piece of memory? The 
easiest way to do this is to use Message ports as a rendesvous(sp?)
protocol. Create a message port with the shared memory attached in
one of the tasks. Then give it a unique name and add it to the 
public port list with AddPort(). Now you second task can find it with
FindPort(). The other advantage to doing this is that you can also
use the message port to communicate if you want.

>Thanks in advance for any answers!

I would be interested to know _why_ you want to do #1. Clearly I suspect
you don't realize how easy and efficient it is to use intuition but I
can be easily convinced that this is not the case.

--
--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!"
Technical Details
Message-ID: <139960@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!elroy.jpl.nasa.gov!ames!amdcad!sun!stpeter.Eng.Sun.COM!cmcmanis
References: <1139@xroads.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!elroy.jpl.nasa.gov!ames!amdcad!sun!stpeter.Eng.Sun.COM!cmcmanis
From: cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: A Few Questions
Keywords: amiga mouse
Message-ID: <139960@sun.Eng.Sun.COM>
Date: 1 Aug 90 18:28:28 GMT
References: <1139@xroads.UUCP>
Sender: news@sun.Eng.Sun.COM
Organization: Sun Microsystems, Mt. View, Ca.
Lines: 36