Download spin-cursor-101-c.hqx (100,385 KB)
Date: Fri, 11 Sep 92 16:52:32 GMT-0500
From: rudman@mondo.engin.umich.edu
Subject: [*] SpinCursor Library 1.01
NOTICE: This should replace the older version of the library
This is the SpinCursor library, AGAIN ... UGH.
Some of you may have already noticed there was no protection against
installing more than once, and so the cursor jumped all over the place
before finally dying a horribly yucky death. I installed a global variable
called gCursInstalled, and this will fix it; now you can call
BeginSpinning() and StopSpinning() without worry as to what will happen.
Some notes for first-time users (read: people unaware of what a VBL task
can do)
o VBL-based spinning cursors will probably continue to spin even after the
Macintosh has crashed. During true Mac crashes, however, the cursor
will
not MOVE anywhere, it will just spin. Good? Bad? You be the judge.
o It would be a nice gesture for you to call StopSpinning() if you receive
a suspend event, and then BeginSpinning() (if necessary) when you
receive
the resume event. Otherwise, you may be "giving the gift of spinning
love"
to other processes; this is defined in the dictionary as "NOT NICE".
o Before you allow a user to quit your program, you should issue a
StopSpinning() just to be on the safe side. Otherwise, the VBL will
remain in memory, and it will attempt to JMP to a CODE which is no
longer
available. Can we say "crash" boys and girls? I knew you could...
o Some people are very, very accute, and they have noticed some small
flicker
in the spinning cursors. This is because the calls to SetCursor are NOT
always called in sync with the actual monitor vertical retrace. I will
be
working on this; in the mean time, it's just a SMALL flicker, more
noticeable
on machines with nice big 16" screens.
o Okay, here's the scoop: SetCursor DOES NOT MOVE MEMORY under these
conditions. SetCCursor MIGHT, however. Nobody at Apple was willing to
try
and put a color example into the new Inside Macintosh line of books, so
I
thought OK, I will. According to someone who sounds like they know, the
color cursor call has a 0.1% chance of failing. I say, Hell... I lock
everything and do the best job I can of keeping things from moving. I
guess
with something as sick as a VBL, anything can happen; but I say it's
safe.
If you have any comments, questions, or suggestions, please feel free to
send me mail personally (no, you don't have to voice your opinions over the
net ;) )
send to: rudman@engin.umich.edu
--------------------------------------------------------------------------
Daniel E. Rudman
The University of Michigan
Computer-Aided Engineering Network
Macintosh Systems Administration