Xref: utzoo comp.sys.mac.programmer:5369 comp.sys.mac:29544 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer,comp.sys.mac Subject: Re: Need some MF help Keywords: MultiFinder Message-ID: <28689@ucbvax.BERKELEY.EDU> Date: 5 Apr 89 06:05:25 GMT References: <1562@neoucom.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 26 In article <1562@neoucom.UUCP> sam@neoucom.UUCP (Scott A. Mason) writes: >Firstly, what is the standard way of checking for MultiFinder >existence? The standard, from Apple is "Don't even try to do this". Most people do it by checking to see if the end of the system heap is close to the beginning of the application heap. If it is, no multifinder. >Lastly, what is the standard way of keeping track of the windows, >so that it can be redrawn or updated after a MF switch? You've missed the fundamental point of Mac (or X for that matter) programming. Mac programs work by associating a data structure with a window. During the course of the program, it mutates the data structure. There is a "Draw()" function in the program, that can prowl the data structure, drawing as it goes. Call this in response to an Update event, or if you wish to print, call it with the a grafport from the Printer Manager. The specific data structure is what is appropriate for _your_ program. Some programs use an offscreen GrafPort, which they mutate by standard draw commands, but most use higher level data structures than just the raw pixels. (Thus allowing zooming, panning, or other alternate views of the same data.) "Draw()" defines a function from the internal data structures to screen graphics. Many programs define the inverse of this function "Pick()" which lets the user select an object on the screen with the mouse.