home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Beta / Quicktime 2.0 Beta.iso / Programming Stuff / Interfaces / Universal Interfaces / Timer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-30  |  2.4 KB  |  118 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Timer.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __TIMER__
  13. #define __TIMER__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. /*    #include <MixedMode.h>                                        */
  19. /*        #include <Traps.h>                                        */
  20. #endif
  21.  
  22. #ifndef __OSUTILS__
  23. #include <OSUtils.h>
  24. #endif
  25.  
  26. typedef struct TMTask TMTask, *TMTaskPtr;
  27.  
  28.  
  29. /*
  30.     TimerProcs cannot be written in or called from a high-level 
  31.     language without the help of mixed mode or assembly glue because they 
  32.     use the following parameter-passing convention:
  33.  
  34.     typedef pascal void (*TimerProcPtr)(TMTaskPtr tmTaskPtr);
  35.  
  36.         In:
  37.             =>     tmTaskPtr                A1.L
  38.         Out:
  39.             none
  40. */
  41.  
  42. enum  {
  43.     uppTimerProcInfo            = kRegisterBased|REGISTER_ROUTINE_PARAMETER(1,kRegisterA1,kFourByteCode)
  44. };
  45.  
  46. #if USESROUTINEDESCRIPTORS
  47. typedef pascal void (*TimerProcPtr)(TMTaskPtr tmTaskPtr);
  48.  
  49. typedef UniversalProcPtr TimerUPP;
  50.  
  51. #define CallTimerProc(userRoutine, tmTaskPtr)  \
  52.     CallUniversalProc((UniversalProcPtr)(userRoutine), uppTimerProcInfo, (tmTaskPtr))
  53.  
  54. #define NewTimerProc(userRoutine)  \
  55.     (TimerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppTimerProcInfo, GetCurrentISA())
  56.  
  57. #else
  58. typedef ProcPtr TimerUPP;
  59.  
  60. #define NewTimerProc(userRoutine)  \
  61.     (TimerUPP)(userRoutine)
  62.  
  63. #endif
  64.  
  65. #define kTMTaskActive (1<<15)
  66.  
  67. #if defined(powerc) || defined (__powerc)
  68. #pragma options align=mac68k
  69. #endif
  70. struct TMTask {
  71.     QElemPtr                    qLink;
  72.     short                        qType;
  73.     TimerUPP                    tmAddr;
  74.     long                        tmCount;
  75.     long                        tmWakeUp;
  76.     long                        tmReserved;
  77. };
  78. #if defined(powerc) || defined(__powerc)
  79. #pragma options align=reset
  80. #endif
  81.  
  82. #ifdef __cplusplus
  83. extern "C" {
  84. #endif
  85.  
  86.  
  87. #if USES68KINLINES
  88. #pragma parameter  InsTime(__A0)
  89. #endif
  90. extern pascal void InsTime(QElemPtr tmTaskPtr)
  91.  ONEWORDINLINE(0xA058);
  92.  
  93. #if USES68KINLINES
  94. #pragma parameter  InsXTime(__A0)
  95. #endif
  96. extern pascal void InsXTime(QElemPtr tmTaskPtr)
  97.  ONEWORDINLINE(0xA458);
  98.  
  99. #if USES68KINLINES
  100. #pragma parameter  PrimeTime(__A0, __D0)
  101. #endif
  102. extern pascal void PrimeTime(QElemPtr tmTaskPtr, long count)
  103.  ONEWORDINLINE(0xA05A);
  104.  
  105. #if USES68KINLINES
  106. #pragma parameter  RmvTime(__A0)
  107. #endif
  108. extern pascal void RmvTime(QElemPtr tmTaskPtr)
  109.  ONEWORDINLINE(0xA059);
  110. extern pascal void Microseconds(UnsignedWide *microTickCount)
  111.  FOURWORDINLINE(0xA193, 0x225F, 0x22C8, 0x2280);
  112. #ifdef __cplusplus
  113. }
  114. #endif
  115.  
  116. #endif
  117.  
  118.