Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!sara From: sara@mcvax.cwi.nl (SARA) Newsgroups: comp.sys.mac Subject: Re: Animated watch cursor. Message-ID: <1500@mcvax.cwi.nl> Date: Wed, 4-Feb-87 16:31:38 EST Article-I.D.: mcvax.1500 Posted: Wed Feb 4 16:31:38 1987 Date-Received: Sat, 7-Feb-87 14:57:48 EST References: <7488@decwrl.DEC.COM> <603@runx.OZ> <607@runx.OZ> <176@trwspf.UUCP> <881@aecom.UUCP> Organization: CWI, Amsterdam Lines: 58 Summary: How animated watch cursors are really implemented.. I have written (and posted) the very first running watch for Macintosh (back in 1985) so I'll explain how I did it... Implementing an animated cursor using some predefined cursors and doing a setcursor of these cursors will only work for certain cursor shapes like wheels etc, but NOT for a watch cursor that has both hands running. That would require a huge number of cursors... Now, to make the hands running you could just use QuickDraw for drawing the hands in a small bitmap, the Cursor data. Performing a SetCursor will display the cursor with the updated hands. This way an application can make the hands of a cursor spin. So, here no vertical retrace tasks are used here. This only works WITHIN an application, the application itself must periodically update the cursor. (This was implemented in my TeX Preview program, and before that in a tiny demo program that did nothing but displaying 'Wait' in the Menu Bar and animating the cursor.) Now Servant and the new Finder use this method. To make the hands spin over all applications you need to do more. The only way to get control over the cursor when another application is running is by using a vertical retrace task, that is installed one way or the other. A natural way to install a VR task is using an INIT that installs this task at system startup. However, Vertical retrace tasks are severely limited, for example they cannot even use QuickDraw, as they are not allowed to use any routine that (indirectly) uses the memory manager. First of all the task must determine whether the cursor IS a watch. If it IS it must periodically update the hands to make them spin. The problem is to find out how to do this without using QuickDraw 8-). I have posted the lastest version of my Watch Installer to the moderator of mod.mac.binaries. It installs an INIT in the system that will animate the hands of the watch cursor using the vertical retrace method. Whether ot not you like to have an animated watch on the screen is not only a matter of taste. It depends on the speed of the rotating hands whether it really draws your attention or not. The Finder doen't display a watch cursor very often, and in most cases not very long either. Other applications, like Kermit when down loading a file, display watch cursors at great length. *I* happen to like gently spinning hands, most people don't even notice it until they are told the hands are spinning... Rick Jansen SARA, Amsterdam Universities Bitnet: Rick@hasara5 UUCP: mcvax!rick@hasara5.bitnet