Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!shelby!agate!usenet.ins.cwru.edu!ncoast!davewt From: davewt@NCoast.ORG (David Wright) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Hooks into the OS vs doing it all yourself (Was Re: Clueless Mac<>) Message-ID: <1991Feb4.054703.2506@NCoast.ORG> Date: 4 Feb 91 05:47:03 GMT References: <1991Jan25.075446.716@Neon.Stanford.EDU> <7658@sugar.hackercorp.com> <1991Jan31.011702.12095@Neon.Stanford.EDU> Organization: North Coast Public Access Un*x (ncoast) Lines: 38 In article <1991Jan31.011702.12095@Neon.Stanford.EDU> torrie@cs.stanford.edu (Evan J Torrie) writes: >peter@sugar.hackercorp.com (Peter da Silva) 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. He was wrong. > > 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. For an example of this on the Amiga, pick up any number of PD programs that will let you change the appearance of the gadgets without changing any program. And on the Amiga anyone is free to write a new library that does whatever type of window trickery they wish, but most people probobly won't like it. > Can you have callback functions.. i.e. get Intuition to call your >function while it's moving the knob? I'm not sure, but I am almost certain from looking in the manual that your program can receive "gadget moved" messages everytime the gadget moves one notch, which would work functionally the same as a callback. The reason you probobly need these on the Mac is that the Mac tends to treat gadgets as a private thing, which return a certain value to the caller, and without a call back function, you would not be able to do (extra) things while the gadget was selected and being moved (in the special case of the scroll bar, since most other gadgets on both systems return only the selected/ unselected type messages). The file requester provides a way to supply call back functions, if you need to add more gadgets to the requestor for special purposes, or you want to do things while the requester is pulling up a list of files, for example, so I would assume that such a feature is provided elsewhere, if needed. Dave