Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cunixf.cc.columbia.edu!cunixb.cc.columbia.edu!es1 From: es1@cunixb.cc.columbia.edu (Ethan Solomita) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Hooks into the OS vs doing it all yourself (Was Re: Clueless Mac<>) Message-ID: <1991Jan31.061011.28172@cunixf.cc.columbia.edu> Date: 31 Jan 91 06:10:11 GMT References: <1991Jan25.075446.716@Neon.Stanford.EDU> <7658@sugar.hackercorp.com> <1991Jan31.011702.12095@Neon.Stanford.EDU> Sender: news@cunixf.cc.columbia.edu (The Daily News) Reply-To: es1@cunixb.cc.columbia.edu (Ethan Solomita) Distribution: usa Organization: Columbia University Lines: 79 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. To quote from the RKM Libs&Devs (Blue) page 165, referring to IDCMP flags: SIZEVERIFY "You set this flag if your program is drawing to the window in such a way that the drawing must be finished before the user sizes the window. If the user tries to size the window, a message is sent to the application and Intuition will Wait() until the program replies. ..." > > 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. Not in this case, I'm afraid. > 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. I'm not sure what you mean, but there are more than enough flags in creating Amiga windows. I've never seen a Mac window look like anything besides a Mac Finder window, so I guess that's not what you're talking about. And on the Amiga you can replace any system function with one of your own writing (affecting the system globally), which (I believe) can also call the original function as well. This has been put to good use by replacing the DisplayBeep() function, used to flash the background when there is an error. The program made it play some digitized sound instead. The was also ew, Exploding Windows, which would do like a Mac and show the window growing to full size by intercepting I assume OpenWindow and CloseWindow. >>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? > From the RKM page 164 GADGETDOWN Your program will receive a message of this class when the user selects a gadget that was created with the GADGIMMEDIATE flag set. GADGETUP When the user releases a gadget that was created with the flag RELVERIFY set, your program will receive a message of this class. >-- >------------------------------------------------------------------------------ >Evan Torrie. Stanford University, Class of 199? torrie@cs.stanford.edu >Today's maxim: All socialists are failed capitalists -- Ethan "It seemed like he appeared on every television show except Wheel of Fortune. You see, he was afraid that Vanna might turn over the 'L' word." -- George Bush attacking Michael Dukakis for going on TV