home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / Spin Cursor Lib / CSpinner.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-09  |  1.2 KB  |  60 lines  |  [TEXT/KAHL]

  1. #ifndef __SPINNER__
  2. #define __SPINNER__
  3.  
  4. #include <Retrace.h>
  5.  
  6. #ifndef    _Gestalt
  7. #define    _Gestalt        0xA1AD
  8. #endif
  9.  
  10. /* Error codes returned by BeginSpinning */
  11.  
  12. #define    cursNoErr                0
  13. #define    cursResNotFound            -50
  14. #define    cursMemReqFailed        -51
  15. #define    cursVBLNotAvail            -52
  16. #define    cursVBLReqFailed        -53
  17. #define    cursVBLTaskNotFound        -54
  18. #define    cursTaskNotInstalled    -55
  19. #define    cursFatalErr            -56
  20. #define    cursSpinCursResErr        -57
  21. #define    cursCouldNotRelease        -58
  22. #define    cursAlreadyInstalled    -59
  23.  
  24. typedef short int        CursErr;
  25.  
  26. typedef struct {
  27.  
  28.     CursHandle            curs;
  29.     struct CursorList     *nextCurs;
  30.     
  31. } CursorList, *CursorListPtr;
  32.  
  33. typedef struct {
  34.  
  35.     short int            frequency;
  36.     short int            initResID;
  37.     CursorList            *frame;
  38.     CursorList            *cursors;
  39.  
  40. } CursGlobals, *CursGlobalPtr;
  41.  
  42. typedef struct {
  43.  
  44.     VBLTask                vblTask;
  45.     CursGlobals            grec;
  46.     Boolean                cQD;
  47.     Boolean                color;
  48.  
  49. } CursorTask, *CursorTaskPtr;
  50.  
  51. #endif
  52.  
  53. void            SetCQDVar                (void);
  54. CursErr            BeginResSpinning        (short int resID);
  55. CursErr            BeginSpinning            (Boolean color, short int initResID, short int numCursors,
  56.                                             short int initDelay, short int frequency);
  57. pascal void        SpinCursor                (void);
  58. CursErr            StopSpinning            (void);
  59. Boolean            WeCanUseGestalt            (void);
  60. Boolean            IsThisTrapAvailable        (unsigned long int trap);