home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Frameworks / MacZoop 1.6.5 / Basic Classes / Z Headers / CursorUtilities.h next >
Encoding:
C/C++ Source or Header  |  1997-02-26  |  1.7 KB  |  89 lines  |  [TEXT/MPCC]

  1. /*************************************************************************************************
  2. *
  3. *
  4. *        CursorUtilities.h            - cursor stuff- spinning watch, etc
  5. *
  6. *        26/9/94        ©1994, Graham Cox
  7. *
  8. *************************************************************************************************/
  9.  
  10. #pragma once
  11.  
  12. #ifndef __CURSORUTILITIES__
  13. #define __CURSORUTILITIES__
  14.  
  15. #include    <Retrace.h>
  16.  
  17. // animated cursor record
  18.  
  19. #if PRAGMA_ALIGN_SUPPORTED
  20. #pragma options align=mac68k
  21. #endif
  22.  
  23. typedef struct
  24. {
  25.     unsigned short    numCursors;
  26.     unsigned short    index;
  27.     CursHandle        cursors[1];
  28. }
  29. acur, *acurPtr, **acurHdl;
  30.  
  31. // modified task record
  32.  
  33. typedef struct
  34. {
  35.     VBLTask        theTask;
  36.     long        A5;
  37.     acurHdl        theCursor;
  38. }
  39. VBLTaskWithA5, *VBLTaskWithA5Ptr;
  40.  
  41. #if PRAGMA_ALIGN_SUPPORTED
  42. #pragma options align=reset
  43. #endif
  44.  
  45. // globals- this is OK as we only have one cursor!
  46.  
  47. extern    short                gVBLCount;
  48. extern    VBLTaskWithA5Ptr    gCursorTask;
  49. extern    acurHdl                gWatchSpinner;
  50. extern    acurHdl                gBallSpinner;
  51.  
  52. // prototypes
  53. #ifdef __cplusplus
  54. extern "C"
  55. {
  56. #endif
  57.     
  58.     acurHdl        InitAnimatedCursor(short resID);
  59.     void        StartCursorAnimation(short period,acurHdl theCursor);
  60.     void        StopCursorAnimation(void);
  61.     void        AnimateCursor(short increment,acurHdl theCursor);
  62.     void        LockCursorData(acurHdl theCursor);
  63.     void        UnlockCursorData(acurHdl theCursor);
  64.  
  65.     #ifndef    __powerc
  66.         void        VBLCursorSpin();
  67.     #else
  68.         void        VBLCursorSpin(VBLTaskWithA5Ptr theTask);
  69.     #endif
  70.  
  71.     void        SetWatchCursor();
  72.     void        SetBeachBallCursor();
  73.     short        GetModifiers();
  74.  
  75.     void        AppCursorInit();
  76.     Boolean        CursorAnimating();
  77.  
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81.  
  82. // constants
  83.  
  84. #define        kWatchFrameCount    8
  85. #define        kWatchResID            129
  86. #define        kBeachBallResID        128
  87.  
  88. #endif
  89.