Path: utzoo!attcan!uunet!decwrl!wuarchive!usc!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: acur resources and animating the cursor Message-ID: <42857@apple.Apple.COM> Date: 11 Jul 90 13:32:23 GMT References: <2966@tellab5.tellabs.com> Organization: Apple Computer Inc, Cupertino, CA Lines: 125 In article <2966@tellab5.tellabs.com> kenk@sunHd.tellabs.com (Ken Konecki) writes: >Is there any documentation on how to use acur resources? I haven't >found anything in IMI-V (at least not in the indices) nor in the >tech notes index. Having poked around with resedit, I know what the >acur resource is, but have no idea how to use it to animate cursors, >except the brute force way of call SetCursor() with each frame in the >acur resource. The Cursor Rotating routines are part of a library that comes with MPW. Documentation for them is scarce, mostly taking form as comments in the header/interface files. Here is the C version. This should have enough information for you to create your own implementation. /************************************************************ Created: Thursday, September 7, 1989 at 9:11 PM CursorCtl.h C Interface to the Macintosh Libraries <<< CursorCtl - Cursor Control Header File >>> Copyright Apple Computer, Inc. 1985-1989 All rights reserved This file contains: InitCursorCtl(newCursors) - Init CursorCtl to load the 'acur' resource RotateCursor(counter) - Sequence through cursor frames for counter mod 32 SpinCursor(increment) - Sequence mod 32 incrementing internal counter Hide_Cursor() - Hide the current cursor Show_Cursor(cursorKind) - Show the cursor ************************************************************/ #ifndef __CURSORCTL__ #define __CURSORCTL__ enum {HIDDEN_CURSOR,I_BEAM_CURSOR,CROSS_CURSOR,PLUS_CURSOR,WATCH_CURSOR, ARROW_CURSOR}; typedef unsigned char Cursors; struct Acur { short n; /*Number of cursors ("frames of film")*/ short index; /* Next frame to show */ short frame1; /*'CURS' resource id for frame #1*/ short fill1; /**/ short frame2; /*'CURS' resource id for frame #2*/ short fill2; /*