Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!hsdndev!think.com!mintaka!geech.ai.mit.edu!rjc From: rjc@geech.ai.mit.edu (Ray Cromwell) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Hooks into the OS vs doing it all yourself (Was Re: Clueless Mac<>) Message-ID: <1991Jan31.044116.25645@mintaka.lcs.mit.edu> Date: 31 Jan 91 04:41:16 GMT References: <1991Jan25.075446.716@Neon.Stanford.EDU> <7658@sugar.hackercorp.com> <1991Jan31.011702.12095@Neon.Stanford.EDU> Sender: daemon@mintaka.lcs.mit.edu (Lucifer Maleficius) Distribution: usa Organization: None Lines: 78 In article <1991Jan31.011702.12095@Neon.Stanford.EDU> torrie@cs.stanford.edu (Evan J Torrie) writes: >peter@sugar.hackercorp.com (Peter da Silva) writes: > >>In article <1991Jan25.075446.716@Neon.Stanford.EDU> torrie@cs.stanford.edu (Evan J Torrie) writes: >>> Can your program get its hooks into this event BEFORE the OS gets >>> hold of it and "do its own thing"? > >>Nope. You can tell Intuition the bounds you're willing to let the user manage >>the window within, but that's it. > > Well this will probably cause some flames, but this is an example of >where the Mac is MORE customizable than the Amiga... i.e. where the >user can make things work the way he wants, not the way the OS wants. > I am reminded of a quote in Steve Chernicoff's Macintosh Revealed >book... paraphrasing, he said something like "When Apple released the >Macintosh 128K, critics pounded it for being a closed system. While >their criticisms of the hardware were well-founded, what they didn't >realise was that the Macintosh had an almost completely open software >design". > For example, all the hooks into window definition functions, menu >definition functions, etc... where you can roll your own code, and >make your own windows/menus etc... this is how the Mac gets all those >nice NeXT/Motif type windows without having to rewrite existing >program code. Well the Amiga can do this too, but its not officially supported. Programs can use input handlers to get mouse/key events before intuition gets them, programs can SetFunction() OpenWindow, programs can open their own screen and uses layer's to implement their own windowing system. There are many ways to customize the interface. For instance, there are programs like Exploding Windows, PopUpMenu, Snap, NewLook, NeXTWindows that do a good job of enhancing the Amiga's look. In the area of enhancing the Amiga's environment, users can choose from a wide variety of Shells, Replacement Workbenchs, Mouse Accelerators, Pointer Animators, Screen blankers, Clocks, Gadget Replacements, Screen hacks, input handlers, etc. Look at the Fish collection, over 400 megabytes of Freeware, and atleast 6-10% of it is in the format of user enhancements. > While it means you may have to write more code to handle the general >case, it gives you more control over the final result as well. > >>Amiga scrollbars (proportional gadgets) don't have arrows. If you see an arrow >>the application is managing two gadgets together. But if you want to know how >>Intuition (which, by the way, is not the O/S, it's just another task) knows how >>far you can frag a scrollbar with the mouse, I can tell you that: the >>application tells it how far it can move the knob. > > Can you have callback functions.. i.e. get Intuition to call your >function while it's moving the knob? Not that I know of. I wouldn't want it. Consider a heavy loaded system with the user causing lots of input events. Your call-back function better be damn FAST or your going to suck up lots of CPU. Instead, the Amiga sends messages and you can service these messages at your own leisure, a benefit is that calls to Wait()/GetMsg() can yield the CPU to other tasks while your waiting for a message. If you want the OS to call your functions, install an input handler and have it parse a list and call the appropriate functions, or spawn a task to Wait for messages, and have that task translate those messages into calls to other tasks. Hard? No. Not as easy as call back, but any fairly good Amiga programmer can emulate them with an input handler in a few hours. My question would be, why? I like the message system better. Also, some of the graphics.library functions are call-back (the animation and collision routines) Since when does the Mac have a NeXT/Motif look? If so, is it a PD hack and where can I get it? I want to try it on my friends Amax. I think plain old finder looks horrible, and so do many of the Mac requestors. AmigaDOS 2.0 makes the Mac look like C64 GEOS. >-- >------------------------------------------------------------------------------ >Evan Torrie. Stanford University, Class of 199? torrie@cs.stanford.edu >Today's maxim: All socialists are failed capitalists